I was determined to clean up the big work bench in the laundry room so I can work more comfortably there with electronic projects like the Shelly iOT. In the process I came across a box that contains a lot of stuff that I bought for the Arduino projects a few years ago. Amongst them are what I thought DHT22 humidity/temperature sensors. I was beaming with excitement and rushed to wire one up to my Uni.
a bagful of I2C sensors for Arduino
I first wired it parallel to the two DS18B20
I switched on the Uni and the temperature and humidity values are both way off
I thought may be the Uni does not like having DS18B20 and DHT22 on the same bus so I removed the two DS18B20
the result is the same with only the DHT22
I scratched my head, and try to see if there is a scaling adjustment. None. I went and did a search to see if other people encounter the same problem. None.
I then try searching for the pin out just to be sure I wired it up correctly. In the process I came across a site discuss the difference of DHT11, DHT22, and AM2302. It turns out what I have are two DHT11, which is the obsolete precursor to the current DHT22. With this I conclude that Shelly must not support DHT11 and just processed garbage data.
I now resign to wait for the DHT22 to arrive from China. I would like to see how the Uni handles both DS18B20 and DHT22 on the same bus. I 'd like to see three DS18B20 with a DHT22. I seems to remember DHT11 does not support addressing, while DS18B20 does. I don't feel like digging into the data sheets. My life is way too complex with my broad interest in wanting to dabble with everything.
Reading a bit more, the single sensor bus on the Uni support either one DHT22 or up to three DS18B20. It's been so long since I played with Arduino. I had three DS18B20 that were wired together on one I2C bus because three is the maximum addressing capacity of this sensor.
Up to now I had not set up any notification based on the sensors. It took me a long time to understand what they called Scene. A Scene allows you to use the condition of an input to trigger an action. The most straightforward action is to send a notification. More complex one can cause an output change within the device, or an action by another device in the network.
With the Uni wired with two DS18B20 and the ADC wired to sense of its 12V power supply voltage, I created three Scenes. I set one to send notification if the voltage drops below 12.6V. I set one if temp sensor 0 drops below 72 degree F, and another if it rises above 74 degree F.
Here is a screen grab video of the notifications. Youtube turned it into a Short which I hate.
a screen grab of notifications triggered by the first DS18B20 - either too high, or too low
The notification seems to be reliable. You can set the notification for once, or repeat, or with lockout duration so you are not flooded by too many when the sensor is hunting or stuck at the trigger threshold. I also tested that the iPhone app does not need to be invoked for the phone or my Apple Watch to receive notification. This is important.
As I read up more on the Shelly offering and its application documentations, I found out more about their product chronology. Uni is their gen 1 product that uses ESP8266 microcontroller by Espressif. Espressif Systems is in Shanghai, China. When I was playing with Arduino a few years ago I vaguely remember reading about it at the time, but I wanted something simple and easy to code despite the Arduino more dated microcontrollers.
The subsequent generation of Shelly uses the newer ESP32 from Espressif.
No comments:
Post a Comment