moodlite - Coming soon

My version with MQTT

chemmings60 · 128


  • Newbie
  • *
    • Posts: 4
    • Likes: +1/-0
    • View Profile
on: January 23, 2019, 11:17:21 AM
I have integrated MQTT into moodlite.
So far. there are 5 topics that are controllable. I wouldn't change these in the code, but change your home automation platform to send and receive from these topics.

So you would send to subscribetopics, and you would listen to publish topics.

brightness and speed would be a value 0-100, it then gets mapped to values between 0-255
Backlight is either ON or OFF, or 0 or 1.

colour is a hex value

preset is single integer 0-8

When any of these options are updated, either by the web interface or MQTT< it then publishes a topic with the current state. So if you turn the backlight off using the web interface, the mqtt is updated.

Any questions please let me know

// ----------------- MQTT Settings, set your smart home platform to match these ----------------------------
/* MQTT Settings */
// Topic which listens for commands
char* subscribeTopic1 = "Moodlight/Backlight";
char* subscribeTopic2 = "Moodlight/Preset";
char* subscribeTopic3 = "Moodlight/Brightness";
char* subscribeTopic4 = "Moodlight/Colour";
char* subscribeTopic5 = "Moodlight/Speed";

char* publishTopic1 = "Moodlight/Backlight/stat";
char* publishTopic2 = "Moodlight/Preset/stat";
char* publishTopic3 = "Moodlight/Brightness/stat";
char* publishTopic4 = "Moodlight/Colour/stat";
char* publishTopic5 = "Moodlight/Speed/stat";


SMF spam blocked by CleanTalk