Milight

Moderator: leecollings

Post Reply
Petervt
Posts: 1
Joined: Wednesday 16 May 2018 18:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Milight

Post 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!
RNEE
Posts: 10
Joined: Sunday 05 August 2018 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Eindhoven area
Contact:

Re: Milight

Post by RNEE »

I have same problem but my default color is pink.
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 |
alanlsmith
Posts: 132
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: Latest β
Location: Near London (Saaarf!)
Contact:

Re: Milight

Post 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&param=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.
RNEE
Posts: 10
Joined: Sunday 05 August 2018 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Eindhoven area
Contact:

Re: Milight

Post 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
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 |
BarryT
Posts: 369
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: Milight

Post 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&param=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&param=setcolbrightnessvalue&idx=410&hex=0&brightness=0&iswhite=false
alanlsmith
Posts: 132
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: Latest β
Location: Near London (Saaarf!)
Contact:

Re: Milight

Post 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&param=switchlight&idx=' ..lampidx.. '&switchcmd=Off
Than setting the lamp to black.
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.
BarryT
Posts: 369
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: Milight

Post 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&param=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 :)
alanlsmith
Posts: 132
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: Latest β
Location: Near London (Saaarf!)
Contact:

Re: Milight

Post 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.
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.
BarryT
Posts: 369
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: Milight

Post by BarryT »

alanlsmith wrote: Sunday 12 August 2018 14:07 Ah.. My apologies.
No problem! You didnt know this ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest