Closed kentora closed 1 year ago
What is Your Appliance PNC number (9+2 digits)?
According to the library it is these 9 digits: 944188409
... And inside the oven it says the same, but adds / 02
Could You make some tests with curl, and check proper values to send for process change?
Get session_token (replace :EMAIL: and :PASSWORD: with Your credentials):
curl --request POST \
--insecure \
--url https://api.emea.ecp.electrolux.com/authentication/authenticate \
--header 'Authorization: Basic dXNlcjpwYXNz' \
--header 'Content-Type: application/json' \
--header 'x-api-key: 714fc3c7-ad68-4c2f-9a1a-b3dbe1c8bb35' \
--header 'x-ibm-client-id: 714fc3c7-ad68-4c2f-9a1a-b3dbe1c8bb35' \
--data $'{
"brand":"Electrolux",
"country":"GB",
"fields":{},
"deviceId":"012345678901234567890012345678900123456789001234567890012345678900123456",
"username":":EMAIL:",
"password":":PASSWORD:"
}'
Get appliances list (replace :EMAIL: with Your email, :SESSION_KEY: with sessionKey value):
curl --request GET \
--insecure \
--url https://api.emea.ecp.electrolux.com/user-appliance-reg/users/:EMAIL:/appliances \
--header 'session_token: :SESSION_KEY:' \
--header 'x-ibm-client-id: 714fc3c7-ad68-4c2f-9a1a-b3dbe1c8bb35'
Send command to appliance (replace :PNC:, :ELC:, :SN:, :MAC: with values from appliances list, :SESSION_KEY: with sessionKey value):
curl --request POST \
--insecure \
--url 'https://api.emea.ecp.electrolux.com/commander/remote/sendjson?pnc=:PNC:&elc=:ELC:&sn=:SN:&mac=:MAC:' \
--header 'Content-Type: application/json' \
--header 'session_token: :SESSION_KEY:' \
--header 'x-ibm-client-id: 714fc3c7-ad68-4c2f-9a1a-b3dbe1c8bb35' \
--data '{
"components": [{"name": "1440", "value": "CDC1"}],
"destination": "OV1",
"operationMode": "EXE",
"source": "RP1",
"timestamp": "1672416228",
"version": "ad"
}'
Try to set proper "value", that chenge setting in appliance.
I'm not quite sure what this would accomplish, that I haven't already? I have successfully changed the OvenProcess, by commenting out the part that converts to integer (thus sending the raw string). This works flawlessly.
Is "CDC1", and "0xCDC1" as value works?
"CDC1" as it is also represented in the profile
Updated in 0.3.11, please test it.
Works like a charm! Ty very much
Discovered while messing around with mauro-midolo/homeassistant_electrolux_status#38
Some HACL values require to be set as a string, but in Session.py:682-686 all string are converted to int values. It should be possible to check up against the profile data_format, which in my case is "string" rather than "uint_16".