Skip to content

Whilser/ESP-DIY-Samrt-Home-Zero-Cross-Dimmer-Domoticz-Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP DIY Samrt Home

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

Flashing ESP8266 (NodeMCU)

Use nodemcu-pyflasher to flashout firmware to ESP8266 (NodeMCU)

NodeMCU-pyflasher

How to Install:

cd domoticz/plugins
git clone https://github.com/Whilser/ESP-DIY-Samrt-Home.git ESPSmartHome
sudo service domoticz restart

How to update:

cd domoticz/plugins/ESPSmartHome
git pull
sudo service domoticz restart

Domoticz configuration

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.

Domoticz configuration

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.

connection diagram

Connection diagram for ESP Smart Home DIY AC dimmer

connection diagram

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

Connecting the device to the Wi-Fi network

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

If you liked it, buy me coffee!
If you liked it, buy me coffee!

About

DIY Smart Home based on Espressif Systems (ESP32, ESP8266) Plugin for Domoticz

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages