peterager / lennoxs30api Goto Github PK
View Code? Open in Web Editor NEWAPI for communication with Lennox S30 / E30 climate controls using Lennox cloud or local connection
License: MIT License
API for communication with Lennox S30 / E30 climate controls using Lennox cloud or local connection
License: MIT License
@PeteRager Have you seen this one?
Message pump error (S30Exception(...), "messagePump failed due to client response error [https://192.168.1.224/Messages/Aesculus_Downstairs/Retrieve] ClientResponseError Error while executing request: [Content-Length can't be present with Transfer-Encoding:\n\n b'4B\\r'\n ^]: error=<class 'aiohttp.client_exceptions.ClientResponseError'>, resp.status=[400], resp.request_info=[RequestInfo(url=URL('https://192.168.1.224/Messages/Aesculus_Downstairs/Retrieve?Direction=Oldest-to-Newest&MessageCount=10&StartTime=1&LongPollingTimeout=5'), method='GET', headers=<CIMultiDictProxy('Host': '192.168.1.224', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.10 aiohttp/3.8.5')>, real_url=URL('https://192.168.1.224/Messages/Aesculus_Downstairs/Retrieve?Direction=Oldest-to-Newest&MessageCount=10&StartTime=1&LongPollingTimeout=5'))], resp.headers=[None]")
It was working fine for 3 days and suddenly it just started this on both of my S30's. Stopping and starting the Docker container resolved the problem.
EDIT: It appears it was only one S30. It is the one with two zones and this was the primary. Did not see any errors on the secondary but its data did not change so assume that it was not getting data either.
I'm seeing the following in my logs every 10 seconds:
2021-09-07 22:19:16 INFO (MainThread) [lennoxs30api.s30api_async] Request Data - Enter
2021-09-07 22:19:26 INFO (MainThread) [lennoxs30api.s30api_async] Request Data - Enter
2021-09-07 22:19:36 INFO (MainThread) [lennoxs30api.s30api_async] Request Data - Enter
2021-09-07 22:19:47 INFO (MainThread) [lennoxs30api.s30api_async] Request Data - Enter
2021-09-07 22:19:57 INFO (MainThread) [lennoxs30api.s30api_async] Request Data - Enter
It looks like there's many "info" level log messages, such as:
https://github.com/PeteRager/lennoxs30api/blob/master/lennoxs30api/s30api_async.py#L387
Would it be better for those to be at a debug level? I'm not sure method calls are useful for day-to-day operation.
I had a HVAC tech come to check my refrigerant on my HP and needed to have the system running at full power. So I put the system in test mode at 100% cooling while they checked the pressure. After it was over my dashboard only showed the time as Fan mode and the system as Off.
I think this is an error in my logic as I only accounted for tempOperation to have heating and cooling and if not, off.
Are there other modes for tempOperation that I should account for?
Small nit. Might want to mention PYTZ is a a prereq and should be installed with PIP first.
Some Lennox Systems have the ability to pull fresh air from outside. This ventilation is controlled via a damper. We will need API ability to open / close the damper as well as associates status information for the system and zones.
Hi,
Are setpoint commands not supported anymore ? The lines to set them are commented out in command_reader_task :
par = splits[1]
print("Heat Setpoint [" + par + "]")
# cmdres = await zone.setHeatSPF(par)
# print("Command Result [" + str(cmdres) + "]")```
Also, these functions aren't in the "s30api_async.py" file. Since it is mentioned that, wrong parameters can brick the thermostat, what is the right method to do a schedule override (the controller is in schedule mode by default) ?
Thanks!
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.
My use case is fairly simple. I want to query my two Heat Pumps periodically (every 5 seconds or so) and see what state they are in (heating/cooling/standby) and what the physical characteristics are of the units and the zones they are supporting. There are a total of 2 S30 thermostats and additional slave thermostat that gives a total of 3 zones. I do not want to control or set anything. I want to do all of this locally (not via the cloud).
It would appear that the poller would meet my needs at first glance but I am having some issues getting the results I expect and could use some guidance.
Log
2023-07-16 10:42:58,793 [MainThread ] [DEBUG] serverConnect - Entering
2023-07-16 10:42:58,793 [MainThread ] [DEBUG] Closing Session
2023-07-16 10:42:58,793 [MainThread ] [DEBUG] Creating Session
2023-07-16 10:42:58,794 [MainThread ] [DEBUG] authenticate - Enter
2023-07-16 10:42:58,794 [MainThread ] [DEBUG] login - Enter
2023-07-16 10:42:58,942 [MainThread ] [INFO ] Creating lennox_home homeId [local]
2023-07-16 10:42:58,942 [MainThread ] [INFO ] Updating lennox_home homeIdx [0 homeId [local] homeName [local]
2023-07-16 10:42:58,943 [MainThread ] [INFO ] Creating lennox_system sysId [LCC]
2023-07-16 10:42:58,943 [MainThread ] [INFO ] Update lennox_system idx [0] sysId [LCC]
2023-07-16 10:42:58,943 [MainThread ] [INFO ] login Success homes [1] systems [1]
2023-07-16 10:42:58,943 [MainThread ] [DEBUG] Negotiate - Enter
2023-07-16 10:42:58,944 [MainThread ] [DEBUG] serverConnect - Complete
lsystem LCC
lsystem LCC
lsystem LCC
lsystem LCC
The current IOS App is able to communicate with the thermostat using the DDS protocol. It would be good to extend the API to support local LAN communication.
I have 5 variables (the amount of time the system is cooling, heating, aux heat, fan and off). These are supposed to be 1 minute long each but they can vary a bit, and when the system has to be restarted a minute or more can go by without data so the numbers can often not add up to the value of $timeFilter.
I would like to replace the Off value with a calculated value where the other 4 variables are subtracted from the $timeFilter duration and it becomes the new Off value.
Where and how would I do this? Right now in my query I get each variable from a Select and at bit of math:
sum(cooling)/60 AS "Cooling" FROM "HD21E10576_1_T" WHERE $timeFilter;
Likewise for Heating, Fan and Aux
Just a caution. I did not notice this in the docs but in case its not there:
If you set the S30 function to Off, then the target temp returns Null on the message pump. If you don't trap this and try to convert it to an integer value then Python will error. I had this issue in my Influx write routine and it failed for all the zones that were attached to that S30, even the ones still operating.
Just something as simple as:
hvac["target_temp"] = int(zone.getTargetTemperatureF()) if zone.getTargetTemperatureF() else 0
fixed the error so all the other parameters could be written.
I need a bit of help in understanding the nuances of diagnostic mode. I had run some tests (100% Cooling) on my heat pumps and when I display the voltage and current in the message pump I am seeing the last values before I turned the test off?
2023-08-14 12:44:46,558 [MainThread ] [INFO ] [Core Residence] Temp [76] Humidity [45] SystemMode [cool] FanMode [auto] HumidityMode [dehumidify] Cool Setpoint [76] Heat Setpoint [68] tempOperation [off] Fan [False] Outdoor - Temp [92] Demand [0] Voltage [241.0] Current [12.801] relayServerConnected [True] internetStatus [True] SSR [False] Aux [False] Temp Status [good]
I went into HASS and turned diagnostic on for one unit and was able to see the values of current after the restart including a graph.
But oddly to me when I used the API to display what I expected to see the pump show current and voltage I got [None] for each.
2023-08-14 11:58:49,841 [MainThread ] [INFO ] [None] Temp [76] Humidity [46] SystemMode [cool] FanMode [auto] HumidityMode [off] Cool Setpoint [76] Heat Setpoint [68] tempOperation [cooling] Fan [False] Outdoor - Temp [93] Demand [97] Voltage [None] Current [None] relayServerConnected [None] internetStatus [None] SSR [False] Aux [False] Temp Status [good]
The other thing was that the zone.name was empty and when looking over the log I see that where normally it would display:
2023-08-14 12:34:02,454 [MainThread ] [INFO ] Creating lennox_zone id [0]
2023-08-14 12:34:02,457 [MainThread ] [INFO ] Creating lennox_zone id [1]
2023-08-14 12:34:02,458 [MainThread ] [INFO ] Creating lennox_zone id [2]
2023-08-14 12:34:02,459 [MainThread ] [INFO ] Creating lennox_zone id [3]
2023-08-14 12:34:06,024 [MainThread ] [INFO ] Creating lennox_zone id [0]
2023-08-14 12:34:06,027 [MainThread ] [INFO ] Creating lennox_zone id [1]
2023-08-14 12:34:06,034 [MainThread ] [INFO ] Creating lennox_zone id [2]
2023-08-14 12:34:06,035 [MainThread ] [INFO ] Creating lennox_zone id [3]
There was only this one:
2023-08-14 11:58:43,770 [MainThread ] [INFO ] Creating lennox_zone id [1]
So is there a conflict between running HASS and using the API at the same time and if I manually enabled the diagnostic it would have worked ok? Or am I missing something else?
Needed for:
The Lennox protocol has both Celsius and Fahrenheit data in it. This API does not full expose Celsius data for reading and support sending Celsius for setpoints.
I know that I asked this question in item #62 about what Demand was and the response was CFM. But I don't think that is correct. I have never seen a Demand that exceeded 100. Mostly for me its about 35-45, but can go up to 100. My actual CFM limits are much larger (see below).
I am wondering if it actually is the percent that is set for the zone? If you have a zoned system you set each of the zones airflow in the Test section. Don't get me started why they are there. You can set these for (in CFM):
The maximum is based on the air handler you have and the installer decides how much they want each zone to get at a maximum.
Looking over the s30api_async.py file I did not see any place to obtain these fan set points. So if my hunch about percent is correct, then there seems to be no way, other than manually entering the values, to actually determine the CFM for a zone at a given time.
API support needed for this HA issue
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.