Page 1 of 1
Milight
Posted: Wednesday 16 May 2018 18:59
by Petervt
Hello,
This is my first post!
I searched for a solution to my problemen but can't find it.
I can control my Milight bulbs with Domoticz. When I turn on a bulb it will always go to green light, not the color that I set before I turned it off. When I want to adjust the switch in Domoticz I see where it goes wrong: green is the default color, with the color pad I'm able to change the color but I can't save it. Is it possible to save the color somehow?
Thanx in advance!
Re: Milight
Posted: Sunday 05 August 2018 10:22
by RNEE
I have same problem but my default color is pink.
How can the default color be saved ?
Re: Milight
Posted: Sunday 05 August 2018 10:29
by alanlsmith
I have the same thing on occasions.
You can use a scene to set the desired colour.
Or you can set the hex value, for example, to set colour to white use the following lua device script:
Code: Select all
commandArray = {}
local lampidx = <lampIDX>
commandArray[#commandArray+1] = {['OpenURL']='http://<DomoticzIP>:<port>/json.htm?type=command¶m=setcolbrightnessvalue&idx=' ..lampidx.. '&hex=ffffff'}
return commandArray
Re: Milight
Posted: Sunday 05 August 2018 11:52
by RNEE
Thank you for the tip !
I use the scene solution.
This works now fine for me, i have an option to switch all my milights on with a coco wall switch.
Worked well before maybe changed in update to 4.97
Re: Milight
Posted: Saturday 11 August 2018 23:04
by BarryT
You could also try to use json, for example (in my case one of my bulbs is idx 410, check yours @devices):
ON command with color purple
Code: Select all
http://IP:PORT/json.htm?type=command¶m=setcolbrightnessvalue&idx=410&hex=5e41d4&brightness=20&iswhite=false
OFF command with color none/black
Code: Select all
http://IP:PORT/json.htm?type=command¶m=setcolbrightnessvalue&idx=410&hex=0&brightness=0&iswhite=false
Re: Milight
Posted: Sunday 12 August 2018 12:11
by alanlsmith
BarryT wrote: ↑Saturday 11 August 2018 23:04
You could also try to use json,
That’s what I said in my previous post, only I was showing json in the context of a lua script in Domoticz.
Also to switch off I think this would be better
Code: Select all
http://192.168.0.10:8080/json.htm?type=command¶m=switchlight&idx=' ..lampidx.. '&switchcmd=Off
Than setting the lamp to black.
Re: Milight
Posted: Sunday 12 August 2018 12:21
by BarryT
alanlsmith wrote: ↑Sunday 12 August 2018 12:11
BarryT wrote: ↑Saturday 11 August 2018 23:04
You could also try to use json,
That’s what I said in my previous post, only I was showing json in the context of a lua script in Domoticz.
Also to switch off I think this would be better
Code: Select all
http://192.168.0.10:8080/json.htm?type=command¶m=switchlight&idx=' ..lampidx.. '&switchcmd=Off
Than setting the lamp to black.
Hehe..
Normally this is the way indeed, but my light isnt turning off when using the switchcmd=off json, thats why i'm using the black

Re: Milight
Posted: Sunday 12 August 2018 14:07
by alanlsmith
BarryT wrote: ↑Sunday 12 August 2018 12:21
Hehe..
Normally this is the way indeed, but my light isnt turning off when using the switchcmd=off json, thats why i'm using the black
Ah.. My apologies.
Re: Milight
Posted: Sunday 12 August 2018 16:09
by BarryT
alanlsmith wrote: ↑Sunday 12 August 2018 14:07
Ah.. My apologies.
No problem! You didnt know this
