kpsuperplane / homebridge-wiz-lan

Control Wiz lights over LAN
Apache License 2.0
115 stars 37 forks source link

(WIZ Scene) Switch Accessory #102

Closed MoTechnicalities closed 2 years ago

MoTechnicalities commented 2 years ago

Now that I have a little bit more understanding about how WIZ bulbs tick. I'd like to request a new plugin feature!

FEATURE: A (HomeKit WIZ Scene) Switch Accessory

WHY: The current method of access to WIZ Scenes has grouping limitations that can be overcome by the below method. The WIZ app can only create Siri activated scenes and not HomeKit automated scenes.

DESIGN: A plugin configuration option to add a separate ON/OFF switch accessory to be associated with a WIZ bulb that when activated will turn ON/OFF any given previously configured WIZ Scene for that particular bulb. Each light bulb may optionally have 1 associated scene switch accessory that activates 1 previously configured scene.

EXAMPLE:

User can optionally create an ON/OFF switch accessory associated with a WIZ bulb and a WIZ scene. When activated the switch accessory will set its associated bulb to any previously configured WIZ Scenes 1 - 32. And when deactivated will return the bulb back to a previously configured normal state.

ADVANTAGES:

Allows individual light bulbs to remain groupable in HomeKit with other light bulbs. Allows individual scene switches to be groupable in HomeKit with other switches. Allows the user to crate, name a [group scene switch] in the Home App, then toggle, create Automatons for, or issue commands to Siri to activate or deactivate a given scene for all associated lights at the same time. Because each switch accessory can specify its own WIZ scene, activating grouped switch accessories could allow easy simultaneously activation of complex lighting effects. Allows WIZ scenes switch accessories to be activated via HomeKit bottons such as Flic.

BASIC USE CASE: User can have separate lights and/or grouped lights in a room, yet create a group switch that will activate a previously specified WIZ scene to all lights associated with the switch accessories placed in that group switch.

"Hey Siri... Activate the Nightlight switch." Siri then activates the group scene switch which was named Nightlight switch, and sets all grouped switch accessories/bulbs to the configured Nightlight scene, even if the bulbs themselves are not grouped or in separate rooms.

"Hey Siri... Activate the Basement Party switch." Siri then activates the group scene switch which was named Basement Party switch, and sets all grouped switch accessories/bulbs to the configured Party scene (different bulbs cycling colors at different speeds!), even if the bulbs themselves are not grouped or in separate rooms.

TECHNICAL HURDLES The plugin would have to create a switch accessory, and associate the switch accessory with the Mac and IP addresses of a given bulb. Activating the switch could simply send a direct command to its bulb similar to this: echo '{"method":"setPilot","env":"pro","params":{"mac":"a8ba50ac5cc1","src":"","state":true,"sceneId":14,"speed":100,"dimming":100}}' | nc -u 192.168.1.180 38899 Deactivating the switch could simply send a direct command to its bulb similar to this: echo '{"method":"setPilot","env":"pro","params":{"mac":"a8ba50ac5cc1","src":"","state":true,"temp":2580}}' | nc -u 192.168.1.180 38899 or to whatever the bulb's state was before switch activation. The switch accessory could maintain accurate sync by checking the previously configured "sceneId": value against the bulb's current value.

Note: Similar methods may or may not be already possible, given the plethora of different switch plugins, but, I think it would be a very useful feature to have already incorporated into the homebridge-wiz plugin.

image

Please give it a Thumbs-Up!