How to use TASMOTA inside BLYNK and HOME ASSISTANT [Work in Progress]

Congratulations I used the QR code to load the project. You could kindly share the integral code with the links, I am very grateful.

If you read my Post you will find all the codes on this page beginning from “HERE”.


As you can see with a Nodemcu with FW Tasmota 6.5 and with my PZEM-004T V3, I was able to correctly visualize the electrical energy measurement. Now I would like to see what Blynk did like you did, but I wouldn’t know how to do it if you could help me. Thank you so much .

@Diego_La_Mattina
pls. read more you will find all you need in this page.

2 Likes

Ok ok I’ll read it right and see if we understand something. But did you use Version 1 or Version 3 of the PZEM004T to make the energy meter? Thank you very much for answering me

To RESET ENERGY in Tasmota

Open “Console Menu” then
Type:
EnergyReset1 0 - to reset Energy Today
EnergyReset2 0 - to reset Energy Yesterday
EnergyReset3 0 - to reset Energy Total & Total Start Time

Command Parameters
EnergyReset1 0..42500 = (§re)set Energy Today in Wh
EnergyReset2 0..42500 = (§re)set Energy Yesterday in Wh
EnergyReset3 0..42500000 = (§re)set Energy Total in Wh
  • Something IMPORTANT I need to add :

All libraries (Ver.) I used in my BLYNK scketchs are the same Libraries selected by TASMOTA

  #include <ESP8266WiFi.h>
  #include <ESP8266mDNS.h>
  #include <WiFiUdp.h>
  #include <ArduinoOTA.h>
  #include <PubSubClient.h>
  #include <ArduinoJson.h>
1 Like

Very interesting subjects. I will try Tasmota.

1 Like

Latest release for MQTT-Explorer

3 Likes

Anyone who uses MQTT should be using the fantastic MQTT Explorer.
I just wish that there was something half as good for iOS.

Thanks @ThomasN for your great product.

Pete.

2 Likes

Tasmota is every where .

1 Like

@PeteKnight
Thanks, but I am Thomas Nurmberg.

1 Like

Ha Ha, apologies!
I’d received email alerts from Thomas Nordquist about the new release, after reporting a few bugs to him and suggesting some improvements.
When I saw this Github link, posted by someone with the name Thomas N, I put two and two together and came up with five!

Pete.

3 Likes

“BLYNK” Tasmota Project _# 6

  • TASMOTA “RF” Control

HARDWARE

I found that QIACHIP are the best modules to work with Tasmota & Blynk.

Transmitter 433Mhz

Receiver 433Mhz

Antennas (short ones are for Transmitters & long for Receivers)

  1. 433Mhz antennas

  2. Make a Simple 433MHz Antenna for Long Range Use

  3. a 315Mhz DIY antenna

or

Transmitter 315Mhz

Receiver 315Mhz

  • 1x Any ESP Device (NodeMCU, Wemos D1, ESP-01)

I use GPIO14 (Sensor) to catch the RF signal on RFrecv(106)


My 433Mhz RF Remotes



“ITEAD” RF REMOTE 433MHZ 4-BUTTON

My 315Mhz RF Remotes

3 Likes
  • How Tasmota Decode the RF Signal :

When you press any button on an RF remote, a signal is received by all the receiver modules in your home connected to the ESPs. (in my case GPIO14 or D5) .

If you open the Console menu of (ex: “Bedroom”) you will find a line containing the RfReceived Data in HEX.

13:52:26 RSL: RESULT = {"Time":"2019-10-04T13:52:26","RfReceived":{"Data":"0x5555C0","Bits":24,"Protocol":1,"Pulse":464}}

if you are using MQTT it will show like this.

13:31:40 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:40","RfReceived":{"Data":"0x5555C0","Bits":24,"Protocol":1,"Pulse":464}}

this is an example of 3 buttons pressed successively

13:31:40 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:40","RfReceived":{"Data":"0x5555C0","Bits":24,"Protocol":1,"Pulse":464}}
13:31:42 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:42","RfReceived":{"Data":"0x5555C3","Bits":24,"Protocol":1,"Pulse":464}}
13:31:44 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:44","RfReceived":{"Data":"0x5555CC","Bits":24,"Protocol":1,"Pulse":465}}

now you have to decide which button you will use to { Turn On, Turn Off or Toggle } Relay1 and Relay2 to write the “RULE”.

ex: for 315 Mhz Bedroom

Rule1
on RfReceived#Data=0x4050C0 do power1 2 endon
on RfReceived#Data=0x405030 do power2 2 endon
on RfReceived#Data=0x40500C do backlog power1 1; power2 1 endon
on RfReceived#Data=0x405003 do backlog power1 0; power2 0 endon

Rule1 definition :
if button 3 on RF Remote is pressed Toggle Power1 Relay
if button 4 on RF Remote is pressed Toggle Power2 Relay
if button 1 on RF Remote is pressed Turn ON Power1 and Power2 Relays
if button 2 on RF Remote is pressed Turn OFF Power1 and Power2 Relays

when you send the Rule it has to be on one Line

don’t forget to turn on the Rule by sending

Rule1 1

If you want to use “2 RF Remotes” one inside the Bedroom and another one with 12 Buttons controlling all your house

Rule1
on RfReceived#Data=0x4050C0 do power1 2 endon
on RfReceived#Data=0x405030 do power2 2 endon
on RfReceived#Data=0x40500C do backlog power1 1; power2 1 endon
on RfReceived#Data=0x405003 do backlog power1 0; power2 0 endon
on RfReceived#Data=0x55550F do power1 2 endon
on RfReceived#Data=0x555530 do power2 2 endon
on RfReceived#Data=0x55550C do backlog power1 0; power2 0 endon
on RfReceived#Data=0x555503 do backlog power1 1; power2 1 endon

by pressing the button with code 0X555530 twice Relay2 will change from ON to OFF then to ON and your Console menu will show these lines

02:25:03 RUL: RFRECEIVED#DATA=0X555530 performs "power2 2"
02:25:03 MQT: Bedroom/stat/RESULT = {"POWER2":"OFF"}
02:25:03 MQT: Bedroom/stat/POWER2 = OFF
02:25:05 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-05T02:25:05","RfReceived":{"Data":"0x555530","Bits":24,"Protocol":1,"Pulse":458}}

02:25:05 RUL: RFRECEIVED#DATA=0X555530 performs "power2 2"
02:25:05 MQT: Bedroom/stat/RESULT = {"POWER2":"ON"}
02:25:05 MQT: Bedroom/stat/POWER2 = ON

Also Panel Remote Transmitter can be used


see @Blynk_Coeur Topic Panel Remote Transmitter 3 Buttons

also his Blynk sketch HERE

a video on radio remote controls

5 Likes

Can we use tasmota RFSend (105) with a web interface like the Sonoff RFBridge module (25).

1 Like

@MDI
This is a good question, if you mean to use the 16 keys of the Sonoff Bridge to send RF Signal by using Rules like
" Rule on RfKey1#State do RfSend 12345 endon "
No, that is not possible.

Arendst said
“Sonoff Bridge is dedicated hardware using an ESP8266 and a RF microcontroller. This doesn’t look like a Wemos D1 and a RF transmitter”

You can find a detailed answer in this Link below.
Management of RF 433 MHz by means of RfKey and Rules

2 Likes

To transmit an RF signal with RFSend(105) using Tasmota web Interface here is how I manage it.
Perhaps there is a better way I don’t known, but my way is working fine.

I select the 8 available Relays so now I have 8 Buttons I can Toggle from OFF to ON and vice versa .
But in our case we need them to act as Push Buttons, this is accomplished by Rules.

RF Transmitter

Rule1 
on power1#State=1 do backlog RfSend 0x514155,24,1 ; ruletimer1 1 endon on rules#timer=1 do power1 off endon
on power2#State=1 do backlog RfSend 0x5D5755,24,1 ; ruletimer2 1 endon on rules#timer=2 do power2 off endon
on power3#State=1 do backlog RfSend 0X555530,24,1 ; ruletimer3 1 endon on rules#timer=3 do power3 off endon
on power4#State=1 do backlog RfSend 0x514155,24,1 ; RfSend 0x5D5755,24,1 ; ruletimer4 1 endon on rules#timer=4 do power4 off endon

This is an example for the first 4 buttons, you can send one, two or more RF codes with a single button.
also instead of writing the RF code in Hex you can write in Decimal (ex: 0x514155 Hex equal ‭5325141‬ Decimal).
when you turn ON any of the first 4 buttons the corresponding RF code will be sent then it will turn OFF after 1 sec. Ruletimer<x> 1

Console menu

11:45:48 RSL: RESULT = {"POWER1":"ON"}
11:45:48 RSL: POWER1 = ON
11:45:48 RUL: POWER1#STATE=1 performs "backlog RfSend 0x514155,24,1 ; ruletimer1 1"
11:45:48 RSL: RESULT = {"RFSend":"Done"}
11:45:48 RSL: RESULT = {"T1":1,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
11:45:50 RUL: RULES#TIMER=1 performs "power1 off"
11:45:50 RSL: RESULT = {"POWER1":"OFF"}
11:45:50 RSL: POWER1 = OFF
11:46:55 RSL: RESULT = {"POWER2":"ON"}
11:46:55 RSL: POWER2 = ON
11:46:55 RUL: POWER2#STATE=1 performs "backlog RfSend 0x5D5755,24,1 ; ruletimer2 1"
11:46:56 RSL: RESULT = {"RFSend":"Done"}
11:46:56 RSL: RESULT = {"T1":0,"T2":1,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
11:46:58 RUL: RULES#TIMER=2 performs "power2 off"
11:46:58 RSL: RESULT = {"POWER2":"OFF"}
11:46:58 RSL: POWER2 = OFF
3 Likes

These binaries are based on the 2.6 core

Now all Pre-compiled binaries for Tasmota are based on the 2.6.1 core

1 Like