peterager / lennoxs30 Goto Github PK
View Code? Open in Web Editor NEWHome Assistant Lennox S40 / S30 / E30 / M30 integration
License: MIT License
Home Assistant Lennox S40 / S30 / E30 / M30 integration
License: MIT License
I was reading the last few PRs on local polling support (nice!), and it looks like the setting is validated to IP addresses only. Could it support hostnames too? For devices with integrations like this, I usually would set a static IP and hostname in my router.
I did check, and the thermostat isn't setting a hostname for itself in its DHCP request, unlike other devices like cameras that will often advertise a unique hostname.
Logged these errors:
2021-06-09 13:29:14 ERROR (MainThread) [custom_components.lennoxs30.s30api_async] Retrieve Failed - Exception
2021-06-10 04:36:07 ERROR (MainThread) [custom_components.lennoxs30.s30api_async] Negotiate failed response code [502] text [<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>
<h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3>
</fieldset></div>
</div>
</body>
</html>
]
2021-06-10 04:36:18 ERROR (MainThread) [custom_components.lennoxs30.s30api_async] Negotiate failed response code [502] text [<html>
<head>
<title> Server Error </title>
</head>
<body>
<font color =\"#aa0000\">
<h2>Server Error.</h2>
</font>
There was an unexpected error in the request processing.
</body>
</html>]
2021-06-10 04:41:28 ERROR (MainThread) [custom_components.lennoxs30.s30api_async] Negotiate failed response code [504] text [<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
]
I am using the NGINX SSL Proxy add-on.
When a local connection is established and a cloud connection is established. The cloud connection may not receive all messages and can become out of sync.
my password to login to https://www.lennoxicomfort.com/account/login contained an '&' and a '^' and I got errors stating my password was invalid. I moved the password from my secrets file to my config file and that did not fix anything. (tried restarting HA several times)
After verifying that I could login via a browser on my pc I changed my password (no special characters this time) and the custom component no longer had login issues
Items like last reconnect time, last message time are in UTC and hence display in Lovelace as UTC times. These times should display in the TZ configured in HA
Both are subscribed to system with no filter, add filters.
HA service method was calling self._zone.setCoolSPF and it should have been calling self.zone.setHeatSPF
Required for users that have multiple S30 systems.
Lovelace Card / HA can deadlock, causing UI to stop responding and system to need to be restarted.
The Climate Entity has a subscription to any System change, when it only care about awayMode.
Hello,
I installed the repository through HACS and did a full reset of the server.
When go to Configuration -> Integrations I don't have a "Big orange + button" like the documentation mentions, but I do have a blue button for "+ Add Integration". When I click on that and search for Lennox nothing comes up.
Repository is showing as installed within HACS though.
Purpose of API metrics is to track the statistics similar to what is done on Zwave. Metrics include:
The API will have counters for these. Exposed in HA and could configured on a poll
Provide a unique id so the entity can be named.
Turn away mode on and off.
When an entity is disabled in HA it should stop reporting,
Outdoor temperature is reported when the compressor has the sensor. This data is captured by the API. Proposal:
Create a sensor called: sensor.{systemname}.outdoor_temperature
Unit of Measure: F
Unique ID: {systemguid}_ot
The screenshot shows duplicate instances of the North zones. I've captured a log file as requested. The file is not sanitized, so would prefer to send to you directly.
02f6a2 is Master/North_Master. Inconsistent naming of the Thermostat and Zones itself may be the cause of your code generating two sensors.
The reconnect logic will keep re-connecting every 60 seconds when the initial connection fails.
Recently upgraded to v0.0.8 to implement and test the "away" and "cancel away mode" presets. Have found that
sending the command climate.set_preset_mode now results in unpredictable behaviour - either the S20 doesn't respond at all, or goes into preset modes not commanded. For example, sending the "away" preset mode might result in a "climate.turn_off", or sometimes takes the S20 out of preset mode and into basic heat/cool mode.
Once this has happened, other commands such as climate.turn_off fail to work or also result in unpredictable behaviour.
A restart of HA doesn't fix this.
Moving set point causes the following error:
2021-06-07 17:04:53 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140289994317200] setCoolSPF() missing 2 required positional arguments: 'scheduleId' and 'tempF'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 760, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 548, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File "/config/custom_components/lennoxs30/climate.py", line 289, in async_set_temperature
await self._system.setCoolSPF(sp)
TypeError: setCoolSPF() missing 2 required positional arguments: 'scheduleId' and 'tempF'
This is repeatable by moving temp set point up or down several degrees.
Saw this today on start-up following an HA Core update:
2021-08-10 04:01:36 ERROR (MainThread) [custom_components.lennoxs30] configuration_initalization failed - no initial data received
2021-08-10 04:01:36 ERROR (MainThread) [custom_components.lennoxs30] async_setup: (S30Exception(...), 'configuration_initalization failed - no initial data received')
Seeing these database isues under Developer Tools -> Statistics. I'm running the MariaDB.
North_outdoor_temperature sensor.north_outdoor_temperature °F recorder The state class '' of this entity is not supported.
South_outdoor_temperature sensor.south_outdoor_temperature °F recorder The state class '' of this entity is not supported.
sensor.icomfort_s30_22eed8_current_temperature_2 sensor.icomfort_s30_22eed8_current_temperature_2 °F recorder There is no state available for this entity.
sensor.icomfort_s30_22eed8_current_humidity sensor.icomfort_s30_22eed8_current_humidity % recorder There is no state available for this entity.
sensor.icomfort_s30_02f6a2_current_temperature_2 sensor.icomfort_s30_02f6a2_current_temperature_2 °F recorder There is no state available for this entity.
sensor.icomfort_s30_02f6a2_current_humidity sensor.icomfort_s30_02f6a2_current_humidity % recorder There is no state available for this entity.
As part of the local API, clients can request advanced diagnostic data from the HVAC controller, and one of the data points includes energy usage of the compressor. With the new Energy dashboard in recent Home Assistant versions, it would be nifty to enable the HVAC system to show up in the energy usage dashboard.
I believe it will involve the following work:
Are there any plans to incorporate sensors the current indoor temperature and humidity?
Right now the API code is included in the integration. This should be separated out into a pypi module
The API version 0.1.0 now support local lan connections to the S30.
Initially this will support a single S30.
Starting with an empty project with lennox custom component installed. Pick add integration, select Lennox S30, this exception occurs.
Exception has occurred: TypeError
list indices must be integers or slices, not str
File "/home/pete/core/homeassistant/helpers/data_entry_flow.py", line 44, in _prepare_result_json
data["data_schema"] = voluptuous_serialize.convert(
File "/home/pete/core/homeassistant/components/config/config_entries.py", line 104, in _prepare_config_flow_result_json
return prepare_result_json(result)
File "/home/pete/core/homeassistant/components/config/config_entries.py", line 134, in _prepare_result_json
return _prepare_config_flow_result_json(result, super()._prepare_result_json)
File "/home/pete/core/homeassistant/helpers/data_entry_flow.py", line 85, in post
result = self._prepare_result_json(result)
File "/home/pete/core/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/home/pete/core/homeassistant/components/config/config_entries.py", line 130, in post
return await super().post(request)
File "/home/pete/core/homeassistant/components/http/view.py", line 133, in handle
result = await result
File "/home/pete/core/homeassistant/components/http/auth.py", line 138, in auth_middleware
return await handler(request)
File "/home/pete/core/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/home/pete/core/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/home/pete/core/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
return await handler(request)
File "/home/pete/core/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/home/pete/core/venv/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/home/pete/core/venv/lib/python3.8/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/home/pete/core/venv/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 430, in _handle_request
resp = await request_handler(request)
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_events.py", line 1851, in _run_once
handle._run()
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
self._run_once()
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
self.run_forever()
File "/home/pete/core/homeassistant/runner.py", line 121, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/home/pete/core/homeassistant/main.py", line 318, in main
exit_code = runner.run(runtime_conf)
File "/home/pete/core/homeassistant/main.py", line 331, in
sys.exit(main())
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pete/.pyenv/versions/3.8.6/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
There is PIA in the log files, that should be obfuscated. Includes:
After a startup saw that the name was
<Home_Name>0
instead of
_
This must be a startup sequencing and order of data arrival.
When the authentication token expires, the integration needs to reinitialize. Right now it does not recover from this failure and requires an HA restart.
When I set the ip_address to access the S30 locally, I've noticed the s30 spontaneously rebooting twice now.
I'm not sure how many times it's actually rebooted, since I'm usually not watching the s30 during the day, but twice the few times I've been looking at it seems high.
My s30 has v 03.81.0777 software.
Has anyone else seen this?
When creating a schedule override in the Lennox App, you are presented with 3 options:
Currently the integration uses the first setting. The request is to support the second option also.
The Ventilation command opens a damper to bring in fresh outside air (assuming the outside air is "fresh" of course. :)) and turns on the fan high to circulate through the house. This is effectively like a "whole house fan" without having to open windows or doors.
Provide support for schedules.
I have my themostat configured via HomeKit, but unfortunately that doesn't allow changing the themostat presets. This does! 🙌
I noticed different renderings of the temperature:
Display | Current Temperature | Low Point | High Point |
---|---|---|---|
Thermostat | 23.0 | 16.5 | 23.0 |
HomeKit Card | 23 | 16.5 | 23.0 |
lennoxs30 Card | 23 | 17 | 23 |
lennoxs30 Detail | 23 | 16.7 | 22.8 |
The detail card makes me think there's some sort of rounding error and that somewhere along the way there's a Fahrenheit to Celsius conversion? Either way, I'd expect the card and detail view to be consistent, and given that the themostat indicates one tenth of a degree of precision I'd expect that to flow all the way through.
I started some work on supporting UI based configuration of this component, and grouping the entities into devices.
Link: https://github.com/HyperActiveJ/lennoxs30
Feedback appreciated.
Running into merge conflicts due to the pace of development this week.
Tasks:
Lennox has a Perfect Mode which allows a single setpoint to be used to control both heating and cooling.
When the S30 is in this mode, the integration is unable to report or control the setpoint.
With a local connection, the S30 send zone status and outdoor temp frequently regardless of whether it changes or not. With the cloud connection only changes were sent. So to avoid lots of entity updates in HA, the integration / api will check for changes and only trigger updates when state has changed.
Some Lennox HVAC systems have auxiliary heat as a backup / augmentation for the heat pump, hence it would be helpful to know when the aux system is running. The request is to make this data available.
If the connection to Lennox fails during initialization, the component will not become available until HA is restarted
If the integration is run in two separate HA systems, using the same login, then data changes may be missed.
Root cause is Lennox has a single queue for application_id and email. Right now the application ID is hard coded.
Following update and restart to HA Core 2021.7.3:
2021-07-16 06:42:54 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up lennoxs30 platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/lennoxs30/sensor.py", line 42, in async_setup_platform
sensor = S30OutdoorTempSensor(hass, manager, system)
File "/config/custom_components/lennoxs30/sensor.py", line 65, in __init__
self._myname = self._system.name + "_outdoor_temperature"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
2021-07-16 06:43:25 ERROR (MainThread) [lennoxs30api.s30api_async] executeOnUpdateCallback - failed 'S30OutdoorTempSensor' object has no attribute '_myname'
2021-07-16 06:43:25 ERROR (MainThread) [lennoxs30api.s30api_async] executeOnUpdateCallback - failed 'S30OutdoorTempSensor' object has no attribute '_myname'
2021-07-16 06:43:25 ERROR (MainThread) [lennoxs30api.s30api_async] executeOnUpdateCallback - failed 'S30OutdoorTempSensor' object has no attribute '_myname'
2021-07-16 06:43:25 ERROR (MainThread) [lennoxs30api.s30api_async] executeOnUpdateCallback - failed 'S30OutdoorTempSensor' object has no attribute '_myname'
Errors are continuous and varied:
2021-07-16 06:47:40 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 395, in async_update_ha_state
f"No entity id specified for entity {self.name}"
File "/config/custom_components/lennoxs30/climate.py", line 152, in name
return self._myname
AttributeError: 'S30Climate' object has no attribute '_myname'
Subsequent restart produced no errors. I have to learn to restart several times before reporting errors I guess :-)
lennoxs30 reports all zone dampers at 100 on multi-zone system when dampers should report as zero for zones that are Off. For the single zone system, damper reports as zero as no dampers are installed.
Allergen defender is a specific fan mode to the s30
By default the integration checks for messages from Lennox every 10 seconds during normal operation and every 1 second during fast operation.
fast operation is used after commands are sent to get the result back faster. For example, changing the state to Cool from thermostat card.
Provide configuration.yaml parameters to adjust these. Change defaults to 60 seconds for normal poll.
Internally determine the best way to manage the switch from normal to fast and back to normal poll modes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.