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

openhab2
wemos
tasmota
Tags: #<Tag:0x00007fe0771a7d68> #<Tag:0x00007fe0771a7138> #<Tag:0x00007fe0771a54a0>

(Rich Koshak) #6

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.


(Christoph Wempe) #7

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?


(Rich Koshak) #8

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


(Jesco) #9

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


(Userweb2018) #10

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


(CM6.5 H102) #11

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.

Thanks


(Vincent Regaud) #12

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


(Userweb2018) #13

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.


(Vincent Regaud) #14

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


(Userweb2018) #15

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


(Userweb2018) #16

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?


(Vincent Regaud) #17

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.


(CM6.5 H102) #18

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.


(Userweb2018) #19

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


(Userweb2018) #20

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!


(CM6.5 H102) #21

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.


(Hakan Tandogan) #22

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.


(CM6.5 H102) #23

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

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


(Userweb2018) #24

Thank you Vincent.
Probably I will take your suggestion, 2/3 Wemos d1 to manage all the sensors.
Do you know if I can power 2/3 wemos d1 with only one power supply?
Thank you for all your help!


(Hakan Tandogan) #25

With just one-wire sensors, I don’t see much of a problem if your power supply is strong enough (any power supply for mobile phones gives you at least 2A, that should be enough).

Here is one guy who did basically the same: