Page 1 of 3

Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Wed Oct 18, 2023 3:06 am
by neilk
Hi all,
As mentioned on the forums for the existing Honeywell plugin, I have been working on a Python 3 plugin to support Evohome as it was my last critical yellow dot. As others have commented it was not possible to upgrade Nicks plugin directly, but this plugin is heavily inspired by it and for Evohome users is functionally equivalent, but uses the publicly available evohome-client libraries rather than the official API. This is almost ready to release, I have found a small but irritating bug when I went to deploy on my main server which I should address quickly (and a workaround is a plugin restart after devices are created fixes the issue). I am looking for people to test and I wanted to explain some decisions/implications to allow upgrades.

1) This uses a new plugin-id so it cannot upgrade the existing Honeywell plugin directly, but it will run in parallel so that you can transition any references to the old devices (control pages, action groups, triggers etc). I am in the process of doing this, then once complete I will disable the old plugin and upgrade indigo on my production machine.

2) The devices created will have the prefix "EVO" rather than "EV", this is deliberate to avoid duplicate device names and to ease the migration when the devices are created. If this is problematic I can look to make this configurable but I don't think it should be an issue, but let me know.

3) I have found a number of actions that actually don't make sense (setting a zone to temporary override but without a temperature or on/off value), I have implemented whenever possible to maintain compatibility but I suspect some of these have never actually worked. I will document examples, before I formally release.

4) I have tested this and install should not have any negative consequences and it respects the rate limiting requirements of the API. It includes a lot of actions and given Evohome can take a while for API initiated changes to update the app/controller it is possible some of these have been missed so please accept that I may have missed something, but I should be able to address anything you find. I also do not know if the public client is as robust as the "official" one, but it seems the major difference is in how authentication was managed rather than the API calls themselves, and it appears pretty robust and is the basis for a number of other integrations.

5) My system has a Hot Water System under Evohome control, so I have not been able to test it on a system without a HW zone, again any issues should be easy to address and I believe it is covered but just in case please be warned.

I have yet to create documentation but it behaves in the same way as the earlier plugin (for Evohome users at least, but without the Wifi related options. I even found a bug that unlocked a useful feature (Indigo devices show zone errors, but the code that set the state has never worked) and that showed be one of my actuators had failed (as I never look at the controller itself).

Credit to the great work Nick did on the original plugin, it was a great effort, without which I could not have done this, and to @howartp for getting me into plugin development with his original version of this some time ago.

Please let me know if you need this and want to be involved in the testing, I should have something to publish by tomorrow latest.

Neil

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Wed Oct 18, 2023 4:28 am
by CliveS
neilk wrote:

Please let me know if you need this and want to be involved in the testing, I should have something to publish by tomorrow latest.

Neil


Yes please Neil. Great work. To get rid of my last Yellow Dot will be fantastic.

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Wed Oct 18, 2023 7:35 am
by jalves
DoI understand correctly from your other posts that this plugin will not support the Honeywell wifi thermostats?

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Wed Oct 18, 2023 3:34 pm
by neilk
I am afraid this is the case, the Honeywell plugin was basically 2 plugins in 1, with shared proprietary compiled code that managed authentication, with all other plugin code having 2 versions called in via the plugin config. The source code for that element is not available and is subject to licensing and developer terms from Honeywell. This plugin uses a public library that is Evohome only to address authentication and as a wrapper to the reverse engineered API. I am not aware of a similar library for the Wifi thermostat, and I don’t have the skills or access to any kit to develop or test against hence the need to make this a new but functionally equivalent plugin, but only for the Evohome portion.

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Wed Oct 18, 2023 4:41 pm
by jalves
I understand Neil. Thanks for looking at it.

I guess I'll need to think about switching out the thermostat for a z-wave version which I can then control directly from Indigo.

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Thu Oct 19, 2023 4:28 am
by MartinG
A keen Evohome plugin user here ready and willing to test your new version.

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Thu Oct 19, 2023 5:57 am
by neilk
You can find the initial version here

https://github.com/neilkplugins/evohome-indigo-plugin/releases/tag/0.03-alpha

and the extremely limited documentation at https://github.com/neilkplugins/evohome-indigo-plugin

Please do let me know how you get on, and if any questions

Neil

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Thu Oct 19, 2023 6:53 am
by CliveS
Neil,

Just downloaded and installed.

All now working but one TRV errored, deleted it and reinstalled it, still errored, did that again and it now is working fine so not sure why it errored as it was seen with all the others on initialisation.

Tried to set temp to 7c (min 8c, max 25c) and got the correct below min waring message so everything seems fine.

Triggers work, change temp using old plugin and yours mirrors and visa versa.

Anything you would like me to test further?

I think you have cracked it and the beauty of it is that it has a GREEN dot :)

