This is web connected 4 inputs module.
Requires:
4 inputs webThing has @type MultiLevelSwitch
and following properties:
- Input-1 up to Input-4, indicates if input is in high (
open
) or low (closed
) state, @type:OpenProperty
- counter, shows how many times inputs has been changed, max = 1000, @type:
LevelProperty
- ON-OFF, ON: at least one input is high, @type:
OnOffProperty
How to start the node see iot_web_thing_example.
GPIO number can be set in idf.py menuconfig -> Inputs config
(see iot_web_thing_example).
Default input GPIOs:
- INPUT-1: GPIO32
- INPUT-2: GPIO33
- INPUT-3: GPIO25
- INPUT-4: GPIO26
To trigger an action in another webThing (e.g. set output-1 in 4-output
high when input-1 drops low) use Gateway rule:
The source is available from GitHub.
- WebThing Gateway - https://webthings.io/gateway/
- Web Thing API - https://webthings.io/api/
- esp-idf - https://github.com/espressif/esp-idf
The code in this project is licensed under the MIT license - see LICENSE for details.
- Krzysztof Zurek - kz