MQTT Advice / Tips

Post Reply
Posts: 17
Joined: Monday 24 February 2014 15:31
Target OS: Raspberry Pi
Domoticz version:

MQTT Advice / Tips

Post by JoshDinsdale » Saturday 16 December 2017 18:29

Hi All

I have been using Domoticz for a couple of years now, but I now find myself needing to get involved with MQTT.

I am using Domoticz on a Pi with the built in MQTT and Node Red setup.

I am using Chris Mullins very cool ESP Milight controller to control a number of Milight Bulbs and LED strips, which works very well in Domoticz via the controllers Milight gateway emulator.

What I'd like to do now, is to use my Milight remote to control the bulbs via domoticz, this will enable everything to stay in-state. This is doable via MQTT as the controller can listen for Milight signals (from the remote) and then forward those as MQTT messages. I have this working.

The issue that I have is that the format of the messages isnt in a format Domoticz can interprete, it is JSON, but doesnt have the right tags, (IDX etc). From what I understand, i should use Node Red in between to parse the messages so that Domotivz can understand them? Is this a correct assumption?

If so, does anyone have any links to any beginners guides to using Node Red to achieve such a solution?

Many thanks


Posts: 6
Joined: Saturday 06 January 2018 12:17
Target OS: Raspberry Pi
Domoticz version: 3.9168

Re: MQTT Advice / Tips

Post by alitrix » Thursday 01 February 2018 14:53

Use Node-RED, to convert the Milight JSON to a understandable Domoticz JSON (including IDX) and publish that on MQTT or do a HTTP-JSON call

Either using the build in 'split' blocks or make a simple JS function that returns the correct JSON format that Domoticz understands

Here are some examples how to use the functions-node in NodeRED

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests