An Arduino sketch using Homie for MQTT, and WiFi connection. Supporting transition, and working with HomeKit, and Home Assistant
ArduinJSON Library
It is for use with White Only LEDs, allowing you to send standard MQTT, or MQTT JSON commands. It works with Home Assistant natively, and will work with HomeKit using MQTTTHING for HomeBridge. It supports transition( in seconds) when sending commands in JSON
To send a state to any topic just add “/set” to the end.
So, to get JSON state “/light/JSON”, and to set that topic “/light/JSON/set”
JSON:
Topic: **/light/JSON
{
"state": "ON",
"brightness": 255,
"transition": 5
}
MQTT Topics:
State: **/light/on ( true/false )
Brightness: **/light/brightness ( 0-255 )
Brightness Percent: **/light/brightnesspct ( 0-100 )