Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.4 KB

File metadata and controls

37 lines (31 loc) · 1.4 KB

An ESP8266 (Wemos D1 Mini) based Pushbutton for home automatisation

This Button can differentiate between three different actions (Click, DoubleClick and LongPress) and send an event to the MQTT Broker. I use this to control my MiLight system with the help of Node-Red.

Software requirements:

Hardware:

You probably need to change the folliwing lines: in /data/homie/config.json

  • Change your WiFi SSID and password here
  "wifi": {
        "ssid": "xxx",
        "password": "yyy"
    }
  • Change this to your MQTT-broker IP
  "mqtt": {
        "host": "192.168.178.34"
  }

and in MQTTLightButtonSwitch3State.ino

  • If your button is attached to a different pin, change the name here:
  OneButton button(D3, true);

Upload the configuration in Arduino IDE with Tools->ESP8266 Sketch Data Upload. Compile and Upload the code with Arduino IDE to your ESP8266.