Wemos D1 - 4 switches configured in Extra Services mode for scene controller. #1731
RunnerMojo
started this conversation in
MEPLHAA Scripts Collection
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Device Name: Wemos D1
URL to Device: Wemos D1 from Amazon.
Used HAA version: 9.5.1
Summary of functions: 4 toggle switches, control onboard LED and toggle 1 GPIO per button.
JSON: {"c":{"l":13,"b":[{"g":0,"t":5}],"m":600},"a":[{"0":{"r":[{"g":2}]},"1":{"r":[{"g":2,"v":1}]},"b":[{"g":0,"t":0}],"es":[{"0":{"r":[{"g":2}]},"1":{"r":[{"g":2,"v":1}]},"b":[{"g":4,"t":0}]},{"0":{"r":[{"g":2}]},"1":{"r":[{"g":2,"v":1}]},"b":[{"g":5,"t":0}]},{"0":{"r":[{"g":2}]},"1":{"r":[{"g":2,"v":1}]},"b":[{"g":3,"t":0}]}]}]}
Long description: I wanted to create a scene controller using a Wemos D1. The D1 simply has four buttons connected to GPIO 0,4,5 and 3. These are arranged on a wallplate with 5V power to the D1. Device appears in HomeKit as one device with four toggle switches. Keeps it clean, but can then use automation to drive other devices for scene control. Uses mode 5 for setup with a 10 minute timeout to enter setup mode after boot. GPIO2 is the onboard LED, just used for testing. I might revise and have a per toggle LED in a future rev as plenty of extra pins on the D1, but in the current use, it's for lighting control so I can see each light come on or go off from the scene controller.
Beta Was this translation helpful? Give feedback.
All reactions