Smart lights and switches are expensive, so I’ve setup cheap lights and sensors for my rooms with nodemcu. Parts that I have for this project:
- AC 220V to DC 5V 500mA Step-Down Power Supply Module - $1.80
- HC-SR501 PIR motion sensor - $1.00
- DHT11 sensor - $1.00
- nodemcu - $3.50
- 5V Relay Board Module - $1.50
All parts are from ebay and under $10 total.
Here is configuration for HASS and the code for nodemcu board.
I am thinking off adding light and sound sensors, so lights can be turned on with clapping or when it’s dark(now I use sun sensor for triggering lights on).
Also I have one 16X2 LCD display which works great with nodemcu, so it can be used to show some information.