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

H-WASHER 500 - Error while trying to get /commands/v1/retrieve #1

Closed
alexandre-leites opened this issue Mar 9, 2023 · 4 comments
Closed

Comments

@alexandre-leites
Copy link
Contributor

I was trying to use the HA addon with my washing machine (HDQ 496AMBS/1-S). However it did not work. While I was trying to debug, I downloaded this library code and found that the following call is not working.

GET /commands/v1/retrieve

The Result is:

{
    "error": {
        "message": "Invalid dictionaryId",
        "code": "RC_MDI",
        "statusCode": 400
    }
}

I tried and successfully replicated the error with Postman. However, even if I add a param named dictionaryId from my appliance info, it still not work properly.

This is my GET /commands/v1/appliance call

{
    "payload": {
        "appliances": [
            {
                "purchaseDate": "2022-07-06T22:00:00.000Z",
                "fwVersion": "5.12.0",
                "applianceTypeId": 2,
                "firstEnrollment": false,
                "attributes": [
                    {
                        "parValue": "6.A.B",
                        "id": <ID>,
                        "parName": "acuVersion",
                        "status": 1,
                        "lastUpdate": "2022-07-07T14:22:40Z"
                    },
                    {
                        "parValue": "ESP32D0WDQ5",
                        "id": <ID>,
                        "parName": "chipset",
                        "status": 1,
                        "lastUpdate": "2022-07-07T14:22:40Z"
                    },
                    {
                        "parValue": "888",
                        "id": <ID>,
                        "parName": "dictionaryId",
                        "status": 1,
                        "lastUpdate": "2023-03-09T04:48:03Z"
                    },
                    {
                        "parValue": "it-IT",
                        "id": <ID>,
                        "parName": "lang",
                        "status": 1,
                        "lastUpdate": "2022-07-07T14:22:40Z"
                    },
                    {
                        "parValue": "7.A.0",
                        "id": <ID>,
                        "parName": "uiVersion",
                        "status": 1,
                        "lastUpdate": "2022-07-07T14:22:40Z"
                    }
                ],
                "applianceModelId": 888,
                "series": "h-wash500",
                "firstEnrollmentTBC": false,
                "code": "88888888",
                "SK": "app#XX-XX-XX-XX-XX-XX",
                "macAddress": "XX-XX-XX-XX-XX-XX",
                "eepromName": "88888888",
                "applianceId": "XX-XX-XX-XX-XX-XX#2022-07-07T14:22:40Z",
                "id": 888,
                "modelName": "HDQ  496AMBS/1-S",
                "applianceTypeName": "WD",
                "connectivity": "wifi|ble",
                "serialNumber": "<MYSERIAL>",
                "nickName": "Washer Dryer",
                "enrollmentDate": "2022-07-07T14:22:40.442Z",
                "brand": "hoover",
                "lastUpdate": "2022-07-07T14:33:05Z",
                "eepromId": 888,
                "applianceStatus": 1,
                "coords": {
                    "lng": 88.8888888,
                    "lat": 88.8888888
                },
                "PK": "user#eu-west-1:<UUID>",
                "sections": {
                    "chatbot": true,
                    "ecoDelayStart": true
                },
                "topics": {
                    "publish": [],
                    "subscribe": [
                        "$aws/events/presence/disconnected/XX-XX-XX-XX-XX-XX",
                        "$aws/events/presence/connected/XX-XX-XX-XX-XX-XX",
                        "haier/things/XX-XX-XX-XX-XX-XX/event/appliancestatus/update",
                        "haier/things/XX-XX-XX-XX-XX-XX/event/discovery/update"
                    ]
                }
            }
        ]
    },
    "authInfo": {}
}

Any ideas how to debug or fix this issue?

@Andre0512
Copy link
Owner

Hi, for my washing machine, it returns a dictionaryId on /commands/v1/retrieve.

{
  "payload": {
    "applianceModel": ...
    "resultCode": "0",
    "settings": ...
    "pauseProgram": ...
    "resumeProgram": ...
    "stopProgram": ...
    "startProgram": ...
    "options": ...
    "dictionaryId": 150
  },
  "authInfo": {}
}

But I have no idea what your error message means, maybe the app works different for your machine and retrieving commands works in another way. But maybe it's just a missing parameter.

Unfortunately, I can't help you to debug this, the api only allows to request information about personal registered models.

I think you need to study the communication between the app and the hOn servers. I used a MITM proxy (HTTP Toolkit), but it's a bit complicated to setup, you need a rooted phone. Let me know if you have any questions about this 🙂

@alexandre-leites
Copy link
Contributor Author

I'll try to intercept the requests and get back to you as soon as I get more info. Thanks

@alexandre-leites
Copy link
Contributor Author

Hello,

I created the PR #2 for fixing this issue as I tested locally. Hope you can accept it and release the library version

@Andre0512
Copy link
Owner

Hi, awesome! Thanks for your contribution 😃
I created a new release for pyhOn and hon, hope you can use it now.

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

No branches or pull requests

2 participants