Thank you!!!!!!!!!!

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Thu Oct 19, 2023 7:50 am
by neilk
That is great news, thanks for the rapid feedback.

I cannot think of anything, other than do you have a hot water zone ?

Let's keep an eye on how it runs, but to be honest I expect the most likely area for issues will have been in install, setup and device creation. I also have not actually experienced an outage of the API, I don't expect problems but I cannot for certain say it will elegantly recover but I am sure Honeywell will help us with that at some point.

If you spot anything that doesn't work, or needs attention then just shout.

I would also be interested in how your migration worked out and how you approached it, I intend to

Install the new plugin and configure the devices
Check the dependency against the existing devices, then move them to the new one
disable the existing plugin
check everything is working as you expect
upgrade to the latest version having banished the yellow dot !

Finally are you OK with the EVO device naming ? I can make this configurable, but don't think it is really an issue.

Thanks,
Neil

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Thu Oct 19, 2023 8:09 am
by CliveS
At present I have 2 radiators in the front room, one is now using EVO and the other staying on EV, every hour I run a schedule that does a look up of temp required for that hour, check to see if windows and doors are open etc and then set the temp. If during the hour a window or door opens or closes I rerun the script so as everything revolves around the one python script all I need to do for moving over is for each TRV change 3 lines

Code: Select all

#devRadiatorTemp      = indigo.devices[423413086].states["temperatureInputsAll"]
#devRadiator         = indigo.devices[423413086] # "EV Zone: Living Room Front"
#devRadiatorSetPoint = indigo.devices[423413086].states["setpointHeat"]

devRadiatorTemp      = indigo.devices[365686248].states["temperatureInputsAll"]
devRadiator         = indigo.devices[365686248] # "EVO Zone: Living Room Front"
devRadiatorSetPoint = indigo.devices[365686248].states["setpointHeat"]
devLivingRoomRWin   = indigo.devices[1789577176].states["onOffState.ui"] # "Living Room Right Window Contact"               
devLivingRoomLWin   = indigo.devices[77925355].states["onOffState.ui"]  # "Living Room Left Window Contact"               



My hot water is heated when the hot tap opens so no Evohome control on that.

I will keep it at just the one TRV changed at present (but may add the Conservatory s well) but all is stable at present.

One observation is that EV Lock was always RED but EVO Lock is staying BLACK so that is good.

Apart from the original install hiccup (info log available if required ) it looks rock solid

EVO is fine with me.

Error report

PostPosted: Fri Oct 20, 2023 4:23 am
by CliveS
Neil,
As the North East gets lashed by storm Babet I think I had a brief cut in internet last night and I found that this morning the radiators did not respond to updates, even clicking the up and down arrows did not respond but the plugin was showing a green dot.

It looks like the reflector was not seen so I presume the internet was not available and Evohome and Pushover failed (pushover recovered as can be seen at bottom of log) .

error log

Code: Select all
2023-10-20 02:25:19.427   Alexa Warning   Your reflector isn't available - you won't be able to use Alexa until the reflector is operating correctly.
2023-10-20 02:25:20.220   Reflector   restarting reflector connection to https://highsteads.indigodomo.net
2023-10-20 02:26:07.447   Z-Wave   received "Drive Right Temperature" sensor update to 10.2 °C
2023-10-20 02:30:00.570   Schedule   Night Check Windows and Doors
2023-10-20 02:30:00.767   Script   All Windows & Doors Locked
2023-10-20 02:31:34.827   Honeywell Evohome Error   [Fri Oct 20 02:31:34 2023] Cannot read Evohome data
2023-10-20 02:31:34.829   Honeywell Evohome Error   Error in plugin execution runConcurrentThread:

  File "plugin.py", line 40, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/Honeywell_Evohome.indigoPlugin/Contents/Server Plugin/Honeywell.py", line 116, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/Honeywell_Evohome.indigoPlugin/Contents/Server Plugin/Honeywell.py", line 203, in evohome_get_all
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins/Honeywell_Evohome.indigoPlugin/Contents/Server Plugin/Honeywell.py", line 209, in evohome_updateDevice
type: 'NoneType' object has no attribute 'locations'

