I assume that it depends on how the SonOff publishes the info.
If it publishes Temp info on a seperate topic (e.g. /tele/sonoff_vu/SENSOR/Temp) you wouldn’t need a transformation
In this case, the MQTT message is not a simple string or number but a json payload so you need to “extract” the desired info from it.
I see the items in my panel, but there is just a “-” instead of value. The log says this every time sonoff updates the temp&hum:
22:26:14.941 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'back_temp'
22:26:14.943 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'back_hum'
Does someone know what the warning is about? Sounds a bit like the JSON transformer would not work?
BTW, JSON transformer is on the bundles:
openhab> bundle:list |grep -i jsonpath
198 | Active | 75 | 0.9.0.b4 | Eclipse SmartHome JSonPath Transformation Service
uuuuughh… Damned. I just copy pasted the lines from your another post without checking it all. The DHT is misspelled there, it should be DHT instead of DTH. Works now. Well, hopefully someone gets to reuse these settings
Thanks for the thread, you got me going with this!
I have the same problem as descibed in the 1st post.
5 DS18B20 should be connected via OneWire at a Sonoff Basic (GPIO14).
The shown values in the Sonoff webbrowser are OK, but Openhab doesn’t show anything. The solution of the 1st post doesnt’t help.
Jsonpath AddOn is installed (is there anything to do?)
Switching of the Sonoff relay is possible. Maybe any value is wrong in the .items or any selection in the Sonoff.
The entry in the .items is following:
Number HWR1_Temp2 “Temperature Kreis 2[%.2f °C]” (La_Labor)
Number HWR1_Temp3 “Temperature Kreis 3[%.2f °C]” (La_Labor)
the problem with the DS18x20 Sensors is solved. The Topics of the Sonoff and the MQTT-Message in the .items have not matched.
Now, I have a new problem. All is working fine, if I connect max. 4 sensors. If I connect a 5th sensor, a huge error message occurs in the openhab logs and all sensors are off. In the Sonoff browser all 5 sensors are working correct. I have changed the sensors - all sensors are working only in a combination of 4 sensors.
I have no idea, how I can find the cause.
Does somebody has any idea?
I’m not sure, if I’m can solve your problem (I’m a newby).
First test your setup with one sensor. My setup works only with 4 sensors. If I connect the 5th sensor, a large errormessage occurs and all sensors are off.
The Sonoff has to be programmed with a software supporting multiple sensors. In the user_config.h following change has to be made:
//#define USE_DS18x20 // Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1.3k code)
#define USE_DS18x20_LEGACY // Optional for more than one DS18x20 sensors with dynamic scan using library OneWire (+1.5k code)
I’m a newby too. I have the multiple sensors sending mqtt data to my raspberrypi with mosquito installed. I just couldn’t figure out the items part. Thank you so much for sharing your config. I will try replicating that on mine tonight after work. Thanks again.