Closed mrcushing closed 3 months ago
@mrcushing Can you provide more info / examples? I'm not seeing this issue.
Sure.
Under Developer Tools, States for my climate entity, I have two possible preset_modes attributes for holding a temperature: "Hold indefinitely" and "Hold until next activity"
I have an an automation to, e.g., hold 62 degrees indefinitely, I do the following: `alias: HVAC - Hold temp at 62 indefinitely. sequence:
But when I run that go and look at my Carrier Infinity system, instead of Holding indefinitely, the system registers as "Hold until [5pm, the time of the next activity]".
Here's a log with IPs removed (it may contain some of the same errors from that other thread that I'm also logging, apologies if so):
2024-08-19 13:57:16.266 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139776200999264] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 951, in async_service_temperature_set await entity.async_set_temperature(kwargs) File "/config/custom_components/infinitude_beyond/climate.py", line 162, in async_set_temperature await self.zone.set_temperature(temperature=temperature) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 839, in set_temperature await self.set_hold_mode(mode=HoldMode.UNTIL, activity=Activity.MANUAL) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 796, in set_hold_mode await self._infinitude._post(endpoint, data) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 91, in _post resp_json: dict = await resp.json(content_type=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 80, in json return await super().json(*args, loads=loads, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1215, in json return loads(stripped.decode(encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/json.py", line 44, in json_loads return orjson.loads(__obj) # type:ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^ orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0) 2024-08-19 13:57:23.670 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139776200999264] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 778, in async_handle_set_preset_mode_service await self.async_set_preset_mode(preset_mode) File "/config/custom_components/infinitude_beyond/climate.py", line 318, in async_set_preset_mode await self.zone.set_hold_mode(mode=InfHoldMode.OFF) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 796, in set_hold_mode await self._infinitude._post(endpoint, data) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 91, in _post resp_json: dict = await resp.json(content_type=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 80, in json return await super().json(args, loads=loads, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1215, in json return loads(stripped.decode(encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/json.py", line 44, in json_loads return orjson.loads(__obj) # type:ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^ orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0) 2024-08-19 13:59:36.405 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] POST http://[IP DELETED]:3000/api/2/activity/manual with {'htsp': '80.0', 'clsp': '80.0', 'fan': 'off'} and {} 2024-08-19 13:59:36.789 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] POST RESPONSE from http://[IP DELETED].9:3000/api/2/activity/manual with {'htsp': '80.0', 'clsp': '80.0', 'fan': 'off'} and {} is: {"clsp":["80.0"],"fan":["off"],"htsp":["80.0"],"id":"manual"} 2024-08-19 13:59:36.790 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] POST http://[IP DELETED]:3000/api/2/hold with {'hold': 'on', 'activity': 'manual', 'until': '17:30'} and {} 2024-08-19 13:59:37.214 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] POST RESPONSE from http://[IP DELETED]:3000/api/2/hold with {'hold': 'on', 'activity': 'manual', 'until': '17:30'} and {} is: <?xml version="1.0" encoding="UTF-8"?>
2024-08-19 13:59:37.215 ERROR (MainThread) [homeassistant.components.script.hold_temp_at_80_indefinitely] HVAC - Hold temp at 80 indefinitely.: Error executing script. Unexpected error for call_service at pos 1: unexpected character: line 1 column 1 (char 0) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 951, in async_service_temperature_set await entity.async_set_temperature(kwargs) File "/config/custom_components/infinitude_beyond/climate.py", line 162, in async_set_temperature await self.zone.set_temperature(temperature=temperature) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 839, in set_temperature await self.set_hold_mode(mode=HoldMode.UNTIL, activity=Activity.MANUAL) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 796, in set_hold_mode await self._infinitude._post(endpoint, data) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 91, in _post resp_json: dict = await resp.json(content_type=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 80, in json return await super().json(args, loads=loads, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1215, in json return loads(stripped.decode(encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/json.py", line 44, in json_loads return orjson.loads(obj) # type:ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^ orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0) 2024-08-19 13:59:37.221 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139776200999264] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/script/init__.py", line 718, in _service_handler response = await self._async_start_run( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/script/init.py", line 674, in _async_start_run script_result = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/script/init.py", line 707, in _async_run return await self.script.async_run(script_vars, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1799, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 527, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 557, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 951, in async_service_temperature_set await entity.async_set_temperature(kwargs) File "/config/custom_components/infinitude_beyond/climate.py", line 162, in async_set_temperature await self.zone.set_temperature(temperature=temperature) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 839, in set_temperature await self.set_hold_mode(mode=HoldMode.UNTIL, activity=Activity.MANUAL) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 796, in set_hold_mode await self._infinitude._post(endpoint, data) File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 91, in _post resp_json: dict = await resp.json(content_type=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 80, in json return await super().json(args, loads=loads, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1215, in json return loads(stripped.decode(encoding)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/json.py", line 44, in json_loads return orjson.loads(__obj) # type:ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^ orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0) 2024-08-19 13:59:41.044 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Updating from Infinitude 2024-08-19 13:59:41.191 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Config changed: {'zones/zone[1]/hold': ('off', 'on'), 'zones/zone[1]/activities/activity[4]/clsp': ('76.0', '80.0'), 'zones/zone[1]/activities/activity[4]/htsp': ('76.0', '80.0'), 'zones/zone[1]/holdActivity': ('home', 'manual'), 'zones/zone[1]/otmr': ('21:00', '17:30')} 2024-08-19 13:59:41.194 DEBUG (MainThread) [custom_components.infinitude_beyond] Finished fetching [IP DELETED]:3000 data in 0.150 seconds (success: True) 2024-08-19 13:59:56.043 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Updating from Infinitude 2024-08-19 13:59:56.205 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Status changed: {'localTime': ('2024-08-19T13:58:28-07:00', '2024-08-19T13:59:03-07:00'), 'zones/zone[1]/clsp': ('76.0', '80.0'), 'zones/zone[1]/hold': ('off', 'on'), 'zones/zone[1]/currentActivity': ('away', 'manual'), 'zones/zone[1]/otmr': ({}, '17:30'), 'zones/zone[1]/htsp': ('66.0', '80.0')} 2024-08-19 13:59:56.213 DEBUG (MainThread) [custom_components.infinitude_beyond] Finished fetching [IP DELETED]:3000 data in 0.170 seconds (success: True) 2024-08-19 14:00:11.043 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Updating from Infinitude 2024-08-19 14:00:11.200 DEBUG (MainThread) [custom_components.infinitude_beyond] Finished fetching [IP DELETED]:3000 data in 0.158 seconds (success: True) 2024-08-19 14:00:26.043 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Updating from Infinitude 2024-08-19 14:00:26.196 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Status changed: {'localTime': ('2024-08-19T13:59:03-07:00', '2024-08-19T13:59:38-07:00')} 2024-08-19 14:00:26.204 DEBUG (MainThread) [custom_components.infinitude_beyond] Finished fetching [IP DELETED]:3000 data in 0.161 seconds (success: True) 2024-08-19 14:00:41.043 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] Updating from Infinitude 2024-08-19 14:00:41.203 DEBUG (MainThread) [custom_components.infinitude_beyond] Finished fetching [IP DELETED]:3000 data in 0.161 seconds (success: True)
Attaching the full log just in case (and for ease of reading): home-assistant_infinitude_beyond_2024-08-19T20-00-41.622Z.log
(I realize I'm not using the Infinitude_Beyond service call to set the hold mode - this script worked before Beyond and did not kick off error messages, but I have also confirmed that changing to use the Infinitude_Beyond service call to set the hold mode results in the same error, with the hold mode only being set until the next scheduled activity).
My guess is that the error being logged about an unexpected character in line 1 (reported as one of the other issues for which I submitted logs) should be fixed first as that might be causing this issue as well.
There does seem to be some error that is caused the entire Infinitude status to be returned when you try to issue your command...that should not be happening.
Let's try a simple test...what happens when you just perform the "Climate: Set preset mode" action in Developer Tools?
The following works fine for me in the 2024.8.1 release:
action: climate.set_preset_mode
data:
preset_mode: Hold indefinitely
target:
entity_id: climate.master_bedroom_thermostat
I want to confirm that it works standalone first...then we can determine if it is a timing issue with your automation.
Throws an error. Relevant portion of the log attached: home-assistant_infinitude_beyond_2024-08-20T02-07-50.710Z.log
Edit - that said, it did in fact switch the system to hold indefinitely, eventually.
Edit x 2 - apologies, that was under 8.0. Testing 8.1 next.
Same result under 8.1. It kicked off an error message but did in fact switch to hold indefinitely, eventually.
Log attached: home-assistant_infinitude_beyond_2024-08-20T02-17-43.481Z.log
@mrcushing Both of your errors appear to be the result of calls made to Infinitude that are returning XML instead of JSON.
I am wondering...are you running the latest version of Infinitude? That has caused issues for some users, who have been running the same Docker container for years. If you have the ability to update to the latest, could you please do so and try to recreate both this and your temperature setting error?
Update: That is almost definitely the case - I had forgotten about this issue: https://github.com/nebulous/infinitude/issues/185
Please update Infinitude.
I've updated to the latest version of infinitude, and that has stopped errors from triggering. However, now it seems there are at least two different problems:
1) On my carrier infinity touchscreen, I no longer have the option to hold until or hold indefinitely at all - where the option used to be on the touchscreen, now it just says "select activity." I'll try rebooting the head unit since the proxy server went down during the docker reinstall, maybe that has screwed with it somehow.
2) When I run the hold indefinitely action, it "sticks" on infinitude beyond. E.G., I've called hold indefinitely, the system holds indefinitely, but then I select return to schedule, it does so, but after a few minutes the climate entity shows as still holding indefinitely even though my carrier system shows as having returned to schedule. I think it might actually be a problem with the "scheduled activity" command, then.
Logs attached: home-assistant_infinitude_beyond_2024-08-20T12-30-57.152Z.log
Please try rebooting the thermostat as you suggested and report back.
Did not solve the problem. Both the "hold/hold until" options have disappeared from the infinity touch headunit (why that would be related to infinitude, I don't know).
And the hold option is still stuck on in infinitude beyond, despite multiple reboots and rebooting even the infinity system itself. It is like the hold status isn't updating from infinitude or the head unit (which might explain why the option has disappeared from the head unit)
Sounds like your thermostat UI is different from mine...I don't have a "Select Activity" anywhere, as there is always 'some' activity always running. Have you tried clicking that button and changing the activity? My only guess right now is that an activity may not be sett, but is required before a hold can be applied.
Something happened in updating infinitude that broke the schedules in my system- they are all grayed out now. So I'm going to turn off wifi, reboot the system, and see what happens.
That was it. Something tripped in the infinity system which disabled scheduling, so of course hold didn't work. I've got hold back now, and will test again.
Edit: test worked. This can be closed - it was just updating the infinitude server (and then a few issues that resulted, but have been cleared)
Automations in HA which set the preset mode to "Hold indefinitely" only in fact "Hold until next activity". Both Hold indefinitely and Hold until next activity are listed as preset modes under climate on HA, but I cannot seem to trigger Hold indefinitely under Infinitude Beyond.