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

TX Ultimate - Touch Sensor activating every minute #1373

Closed
NullScope opened this issue Mar 28, 2024 · 17 comments · Fixed by #1378
Closed

TX Ultimate - Touch Sensor activating every minute #1373

NullScope opened this issue Mar 28, 2024 · 17 comments · Fixed by #1378
Assignees
Labels
bug Something isn't working

Comments

@NullScope
Copy link
Contributor

NullScope commented Mar 28, 2024

I've added a TX Ultimate 1 Switch (T5-1C-86) into my house, and used SonoffLAN to add it to home assistant, however for some reason, the Touch sensor it adds, keeps swapping to "Touch" every minute. I've checked the eWeLink app and this isn't registered on the logs, nor do the lights turn on/off or flicker, so it seems it might be an issue with the integration. This makes it impossible to automate using the sensor

image

image

Here are all the logs:
home-assistant_sonoff_2024-03-28T16-05-58.666Z.log
sonoff-b22067f983846bf70d4ec053712eb710-Bathroom Wall Switch-9487f15a23fad64008a7d7e80740df1f.json

@NullScope
Copy link
Contributor Author

NullScope commented Mar 28, 2024

Seems if I set the integration to Cloud/Auto the spamming stops, however no "touch" event gets fired, only slide_1 and slide_2

@NullScope
Copy link
Contributor Author

NullScope commented Apr 3, 2024

Upon further investigation, it seems that in Auto there is in fact a "touch" event, however the issue still happens, but only every hour. I looked into the code and saw that it is pinging the switch which causes the switch to then reply with this message:

2024-04-03 16:29:54 [D] 100208fab3 <= Local3 | 192.168.1.18:8081 | {'percentageControl': 0, 'calibState': False, 'triggerType': 2, 'fwVersion': '1.3.1', 'rssi': -79} | 317

The code then interprets this as a "touch" event, however a true touch event has a switches array in the message like so:

2024-04-03 13:55:44 [D] 100208fab3 <= Local3 | 192.168.1.18:8081 | {'switches': [{'switch': 'on', 'outlet': 0}], 'percentageControl': 0, 'calibState': False, 'triggerType': 2, 'fwVersion': '1.3.1', 'rssi': -91} | 282

I will make a PR to fix this issue

@AlexxIT AlexxIT added the bug Something isn't working label Apr 8, 2024
@AlexxIT AlexxIT self-assigned this Apr 8, 2024
AlexxIT added a commit that referenced this issue Apr 16, 2024
@GONOD
Copy link

GONOD commented Jun 4, 2024

I comment here because I still have the issue.
I have more than 10 T5 1/2/3/4 switches and I have a switches array in the response:

2024-06-04 14:57:47.942 DEBUG (MainThread) [custom_components.sonoff.core.ewelink] 1001f11217 <= Local3 | xxx.xxx.x.xxx:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'off', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 2, 'lightSwitch': 'off', 'lightMode': 0, 'shock': 1, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '22:00', 'to': '07:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', ...} | 11382

So I guess the fix is only for T5 with 1 switch

@NullScope
Copy link
Contributor Author

@GONOD what version do you have currently installed? I ask because my fix just looks for the presence of the switches array, which you have.

Do you have the switch in eletromotor mode? Given the presence of 'electromotor': 1 which is maybe making it go into another component in SonoffLAN

@GONOD
Copy link

GONOD commented Jun 4, 2024

@NullScope I have the 3.7.3 (the latest) that include your fix (already checked on the code).
And I guess the presence of the switches array depends on the type of switch 1 or more buttons. One button, no array, and if there are more than one buttons it will send the array with the state of each switches.

I'm not in electromotor mode. (Not on the ewelink app...it's switch mode).
Screenshot_20240604-164948

@NullScope
Copy link
Contributor Author

NullScope commented Jun 4, 2024

One button, no array, and if there are more than one buttons it will send the array with the state of each switches.

This is odd as I only have 1 TX Ultimate and its one switch / gang, which was sending the array, unless something has changed on the recent firmware update, but I also have that updated to the latest version

@martinmasera
Copy link

hello
how you fix that matter I alos get a constantly Action of that switches in my log files.

@NullScope
Copy link
Contributor Author

@martinmasera what switch do you have? Can you share the logs?

@martinmasera
Copy link

martinmasera commented Sep 3, 2024 via email

@NullScope
Copy link
Contributor Author

@martinmasera please get the sonoffLAN debug logs, can't understand what is happening with that logbook

@martinmasera
Copy link

martinmasera commented Sep 3, 2024 via email

@NullScope
Copy link
Contributor Author

@martinmasera those are the ones thanks, could you confirm me which switches have these IP addresses?

192.168.3.126
192.168.3.129
192.168.3.130
192.168.3.131
192.168.3.136
192.168.3.138
192.168.3.251

It would help me filter the logs better, on my side I only have a single sonoff device, so the fact that you have different switches in the same account might be what is causing the issue

@martinmasera
Copy link

martinmasera commented Sep 3, 2024 via email

@NullScope
Copy link
Contributor Author

@martinmasera I see a few of them are giving error 400 on the sequence messages, and you have a bunch of You logged in from another place, could you try creating a another eWeLink account dedicated to home assistant and share the devices with that account and reconfigure SonoffLAN to use that account? As per https://github.com/AlexxIT/SonoffLAN?tab=readme-ov-file#configuration

Please let me know if that helps

@martinmasera
Copy link

martinmasera commented Sep 5, 2024 via email

@martinmasera
Copy link

martinmasera commented Sep 5, 2024 via email

@NullScope
Copy link
Contributor Author

Hi @martinmasera no problem, glad that it fixed the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants