Milight

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

Milight

Post by Petervt » Wednesday 16 May 2018 18:59

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: 2
Joined: Sunday 05 August 2018 10:13
Target OS: Windows
Domoticz version:
Contact:

Re: Milight

Post by RNEE » Sunday 05 August 2018 10:22

I have same problem but my default color is pink.
How can the default color be saved ?

alanlsmith
Posts: 105
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: 4.9701
Location: Near London
Contact:

Re: Milight

Post by alanlsmith » Sunday 05 August 2018 10:29

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 v4.9701 beta, Ubuntu 18.04 on Intel NUC i3, 8Gb ram, 70Gb drive, RFXtrx433, z-wave and a bit of Broadlink/Android

RNEE
Posts: 2
Joined: Sunday 05 August 2018 10:13
Target OS: Windows
Domoticz version:
Contact:

Re: Milight

Post by RNEE » Sunday 05 August 2018 11:52

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

BarryT
Posts: 281
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: beta
Location: east netherlands
Contact:

Re: Milight

Post by BarryT » Saturday 11 August 2018 23:04

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
6x Raspberry 3
2x VPS Server
2x Active VPN
A lot of scripts, switches and sensors :)

alanlsmith
Posts: 105
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: 4.9701
Location: Near London
Contact:

Re: Milight

Post by alanlsmith » 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.
Domoticz v4.9701 beta, Ubuntu 18.04 on Intel NUC i3, 8Gb ram, 70Gb drive, RFXtrx433, z-wave and a bit of Broadlink/Android

BarryT
Posts: 281
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: beta
Location: east netherlands
Contact:

Re: Milight

Post by BarryT » Sunday 12 August 2018 12:21

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 :)
6x Raspberry 3
2x VPS Server
2x Active VPN
A lot of scripts, switches and sensors :)

alanlsmith
Posts: 105
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: 4.9701
Location: Near London
Contact:

Re: Milight

Post by alanlsmith » Sunday 12 August 2018 14:07

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 v4.9701 beta, Ubuntu 18.04 on Intel NUC i3, 8Gb ram, 70Gb drive, RFXtrx433, z-wave and a bit of Broadlink/Android

BarryT
Posts: 281
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: beta
Location: east netherlands
Contact:

Re: Milight

Post by BarryT » Sunday 12 August 2018 16:09

alanlsmith wrote:
Sunday 12 August 2018 14:07
Ah.. My apologies.
No problem! You didnt know this ;)
6x Raspberry 3
2x VPS Server
2x Active VPN
A lot of scripts, switches and sensors :)

Post Reply

Who is online

Users browsing this forum: McJohn and 2 guests