If you explain what you want to do someone will help
For example I want to switch on a relay if the temperature is higher than 25C
Otherwise it’s too vague.
Regards
Phil K
Sent from Mail for Windows 10
--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You don’t need a rule to read sensors because Tasmota automatically sends it one you configure the module. It is sent by MQTT so you need a MQTT broker. I use Mosquitto.
Here is an example of the output from a TH10 with 5 DS18B20 sensors
19:21:41 MQT: tele/sonoff-pump/SENSOR = {"Time":"2018-09-12T19:21:41","DS18B20-1":{"Id":"0417C15DF4FF","Temperature":20.1},"DS18B20-2":{"Id":"0517C143A6FF","Temperature":19.9},"DS18B20-3":{"Id":"0517C16908FF","Temperature":40.3},"DS18B20-4":{"Id":"0517C172E7FF","Temperature":38.0},"DS18B20-5":{"Id":"0517C17422FF","Temperature":21.4},"TempUnit":"C"}
I don’t know it works in Domoticz but in openHAB you create an item which strips the JSON. This is an example of how to read the first DS18B20 from the MQTT message
Number CHPump_Temperature "CH Flow Temperature [%.1f C]" (GroundFloor, TEMP) {mqtt="<[mosquitto:tele/sonoff-pump/SENSOR:state:JSONPATH($.DS18B20-1.Temperature)]"}
Hope that helps
19:31:47 RSL: tele/Drsjes-118/SENSOR = {"Time":"2018-09-12T19:31:47","COUNTER":{"C1":0},"DS18x20":{"DS1":{"Type":"DS18B20","Address":"28B8A226000080FD","Temperature":22.8},"DS2":{"Type":"DS18B20","Address":"2804371F05000080","Temperature":23.3},"DS3":{"Type":"DS18B20","Address":"28DC20E404000086","Temperature":23.6},"DS4":{"Type":"DS18B20","Address":"284ABA26000080A3","Temperature":22.6},"DS5":{"Type":"DS18B20","Address":"287B351F050000BF","Temperature":23.6},"DS6":{"Type":"DS18B20","Address":"28FF81E463160 ...
Dallas sensors are 1-wire sensors (DS18B20). You need to use the sensors.bin (which it looks like you are using) to use multiple sensors on one GPIO. And it looks like you are seeing the 8 on one GPIO but don’t forget to use a pullup resistor https://github.com/arendst/Sonoff-Tasmota/wiki/Expanding-Sonoffs
There’s information on JSON https://github.com/arendst/Sonoff-Tasmota/wiki/JSON-Status-Responses
The issue seems to be at the Domoticz end as the JSON string has the sensors (DS1 etc) in it. The JSON format is different to mine so that may the Domoticz config. There’s information on Domiticz https://github.com/arendst/Sonoff-Tasmota/wiki/Domoticz and https://github.com/arendst/Sonoff-Tasmota/wiki/Domoticz---Automatic-discovery
In openHAB you create an Item which holds the value which was the example I gave
Number CHPump_Temperature "CH Flow Temperature [%.1f C]" (GroundFloor, TEMP) {mqtt="<[mosquitto:tele/sonoff-pump/SENSOR:state:JSONPATH($.DS18B20-1.Temperature)]"}
This says that the Item stores a Number and it’s referred to as CHPump_Temperature. The next bit explains how to display it then its location and finally how the information comes from MQTT broker..
I don’t know enough about Domoticz but I’m sure somebody else can help with that aspect.