Remote reboot a sensor?

Hi everyone

My first project is a DHT22 in a walk-in fridge that has an average temperature of -14°C. The goal is to send myself an alert in case of an anormal temp.

It’s wired to a Raspberrypi4 with hassos directly flashed on the SD card.

Problem :
My sensor often randomly stops working after a couple days. It gets stuck on a last recorded temperature. Rebooting the Home Assistant server doesn’t solve the problem, except the temperature then shows as “Unknown”. I have to physically go on site and power cycle the Pi, then it’s good for a couple days.

I’ve read on the internets that these cheap sensors sometimes have that issue. The thing is that the exact same sensor had been functioning normally for months in my living room prior, when I was testing the whole configuration. Maybe it doesn’t like being in such cold temperatures? Even though it’s supposed to work up to -40°C.

I’ll try swapping the sensor for another DHT22. But in the meantime, is there a way I can reset the sensor itself remotely?

Any idea of what else I could try ?

Thanks so much for your attention,
Ian

Can’t help directly with your problem, sorry. :slight_smile:

What I’d try, is to use an ESP (32 or 8266) as the connection for the sensor. In ESPHome you could at least set a switch to restart the device (and automate that) and it wouldn’t disturb your HA installation.

The DHT22 is often used with ESPs, and setting this up in ESPHome takes litteraly less than five minutes. :slight_smile: If that switch wouldn’t work, you can at least automate the power to the ESP itself to restart it. :slight_smile:

That’s a good idea, and an excellent excuse to start tinkering with ESPs :stuck_out_tongue_closed_eyes: Thanks !