[Released] Tasmota Sync - Universal Sensor Driver

EDIT The [RELEASE] version of the conversation starts here and you can find the necessary links for the code and documentation in that post.
END EDIT

Anyone who has a Tasmota device with sensor data might find this driver of interest. Like other Tasmota Sync drivers it does native synchronization between Hubitat and Tasmota 11 or higher without the need for a custom compilation or Webhooks. You can find more information on the Tasmota Sync family of drivers here.

This new driver has several advantages. 1) It does not require the user to specify the name of the sensor. 2) It can handle multiple sensors on the same Tasmota device. 3) Additional sensors can be added with relative ease. 4) You can test your Tasmota sensor data for compatibility before making any changes. I thought Tasmota sensors would be worth having it's own topic.

You can download the driver here.

Instructions for evaluating Tasmota sensor data:

  1. Create a new Virtual Device and select the Tasmota Sync - Universal Multi Sensor driver.
  2. Open the device and "Save Preferences". No need to enter valid IP addresses.
  3. Go to your Tasmota device webpage. It should list the sensor data.
  4. Click on Console
  5. Type 'Status 8'
  6. You will get a response like this.
    20:09:35.079 RSL: STATUS8 = {"StatusSNS":{"Time":"2022-06-12T20:09:35","SI7021":{"Temperature":88,"Humidity":39,"DewPoint":60},"TempUnit":"F"}}
  7. Copy the part including the curly braces which is {"StatusSNS":{"Time":"2022-06-12T20:09:35","SI7021":{"Temperature":88,"Humidity":39,"DewPoint":60},"TempUnit":"F"}} in this case.
  8. Paste it into the field for "Evaluate Sensor Data" like this.
  9. Click on the "Evaluate Sensor Data" button and the screen will refresh and show the extracted data.
  10. Refresh the browser to update the State variable display and show the sensors and triggers extracted.

To test some different data click on "Clear Attributes" and do a browser refresh. Now paste new data into the "Evaluate Sensor Data" field and click on the button. Repeat as many times as you wish. Here is an example of multiple sensors on the same Tasmota device.

The code is not tied to particular sensor names but instead merely looks at their capabilities. The current version of the driver has attributes for the following types of sensors.
Accelerometer, AirQuality, Chemical, Energy, Environmental, Flow, IR, IO, Light-GestureSensor, Load, NFC, Rain, RF and I'm happy to add others as I get samples of their STATUS 8 output.

I say it's a BETA version but that is mainly because I'm going on a trip and won't be able to provide my normal support. If you do install it for a device don't forget to do a "Tasmota Inject Rule" and then set the "TelePeriod" appropriately.

2 Likes

I have installed the sensor after trying two instances of your normal sensor driver. I have a Tasmota 12.0.2 device which has two DS18B20 temp sensors wired to it. Using the original sensor driver the seconds data would always replace the first in my dashboards.

With this driver I see both devices.

State Variables

  • Action : STATUS
  • sensorTriggers : [Tele-DS18B20-2#TEMPERATURE, Tele-DS18B20-1#TEMPERATURE]
  • ActionValue : 8
  • inTransaction : false
  • sensorNames : [DS18B20-2, DS18B20-1]
  • lastSensorData : 2022-06-25 15:51:23
  • startTime : 1656186683982
  • LastSync : 2022-06-25 15:51:24
  • itemNames : [TIME, TEMPUNIT]

but I do not see the two sensors individually where I can use them in a rule or dashboard. They are also not shown separately in the current states section of the HE device page.

In addition, here is a copy of my tasmota console which shows to VARS being set to the same value. Is this correct? One of my sensors is outdoors and the other is in a freezer.

15:45:50.228 CMD: status 8
15:45:50.237 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-06-25T15:45:50","DS18B20-1":{"Id":"011937B1E1FD","Temperature":85.7},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-6.6},"TempUnit":"F"}}
15:49:07.441 MQT: tele/TempSensors/STATE = {"Time":"2022-06-25T15:49:07","Uptime":"1T19:30:10","UptimeSec":156610,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:13:65","Channel":1,"Mode":"11n","RSSI":42,"Signal":-79,"LinkCount":1,"Downtime":"0T00:00:03"}}
15:49:07.452 MQT: tele/TempSensors/SENSOR = {"Time":"2022-06-25T15:49:07","DS18B20-1":{"Id":"011937B1E1FD","Temperature":85.8},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-6.7},"TempUnit":"F"}
15:49:07.466 RUL: TELE-DS18B20-2#TEMPERATURE performs "backlog0 var9 -6.7 ; RuleTimer1 1"
15:49:07.478 MQT: stat/TempSensors/RESULT = {"Var9":"-6.7"}
15:49:07.511 MQT: stat/TempSensors/RESULT = {"T1":1,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
15:49:09.647 RUL: RULES#TIMER=1 performs "var15 '-6.7'"
15:49:09.654 MQT: stat/TempSensors/RESULT = {"Var15":"'-6.7'"}

I also cleared all attributes and resubmitted the status 8 data and got this in the logs

dev:5642022-06-26 04:20:54.393 pm debugType All

dev:5642022-06-26 04:20:54.365 pm infoTemp Monitor - :zero::dash: statusResponse: Exiting

dev:5642022-06-26 04:20:54.361 pm infoTemp Monitor - :zero:statusResponse: STATUS 8 - SENSOR values processed.

dev:5642022-06-26 04:20:54.358 pm infoTemp Monitor - :stop_sign: statusResponse: Error: Unable to match sensor data field 'ID' with a known Hubitat attribute. Is it missing from the attributes section and\or the sensor2AttributeMap?

dev:5642022-06-26 04:20:54.352 pm infoTemp Monitor - :zero:statusResponse: Data is: ID Value: 011937B1E1FD

dev:5642022-06-26 04:20:54.346 pm infoTemp Monitor - :zero:statusResponse: Data is: TEMPERATURE Value: 86.7

dev:5642022-06-26 04:20:54.342 pm infoTemp Monitor - :stop_sign: statusResponse: Error: Unable to match sensor data field 'ID' with a known Hubitat attribute. Is it missing from the attributes section and\or the sensor2AttributeMap?

dev:5642022-06-26 04:20:54.337 pm infoTemp Monitor - :zero:statusResponse: Data is: ID Value: 011937D1CBA3

dev:5642022-06-26 04:20:54.330 pm infoTemp Monitor - :zero:statusResponse: Data is: TEMPERATURE Value: -11.0

dev:5642022-06-26 04:20:54.311 pm infoTemp Monitor - :zero:statusResponse: Raw data is: {"STATUSSNS":{"TIME":"2022-06-26T16:20:33","DS18B20-1":{"ID":"011937B1E1FD","TEMPERATURE":86.7},"DS18B20-2":{"ID":"011937D1CBA3","TEMPERATURE":-11.0},"TEMPUNIT":"F"}}.

dev:5642022-06-26 04:20:04.987 pm debugType All

dev:5642022-06-26 04:20:04.761 pm infoTemp Monitor - :zero:clearAttributes: Clearing All Attributes

Thanks for your help. These are great drives and a vast improvement over parent/child.

Hi, sorry for the slow response but I’m traveling at the moment and have intermittent internet access. I had not really anticipated having multiple sensors of the same type on the device but your use case makes sense.

Good news is that I could add some logic to handle duplicate temp sensors as that is the most likely use case I think. Bad news is I don’t get home for another two weeks. If you are willing to wait I’ll make an update that will work for you.

One question though, do you manually assign the ID value to each sensor?

P.S. Are you running any other of the Tasmota Sync drivers or just for this sensor. Just curious about how much adoption they are getting.

1 Like

Thanks for getting back to me. I can wait. I hope you are enjoying your travels.

I do not manually assign the ID's. The tasmota documentation for this sensor is at DS18x20 temperature sensor - Tasmota. It says each sensor gets a unique id and calls out the max number of sensors (I only have 2 at the moment.)

I have installed another sync driver (sensor) for a current reading device. I run one leg of a 220v circuit through the "donut" and have the analog pin of the 8266 configured for CT POWER. I also have a number of water leak sensors that I have built that I want to move over to these drivers. My goal would be to not need NodeRed but instead do all my logic via Hubitat rules.

I am having a similar problem with this current monitor. The last message shows current, voltage and power values but the state variable all show 0.

Again, thanks for your reply and no rush.
Tom

For some reason your energy stats are reported under CTENERGY vs ENERGY. Should be an easy add to accommodate that type of naming.

Still just over a week left of vacation. Looking forward to being home to be honest.

At what frequency does Tasmota update the power, voltage, current etc. Does it make sense to use these values as triggers vs just using the TelePeriod? You don't want to flood Hubitat with updates every second.
You can find the trigger options for Analog devices here.

I don't really know. It is on the analog pin. I assume upon change of the value. I don't want to use teleperiod b/c I am detecting when a 220v starts drawing current. I then turn on a vacuum attached to my tablesaw blade guard (only if the blade guard is in place). So I need it to react ASAP, not after perhaps 9 seconds of the teleperiod.

I currently have a tasmota rule that watches the energy draw and if over 200 watts it publishes a power on MQTT message and when it falls below that it publishes an off. Node red then picks that up and performs the rest of the logic.

Hope this helps.

To the best of my knowledge values update once per second and the lowest teleperiod is once every ten seconds.

On the digital energy monitoring in the default settings, the values fluctuate every second, such as voltage even when the downstream device is not turned on. The user can dampen these with ampres and voltres but nevertheless the changes are usually every second when the device is on, depending on the appliance. Sending very frequent changes to Hubitat is a recipe for a slow Hub and poor responsiveness.

I don't know what functions Node Red is performing but if the other device is also Tasmota (or could be Tasmota) I would use a rule\trigger to turn it off\on with Websend. That would give you the lowest response time and the lowest overhead.
WebSend [192.168.0.125] POWER OFF for example.

I will still work on updating the driver to handle ANALOG JSON inputs but I'm going to configure it for TelePeriod as I think that is what is most broadly applicable. You could always edit the rule if you wanted to.

I have updated the driver to handle the ANALOG CTENERGY data. I don't have that hardware but it works with my mock up configuration. You can find the updated version here

Please let me know your results.

I have updated the driver to handle two temperature sensors. Works in my mock up. You can find the updated version [here] but should also be visible in HPM. (Hubitat-Tasmota/Universal_Multi_Sensor.groovy at main · GaryMilne/Hubitat-Tasmota · GitHub)

No Joy! I copied the driver and did a manual install (it was not showing up as an update in HPM). The code shows a version of

Version 0.99.1 - Added support to handle ANALOG CTENERGY JSON inputs

  • Version 0.99.2 - Added support to handle two TEMPERATURE sensors. Reporting as temperature and temperature1.

Created a new virtual device with type Tasmota Sync - Universal Multi Sensor.
Filled out the IP info, did a status 8 and a rule inject but am only getting a single temp showing.

Here is the log
dev:5912022-07-15 05:13:10.806 pm infoTemperature Monitors - :zero::dash: statusResponse: Exiting

dev:5912022-07-15 05:13:10.802 pm infoTemperature Monitors - :zero:statusResponse: STATUS 8 - SENSOR values processed.

dev:5912022-07-15 05:13:10.800 pm infoTemperature Monitors - :stop_sign: statusResponse: Error: Unable to match sensor data field 'ID' with a known Hubitat attribute. Is it missing from the attributes section and\or the sensor2AttributeMap?

dev:5912022-07-15 05:13:10.796 pm infoTemperature Monitors - :zero:statusResponse: Data is: ID Value: 011937B1E1FD

dev:5912022-07-15 05:13:10.792 pm infoTemperature Monitors - :zero:statusResponse: Data is: TEMPERATURE Value: 86.8

dev:5912022-07-15 05:13:10.772 pm infoTemperature Monitors - :stop_sign: statusResponse: Error: Unable to match sensor data field 'ID' with a known Hubitat attribute. Is it missing from the attributes section and\or the sensor2AttributeMap?

dev:5912022-07-15 05:13:10.769 pm infoTemperature Monitors - :zero:statusResponse: Data is: ID Value: 011937D1CBA3

dev:5912022-07-15 05:13:10.762 pm infoTemperature Monitors - :zero:statusResponse: Data is: TEMPERATURE Value: -9.7

dev:5912022-07-15 05:13:10.754 pm infoTemperature Monitors - :zero:statusResponse: Raw data is: {"STATUSSNS":{"TIME":"2022-07-15T17:13:09","DS18B20-1":{"ID":"011937B1E1FD","TEMPERATURE":86.8},"DS18B20-2":{"ID":"011937D1CBA3","TEMPERATURE":-9.7},"TEMPUNIT":"F"}}.

dev:5912022-07-15 05:13:10.592 pm debugType All

dev:5912022-07-15 05:13:10.526 pm infoTemperature Monitors - :zero::telephone_receiver: callTasmota: Sending command: STATUS 8

dev:5912022-07-15 05:13:10.521 pm infoTemperature Monitors - :zero::zap: Action: Refresh started....

dev:5912022-07-15 05:13:10.497 pm infoTemperature Monitors - :zero::zap: Action: Initialize/Update Device

Thanks for your help with this.

Please send the updates sent from Tasmota, should begin {'Tsync.....

16:40:18.852 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T16:40:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.6},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.5},"TempUnit":"F"}
16:40:18.866 RUL: TELE-DS18B20-2#TEMPERATURE performs "backlog0 var9 -9.5 ; RuleTimer1 1"
16:40:18.878 MQT: stat/TempSensors/RESULT = {"Var9":"-9.5"}
16:40:18.901 MQT: stat/TempSensors/RESULT = {"T1":1,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
16:40:20.862 RUL: RULES#TIMER=1 performs "var15 '-9.5'"
16:40:20.869 MQT: stat/TempSensors/RESULT = {"Var15":"'-9.5'"}
16:45:18.846 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T16:45:18","Uptime":"21T20:26:21","UptimeSec":1887981,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":46,"Signal":-77,"LinkCount":15,"Downtime":"0T00:00:44"}}
16:45:18.857 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T16:45:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.0},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.5},"TempUnit":"F"}
16:45:18.870 RUL: TELE-DS18B20-2#TEMPERATURE performs "backlog0 var9 -9.5 ; RuleTimer1 1"
16:45:18.881 MQT: stat/TempSensors/RESULT = {"Var9":"-9.5"}
16:45:18.903 MQT: stat/TempSensors/RESULT = {"T1":1,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
16:45:20.813 RUL: RULES#TIMER=1 performs "var15 '-9.5'"
16:45:20.820 MQT: stat/TempSensors/RESULT = {"Var15":"'-9.5'"}
16:50:18.811 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T16:50:18","Uptime":"21T20:31:21","UptimeSec":1888281,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":44,"Signal":-78,"LinkCount":15,"Downtime":"0T00:00:44"}}
16:50:18.823 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T16:50:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.2},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.5},"TempUnit":"F"}
16:50:18.837 RUL: TELE-DS18B20-2#TEMPERATURE performs "backlog0 var9 -9.5 ; RuleTimer1 1"
16:50:18.849 MQT: stat/TempSensors/RESULT = {"Var9":"-9.5"}
16:50:18.870 MQT: stat/TempSensors/RESULT = {"T1":1,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
16:50:20.834 RUL: RULES#TIMER=1 performs "var15 '-9.5'"
16:50:20.841 MQT: stat/TempSensors/RESULT = {"Var15":"'-9.5'"}
16:55:18.830 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T16:55:18","Uptime":"21T20:36:21","UptimeSec":1888581,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":46,"Signal":-77,"LinkCount":15,"Downtime":"0T00:00:44"}}
16:55:18.842 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T16:55:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.6},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.6},"TempUnit":"F"}
16:55:18.855 RUL: TELE-DS18B20-2#TEMPERATURE performs "backlog0 var9 -9.6 ; RuleTimer1 1"
16:55:18.868 MQT: stat/TempSensors/RESULT = {"Var9":"-9.6"}
16:55:18.891 MQT: stat/TempSensors/RESULT = {"T1":1,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
16:55:20.858 RUL: RULES#TIMER=1 performs "var15 '-9.6'"
16:55:20.865 MQT: stat/TempSensors/RESULT = {"Var15":"'-9.6'"}
16:55:20.914 RUL: VAR15#STATE$!%VAR16% performs "backlog ; var16 '-9.6' ; webquery http://192.168.86.207:39501/ POST {'TSync':'True','temperature':'-9.6'}"
16:55:20.948 MQT: stat/TempSensors/RESULT = {"Var16":"'-9.6'"}
16:55:21.339 MQT: stat/TempSensors/RESULT = {"WebQuery":"Done"}
16:59:22.820 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-07-15T16:59:22","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.2},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.6},"TempUnit":"F"}}
16:59:51.664 CMD: status 8
16:59:51.673 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-07-15T16:59:51","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.3},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.6},"TempUnit":"F"}}
17:00:18.853 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T17:00:18","Uptime":"21T20:41:21","UptimeSec":1888881,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":46,"Signal":-77,"LinkCount":15,"Downtime":"0T00:00:44"}}
17:00:18.865 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T17:00:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.3},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.6},"TempUnit":"F"}
17:00:18.882 RUL: TELE-DS18B20-2#TEMPERATURE performs "backlog0 var9 -9.6 ; RuleTimer1 1"
17:00:18.897 MQT: stat/TempSensors/RESULT = {"Var9":"-9.6"}
17:00:18.925 MQT: stat/TempSensors/RESULT = {"T1":1,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
17:00:20.812 RUL: RULES#TIMER=1 performs "var15 '-9.6'"
17:00:20.823 MQT: stat/TempSensors/RESULT = {"Var15":"'-9.6'"}
17:00:20.961 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-07-15T17:00:20","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.3},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.6},"TempUnit":"F"}}
17:00:32.887 RUL: Stored uncompressed, would compress from 450 to 254 (-44%)
17:00:32.892 MQT: stat/TempSensors/RESULT = {"Rule3":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":450,"Free":61,"Rules":"ON Tele-HX711#ABSRAW DO backlog0 var12 %value% ; RuleTimer1 1 ENDON ON Tele-HX711#WEIGHT DO backlog0 var13 %value% ; RuleTimer1 1 ENDON ON Tele-HX711#WEIGHTRAW DO backlog0 var14 %value% ; RuleTimer1 1 ENDON ON Rules#Timer=1 DO var15 '%var12%','%var13%','%var14%' ENDON ON var15#State$!%var16% DO backlog ; var16 %var15% ; webquery http://192.168.86.207:39501/ POST {'TSync':'True','ABSRAW':'%var12%','WEIGHT':'%var13%','WEIGHTRAW':'%var14%'} ENDON "}}
17:00:38.097 MQT: stat/TempSensors/RESULT = {"Rule3":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":450,"Free":61,"Rules":"ON Tele-HX711#ABSRAW DO backlog0 var12 %value% ; RuleTimer1 1 ENDON ON Tele-HX711#WEIGHT DO backlog0 var13 %value% ; RuleTimer1 1 ENDON ON Tele-HX711#WEIGHTRAW DO backlog0 var14 %value% ; RuleTimer1 1 ENDON ON Rules#Timer=1 DO var15 '%var12%','%var13%','%var14%' ENDON ON var15#State$!%var16% DO backlog ; var16 %var15% ; webquery http://192.168.86.207:39501/ POST {'TSync':'True','ABSRAW':'%var12%','WEIGHT':'%var13%','WEIGHTRAW':'%var14%'} ENDON "}}
17:00:43.519 MQT: stat/TempSensors/RESULT = {"Time":"2022-07-15T17:00:43","Uptime":"21T20:41:46","UptimeSec":1888906,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":46,"Signal":-77,"LinkCount":15,"Downtime":"0T00:00:44"}}
17:00:48.845 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-07-15T17:00:48","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.4},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.6},"TempUnit":"F"}}
17:05:18.805 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T17:05:18","Uptime":"21T20:46:21","UptimeSec":1889181,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":48,"Signal":-76,"LinkCount":15,"Downtime":"0T00:00:44"}}
17:05:18.819 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T17:05:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.9},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.6},"TempUnit":"F"}
17:10:18.827 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T17:10:18","Uptime":"21T20:51:21","UptimeSec":1889481,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":20,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":46,"Signal":-77,"LinkCount":15,"Downtime":"0T00:00:44"}}
17:10:18.841 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T17:10:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.6},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.7},"TempUnit":"F"}
17:11:16.968 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-07-15T17:11:16","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.6},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.7},"TempUnit":"F"}}
17:12:53.250 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-07-15T17:12:53","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.8},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.7},"TempUnit":"F"}}
17:13:09.989 MQT: stat/TempSensors/STATUS8 = {"StatusSNS":{"Time":"2022-07-15T17:13:09","DS18B20-1":{"Id":"011937B1E1FD","Temperature":86.8},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.7},"TempUnit":"F"}}
17:15:18.845 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T17:15:18","Uptime":"21T20:56:21","UptimeSec":1889781,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":42,"Signal":-79,"LinkCount":15,"Downtime":"0T00:00:44"}}
17:15:18.860 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T17:15:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":87.0},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.7},"TempUnit":"F"}
17:20:18.818 MQT: tele/TempSensors/STATE = {"Time":"2022-07-15T17:20:18","Uptime":"21T21:01:21","UptimeSec":1890081,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":24,"Wifi":{"AP":1,"SSId":"ValleyHome","BSSId":"70:3A:CB:5C:58:88","Channel":6,"Mode":"11n","RSSI":44,"Signal":-78,"LinkCount":15,"Downtime":"0T00:00:44"}}
17:20:18.830 MQT: tele/TempSensors/SENSOR = {"Time":"2022-07-15T17:20:18","DS18B20-1":{"Id":"011937B1E1FD","Temperature":87.5},"DS18B20-2":{"Id":"011937D1CBA3","Temperature":-9.7},"TempUnit":"F"}

I'm going to PM you and we'll take it off the main thread.

Tasmota Sync - Universal Multi Sensor Driver [Release]
This is the initial release of the Tasmota Sync - Universal Multi Sensor Driver.
It differs from the earlier versions in several ways.

  1. It detects the sensors and datatypes that you have installed.
  2. It can handle multiple sensors on the same Tasmota device.
  3. It can handle multiple instances of the same type of sensor on the Tasmota device.
  4. The "with Relays" version can handle up to two attached power relays in tandem with the sensors.

There are a couple of changes in behavior that should be compatible with existing rules you may have defined but I want to point them out as I think this will be how I address switches\relays in future.

In Tasmota switches are defined as Switch 1 - 8. In Hubitat the first switch is "switch" and it is at the programmers discretion what subsequent switches are named but most commonly the sequence goes switch, switch1, switch2 etc. or switch, switch2, switch3 etc.

What I have elected to do in this driver (and in future releases of other Tasmota Sync drivers) is to link switch and switch1 attributes and provide both an "on" and "switch1On" (and off) commands. Executing either of these commands will send a "POWER1 ON" and if successful turn on BOTH the switch and switch1 attributes. This allows the numbering of switches to be consistent between Tasmota and Hubitat. It also allows the use of the Hubitat "switch" attribute to be accessed via the switch capability, whereas switch1 - switch8 must be referenced via custom attributes.

These drivers can be found on HPM but they are added as new drivers and will not update any existing Tasmota Sync sensor drivers.

Handles this device no problem and its pretty loaded.

You can also find the drivers here. Variants are:
Universal Multi Sensor, Universal Multi Sensor Single Relay, Universal Multi Sensor Double Relay.

Documentation is here: https://github.com/GaryMilne/Hubitat-Tasmota/blob/main/Tasmota%20Sync%20Sensor%20Documentation.pdf

Please be sure you read the docs before posting questions.

2 Likes

Hi @garyjmilne - as mentioned in the other thread, the new universal sensor driver works great - thank you very much for your efforts on it.

I don't know how many guys are doing this type of thing - using Tasmota on a Wemos D1 or ESP32 to pick up multiple sensors and relays, but I have found it very useful around our property. So I thought I would just document how I got the temperature sensors to work in rules & dashboards - to save anyone else the reading and time I have taken.

My one ESP32 has 3 x DS18B20's picking up various temperatures on a water heater. The water heater is primarily solar heated with electrical backup if required - so I have a DS18B20 at the inlet & outlet of the water heater as well as at the solar panel on the roof. I set up a single rule that updates 3 x global variables every 5 minutes with the temperatures from the ESP32. The global variables are set with temperature 'connectors' - this creates a single parent device with the 3 temperatures which can be named as you please. From there it is very easy to have a multi-tile display, plus use the individual temperatures in rules as required.

Hope this assists others in the future.

Anyone interested in the Tasmota Sync drivers should also take a look at this companion app I wrote to distribute commands to multiple Tasmota devices at the same time. Makes a lot of things easier.

2 Likes

Just a further refinement for anyone interested. I added a fourth DS18B20 probe which works fine. But I noticed after some time that the ESP's onboard CPU temperature reading was somehow being reported in HE in place of one of the four DS18B20 probes. Running the 'Status 8' command in Tasmota and then pasting the info in 'Evaluate Sensor Data' in HE would sort it out for a day or so, but the problem would return.
So finally I researched it and it is possible to de-activate the ESP's onboard temperature. Per this page, you can use the ' SetSensor127 0' command to do this. The onboard temperature sensor only measures the CPU temperature - not the environment the MCU is in, so not much point. Since I made this change, no 'cross-reporting' of the probes in HE.

1 Like

Hi @garyjmilne - I noticed the drivers for the multi sensors are still the same version as a few months ago.

The ability to create child devices with the other driver updates is great - thank you very much! It also simplifies things in HE quite a bit for me. Just wondering if there were any plans to do the same 'child device' changes for the multi-sensor drivers?

I can't say there was a plan but now that someone has asked it is on my radar. I'm coming to the end of a big dev project so I can't say it's imminent, but I think sometime in May is highly likely.