-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two Wizmote simultaneosly #4
Comments
The blueprint is only set up for a single remote. You need to set up two automations from the blueprint, or you could modify the blueprint to support multiple remotes. As for you other issue, I am not too sure. The logs you are seeing above are showing that the remote is sending and ESPHome is receiving correctly. |
I think it is to do with last_sequence being shared amongst all on_esp_now_message calls rather than saving the last_sequence per remote mac address. Whichever message (remote) has the highest wizmote.sequence number will trigger wizmote on_button. I have two remote here and only one usually fires events into home assistant yet both remotes are being seen in the esphome logs. If I keep clicking the non-responsive remote enough times to have a higher sequence number, it will begin to function then the other remote will fail until its sequence number is the highest. This probably explains the behavior @hirkkak is seeing. |
I discovered that new remote works only when i reboot HA, until i use any button on the old one. I tried to use same button on the old one for about 100 times, but didn`t work. Any idea? |
I think you may need to press the buttons on the new remote many more times. This will not solve the issue but will confirm it is the same one I have observed. Could you press the number 1 on each remote and post the esphome log output here? |
Hi, here is the conclusion. Button 3, on Working Wiz1 Remote: Button 3, on NON Working Wiz2 Remote: Button 3, on NON Working Wiz2 remote after about 100 clicks. Buttton 3, on WORKING Wiz1: Button 3, on NON Working Wiz2 remote after thousands clicks. Button 3, on WORKING Wiz2 remote after thousands clicks + 2. So you are right. The highest one, wins!! Now, if i click 3 times on wiz 1, have to click other 3 on wiz2 to get working and vice versa The question is? There is some magical and extra easy solution? ;-) Thx in advance for all, and sorry for delay, away from home. |
Hi i replaced '<=' by '==' it seem works perfectly on wizmote.cpp void WizMoteListener::on_esp_now_message(esp_now::ESPNowPacket packet) { this->last_sequence_ = wizmote.sequence; |
Ah sorry, I misunderstood your original issue. Yeah this makes perfect sense that the sequence needs to be unique per remote mac. I will try make some time to fix this. |
@jesserockz was this ever corrected? |
It doesn't look like the change from @hirkkak was ever pushed, but I went and made it myself and can confirm both of my WIZ remotes now work correctly. |
Off topic, and pardon my ignorance but does one need a ESP32 board dedicated to capture the wizmote packets or can Home Assistant's ESPHome do that by itself? @bbass101 |
I forked the repo and added the fix listed above by @hirkkak and updated the blueprint to support multiple remotes. There is an issue with it: If multiple remotes have a button pressed at the same time, it will appear that the buttons were pressed multiple times. #9 I have an idea on how to better fix it, but it will have a limitation on how many remotes it can support... Edit: I updated my fork with my idea of a fix. Added an array that fixes the bug I mentioned earlier. Now it supports up to 15 remotes without the multiple button press issues I mentioned. Not the most elegant solution, but it works. |
Looks like this issue and #14 can be closed as resolved. |
Hello, Congratulations for your work, first of all.
I had a wizmote controller and it has been very useful for me to make it work with HA. The fact is that I decided to buy a second controller to have the same functions twice. But it only works when I put the MAC field, which also doesn't support multiple values (or I don't know how to put them). And if I don't fill it, only the first wizmote works. Is there any solution for this? Is there a way to make both work simultaneously?.
Greetings and thank you very much!
EDIT:
After some more testing, the new controller no longer works.
No event is heard (using developer options)
Neither esphome.wizmote_choose nor esphome.wizmote_action
But if both events are shown in the esphome log
Off button of the remote that not works.
[01:10:07][D][esp_now:071]: mac: 6C.29.90.0D.6A.1E (6), data: 81.E3.02.00.00.20.02.01.57.4F.72.5F.E5 (13)
Off button of the remote that works.
[01:10:50][D][esp_now:071]: mac: 6C.29.90.06.0D.AE (6), data: 81.DA.05.00.00.20.02.01.54.6C.E3.F7.B9 (13)
EDIT2: The new controller randomly works(some days it works and other days it doesn't). How can i debug it?
The text was updated successfully, but these errors were encountered: