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

SLZB-06 login errors on HA startup/reload #135870

Closed
Anto79-ops opened this issue Jan 17, 2025 · 9 comments · Fixed by smlight-tech/pysmlight#25 or #136496
Closed

SLZB-06 login errors on HA startup/reload #135870

Anto79-ops opened this issue Jan 17, 2025 · 9 comments · Fixed by smlight-tech/pysmlight#25 or #136496

Comments

@Anto79-ops
Copy link

Anto79-ops commented Jan 17, 2025

The problem

hello!

I have a SLZB-06 and recently updated the core firmware of the device from v2.3.6 to v2.6.8.dev26. The integration still works and entities are reporting however, on ever startup, these logs appear:

Logger: aiohttp_sse_client2.client
Source: runner.py:154
First occurred: 12:23:50 PM (1 occurrences)
Last logged: 12:23:50 PM

fetch http://slzb-06.local/events failed: 401: b'wrong login or password'

and

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:112
First occurred: 12:23:50 PM (1 occurrences)
Last logged: 12:23:50 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/pysmlight/sse.py", line 52, in client
    await self.sse_stream()
  File "/usr/local/lib/python3.13/site-packages/pysmlight/sse.py", line 58, in sse_stream
    async with EventSource(
               ~~~~~~~~~~~^
        self.url, session=self.session, timeout=self.timeout, max_connect_retry=8
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ) as event_source:
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp_sse_client2/client.py", line 126, in __aenter__
    await self.connect(self._max_connect_retry)
  File "/usr/local/lib/python3.13/site-packages/aiohttp_sse_client2/client.py", line 244, in connect
    raise ConnectionRefusedError(error_message, body)
ConnectionRefusedError: [Errno fetch http://slzb-06.local/events failed: 401: b'wrong login or password'] b'wrong login or password'

I restart the device and even deleted and added it again, still giving this log. Again, the intergration works its not broken or anything, just the logs are reported.

Is there some sort of typo with the b?

thanks

What version of Home Assistant Core has the issue?

2015.1.2

What was the last working version of Home Assistant Core?

n/a

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SM-Lite

Link to integration documentation on our website

https://www.home-assistant.io/integrations/smlight/

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

Hey there @tl-sl, mind taking a look at this issue as it has been labeled with an integration (smlight) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of smlight 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 smlight Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


smlight documentation
smlight source
(message by IssueLinks)

@heymoe
Copy link

heymoe commented Jan 20, 2025

Just wanted to add a "me too" to this report. I'm also running HAOS v2025.1.2 and my SLZB-06 is setup in Ethernet (PoE) mode. As the OP noted, this seems to happen on initial connection attempt after restart / reload but looks to connect correctly after retry being that my ZigBee devices are working and Zigbee2MQTT admin interface is working fine too.

@Anto79-ops
Copy link
Author

Anto79-ops commented Jan 20, 2025

also happens on the release FW, : core: v2.7.0 and on HA Core 2025.1.3.

thanks

@serlinGi
Copy link

same with SLZB-06p10 adapter in PoE etherneth;
also the binary_sensor.my-slzb_internet is in Unknown state.

@jrgx19
Copy link

jrgx19 commented Jan 22, 2025

I have the same issue with the SLZB-06M core v2.7.1 | Zigbee 20241127. Home Assistant Core 2025.1.3 | Supervisor 2024.12.3 | Operating System 14.1 | Frontend 20250109.0. All the Zigbee devices communicate fine with HA.

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:112
First occurred: 11:12:08 (1 occurrences)
Last logged: 11:12:08

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/pysmlight/sse.py", line 52, in client
    await self.sse_stream()
  File "/usr/local/lib/python3.13/site-packages/pysmlight/sse.py", line 58, in sse_stream
    async with EventSource(
               ~~~~~~~~~~~^
        self.url, session=self.session, timeout=self.timeout, max_connect_retry=8
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ) as event_source:
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp_sse_client2/client.py", line 126, in __aenter__
    await self.connect(self._max_connect_retry)
  File "/usr/local/lib/python3.13/site-packages/aiohttp_sse_client2/client.py", line 244, in connect
    raise ConnectionRefusedError(error_message, body)
ConnectionRefusedError: [Errno fetch http://slzb-06m.local/events failed: 401: b'wrong login or password'] b'wrong login or password'

@andy778
Copy link

andy778 commented Jan 23, 2025

I have the same issue with the SLZB-06 core v2.7.0 & v2.7.1 | Zigbee 20241127. Home Assistant Core 2025.1.3| Supervisor 2024.12.3

2025-01-23 22:11:18.717 ERROR (MainThread) [aiohttp_sse_client2.client] fetch http://slzb-06.local/events failed: 401: b'wrong login or password'
2025-01-23 22:11:18.718 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/pysmlight/sse.py", line 52, in client
    await self.sse_stream()
  File "/usr/local/lib/python3.13/site-packages/pysmlight/sse.py", line 58, in sse_stream
    async with EventSource(
               ~~~~~~~~~~~^
        self.url, session=self.session, timeout=self.timeout, max_connect_retry=8
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ) as event_source:
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp_sse_client2/client.py", line 126, in __aenter__
    await self.connect(self._max_connect_retry)
  File "/usr/local/lib/python3.13/site-packages/aiohttp_sse_client2/client.py", line 244, in connect
    raise ConnectionRefusedError(error_message, body)
ConnectionRefusedError: [Errno fetch http://slzb-06.local/events failed: 401: b'wrong login or password'] b'wrong login or password'

@andy778
Copy link

andy778 commented Jan 24, 2025

Seems some of these request are missing the "Authorization: Basic *" (Replaced the base64 encoded passwd with X)

GET /api2?action=0&page=1 HTTP/1.1
Host: slzb-06.local
User-Agent: HomeAssistant/2025.1.4 aiohttp/3.11.11 Python/3.13
Accept: */*
Accept-Encoding: gzip, deflate, br
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


GET /api2?action=0&page=1 HTTP/1.1
Host: slzb-06.local
User-Agent: HomeAssistant/2025.1.4 aiohttp/3.11.11 Python/3.13
Accept: */*
Accept-Encoding: gzip, deflate, br

Image

@tl-sl
Copy link
Contributor

tl-sl commented Jan 24, 2025

ConnectionRefusedError: [Errno fetch http://slzb-06.local/events failed: 401: b'wrong login or password'] b'wrong login or password'

the SSE server was moved to a new port, maybe there is something failing with the redirect. I will update to use the new location directly.

@tl-sl
Copy link
Contributor

tl-sl commented Jan 25, 2025

Having authentication enabled breaks the redirection to the new SSE server location. I am preparing a fix for this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants