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

Closed
opened 2023-03-09 06:52:31 +01:00 by alexandre-leites · 4 comments
alexandre-leites commented 2023-03-09 06:52:31 +01:00 (Migrated from github.com)

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?

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: ```json { "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 ```json { "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 commented 2023-03-11 03:15:00 +01:00 (Migrated from github.com)

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 🙂

Hi, for my washing machine, it returns a `dictionaryId` on `/commands/v1/retrieve`. ```json { "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](https://github.com/httptoolkit/httptoolkit)), but it's a bit complicated to setup, you need a rooted phone. Let me know if you have any questions about this :slightly_smiling_face:
alexandre-leites commented 2023-03-11 21:03:34 +01:00 (Migrated from github.com)

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

I'll try to intercept the requests and get back to you as soon as I get more info. Thanks
alexandre-leites commented 2023-03-13 04:02:37 +01:00 (Migrated from github.com)

Hello,

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

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 commented 2023-03-13 23:29:01 +01:00 (Migrated from github.com)

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

Hi, awesome! Thanks for your contribution :smiley: I created a new release for pyhOn and hon, hope you can use it now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiconfjs/pyhOn#1
No description provided.