aneisch / thermostat_api_server_docker

Python API server for Observer Communicating Thermostat local control
5 stars 2 forks source link

Sending to thermostat #3

Closed ullms1 closed 10 months ago

ullms1 commented 10 months ago

Able to get the api to communicate with the MQTT server, thermostat sending information, but unable to control the thermostat via the MQTT server (homeassistant). Any suggestions?

aneisch commented 10 months ago

If you docker logs -f CONTAINER_NAME do you see log entries for commands from HA?

ullms1 commented 10 months ago

Here is a portion of the log file

i_server | Connecting to MQTT thermostat_api_server | Connected to MQTT thermostat_api_server | Subscribed to homeassistant/climate/living/cmnd/# thermostat_api_server | Published Config Entries thermostat_api_server | 192.168.0.102 - - [12/Nov/2023 19:54:52] "POST /systems/2617N192113 HTTP/1.1" 200 - thermostat_api_server | 192.168.0.102 - - [12/Nov/2023 19:54:54] "POST /systems/2617N192113/notifications HTTP/1.1" 200 - thermostat_api_server | 192.168.0.102 - - [12/Nov/2023 19:54:56] "POST /systems/2617N192113/status HTTP/1.1" 200 - thermostat_api_server | 192.168.0.102 - - [12/Nov/2023 19:54:58] "POST /systems/2617N192113/odu_status HTTP/1.1" 200 - thermostat_api_server | 192.168.0.102 - - [12/Nov/2023 19:55:02] "POST /systems/2617N192113/idu_faults HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 19:55:04] "GET /time HTTP/1.1" 200 - thermostat_api_server | 192.168.0.102 - - [12/Nov/2023 19:55:06] "POST /systems/2617N192113/odu_faults HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 19:56:04] "GET /time HTTP/1.1" 200 - thermostat_api_server | New message: homeassistant/climate/living/cmnd/temperature 70.0 thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 19:57:04] "GET /time HTTP/1.1" 200 - thermostat_api_server | New message: homeassistant/climate/living/cmnd/operating_mode heat thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 19:58:04] "GET /time HTTP/1.1" 200 - thermostat_api_server | 192.168.0.102 - - [12/Nov/2023 19:58:15] "POST /systems/2617N192113/history HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 19:59:04] "GET /time HTTP/1.1" 200 - thermostat_api_server | New message: homeassistant/climate/living/cmnd/operating_mode off thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 20:00:05] "GET /time HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 20:01:05] "GET /time HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 20:02:05] "GET /time HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 20:03:05] "GET /time HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 20:04:05] "GET /time HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 20:05:05] "GET /time HTTP/1.1" 200 - thermostat_api_server | 127.0.0.1 - - [12/Nov/2023 20:06:05] "GET /time HTTP/1.1" 200 - thermostat_api_server | New message: homeassistant/climate/living/cmnd/operating_mode cool thermostat_api_server | New message: homeassistant/climate/living/cmnd/operating_mode heat thermostat_api_server | New message: homeassistant/climate/living/cmnd/operating_mode heat thermostat_api_server | New message: homeassistant/climate/living/cmnd/operating_mode heat thermostat_api_server | New message: homeassistant/climate/living/cmnd/operating_mode heat thermostat_api_server | New message: homeassistant/climate/living/cmnd/temperature 64.0

On Sun, Nov 12, 2023 at 2:25 PM Andrew @.***> wrote:

If you docker logs -f CONTAINER_NAME do you see log entries for commands from HA?

— Reply to this email directly, view it on GitHub https://github.com/aneisch/thermostat_api_server_docker/issues/3#issuecomment-1807229745, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBWSYPC2K3Y5PCX5UGCFPTYEEWC7AVCNFSM6AAAAAA7IHSXDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGIZDSNZUGU . You are receiving this because you authored the thread.Message ID: @.***>

aneisch commented 10 months ago

It looks like the most recent contact from the thermostat is 12/Nov/2023 19:56:04 but your command is sent from HA right after that.

I see the same where sometimes the thermostat simply stops communicating with the API server. It usually doesn't last too long but I haven't figured out if this is a code problem or just an oddity with the thermostat itself.

ullms1 commented 10 months ago

I'm thinking it's an issue with the thermostat firmware. It doesn't stay connected with the observer API website either. If the power is disconnected it will connect when power is restored but then disconnects after an hour or so, and never reconnects.

I tried your API to see if it was just observers web API. Great work though.

Thanks for the help.

On Sun, Nov 12, 2023, 2:43 PM Andrew @.***> wrote:

It looks like the most recent contact from the thermostat is 12/Nov/2023 19:56:04 but your command is sent from HA right after that.

I see the same where sometimes the thermostat simply stops communicating with the API server. It usually doesn't last too long but I haven't figured out if this is a code problem or just an oddity with the thermostat itself.

— Reply to this email directly, view it on GitHub https://github.com/aneisch/thermostat_api_server_docker/issues/3#issuecomment-1807234024, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBWSYPX2BLMLZBWZ3RZKX3YEEYIZAVCNFSM6AAAAAA7IHSXDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGIZTIMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

aneisch commented 10 months ago

Mine has been pretty stable. I think it's really susceptible to wifi dropouts and such. I have noticed that if I manually kill the tcp connection between my API server and the thermostat that will get it to "reset" and start working again.