2023-10-20 02:31:34.830   Honeywell Evohome Error   plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2023-10-20 02:31:51.972   Pushover Error   Error in plugin execution ExecuteAction:

  File "plugin.py", line 139, in send
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/api.py", line 117, in post
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/api.py", line 61, in request
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/sessions.py", line 529, in request
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/sessions.py", line 645, in send
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/adapters.py", line 519, in send
type: HTTPSConnectionPool(host='api.pushover.net', port=443): Max retries exceeded with url: /1/messages.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x107bd1bd0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

2023-10-20 02:31:52.109   Hue Lights   Sent Hue Lights  "Back Door Light"  to 100.
2023-10-20 02:31:52.109   Hue Lights   updateDeviceState: Updating device "Back Door Light" state: "brightnessLevel". Old value = 0. New value = 100
2023-10-20 02:35:41.846   Error   reflector connection test failed: unable to connect to server
2023-10-20 02:35:41.848   Warning   reflector reconnection scheduled in 5 seconds
2023-10-20 02:35:47.880   Reflector   restarting reflector connection to https://highsteads.indigodomo.net
2023-10-20 02:37:08.262   Hue Lights   Sent Hue Lights  "Back Door Light" off.
2023-10-20 02:37:08.263   Hue Lights   updateDeviceState: Updating device "Back Door Light" state: "brightnessLevel". Old value = 100. New value = 0
2023-10-20 02:38:12.025   Hue Lights   Sent Hue Lights  "Back Door Light"  to 100.
2023-10-20 02:38:12.025   Hue Lights   updateDeviceState: Updating device "Back Door Light" state: "brightnessLevel". Old value = 0. New value = 100
2023-10-20 02:38:12.276   Pushover   Pushover notification was sent successfully, title: Door, body: Alert



.

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Fri Oct 20, 2023 7:32 am
by neilk
Thanks Clive, I will add some better trapping here for this that hopefully will also allow it to recover but this is really helpful. I will publish a new version over the weekend.

Neil

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Fri Oct 20, 2023 7:41 am
by CliveS
Neil,
Look forward to the update, just had another outage so the rain is causing havoc up here!

Same error message so I am using SQL logger event trigger to restart it at present.

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Fri Oct 20, 2023 12:26 pm
by neilk
Clive,
Sorry for the issues, I shipped my whole development machine to a wind tunnel to replicate your situation and found the error (or I just unplugged the network cable). I had checked and caught the error that the API call failed, but didn't stop the empty response being processed. I also found why the error never cleared (which actually was the earlier bug that I couldn't replicate) as my logic that flagged an error never actually reset when cleared. My earlier 'bug' was I added the credentials incorrectly the first time, corrected them in the plugin config but for the same reason the error never cleared until a plugin restart.

Try this version https://github.com/neilkplugins/evohome-indigo-plugin/releases/tag/0.0.4-Alpha

I hope you stay safe, warm and dry, I see the lighthouse at the end of South Shields pier lost it's top, and some crazy pictures of Sea foam at Seaburn on the news today, and we are all coming back to South Shields next week !

Neil

Re: Honeywell Evohome Python 3 plugin - coming soon

PostPosted: Fri Oct 20, 2023 1:22 pm
by CliveS
neilk wrote:

I hope you stay safe, warm and dry, I see the lighthouse at the end of South Shields pier lost it's top, and some crazy pictures of Sea foam at Seaburn on the news today, and we are all coming back to South Shields next week !

Neil


Well if you put a sail on the car roof you should get here in double quick time, Yes South Shields and Seaburn are just over 20 miles away but we are perched 270m up on the edge of the pennines so a bit breezy and very, very wet at present. Good thing you didn't use rain in the wind tunnel :D

Installed the update and will see how it goes, thanks for the speedy response