OpenWiz
OpenWiz copied to clipboard
Dimming not setting properly
Hey there! I assume this is more a light issue than an issue with the library, but I wanted to see if you have this experience. I can update my dimming just fine, but when it is set to 100, it is nowhere near full brightness, and anything more than that gives an error. Here is some sample code to work with.
var command = new WizParams();
command.State = true;
command.Dimming = 150;//_options.LightSettings.Wiz.Brightness;
command.Speed = 0;
command.R = 255;
command.B = 0;
command.G = 0;
UpdateLight(command, lightMacAddress);
private WizResult UpdateLight(WizParams wizParams, string lightId)
{
WizSocket socket = new WizSocket();
socket.GetSocket().EnableBroadcast = true; // This will enable sending to the broadcast address
socket.GetSocket().ReceiveTimeout = 1000; // This will prevent the demo from running indefinitely
WizHandle handle = new WizHandle(lightId, IPAddress.Broadcast); // MAC doesn't matter here
WizState state = new WizState
{
Method = WizMethod.setPilot,
Params = wizParams
};
socket.SendTo(state, handle);
WizResult pilot;
while (true)
{
state = socket.ReceiveFrom(handle);
pilot = state.Result;
break;
}
return pilot;
}
Hi @isaacrlevin ! I swear I check up regularly, so sorry for the wait. I'll try to get the fix up today.
So after a bit of finessing, I realized that the hue LEDs aren't as perceivably bright as the cool/warm white LEDs.
I played with Params.Dimming (by the way, values here are in [10, 100]) and no max colored LED produces as intense a light. You could try using the white LED's in tandem, but the final color looses a lot of saturation.
Makes sense, except why does the app allow you to have full brightness when you change color
Get Outlook for Androidhttps://aka.ms/ghei36
From: Christopher Madrigal [email protected] Sent: Wednesday, March 3, 2021 6:28:53 PM To: UselessMnemonic/OpenWiz [email protected] Cc: Isaac Levin [email protected]; Mention [email protected] Subject: Re: [UselessMnemonic/OpenWiz] Dimming not setting properly (#2)
So after a bit of finessing, I realized that the hue LEDs aren't as perceivably bright as the cool/warm white LEDs.
I played with Params.Dimming (by the way, values here are in [10, 100]) and no max colored LED produces as intense a light. You could try using the white LED's in tandem, but the final color looses a lot of saturation.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/UselessMnemonic/OpenWiz/issues/2#issuecomment-790235952, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACDXTJTTI2VXKCGBFCFU7OTTB3V6LANCNFSM4YC3HZSQ.
The controls on the app map more or less directly to the parameters for setPilot
. I went ahead and selected full bright red on the app. This is part of the result of getPilot
:
{
"method" : "getPilot",
"result" : {
"rssi" : -54,
"state" : true,
"sceneId" : 0,
"r" : 255,
"dimming" : 100
}
}
I tried manually setting the same color, and I get the same result. Full brightness on the app doesn't correlate to physical brightness.
That is really odd. If I set dimming to 100, like below, the light is nowhere near as bright as setting red in the app
WizSocket socket = new WizSocket();
socket.GetSocket().EnableBroadcast = true; // This will enable sending to the broadcast address
socket.GetSocket().ReceiveTimeout = 1000; // This will prevent the demo from running indefinitely
WizHandle handle = new WizHandle(lightId, IPAddress.Broadcast); // MAC doesn't matter here
WizState state = new WizState
{
Method = WizMethod.setPilot,
Params = new WizParams{
State = true,
Dimming = 100,
Speed = 0,
R = 255,
B = 0,
G = 0
}
};
socket.SendTo(state, handle);
WizResult pilot;
while (true)
{
state = socket.ReceiveFrom(handle);
pilot = state.Result;
break;
}
Which particular bulb are you using? I have tested only with the BR30 model, so perhaps your bulb needs some extra configuration.
Alternatively, how often do you send updates? I find that frequent updates cause the bulb to stop mid-transition.
I have an A19 bulb
Get Outlook for Androidhttps://aka.ms/ghei36
From: Christopher Madrigal [email protected] Sent: Thursday, March 4, 2021 6:09:16 PM To: UselessMnemonic/OpenWiz [email protected] Cc: Isaac Levin [email protected]; Mention [email protected] Subject: Re: [UselessMnemonic/OpenWiz] Dimming not setting properly (#2)
Which particular bulb are you using? I have tested only with the BR30 model, so perhaps your bulb needs some extra configuration.
Alternatively, how often do you send updates? I find that frequent updates cause the bulb to stop mid-transition.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/UselessMnemonic/OpenWiz/issues/2#issuecomment-791092529, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACDXTJSXUPMMNQQRY6OQTXLTCA4MZANCNFSM4YC3HZSQ.
Could you post a link to the item you bought, by chance? I see a few labeled A19, I just want to be sure I grab the same one.
https://www.homedepot.com/p/WiZ-60W-Equivalent-A19-Colors-and-Tunable-White-Wi-Fi-Connected-Smart-LED-Light-Bulb-IZ0126081/303142930
Any update here?
Hi there, sorry about the wait, I've gotten busier with work and I'm having troubles securing a bulb
Did a bit more digging here. It seems that if you increase Dimming
to over 100, you will get a an Invalid params message
Since 100 dimming is pretty dark, I think the issue is related to not accepting more than 100. For instance, I tried doing this in Python with pywizlight and had no issues setting the dimming to 255.
Disregard the nonsense about dimming over 255, I realized that that pywizlight also uses 0-100
@UselessMnemonic now that you have a light. Can you try to repro what I am seeing here?
Same problem with A19 bulb
Hey @UselessMnemonic coming back here to see if you have had a chance to look at this. I can try to debug, but I am not sure how you debug this issue
Hello @UselessMnemonic checking to see if had any ideas with the dimming of the A19 bulb