-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thermostat Schedule, Fan, and Equipment #5
Comments
I see a bug here also where 71 is set in place of {candidate_configuration["htsp"]} in (fixed b8bc435). Does this fix the issue for you?
I use a history_stats sensor to track runtime:
|
So problem 2 is solved - thanks. Problem 1 remains. Now, it is resetting all the heat temperatures to 69 and all the cool temperatures to 71. It is also changing all the period start times back to 0600, 0800, 1700, and 2200. I gather from your code that the wake, home, evening and sleep schedules correspond to period_id 1-4 respectively. Also guessing that htsp is the heat set-point and clsp is the cool set-point..... On problem 3, my sensor.edenobservertstat_state is always "unknown". |
It should be pretty straightforward to build the schedule. What would you envision as the method for setting that? Providing a JSON or YAML file you populate with the schedule to the server? Setting via env variables on the container? I'm leaning towards filling out the schedule in a text file and having the server build the config but am open to ideas. Something like: |
That would work great. But if someone were to change the schedule on the TSTAT0201CW itself, would that be updated on the server? I'm totally good with the yaml file, but the rest of the family, not so much :) |
So would you expect the schedule to be set on the thermostat itself and never be overridden by the API server? I think that would be even easier, just accept what is there and then echo it back when the thermostat asks for updated settings. |
From my standpoint, that would be ideal. I can always set a new schedule in HA with hold automations - that has been my stop gap. The downside is that there is some learning going on within the TSTAT0201CW that I can't take advantage of with a series of hold temps (if that makes sense). |
Well I just removed the program data from the XML config POST response. That seems to allow the program to stay independent from the API server. Can you test the most recent image? I also tweaked some of the PingRates to increase the performance. |
Can you capture the MQTT message from the API server upon thermostat posting to
Or better yet, a full packet capture from your api server host as you change a setting from HA, and the thermostat acknowledges the change. Network interface might be something like eth0 (you can check ifconfig) It's also odd that some other values are Unknown or empty. |
Here's what I've got, I think Received 8:37:03 PM |
I don't have tcpdump and was struggling to find /status - I'm still on the low of the learning curve here..... |
Are you using a raspberry pi? Do you know what operating system you are running? Do you have shell access to it over ssh? |
I've got shell access to my Raspberry Pi and home assistant is a docker container installation - solely to support your server :) NAME="Debian GNU/Linux" Looks like I can install tcpdump if you'd like me to. Thanks for your patience with me - I'm a retired engineering professor and my days of linux administration are decades behind me - things have changed! |
Better yet, I just committed a change to output the raw data from the thermostat. Can you pull the latest image, redeploy your container, and send me the logs after a few minutes of it running? |
rwn@edenrpi:/opt $ docker logs thermostat_api_server They Are generating, but how do I send you one? |
It looks like the thermostat isn't communicating to your server, it might take a few minutes. I'm looking for something like:
|
had to power cycle the TSTAT 192.168.86.240 - - [03/Feb/2024 04:44:14] "POST /systems/2615N363586/status HTTP/1.1" 200 - |
Would you mind pulling the latest image (again) and collecting the logs again? |
Sorry for the delay - weekend family obligations - here is the latest 2024-02-05 15:31:35,508 -- INFO -- 192.168.86.240 -- POST -- /systems/2615N363586/odu_status |
Your thermostat is sending data in a different format: Mine: Not sure what up with that but it explains why the Home Assistant templates are failing. Perhaps this is due to a varied firmware version on the thermostat? Can you grab data from
|
docker logs thermostat_api_server 2>&1 | grep "/profile" didn't return anything, but the Thermostat Application Version number listed on the Observer is 4.02 |
Hey Andrew - I totally understand if this version issue is low on your priority list - the system state is not a big deal for me. But is there any chance you can update the image to log less frequently? Thanks |
I haven't forgotten about you! It's on my list to figure something out with the version. As far as logging, if you set |
I just upgraded my WiFi to Google Nest last night because they are also thread border routers (and work great so far, BTW). In the process I realized that I needed a static IP for my RPi. I edited my docker compose and restarted everything which pulled your latest version, but now I'm getting the error below. Did I screw something up my MQTT server or has something changed in the code? Traceback (most recent call last): |
Hang on - I think it's me. Hard to tell which device is my Home Assistant, but suspect it's the one that says Home Assistant Container...... |
It's on me. I didn't pin module versions and Paho had a breaking change. Fixed in 722a1b3 |
Still having connection issues - here's my latest log. I've confirmed that the IP of the MQTT broker and the API server are the same as the Pi. The port of the broker is 1883 and for the server, its 8080. I've noticed that both my Raspberry Pi and my HA docker container have IP addresses - I'm assuming that the IP for the Pi is the one I should be using - is that right? If not, then that may be my problem 2024-02-18 15:22:30,030 -- INFO -- Connecting to MQTT |
Please check the IP you are passing to this container in the |
I changed it in the docker compose to the IP of the Pi, which is a 192.168.XX.XX - it had been the IP listed in Portainer, which is a 172.18.x.x Now my log looks like this - things I do in HA seem to be logged, but they are not actually registering with the thermostat. And things done to the thermostat are not registering in the log. Nor did the server download the current setting of the tstat. But it seems to be connecting at least! 2024-02-20 04:06:19,011 -- INFO -- Connecting to MQTT |
That's a good sign. I'd check this now: #4 (comment) |
That works. 2024-02-20T13:57:31Zpower cycled the tstat and restarted HA - still not able to control the thermostat from HA. I had enabled MQTT logging - here is some output in case that is helpful: 2024-02-19 21:30:17.256 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on homeassistant/sensor/2615N363586-last-time/config (qos=0): b'{"device": {"mdl": "TSTAT0201CW", "mf": "Observer", "ids": "2615N363586", "name": "EdenObserverTSTAT"}, "stat_t": "homeassistant/climate/EdenObserverTSTAT/state", "val_tpl": "{{ value_json.last_communication }}", "name": "EdenObserverTSTAT Last Communication", "ic": "mdi:clock", "uniq_id": "2615N363586-last-time"}' |
Still can't control of the tstat from home assistant, so I'd like to try it from an earlier version. How would I modify my docker compose to rollback to your version 00abac6? I tried image: ghcr.io/aneisch/thermostat_api_server:00abac6-arm64 to no avail |
check all that - back up and running again after some restarts etc - the observer api was resetting to the default after every power cycle |
First off, thanks so much for this. I've got an HVAC imbalance in my home and I've been using your server code and HA to run the fan at various levels depending on temperature delta to equalize rooms temperatures - it's made a huge difference. So far it's been completely stable.
Here is a list of things that have been minor issues for me:
The Schedule on the Observer gets reset within 12 hours. The Observer Wake, Home, Evening, Sleep settings get set to 69 or 71 degrees and the schedule is also reset to some default - I can't for the life of me figure out how or why. I can set automations in HA to hold temperature during certain time triggers, but that is not as family friendly as setting the schedule on the Observer.
The Observer has high, med and low fan settings, but the Thermostat entity only has high and low - can the medium setting be added?
Finally, it would be nice to know how often and how long the heat, aux heat (its a heat pump) and cool run for. I assume that is the Active Equipment Event, but that seems to be broken.
Thanks again for all your work on this.
The text was updated successfully, but these errors were encountered: