dm82m / hass-Deltasol-KM2

Custom component for retrieving sensor information from Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB
MIT License
25 stars 6 forks source link

Error handling for wrong credentials #13

Closed dm82m closed 2 years ago

dm82m commented 2 years ago

After #12 is integrated we should improve the error handling. I want to handle wrong credentials next. KM2 is giving this result in case of bad credentials:

[
    {
        "jsonrpc": "2.0",
        "id": "1",
        "error": {
            "category": "App",
            "message": "Invalid credentials"
        }
    }
]

What we need to know is, if the answer of a DL2/DL3 call is the same on bad credentials.

chiefdeputy commented 2 years ago

Calling http://my-dl2/dlx/download/live?sessionAuthUsername=admin&sessionAuthPassword=wrongpw gives me a 403 status including the html login form (no json).