Skip to content

"Invalid password" after some period #12

@cbrunnkvist

Description

@cbrunnkvist

I'm observing a consistent issue between my Homebridge and the two Shelly 1 PM that I have connected: it was all fine and dandy. I added password auth on the Shelly devices, and it still works, initially. What seems to happen with homebridge-shelly-ng though is that after a certain amount of time (haven't measured, but it seems to be about 60 mins) of idling, the accessories just stop working, and I see the following in the logs when I try and toggle their switches:

[2/9/2024, 9:11:50 PM] [Shelly NG] [Floor Fan] Failed to set switch: Invalid password
[2/9/2024, 11:05:41 PM] [Shelly NG] [Disco Light] Failed to set switch: Invalid password

I immediately suspected some kind of underlying code-related issue (since I didn't change passwords either in Homebridge or on the devices) so I added rudimentary extra logging to the place where the message originates:

[2/9/2024, 9:11:50 PM] [Shelly NG] [Floor Fan] Failed to set switch: Invalid password (correct-password-here): {"auth_type": "digest", "nonce": 1707487913, "nc": 1, "realm": "shellyplus1pm-441793aaaaaa", "algorithm": "SHA-256"}

so I can only conclude that that far, it looks like we have the right password and we are still seeing a Digest challenge with new nonce and so on.

Restarting the plugin/child-bridge clears the problem, but only until next period.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions