CyrilP / hass-deltadore-tydom-component

Delta Dore Tydom Home Assistant custom component
MIT License
13 stars 3 forks source link

Changing SVAC Mode returns HTTP Code 401 #114

Open Pedritod opened 3 months ago

Pedritod commented 3 months ago

System Health details

System Information

version core-2024.8.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.46-haos
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok HACS Data | ok GitHub API Calls Remaining | 4994 Installed Version | 2.0.0 Stage | running Available Repositories | 1390 Downloaded Repositories | 8
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.1 -- | -- update_channel | stable supervisor_version | supervisor-2024.08.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 30.8 GB disk_used | 5.9 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | oracle board | ova supervisor_api | ok version_api | ok installed_addons | Matter Server (6.4.1), Get HACS (1.3.0), eufy-security-ws (1.8.0-2)
Dashboards dashboards | 2 -- | -- resources | 1 views | 1 mode | storage
Recorder oldest_recorder_run | August 25, 2024 at 7:06 PM -- | -- current_recorder_run | August 26, 2024 at 10:44 AM estimated_db_size | 2.98 MiB database_engine | sqlite database_version | 3.45.3
Sonoff version | 3.7.3 (e240aaf) -- | -- cloud_online | 2 / 2 local_online | 2 / 2

Checklist

Describe the issue

I cannot change the mode of my boiler / thermostat, I always get 401

Reproduction steps

  1. Go to Thermostat widget and change mode from off to heating

Debug logs

content : 
2024-08-26 10:48:45.960 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"thermicLevel","value":"STOP"}])
2024-08-26 10:48:45.961 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"hvacMode","value":"ANTI_FROST"}])
2024-08-26 10:48:45.961 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"antifrostOn","value":true}])
2024-08-26 10:48:45.962 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT data {"to":"-1})
2024-08-26 10:48:45.962 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT data {"to":"-1})
2024-08-26 10:48:45.964 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT data {"actions":"in"})
2024-08-26 10:50:55.150 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (GET /ping)
2024-08-26 10:50:55.324 DEBUG (MainThread) [custom_components.deltadore_tydom] response status : 401
headers : <CIMultiDictProxy('X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-Frame-Options': 'DENY', 'Set-Cookie': 'JSESSIONID=4661A1188AE00DE773EDAAE217AA342C;path=/;HttpOnly', 'WWW-Authenticate': 'Digest realm="ServiceMedia", qop="auth", nonce="MTcyNDY2MjU1NTI5ODplODU1OTZkMGNhMjQ3NWI1NWNjYTI5ZjYyNzRlMzIxNQ=="', 'Content-Length': '0', 'Date': 'Mon, 26 Aug 2024 08:50:54 GMT')>
content : 
2024-08-26 10:51:23.440 DEBUG (MainThread) [custom_components.deltadore_tydom] setting hvac mode to NORMAL
2024-08-26 10:51:23.440 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"hvacMode","value":"NORMAL"}])
2024-08-26 10:51:23.764 DEBUG (MainThread) [custom_components.deltadore_tydom] response status : 401
headers : <CIMultiDictProxy('X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-Frame-Options': 'DENY', 'Set-Cookie': 'JSESSIONID=36B781BBAB8AD77EE1B29093CB2E8B41;path=/;HttpOnly', 'WWW-Authenticate': 'Digest realm="ServiceMedia", qop="auth", nonce="MTcyNDY2MjU4MzczMjo3MjczOTNjMTY3MDE2OTk0ZjBlN2Y5ZmU3YzRkNWQyMA=="', 'Content-Length': '0', 'Date': 'Mon, 26 Aug 2024 08:51:23 GMT')>
content : 
2024-08-26 10:51:23.829 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"authorization","value":"HEATING"}])
2024-08-26 10:51:23.829 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"setpoint","value":"19.0"}])
2024-08-26 10:51:23.830 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"antifrostOn","value":false}])
2024-08-26 10:51:25.389 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (GET /ping)
2024-08-26 10:51:55.432 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (GET /ping)
2024-08-26 10:51:55.626 DEBUG (MainThread) [custom_components.deltadore_tydom] response status : 401
headers : <CIMultiDictProxy('X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-Frame-Options': 'DENY', 'Set-Cookie': 'JSESSIONID=ED203A511D0B2014F7A5F6BA0D74ED2E;path=/;HttpOnly', 'WWW-Authenticate': 'Digest realm="ServiceMedia", qop="auth", nonce="MTcyNDY2MjYxNTU5MjpjYjkxNjMwNDg2NTQzZDBkNTcxZjRkYjQ2ZDQyNGQyNw=="', 'Content-Length': '0', 'Date': 'Mon, 26 Aug 2024 08:51:54 GMT')>
content : 
2024-08-26 10:58:53.357 WARNING (MainThread) [custom_components.deltadore_tydom] Unknown message type received 
2024-08-26 10:58:53.700 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/deltadore_tydom/hub.py", line 147, in setup
    await self.create_ha_device(device)
  File "/config/custom_components/deltadore_tydom/hub.py", line 200, in create_ha_device
    ha_device = HaClimate(device, self._hass)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deltadore_tydom/ha_entities.py", line 660, in __init__
    if  "NORMAL" in self._device._metadata["thermicLevel"] or "AUTO" in self._device._metadata["thermicLevel"]:
                    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'thermicLevel'
2024-08-26 11:01:36.213 DEBUG (MainThread) [custom_components.deltadore_tydom] setting hvac mode to ANTI_FROST
2024-08-26 11:01:36.213 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"setpoint","value":null}])
2024-08-26 11:01:36.404 DEBUG (MainThread) [custom_components.deltadore_tydom] response status : 401
headers : <CIMultiDictProxy('X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-Frame-Options': 'DENY', 'Set-Cookie': 'JSESSIONID=ABE69E68DC19FB4795EFEEE722C794CB;path=/;HttpOnly', 'WWW-Authenticate': 'Digest realm="ServiceMedia", qop="auth", nonce="MTcyNDY2MzE5NjM1MjpkYjEwNTA3NmMxYTNjOGQwYTNjOTIxMWI3OGJjMjI3Mg=="', 'Content-Length': '0', 'Date': 'Mon, 26 Aug 2024 09:01:35 GMT')>
content : 
2024-08-26 11:01:36.468 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"thermicLevel","value":"STOP"}])
2024-08-26 11:01:36.468 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"hvacMode","value":"ANTI_FROST"}])
2024-08-26 11:01:36.469 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"antifrostOn","value":true}])
2024-08-26 11:01:36.469 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT data {"to":"-1})
2024-08-26 11:01:36.469 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT data {"to":"-1})
2024-08-26 11:01:36.470 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT data {"actions":"in"})
2024-08-26 11:01:47.802 DEBUG (MainThread) [custom_components.deltadore_tydom] Sending message to tydom (PUT device data [{"name":"setpoint","value":"18.5"}])
2024-08-26 11:01:47.991 DEBUG (MainThread) [custom_components.deltadore_tydom] response status : 401
headers : <CIMultiDictProxy('X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-Frame-Options': 'DENY', 'Set-Cookie': 'JSESSIONID=61B92AA688938EAF46295EFDDB4742A5;path=/;HttpOnly', 'WWW-Authenticate': 'Digest realm="ServiceMedia", qop="auth", nonce="MTcyNDY2MzIwNzkzODpiY2NhYTUwM2U0YjRiZmM1N2M4ZTUwMGU0YThhOTdkMw=="', 'Content-Length': '0', 'Date': 'Mon, 26 Aug 2024 09:01:46 GMT')>
content :

Diagnostics dump

No response