Display Temp an Humidity from DHT11 installed on Wemos D1 mini with Tasmota


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.

This is the

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'

Which further information do you need?

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.

This is working for me:

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?

It should work with %s too, it will just show a whole lot of decimal places.

Hi, after a few tests and several restarts, it works now with these values:

String   Temperatur    "Außentemperatur [%s °C]" <temperature> [ "CurrentTemperature" ] {mqtt="<[ mosquitto:tele/sonoff/SENSOR:state:JSONPATH($.DHT11.Temperature)]" }
String   Luftfeuchte   "Luftfeuchte [%d %%]" <humidity> [ "CurrentHumidity" ] {mqtt="<[ mosquitto:tele/sonoff/SENSOR:state:JSONPATH($.DHT11.Humidity)]" }

Thank you very much Christoph and Rich! Cheers Jesco

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

Hello and welcome to the community.

I’ve never tried to connect that many sensors to a single Esp.:smile: If you view the wemos from the tasmota web GUI, are all 10 showing in the console?

Also, to make your community experience more pleasant, please take a few minutes and read this link.


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.

Please see:

To find the address of the sensors
If you have sensors with the same address that is your problem

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.

Could be a power problem from the pins.

Try creating another onewire object on another pin and put your other two devices on that one

This is a good idea, I will try during the weekend and i will let you know.
Thanks a lot.

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?

You didn’t say that you were running tasmota.
No it can’t handle more than 8 devices on the one wire bus.
EDIT: Yes you did in the title.

You can also try a different firmware, if tasmota is the cause of limited sensors, like Esp Easy. This firmware also work very well with OH.

Thank you very much Vincent.
I never tried espeasy, but I will try.
I will let you know the progress.

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!

You keep calling me Vincent,:rofl:

I have no idea about the limit of sensors that can be used on a particular firmware. There are several other options, do a quick google search. If the firmware, and not the wemos, is the limiting factor then you may need to write your own code to handle all 20 sensors. This is something you will need to search google and find a solution for.

Check the wiki for Esp Easy if I remember correctly you can have the wemos publish the wifi strength, not sure about the firmware version.

1 Like

Honestly, with that many sensors, I would use multiple microcontrollers. In the short term, you might save money by buying less controllers, but if the one single controller fails, you lose all measurement possibilites at once.

If you already have all the wires going to one central place, then mount two (better three) D1s there, and give each of them 7 sensors. That way, you even get some fail safety.


Great idea,:+1: can’t go wrong with having a fail safe setup.

Guess I should have thought to mention that myself.:roll_eyes: