Skip to content

Added Dual Head Feature & CLI Improvements#193

Open
sbidy wants to merge 9 commits intomasterfrom
feat/dual_head
Open

Added Dual Head Feature & CLI Improvements#193
sbidy wants to merge 9 commits intomasterfrom
feat/dual_head

Conversation

@sbidy
Copy link
Copy Markdown
Owner

@sbidy sbidy commented Oct 1, 2025

  • Breaking Change: CLI interaction will change! Arguments changed
  • Added dual head function to control the different heads in the bulbs/lights
  • CLI readme updated

@sbidy sbidy self-assigned this Oct 1, 2025
@sbidy sbidy added feature breaking change Breaking change - see comment labels Oct 1, 2025
@sbidy
Copy link
Copy Markdown
Owner Author

sbidy commented Oct 1, 2025

Will fix #191 but maintaining the state of the different heads still pending. A getPilot{"devices":2} will not return the state of device 2. - throws an error.

Copy link
Copy Markdown

@artoonie artoonie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the Wiz app can correctly read the state -- does that mean the API exists, we just need to reverse engineer it? Let me know if there's something I can help investigate here!

Comment thread pywizlight/bulb.py
resp = await self.send({"method": "getPilot", "params": {}})
if resp is not None and "result" in resp:
self.state = PilotParser(resp["result"])
sinlge_state = PilotParser(resp["result"])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/sinlge/single, this variable gets returned a few lines down.

@pauverblom
Copy link
Copy Markdown

Hi! I just wanted to report that I tested this branch on my specific Dual Head WiZ light (Model: Squire).

I successfully used the CLI to control both heads independently:

python3 -m pywizlight.cli color 192.168.1.233 '0,255,0' --device 1 (Worked)
python3 -m pywizlight.cli color 192.168.1.233 '255,0,0' --device 2 (Worked)

The functionality is solid. I see the checks are failing, but I wanted to confirm the logic is sound.

Let me know if you need any help to get this merged!

@leondelpech
Copy link
Copy Markdown

Hi @sbidy, I saw a discussion of probing the UDP and I had done just this. Happy to share the traffic.
I see that sometime back Wiz discuss the method syncPilot, I am a newbie at this, would it be possible to use this. It seems to return the state of the dual head. Happy to help where I can is there any guides around getting a successful pull request fror this?

@PixPMusic
Copy link
Copy Markdown

PixPMusic commented Jan 26, 2026

The Kelvin flag is currently broken, but it's a pretty simple fix, and in the same pass it's trivial to add RGBW and RGBWW control.

@PixPMusic
Copy link
Copy Markdown

PixPMusic commented Jan 26, 2026

And the lint issues are pretty simple to clean up. I've also adjusted the sync logic a bit to avoid ambiguous state data corrupting the display in HASS:

#197 should get this PR pretty close to being ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Breaking change - see comment feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants