Domoticz plugin for DIY Smart Home based on Espressif Systems (ESP32, ESP8266). Note: The plugin is under development. The plugin was tested with python 3.5.x and Domoticz 4.x installed on Raspberry Pi.
Currently supported:
- DIY Smart Home AC dimmer 220V
Use nodemcu-pyflasher to flashout firmware to ESP8266 (NodeMCU)
cd domoticz/plugins
git clone https://github.com/Whilser/ESP-DIY-Samrt-Home.git ESPSmartHome
sudo service domoticz restart
cd domoticz/plugins/ESPSmartHome
git pull
sudo service domoticz restart
To configure device just enter Device ID of your ESP Smart Home device. If you do not know the Device ID, just leave Device ID field defaulted 0, this will start discover for your ESP Smart Home devices. Go to the Domoticz log, it will display the found ESP Smart Home devices and the Device ID you need.
The plugin creates a dimmer switch and a set of scenes. Bright is a bright scene, TV is a light of 30% power, Daily is a half-dimmer switched on, Midnight is minimal lighting.
Control through SSH commands:
echo '{"id":1, "method":"set_power", "power":"50", "state":"ON"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"set_power", "power":"50", "state":"OFF"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"set_state", "state":"OFF"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"set_state", "state":"ON"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"set_config", "SSID":"Wi-Fi SSID", "PASSWD": "PASSWORD"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"set_mode", "mode":"TOGGLE_MODE"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"get_temperature"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"get_state"}' | nc -w1 <deviceIP> 2000
echo '{"id":1, "method":"update", "IP":"<Update Server IP>", "url":"/update/firmware.bin"}' | nc -w1 <deviceIP> 2000
In case of unsuccessful connection to the Wi-Fi network, the device creates an access point with an ip address 192.168.4.1. To send Wi-Fi network settings (SSID, PASSWORD) to the device, connect to the AP and send a command via SSH terminal:
echo '{"id":1, "method":"set_config", "SSID":"Wi-Fi SSID", "PASSWD": "PASSWORD"}' | nc -w1 192.168.4.1 2000