core
core copied to clipboard
Switcher Touch - discovered but no action from HA (related to home-assistant / core #91215)
The problem
A new switcher touch was not discovered by HA, found this issue in HA/CORE [https://github.com/https://github.com/home-assistant/core/pull/91215].
I noticed it was merged into DEV release of HA, but I can't comment there...
So I installed the DEV version and the new switch was discovered. it also got the sensors working and was updated in HA when triggered by the physical/app switch. The problem is that it can't be controlled from within HA. It seems like communication is passing from the switch to HA but not the other way around. please see the video:
https://user-images.githubusercontent.com/17390016/235326351-69ee2903-7bb8-499e-9e37-b6f0aef66ddf.mp4
What version of Home Assistant Core has the issue?
core-2023.5.0.dev20230423
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
switcher
Link to integration documentation on our website
https://www.home-assistant.io/integrations/switcher_kis/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @tomerfi, @thecode, mind taking a look at this issue as it has been labeled with an integration (switcher_kis
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of switcher_kis
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign switcher_kis
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
switcher_kis documentation switcher_kis source (message by IssueLinks)
attached the integration debug diagnostics config_entry-switcher_kis-963494e84b7783a15d68ef28184c752b.json (2).txt
@TomerFi anything else I can contribute to assist you with debugging it?
Unfortunately I haven't been using HA for a while nor have I actively maintained this integration for the last couple of years. @thecode will probably be able to provide better answers than me on this.
The problem originates at https://github.com/home-assistant/core/pull/91215 or more precisely at https://github.com/TomerFi/aioswitcher/pull/642 The reason I was waiting with adding additional port was that my install tests with adding this port did not work.
I don't have time to do reverse engineering now to understand what is different in these devices nor I didn't get any information from the vendor about what is needed to be updated to control them.
We can either revert this bump, leaving these devices not detected as they were before but not broken or keep it like and wait for someone to fix it.
I have this switch, and of course HA. Is there anything I can do to assist with the reverse engineering with your guidance? Im not the right man to do it alone, but I can be your ears and eyes and i really want to help solving it...
I can try to help too. I have a new switch (version 5.03), I did exactly what you did (manually override the integration from github). I started to debug it, maybe together we can fix it
@YuvalWS Im here for any need. But I can't code.... If you need anything to check, sniff, etc, just give me instructions! 🙌
I started to test it today, and I noticed a strange thing - a short time after the switcher connect to the network I can control it via the integration (at least turn it on and off), and after a few minutes it stops working. after a few minutes I could control it again. @thecode - I don't see a reason to revert, this state is better than nothing. I will try to look deeply into it later
I found that if I'm changing some unknown data in the packet it is working (only when I close the Switcher App)
Wireshark - Switcher App requests headers:
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Open App
Login - fe f0 52 00 02 32 a1 00 5e a2 a7 2c ed 03 01 00
On - fe f0 5d 00 02 32 01 02 5e a2 a7 2c ec 03 01 00
Off - fe f0 5d 00 02 32 01 02 5e a2 a7 2c ee 03 01 00
On - fe f0 5d 00 02 32 01 02 5e a2 a7 2c f1 03 01 00
Off - fe f0 5d 00 02 32 01 02 5e a2 a7 2c f2 03 01 00
Restart App
Login - fe f0 52 00 02 32 a1 00 a8 a2 a7 2c ed 03 01 00
On - fe f0 5d 00 02 32 01 02 a8 a2 a7 2c ec 03 01 00
Off -fe f0 5d 00 02 32 01 02 a8 a2 a7 2c ee 03 01 00
Header[08:0B] is the session_id Header[0C:0C] is the unknown data that looks like some index
I tested it with the change below:
REQUEST_FORMAT_TYPE1 = "{}ec0001000000000000000000{}00000000000000000000f0fe"
REQUEST_FORMAT_TYPE1_NEW = "{}ed0001000000000000000000{}00000000000000000000f0fe"
...
# format value just timestamp (initial session id is "00000000")
LOGIN_PACKET_TYPE1 = (
"fef052000232a10000000000" + REQUEST_FORMAT_TYPE1_NEW[2:] + "1c" + PAD_72_ZEROS + "00"
)
...
# format values are local session id, timestamp, device id, command, timer
SEND_CONTROL_PACKET = (
"fef05d0002320102" + REQUEST_FORMAT_TYPE1 + "{}" + PAD_72_ZEROS + "000106000{}00{}"
)
any update?
For me it's been 2 weeks and it works perfectly. Switcher 5.03, HA 2023.5.1
@YuvalWS what did you do to solve it?
I have the same issue.. Switcher Touch with 5.15 Firmware and HA 2023.06.2
I had this issue 3 days ago, now i wanted to start diving in but... I wanted to verify there is no something new on the onboarding process. So maybe there is something (maybe token generation, idw) but it is working now. so reonboard your device and update us if its working for you as well.
I removed the integration , installed it again, still the same behavior
I removed the integration , installed it again, still the same behavior
Not the integration, but the switcher device from switcher app and add it again to switcher app. I didnt touch HA at all.
I just tried that. Removed the device from the Switcher app and then onboarded it again. Then removed again the integration in HA and installed it again. Still the same behaviour.
Quick update, Switcher support asked me to enable the "local" toggle on the Switcher app. At first, it didn't help, but I did a power reset and reinstalled the integration in HA and it started working.
Quick update, Switcher support asked me to enable the "local" toggle on the Switcher app. At first, it didn't help, but I did a power reset and reinstalled the integration in HA and it started working.
@Kili4ka Can you confirm the switch model and fw version?
Switcher Touch (3 gewiss), FW 5.15
I can go ahead and approve this is fixed now.
the steps for getting it to work again in HA:
- upgrade to 5.15 FW
- delete the device from the switcher app
- delete switcher integration from HA (I did this step, but I'm not sure it is necessary for the process)
- change the switcher app to work in LOCAL mode
- add the device again
- add the HA integration again
Thanks to SWITCHER for supporting this issue!