Replies: 5 comments 1 reply
-
Which switches are you using? WiZ branded ones? I think WiZ has used different combinations of Bluetooth, IR, and WiFi for remotes, there's a chance that if the switch is WiFi we could figure out how to receive messages from the remote directly instead of the lights via polling. Also I may be wrong, but I think your WireShark is simply misinterpreting the traffic as being ADwin configuraion data. The rest of the data looks like what I have been seeing from my bulbs assuming your LAN is using the entire 172.16/12 address space. The firstBeat method seems to only be fired the first time a bulb is connected to power, which probably isn't useful for the purposes you/we would want to use it for. |
Beta Was this translation helpful? Give feedback.
-
Ah I was a bit unclear, sorry! I mean that I use old school mains wall switches which will cut out electricity from bulbs, not any smart switches. So when I switch electricity back on I would like to see faster bulb detection as e.g. Trådfri does so I could apply bulb settings with less delay. I am trying to understand home assistant architecture, but it's a bit hard since I am no Python developer. But if I got this right then in ordet to get this done pywizlight library should listen for these broadcast messages and if it detects this firstBeat meassge then it would kick further action to happen. Not sure if this is feasible, I'll try to read more documentation and code and see if I could do something. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Ah, I was able to hack together something and managed to get this work. Lights are now updated to correct color temperature and brightness (using flux) after few seconds when they are switched on from mains switch. I modified light.py and added a new service which, when called, polls immediate update from that specific bulb. Then I created small python script which listens for udp broadcasts and in case of firstBeat will call this new service. This is not ideal of course, but I have no idea how to make home assistant to listen udp broadcasts... |
Beta Was this translation helpful? Give feedback.
-
Thanks! For the record, if somebody is interested; I was able to implement UDF broadcast listener into wiz_light instead of using external python scripts. I am not going to create a pull request since I know that I've probably broken toomany home assistant rules. If interested just check my fork of wiz_light. I hope functionality like this could be impemented in the future. |
Beta Was this translation helpful? Give feedback.
-
I added the Update Service from @jarpatus into the current HASS core implementation. The UDP boardcast listener is a great idea. I had a look into that and it looks as an possible solution for me. But I saw some problems with dual homed or dockered HASS instances. This can be a problem to get the broadcast form another network. |
Beta Was this translation helpful? Give feedback.
-
Hi! First of all this is wonderful integration, thank you! I just bought few WiZ bulbs to experiment and then proceeded to bought WiZ bulbs for whole house since Everything Just Works and I was able to make follow-the-sun color temperature using home assistant.
In any case, I wonder if it's possible to "fast detect" when WiZ bulb has been switched on from wall switch? Now it seems integration is polling all bulbs and it could take quite a long time until this integration detects that bulb has been switched on. Fast detect would be very useful e.g. for applying correct color temperature and brightness when light has been switched on. This works e.g. with Ikea Trådfri gateway but I want to get rid of them.
I proceeded to sniff my network traffic and it seems bulbs do broadcast their presence, so if this broadcast could be captured then polling that bulb could be triggered instantly? Here's the broadcast message I can see:
Ok actually I am a bit worried about this message as it contains IP addresses in Vietnam, I wonder if bulbs will actually connect to Vietnam in addition to these broadcast messages... But that is another story.
Beta Was this translation helpful? Give feedback.
All reactions