Hi, after i flashed successful a few Sonoff devices, i flashed a Wemos D1 mini as well. I`m using it with a DHT11 and it works in principle. The web GUI shows the temperature and the humidity, as well i can connect via mqtt, using
mosquitto_sub -h 127.0.0.1 -t tele/sonoff/SENSOR
I was creating an item for reading the separated values like
There is most likely something wrong with your JSONPATH. A big problem could be if there are stray characters in the value (e.g. “%” for humidity, leading or trailing white space, quotes, etc) you extract you won’t be able to assign the value to a Number Item.
First, post your full Item definition.
Change its type to String and see if you can tell if there are stray characters in the result. If not create a Rule to log out the String that does get extracted to check it there.
Change its type to String and see if you can tell if there are stray characters in the result. If not create a Rule to log out the String that does get extracted to check it there.
What is the JSONPATH returning? I hate playing 20 questions.
2017-09-12 22:41:02.308 [ERROR] [ssories.AbstractHomekitAccessoryImpl] - Type Temperatur is a org.eclipse.smarthome.core.library.items.StringItem instead of the expected org.eclipse.smarthome.core.library.items.NumberItem
changing back to number and reboot
2017-09-12 22:53:16.765 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperatur'
The error is coming from HomeKit. I don’t care about HomeKit. Remove the Item from HomeKit (what ever that means, I don’t use HomeKit) or just ignore the error for now. It isn’t relevant. Make the Item work and then you can make HomeKit work.
What I need is to know what the JSONPATH is returning.
Keep the Item as a String. Post the JSON. And look in events.log to see what Temperatur is being changed to. If that doesn’t work, create a Rule to print out the state of Temperatur.
Number Therm_Temp "Temperatur [%.2f °C]" <temperature> { mqtt="<[openhab:tele/wemos01/SENSOR:state:JSONPATH($.DS18B20.Temperature)]" }
The sensor is DS18B20, but I think it should be the comparable to DHT.
When changing between Number and String did you also change the placeholder (%s and %.2f) in the Text?
Good evening,
this is my first post in the Community, so sorry if I don’t know how to do it!
I’ve been using openhab2 for a few months with sonoff and tasmota firmware, I’m not a programmer or I’m new to these things.
I am quite satisfied with some results achieved, but now I find myself in trouble with 1 Wemos D1 mini with tasmota firmware and more than 10 Dallas DS18B20.
I can only read 8 sensors, even if I have connected more than 10 sensors.
It is as if 8 were the maximum limit.
Any suggestions?
Thank you
The DS18B20 temperature sensors are on the one wire bus.
They need an address to be differentiated on the bus
It is possible that some of you sensors have duplicated addresses and in that case you won’t be able to read those.
Thank you for your suggestion.
The sensors have different address, I checked them before.
On the tasmota web gui of the wemos I can see only 8 sensors, if I disconnect 1 sensor I will see another sensor that was not reachble before with the right address.
Seems like only 8 sensors at time can be display.
Probably I have to use 2 wemos.
Hi Vincent,
this morning I tried your suggestion with no success.
All the ds18b20 sensors are on 1-wire connection with 3.3v connection and pin 7.
I tried to connect 1 extra ds18b20 to the 5v and pin 1-2-3-4-5-6 with 4.7 resistor but no success.
I tried to connect a dht22 to 5v and pin 1 and is working with no problem.
My opinion is like if tasmota firmware cann’t read more the 8 ds18b20 sensors.
Do you know other way to connect the wemos d1 mini with more sensors and sen the value to mqtt broker and openhab2?
Hi Vincent,
Like you suggest I tried espeasy firmware and now is working fine.
Also with espeasy there is a limitation of maximum of 12 tasks (sensors in my case).
I have nealy 20 sensors ds18b20 and dht22 in my house.
Do you know if I can try a different firmware or is better that I use 2 Wemos D1?
I also wold like to monitor the wifi signal in openhab and the firmware version for the Wemos D1…
I know the procedure with Tasmota but nothing with espeasy.
Any suggeation?
Thanks a lot!