RGBWW bulb issue

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
lshield
Posts: 12
Joined: Monday 01 May 2017 6:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

RGBWW bulb issue

Post by lshield »

I bought a Yeelight RGBWW lamp. It works in Domoticz when using the slider and color picker of the GUI. I was hoping to make a wakeup lamp that can change the RGB values as it progresses through the brightness. I already have that working with other regular dimmer switches so that's not the issue.
I can't get DzVents to change the RGB value of the Yeelight lamp or a dummy RGBWW dimmer switch. DzVents will turn the light on or off just fine. The issue is when I use any of the specific "setColor" or ''setRGB" or Hue or whatever commands.
I always get something that says the following (the port number is correct when I see it):

Code: Select all

Error: Error opening url: http://127.0.0.1:XXXX/json.htm?type=command&param=setcolbrightnessvalue&idx=724&brightness=45&color={"m":3,"t":0,"cw":0,"ww":0,"r":255,"g":100,"b":150}
That was when trying to use the command:

Code: Select all

setColor(255,100,150,45)
At this point I don't have any ideas as I can't understand why it can't even change the RGBWW dummy switch.
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: RGBWW bulb issue

Post by manjh »

I had a similar issue with an Ikea Trädfri lamp, with the Zigbee-for-Domoticz plugin. After a lot of fiddling, I found out the it works fine when the lamp is in a Zigbee group.
So the individual lamp work like you describe, but in the group it is OK.
So I used a workaround: even a single lamp now is in a group, and that group is what I control...
Hans
lshield
Posts: 12
Joined: Monday 01 May 2017 6:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: RGBWW bulb issue

Post by lshield »

Are you using a Zigbee light? I don't use them so I don't have any of the Zigbee plugin installed. The bulb is a Yeelight bulb which mostly worked just with what is built in to the system.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RGBWW bulb issue

Post by waltervl »

Can you do the url manually in a browser? What kind of response do you get back?
Did you set the security correct for API calls over http (see settings, tab security)?
Did you set trusted networks correctly (see settings, tab security)?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
lshield
Posts: 12
Joined: Monday 01 May 2017 6:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: RGBWW bulb issue

Post by lshield »

I currently have port forwarding set up so that I can access this outside my network. I can do the url manually in a browser but only if I use my external IP address even though I'm on the same network. It works fine doing it through the browser. I have all the trusted network things and the security set up properly, I think. I can access the main domoticz page from the local IP address but for whatever reason, I can't get the json url to work even with the username/password.
lshield
Posts: 12
Joined: Monday 01 May 2017 6:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: RGBWW bulb issue

Post by lshield »

I also was able to log in to my raspberrypi and test all of this. I'm able to use the 127.0.0.1 address on the pi in a browser. It works fine to use the following:

Code: Select all

/json.htm?type=command&param=setcolbrightnessvalue&idx=723&brightness=45&color={"m":3,"t":0,"cw":0,"r":255,"g":100,"b":150}
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RGBWW bulb issue

Post by waltervl »

Then it should also work from Dzvents.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
lshield
Posts: 12
Joined: Monday 01 May 2017 6:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: RGBWW bulb issue

Post by lshield »

waltervl wrote: Monday 13 March 2023 19:00 Then it should also work from Dzvents.
RIght, it should. But it still doesn't. Here is the minimal dzvents thing I made to test it:

Code: Select all

return {
	active = true,
	on = {
		devices = {
			708,
		}
	},
	execute = function(domoticz, device)
		local light = domoticz.devices(723)
		light.setColor(255,134,110,32)
	end
}
Here is the output in the log:

Code: Select all

2023-03-13 14:14:34.591 Error: Error opening url: http://127.0.0.1:XXXX/json.htm?type=command&param=setcolbrightnessvalue&idx=723&brightness=32&color={"m":3,"t":0,"cw":0,"ww":0,"r":255,"g":134,"b":110}
If I just use the "switchOn()" command instead of the "setColor", then it works fine. Only when I try to do anything with the rgb do I get the error.
This happens both with a real Yeelight lamp and a dummy RGBWW Dimmer switch. Both give the same error.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RGBWW bulb issue

Post by waltervl »

Is the port XXXX the internal port or the external port?
And does the URL work when you put it exactly (including the port and iP) as mentioned by the error when executed from the RPi?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
lshield
Posts: 12
Joined: Monday 01 May 2017 6:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: RGBWW bulb issue

Post by lshield »

The port number is my http port so it's the external port.
If I take the error url and put it in a browser on the rpi it works with the device listed updating.

Code: Select all

{
	"status" : "OK",
	"title" : "SetColBrightnessValue"
}
Also, when I first started I had to put the user:password in for the 127 address to work. I had forgotten about that. I cleared my cache and just tried it again and now I'm getting the "401 Unauthorized" when I'm not adding the user:password. The "127.0.0.*" is definitely listed under the "trusted networks".
lshield
Posts: 12
Joined: Monday 01 May 2017 6:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: RGBWW bulb issue

Post by lshield »

Actually, I might have just fixed it. I removed my "192.168..." IP under trusted networks and just left the 127. Now it's working fine. Maybe there was a comma in between the two addresses instead of a semicolon.
Kouki31
Posts: 7
Joined: Tuesday 01 January 2019 21:19
Target OS: Linux
Domoticz version:
Contact:

Re: RGBWW bulb issue

Post by Kouki31 »

hello i dont know if its same with me but i have to add 127.0.0.1 to Trusted Networks (no username/password):
and now its work againe
its next to 2023.1 update with password..
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: RGBWW bulb issue

Post by manjh »

lshield wrote: Monday 13 March 2023 13:56 Are you using a Zigbee light? I don't use them so I don't have any of the Zigbee plugin installed. The bulb is a Yeelight bulb which mostly worked just with what is built in to the system.
Correct, this is a ZIgbee (Ikea) lamp. But what struck me is the fact that the behaviour is the same...
Hans
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: RGBWW bulb issue

Post by manjh »

lshield wrote: Monday 13 March 2023 23:31 Actually, I might have just fixed it. I removed my "192.168..." IP under trusted networks and just left the 127. Now it's working fine. Maybe there was a comma in between the two addresses instead of a semicolon.
I had a similar experience with two trusted IP ranges. I had a semicolon AND a space between the two. After I removed the space it worked OK.
Hans
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: RGBWW bulb issue

Post by waltervl »

manjh wrote: Thursday 16 March 2023 20:37
lshield wrote: Monday 13 March 2023 13:56 Are you using a Zigbee light? I don't use them so I don't have any of the Zigbee plugin installed. The bulb is a Yeelight bulb which mostly worked just with what is built in to the system.
Correct, this is a ZIgbee (Ikea) lamp. But what struck me is the fact that the behaviour is the same...
Dzvents uses http api for some functions like set color so that is why all rgbww devices have this issue with dzVents in 2023.1 if the security settings are not correct.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest