Skip to content

Received 'response: {'ret': '100', 'msg': 'not logined or expired' }  #5

@youzer-name

Description

@youzer-name

I received the message:

response: {'ret': '100', 'msg': 'not logined or expired' }

just after "request: device/getDeviceDetails.json, {}" when trying to run a script. (that's not a typo... it says "logined")

This occurred one day after initially starting to use your script, so it appears I was within 24 hours of my first login and the python-sengled-client was attempting to use the cached login but my login on the Sengled server had expired. I received this message twice in a row. I then deleted the contents of the pickle file and the next attempt to run the script worked.

I am not very familiar with Python although I dabble in a few other programming languages. From what I can understand of your script it doesn't attempt to detect this response and force a new login if the response is 'not logined or expired'.

For now I've changed the line in the script that sets the credentials retention from "60 * 60 * 24" to "60 * 60 * 12" in the hope that only keeping the login for 12 hours will avoid the issue. It would seem to be better though to have your script look at the response from the server when requesting the device/getDeviceDetails.json and looping back to a new login when the error is received. I could try to learn enough Python to do that but I figured it would be a fairly simple thing for the original author of the script to implement. Is this something you could add?

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