WEMOS D1 example now available for using i4things.com for smart home automation

Article Image

WEMOS D1 example now available for using i4things.com for smart home automation:
 
https://github.com/i4things/NodeAPI/tree/master/examples/WEMOS/Garage/thing  

Garage example

Scenario : Wemos, DHT22 sensor measuring temperature and humidity and 2 relay
- Relay 1 is for Automatic Garage door - when Open/Close button on web page is clicked Relay 1 is ON for 2 sec
- DTH22 measures temp and humidity and send it every 10 min to the server ( if different)
- Relay 2 is connected to a fan
- When humidity over 70% relay 2 is automatically switched ON for 2 hours cycle
- When clicked on web page - "Relay 2 ON" button Relay 2 is switched ON.
- When clicked on web page - "Relay 2 OFF" button Relay 2 is switched OFF. ( if humidity is > 70% it will be switched ON automatically after 10 minutes again)
- Relay 2 cannot stay ON for more then 2 hours every 2.5 hours
- If Relay 2 is switched OFF because max ON ( 2 hours) is reached it cannot be switched ON for the next 1/2h