Closed escharhon closed 2 months ago
I am experiencing this same issue but haven’t had the time to detail it. Please let me know if I can provide any additional logs or configuration information to assist in triage/troubleshooting/RCA.
Bumping this. :)
After much fiddling I have determined that the issue here isn't with the Wyze homebridge plugin, but with Homekit scenes themselves. I used the Eve App to modify the scenes and set them to only change color (instead of powering on, setting brightness AND color all at the same time) and now when I run the scenes via the Apple Home app them they change properly. From googling around this seems to be a known issue about how Homekit scenes work, and the only fix at the moment is to use a third party app (like Eve), to modify the scene.
So I found in the debug logs an issue where when changing multiple properties of lights as part of a scene (as @escharhon above mentioned) the P1507 (WYZE_API_COLOR_PROPERTY) value returns undefined. See below
[5/4/2024, 2:01:21 AM] [Wyze] run_action_list Data Body: {"action_list":[{"instance_id":"7C78B2214B0B","action_params":{"list":[{"mac":"7C78B2214B0B","plist":[{"pid":"P1507","pvalue":"undefined"},{"pid":"P3","pvalue":"1"}]}]},"provider_key":"WLPA19C","action_key":"set_mesh_property"}]}
[5/4/2024, 2:01:21 AM] [Wyze] run_action_list Data Body: {"action_list":[{"instance_id":"7C78B2214B0B","action_params":{"list":[{"mac":"7C78B2214B0B","plist":[{"pid":"P3","pvalue":"1"}]}]},"provider_key":"WLPA19C","action_key":"set_mesh_property"}]}
Now, interestingly, when setting ONLY the color value, as described above, for some reason the value is NOT undefined, but indeed contains a value.
[5/4/2024, 2:23:48 AM] [Wyze] run_action_list Data Body: {"action_list":[{"instance_id":"7C78B2214B0B","action_params":{"list":[{"mac":"7C78B2214B0B","plist":[{"pid":"P1507","pvalue":"ff6100"},{"pid":"P3","pvalue":"1"}]}]},"provider_key":"WLPA19C","action_key":"set_mesh_property"}]}
I'm not sure that this issue originates specifically from how HomeKit handles scenes, but instead how this plugin is handling that input.
And after investigating further (finding the plugin log setting) I was able to rip a log of exactly that happening.
[5/4/2024, 2:35:19 AM] [Wyze] [MeshLight] Setting brightness for "Office Light Center (7C78B2214B0B) to 1"
[5/4/2024, 2:35:19 AM] [Wyze] run_action_list Data Body: {"action_list":[{"instance_id":"7C78B2214B0B","action_params":{"list":[{"mac":"7C78B2214B0B","plist":[{"pid":"P1501","pvalue":"1"},{"pid":"P3","pvalue":"1"}]}]},"provider_key":"WLPA19C","action_key":"set_mesh_property"}]}
[5/4/2024, 2:35:19 AM] [Wyze] [MeshLight] Setting saturation (color) for "Office Light Center (7C78B2214B0B) to 100"
[5/4/2024, 2:35:19 AM] [Wyze] [MeshLight] H(S) Values: 100, 100
[5/4/2024, 2:35:19 AM] [Wyze] [MeshLight] Setting hue (color) for "Office Light Center (7C78B2214B0B) to 23 : (H)S Values: 23, 100"
[5/4/2024, 2:35:19 AM] [Wyze] ff6100
[5/4/2024, 2:35:19 AM] [Wyze] run_action_list Data Body: {"action_list":[{"instance_id":"7C78B2214B0B","action_params":{"list":[{"mac":"7C78B2214B0B","plist":[{"pid":"P1507","pvalue":"undefined"},{"pid":"P3","pvalue":"1"}]}]},"provider_key":"WLPA19C","action_key":"set_mesh_property"}]}
[5/4/2024, 2:35:19 AM] [Wyze] [MeshLight] Setting power for "Office Light Center (7C78B2214B0B)" to true"
[5/4/2024, 2:35:19 AM] [Wyze] run_action_list Data Body: {"action_list":[{"instance_id":"7C78B2214B0B","action_params":{"list":[{"mac":"7C78B2214B0B","plist":[{"pid":"P3","pvalue":"1"}]}]},"provider_key":"WLPA19C","action_key":"set_mesh_property"}]}
Here's the plugin log equivalent of the hue changes working:
[5/4/2024, 2:43:52 AM] [Wyze] [MeshLight] Setting hue (color) for "Office Light Center (7C78B2214B0B) to 23 : (H)S Values: 23, 100"
[5/4/2024, 2:43:52 AM] [Wyze] [MeshLight] Setting saturation (color) for "Office Light Center (7C78B2214B0B) to 100"
[5/4/2024, 2:43:52 AM] [Wyze] [MeshLight] H(S) Values: 100, 100
[5/4/2024, 2:43:52 AM] [Wyze] run_action_list Data Body: {"action_list":[{"instance_id":"7C78B2214B0B","action_params":{"list":[{"mac":"7C78B2214B0B","plist":[{"pid":"P1507","pvalue":"ff6100"},{"pid":"P3","pvalue":"1"}]}]},"provider_key":"WLPA19C","action_key":"set_mesh_property"}]}
Interestingly the hexValue is NOT logged in this scenario, which leads me to believe this is using a different function.
I'm not intimately familiar with the codebase, so I don't quite know where to go from here. I've traced the issue to—I think—the code in setHue() on line 209 in /accessories/WyzeMeshLight.js. It's obvious in the above logs that the application successfully produces a hexadecimal hue value (ff6100) for the API to consume, however it doesn't seem to make it there.
Describe The Bug: When adding a Wyze Bulb Color or a Light Strip Pro to a scene and choosing a color and then activating the scene, the bulb does not change to the chosen color.
It does work if you choose a "temperature" (shades of white), but not a color (Red, green, blue etc)
To Reproduce: Add Wyze Bulb Color and\or Light Strip Pro to a scene and choose a color. Run the scene.
Expected behavior: The Wyze Bulb Color and\or Light Strip Pro should change to the color that is chosen in the scene.
Logs:
Plugin Config:
Screenshots:
Environment: