Milight
Moderator: leecollings
-
- Posts: 1
- Joined: Wednesday 16 May 2018 18:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Milight
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!
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!
-
- Posts: 10
- Joined: Sunday 05 August 2018 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Eindhoven area
- Contact:
Re: Milight
I have same problem but my default color is pink.
How can the default color be saved ?
How can the default color be saved ?
Domoticz on Raspberry PI 5 with 500 Gb NvME|Milight|RFXCOM|Goodwe - Smartstuff P1 meter|Buienradar|Afval kalender|Tuya||deCONZ Conbee II| in development Marstek Homebattery 5,12Kwh via Modbus |
-
- Posts: 132
- Joined: Monday 07 August 2017 17:17
- Target OS: Linux
- Domoticz version: Latest β
- Location: Near London (Saaarf!)
- Contact:
Re: Milight
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:
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
Domoticz Latest β, RPi 4B with 110Gb SSD for Domoticz, RPi 4B with 110Gb SSD for Node-Red & a RPi 2B for logging / IP addressing. RFXCOM, PiZiGate, Z-Wave, Harmony, Hue lamps and a bit of Broadlink.
-
- Posts: 10
- Joined: Sunday 05 August 2018 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Eindhoven area
- Contact:
Re: Milight
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
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
Domoticz on Raspberry PI 5 with 500 Gb NvME|Milight|RFXCOM|Goodwe - Smartstuff P1 meter|Buienradar|Afval kalender|Tuya||deCONZ Conbee II| in development Marstek Homebattery 5,12Kwh via Modbus |
-
- Posts: 369
- Joined: Tuesday 31 March 2015 22:06
- Target OS: Linux
- Domoticz version: 2024.3
- Location: east netherlands
- Contact:
Re: Milight
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 purpleOFF command with color none/black
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
Code: Select all
http://IP:PORT/json.htm?type=command¶m=setcolbrightnessvalue&idx=410&hex=0&brightness=0&iswhite=false
-
- Posts: 132
- Joined: Monday 07 August 2017 17:17
- Target OS: Linux
- Domoticz version: Latest β
- Location: Near London (Saaarf!)
- Contact:
Re: Milight
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
Domoticz Latest β, RPi 4B with 110Gb SSD for Domoticz, RPi 4B with 110Gb SSD for Node-Red & a RPi 2B for logging / IP addressing. RFXCOM, PiZiGate, Z-Wave, Harmony, Hue lamps and a bit of Broadlink.
-
- Posts: 369
- Joined: Tuesday 31 March 2015 22:06
- Target OS: Linux
- Domoticz version: 2024.3
- Location: east netherlands
- Contact:
Re: Milight
Hehe..alanlsmith wrote: ↑Sunday 12 August 2018 12:11That’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 betterThan setting the lamp to black.Code: Select all
http://192.168.0.10:8080/json.htm?type=command¶m=switchlight&idx=' ..lampidx.. '&switchcmd=Off
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

-
- Posts: 132
- Joined: Monday 07 August 2017 17:17
- Target OS: Linux
- Domoticz version: Latest β
- Location: Near London (Saaarf!)
- Contact:
Re: Milight
Ah.. My apologies.
Domoticz Latest β, RPi 4B with 110Gb SSD for Domoticz, RPi 4B with 110Gb SSD for Node-Red & a RPi 2B for logging / IP addressing. RFXCOM, PiZiGate, Z-Wave, Harmony, Hue lamps and a bit of Broadlink.
-
- Posts: 369
- Joined: Tuesday 31 March 2015 22:06
- Target OS: Linux
- Domoticz version: 2024.3
- Location: east netherlands
- Contact:
Re: Milight
No problem! You didnt know this

Who is online
Users browsing this forum: No registered users and 1 guest