Welcome,
Since Tasmote for esp8266 and ds18b20 has been mentioned, I decided that I would play with it. I go to the binary releases page, upload with esptoot.py the tasmote.bin firmware and nothing, the hardware cold. And so I loaded the firmware one by one and the hardware came to life. And it only came to life when uploading tasmot-4m.bin to my nodemcu. It even looks cool, more professional than mine, that's a plus. I plugged the ds18b20 into the nodemcu and configures via the admin panel and ok it works, reads a new value from the thermometer every few seconds and rest services Tasmota under the
http://192.168.4.1/cm?cmnd=Status%208
gives a more or less json like this in response:
{
"StatusSNS": {
"Time": "2023-11-05T12:49:05",
"DS18B20": {
"Id": "3C530457A8AC",
"Temperature": 23.7
},
"TempUnit": "C"
}
}
i.e. it does what it does for me.
The main difference with my software is that Tasmota samples the thermometer every few seconds and gives the stored data on request from resta. In my case, the reading of the thermometer is done at the resta request, i.e. if we query every 5 minutes, only the thermometer is sampled every 5 minutes.
This is very important because if such a nodemcu with ds18b20 is to work non-stop, you need to take into account the number of ds18b20 thermometer reading cycles which is limited and after which the thermometer simply stops working.
When I had a project that reads ds18b20 every second, such a gaggle of them lasted 2 years 24/7 and had to be replaced.
Do you know how to change the sampling frequency of the thermometer in Tasmota? So that, for example, it only polls the thermometer every minute.
Greetings,
Luke