Skip to content
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

Switcher Touch - discovered but no action from HA (related to home-assistant / core #91215) #92269

Closed
adizag opened this issue Apr 29, 2023 · 22 comments

Comments

@adizag
Copy link

adizag commented Apr 29, 2023

The problem

A new switcher touch was not discovered by HA, found this issue in HA/CORE [https://github.com/https://github.com//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:

switcher.DUDE.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

@home-assistant
Copy link

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)

@adizag
Copy link
Author

adizag commented Apr 30, 2023

attached the integration debug diagnostics
config_entry-switcher_kis-963494e84b7783a15d68ef28184c752b.json (2).txt

@adizag
Copy link
Author

adizag commented May 2, 2023

@TomerFi anything else I can contribute to assist you with debugging it?

@TomerFi
Copy link
Contributor

TomerFi commented May 2, 2023

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.

@thecode
Copy link
Member

thecode commented May 2, 2023

The problem originates at #91215 or more precisely at TomerFi/aioswitcher#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.

@adizag
Copy link
Author

adizag commented May 2, 2023

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...

@YuvalWS
Copy link

YuvalWS commented May 2, 2023

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

@adizag
Copy link
Author

adizag commented May 2, 2023

@YuvalWS
Im here for any need. But I can't code....
If you need anything to check, sniff, etc, just give me instructions! 🙌

@YuvalWS
Copy link

YuvalWS commented May 3, 2023

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

@zVaz
Copy link

zVaz commented May 8, 2023

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{}"
)

@adizag
Copy link
Author

adizag commented May 15, 2023

any update?

@YuvalWS
Copy link

YuvalWS commented May 15, 2023

For me it's been 2 weeks and it works perfectly. Switcher 5.03, HA 2023.5.1

@adizag
Copy link
Author

adizag commented May 15, 2023

@YuvalWS what did you do to solve it?

@Kili4ka
Copy link

Kili4ka commented Jun 15, 2023

I have the same issue..
Switcher Touch with 5.15 Firmware and HA 2023.06.2

@Yogranov
Copy link

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.

@Kili4ka
Copy link

Kili4ka commented Jun 17, 2023

I removed the integration , installed it again, still the same behavior

@Yogranov
Copy link

Yogranov commented Jun 17, 2023

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.

@Kili4ka
Copy link

Kili4ka commented Jun 17, 2023

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.

@Kili4ka
Copy link

Kili4ka commented Jun 19, 2023

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.

@adizag
Copy link
Author

adizag commented Jun 19, 2023

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?

@Kili4ka
Copy link

Kili4ka commented Jun 19, 2023

Switcher Touch (3 gewiss), FW 5.15

@adizag
Copy link
Author

adizag commented Jun 21, 2023

I can go ahead and approve this is fixed now.

the steps for getting it to work again in HA:

  1. upgrade to 5.15 FW
  2. delete the device from the switcher app
  3. delete switcher integration from HA (I did this step, but I'm not sure it is necessary for the process)
  4. change the switcher app to work in LOCAL mode
  5. add the device again
  6. add the HA integration again

Thanks to SWITCHER for supporting this issue!

@adizag adizag closed this as completed Jun 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants