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

add support for new auth #47

Merged
merged 7 commits into from
Oct 8, 2024
Merged

add support for new auth #47

merged 7 commits into from
Oct 8, 2024

Conversation

apatsufas
Copy link
Owner

@apatsufas apatsufas commented Oct 18, 2023

  • Fixes issue where devices would not connect after firmware update
  • Stability improvements
  • Code refactoring and under the hood improvements

@akudev
Copy link

akudev commented Nov 13, 2023

I am using this plugin inside the Homebridge Accessory Manager adapter in iobroker and can confirm that this (1.5.0-beta3) allows my L510 bulbs to be controlled again.

But this only works for "the rest of the day": next morning state changes do not change the physical lamp anymore. However, a restart of the Homebridge Accessory Manager fixes this and everything works again. So I guess there is some initialization code which needs to be run again once there is some sort of session expiry.

Edit: other Homebridge plugins I use within HAM do not require this restart, hence my assumption that this behavior is TAPO-specific.

@akudev
Copy link

akudev commented Nov 16, 2023

Even worse: I believe that once this happens, the plugin goes wild until my Raspberry becomes unresponsive.
/var/log/syslog contains literally hundreds of these message per second:

Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80
Nov 16 10:09:06 pi bash[538]: [16/11/2023, 10:09:06] [Tapo Smart Platform] 322 Error: connect ECONNRESET 192.168.178.79:80`

And then the syslog content ends. That's the last entries, nothing else for hours until I force-rebooted it. (It did not even respond to ping.)

In the iobroker log at the same time:

2023-11-16 10:07:00.611  - debug: ham.0 (18081) Char change event: false --> false
2023-11-16 10:07:00.612  - debug: ham.0 (18081) handleCharValue = false
2023-11-16 10:07:00.630  - debug: ham.0 (18081) setState tapo-lampe-2.Lightbulb.On: set value = false
2023-11-16 10:07:00.631  - debug: ham.0 (18081) Char change event: 15 --> 15
2023-11-16 10:07:00.631  - debug: ham.0 (18081) handleCharValue = 15
2023-11-16 10:07:00.646  - debug: ham.0 (18081) setState tapo-lampe-2.Lightbulb.Brightness: set value = 15
2023-11-16 10:07:00.681  - info: ham.0 (18081) stateChange ham.0.tapo-lampe-2.Lightbulb.On {"val":false,"ack":true,"ts":1700125620675,"q":0,"from":"system.adapter.ham.0","user":"system.user.admin","lc":1700117754129}
2023-11-16 10:07:00.685  - info: ham.0 (18081) stateChange ham.0.tapo-lampe-2.Lightbulb.Brightness {"val":15,"ack":true,"ts":1700125620676,"q":0,"from":"system.adapter.ham.0","user":"system.user.admin","lc":1700117749125}
2023-11-16 10:07:02.651  - debug: ham.0 (18081) Char change event: false --> false
2023-11-16 10:07:02.652  - debug: ham.0 (18081) handleCharValue = false
2023-11-16 10:07:02.661  - debug: ham.0 (18081) setState tapo-lampe-2.Lightbulb.On: set value = false
2023-11-16 10:07:02.661  - debug: ham.0 (18081) Char change event: 15 --> 15
2023-11-16 10:07:02.661  - debug: ham.0 (18081) handleCharValue = 15
2023-11-16 10:07:02.667  - debug: ham.0 (18081) setState tapo-lampe-2.Lightbulb.Brightness: set value = 15
2023-11-16 10:07:02.681  - info: ham.0 (18081) stateChange ham.0.tapo-lampe-2.Lightbulb.On {"val":false,"ack":true,"ts":1700125622679,"q":0,"from":"system.adapter.ham.0","user":"system.user.admin","lc":1700117754129}
2023-11-16 10:07:02.684  - info: ham.0 (18081) stateChange ham.0.tapo-lampe-2.Lightbulb.Brightness {"val":15,"ack":true,"ts":1700125622679,"q":0,"from":"system.adapter.ham.0","user":"system.user.admin","lc":1700117749125}
2023-11-16 10:07:05.003  - debug: ham.0 (18081) Char change event: false --> false
2023-11-16 10:07:05.004  - debug: ham.0 (18081) handleCharValue = false
2023-11-16 10:07:05.021  - debug: ham.0 (18081) setState tapo-lampe-2.Lightbulb.On: set value = false
2023-11-16 10:07:05.022  - debug: ham.0 (18081) Char change event: 15 --> 15
2023-11-16 10:07:05.022  - debug: ham.0 (18081) handleCharValue = 15
2023-11-16 10:07:05.047  - debug: ham.0 (18081) setState tapo-lampe-2.Lightbulb.Brightness: set value = 15

"Change" between equal states.

I can't tell whether this is caused by embedding inside iobroker or by the plugin itself, so I don't open an issue, but I wanted to let you know within this PR that something might be wrong.

@Heisenberg2018
Copy link

Is there any new information when the update will be released?

@apatsufas apatsufas merged commit 5b66205 into master Oct 8, 2024
0 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants