Milight integration with Loxone

516 views
Skip to first unread message

Tico

unread,
Dec 18, 2018, 7:23:03 PM12/18/18
to Loxone English
I've searched through these posts for Milight integration with Loxone. There are some references to an old Milight wifi controller that could be controlled with a PicoC block.

The new wifi iBox2 controller seems to have a different API.

Is anyone using current generation Milights with iBox2 and Loxone?

Koray Sels

unread,
Dec 20, 2018, 1:23:35 AM12/20/18
to Loxone English
I do this (and other this like Alexa support) with Node-red on a rPi and virtual outputs in Loxone.
Nodered has a Mi-Light 2 node (compatible with latest iboxes) and then some UDP magic to virtual outputs.

Tico

unread,
Dec 20, 2018, 2:58:53 AM12/20/18
to Loxone English
Thanks. I've just ordered a Milight floodlight (100W RGB CCT).

If you have any further details of how this is set up in Node-red, that'd be appreciated. I'm just beginning with Node-red on a Loxberry installation. I don't have a clue yet...

Tico

unread,
Dec 28, 2018, 2:26:07 AM12/28/18
to Loxone English
The light has just arrived and all works well so far.


Things I've read about and checked for -

1. Earthing - Despite many YouTube videos depicting lack of a connected earth for some cheap imported lights, this light is fine (it also wasn't very cheap...)
2. Lighting driver below advertised output - With a multi-meter connected, this pulls 0.4A at 250 volts. 100 watts.

@Koray Sels - Do you have a screen-shot of the Node-red setup with Mi-Light 2?



On Thursday, December 20, 2018 at 2:23:35 PM UTC+8, Koray Sels wrote:

Tico

unread,
Jan 20, 2019, 3:39:39 AM1/20/19
to loxone-...@googlegroups.com
I'm just getting my head around Node Red. I've successfully integrated the Loxone and Milight nodes and have some partial control of the Milight with Loxone.

I've got temperature, ON/OFF and brightness control of the white component of the light. 

I'm struggling with how to split the HSV (RGB) component and reformat them appropriately.

I'm keen to view someone else's flows to establish how it's done.

Loxone-Milight.png



[{"id":"de70832e.b14a4","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"753da4fd.ee178c","type":"loxone-control-in","z":"de70832e.b14a4","name":"","miniserver":"1421c5dc.eff0fa","control":"12e6cd0f-00c8-1932-ffffd989fb12b87b/AI1","state":"12e6cd0f-00c8-195d-ffffd989fb12b87b","x":80,"y":340,"wires":[["67895904.1e9e28"]]},{"id":"5ce9c592.e2d67c","type":"loxone-control-out","z":"de70832e.b14a4","name":"","miniserver":"4b6b5dfc.cc27d4","control":"12e6cd0f-00c8-1932-ffffd989fb12b87b/AI1","x":890,"y":120,"wires":[]},{"id":"ad23630a.4109d","type":"ui_colour_picker","z":"de70832e.b14a4","name":"","label":"Colour Picker","group":"e894cfe3.0cdd7","format":"hsv","outformat":"object","showSwatch":false,"showPicker":true,"showValue":false,"showHue":false,"showAlpha":false,"showLightness":false,"order":0,"width":"0","height":"0","passthru":false,"topic":"","x":300,"y":120,"wires":[["9c9d1f0.fc556e"]]},{"id":"9c9d1f0.fc556e","type":"function","z":"de70832e.b14a4","name":"Loxone HSV Converter","func":"var hsvstring =\"\";\n\nvar h = Math.round(msg.payload.h);\nvar s = Math.round(msg.payload.s*100);\nvar v = Math.round(msg.payload.v*100);\n\nhsvstring = \"hsv(\" + h + \",\" + s +\",\" + v + \")\";\nmsg.payload = hsvstring;\n\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":120,"wires":[["5ce9c592.e2d67c"]]},{"id":"67895904.1e9e28","type":"switch","z":"de70832e.b14a4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"hsv(0,0,0)","vt":"str"},{"t":"cont","v":"hsv","vt":"str"},{"t":"cont","v":"temp","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":250,"y":340,"wires":[["bc99cc7c.aee73"],[],["c5d3643d.c16658","bc0a7e4b.d0a8"]]},{"id":"bc99cc7c.aee73","type":"template","z":"de70832e.b14a4","name":"Off","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"off","output":"str","x":690,"y":240,"wires":[["157694a4.2845fb"]]},{"id":"c5d3643d.c16658","type":"function","z":"de70832e.b14a4","name":"Temperature Split","func":"var temp= msg.payload.split(\",\");\n\ntemp[0] = temp[0].substr(5);\ntemp[1] = temp[1].substr(0, temp[1].length-1); \n\nmsg.h = temp[0];\n\nmsg.payload = temp[1];\n\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":520,"wires":[["59ee9289.0463ac"]]},{"id":"d812d142.d8785","type":"function","z":"de70832e.b14a4","name":"Temperature","func":"msg.command = 'temperature';\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":520,"wires":[["157694a4.2845fb"]]},{"id":"59ee9289.0463ac","type":"range","z":"de70832e.b14a4","minin":"2700","maxin":"6500","minout":"0","maxout":"100","action":"scale","round":true,"property":"payload","name":"Scale White 0-100","x":710,"y":520,"wires":[["d812d142.d8785"]]},{"id":"157694a4.2845fb","type":"MiLight","z":"de70832e.b14a4","name":"MiLight","bridgetype":"v6","bulbtype":"fullColor","zone":1,"ip":"10.1.1.9","broadcast":true,"x":1160,"y":340,"wires":[]},{"id":"d225bfa2.3e459","type":"function","z":"de70832e.b14a4","name":"Brightness","func":"msg.command = 'brightness';\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":460,"wires":[["157694a4.2845fb"]]},{"id":"bc0a7e4b.d0a8","type":"function","z":"de70832e.b14a4","name":"Brightness Split","func":"var temp= msg.payload.split(\",\");\n\ntemp[0] = temp[0].substr(5);\ntemp[1] = temp[1].substr(0, temp[1].length-1); \n\nmsg.h = temp[1];\n\nmsg.payload = temp[0];\n\nreturn msg;","outputs":1,"noerr":0,"x":500,"y":460,"wires":[["d225bfa2.3e459"]]},{"id":"1421c5dc.eff0fa","type":"loxone-miniserver","z":"","host":"192.168.1.5","port":"55555","enctype":"0","active":true},{"id":"4b6b5dfc.cc27d4","type":"loxone-miniserver","z":"","host":"192.168.1.5","port":"55555","enctype":"0","active":true},{"id":"e894cfe3.0cdd7","type":"ui_group","z":"","name":"Lighting","tab":"a5eef3a2.d9c0d","disp":true,"width":"6","collapse":false},{"id":"a5eef3a2.d9c0d","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]


Reply all
Reply to author
Forward
0 new messages