[Workaround] Evohome multiple concurrent locations

Same here…
Supervised intall on an Odroid under Debian 11, because I am only dipping my toe into the pool that is called Linux :wink:
So adding a folder custom_components (through Samba) to the folder my configuration.yaml resides in would not be a problem, but if I put the async2 GitHub repo in there, nothing happens. If I create another renamed evohome entry with the same user/pw combination as the evohome: entry in my configuration. yaml I get “invalid config” beacuase the renamed entry is not recognised.

I can ssh into the machine, but I did not makage to find where homeassistant actually gets installed, let alone where I would find the compunents folder under it…

Any help would be greatly appreciated, because I just spent about €200 on a thermostat that has no added value because I already own the same one that I use in my caravan (so necessarily 2 locations, because 2 gateways). Pfff…

  1. You need to install it as a custom component, and you must change the name of the folder.

The official integration would be ...\components\evohome, and you want it to be in (say) custom_components\evohome_cc (or \evohome_00, \evohome_01…).

Or you can copy it direct from the git repo (make sure you use the correct branch).

Accessing the custom_components folder is a HA thing - you should be able to find the answer to that elsewhere in the docs/forum.

  1. Once you’ve done that, you have to edit the manifest.json file:
"domain": "evohome_cc",

… and the const.py file:

DOMAIN = "evohome_cc"
  1. You then edit you configuration.yaml file:
evohome:
  username: !secret my_evohome_username
  password: !secret my_evohome_password

evohome_cc:
  username: !secret my_evohome_username
  password: !secret my_evohome_password
  location_idx: 1
  1. Once you get it working, every time you upgrade HA, you are at risk of having to re-copy/edit the files as above, because the HA team may well have modified the integration & it’s dependencies.

WIth little effort, you shoudl be able to make a script for that.

I’ve managed to get a second Evohome to show up in Home Assistant.

Various problems I had:

  • couldn’t find the normal component files (probably because I’m using HASSIO which uses Docker, which is still new to me)

  • so I downloaded files from GitHub. Had problems finding which version, and ended up having to copy/paste in the end

  • HA wouldn’t load the custom component because it requires a ‘version’ in the manifest.json, so I made one up (added “version”: “0.1” at the end of the JSON)

  • Honeywell refused the login, saying ‘too many attempts’. I guess because both components are logging in within milliseconds. So, I edited init.py and added a

    time.sleep(5)

just before

client_v2 = evohomeasync2.EvohomeClient(

and that seems to have worked (need ‘import time’ at the top if the file as well). The 5 second delay may be OTT, but it works

Like Paul above, I was not able to find the official integration inside homeassistant through ssh, so I copied the files from core/homeassistant/components/evohome at dev · home-assistant/core · GitHub by selecting each file and “right-click save as” the raw file. Put them all in a folder “evothuis” (“thuis” is Dutch for “at home”) inside a folder custom_components under the config folder of my Samba share of homeassistant.
Did the two modifications to have manifest.json and const.py point to “evothuis”, and copy/pasted the evohome section of my configuration.yaml file to a new section “evothuis”. Added the location_idx: 1 to that section, and …_idx: 0 to the :evohome section.

After a save, H.A. configuration check failed because it “could not find the integration “evothuis””. So HA will not restart until I comment out the “evothuis:” section in my coonfiguration.yaml file again.
I have the standard evohome integration running for location_idx: 0 correctly. Do I need to also do something with the files from GitHub - zxdavb/evohome-client: Python client to access the Evohome web service (or the async version) too, to install a “new” intergration?
I am confused. Because this is the way I imaginged it would work (copy/paste the existing component under a different name, effectively, and use that new one for my new thermostat/gateway combo), but apparently I am not getting the whole picture yet.

To illustrate the situation, a snippet from configuration.yaml, and the message I get upon checking the configuration before restart (restart is not allowed because of this)

Blockquote

evohome:
username: !secret honeywell_user
password: !secret honeywell_pw
location_idx: 0

evothuis:
username: !secret honeywell_user
password: !secret honeywell_pw
location_idx: 1

Blockquote


Yes; I got it working :slight_smile:
It turned out that I did things right (sort of), but perhaps I should have done it all through ssh.
By placing the folder under my custom_components folder, the new folder was owned by the Samba User that created it. Had I created it using ssh as root (a supervised install plays HA as root user), then probably the permissions would have been set OK straight away.
Now I had to grant execute rights to /usr/share/hassio/homeassistant/custom_components/[new folder]/*, and that single action made it all work.
Apart from Honneywell having some issues with their server at this specific moment (I just got a notification of that while using their own app; measured temperature values are no longer fed back to the app / the integration; setting temperatures still works), I got HA to recognise the integration under the new name, and I now have two separate climate.thermostat entities to play with.

Thank you very, very much @zxdavb, for taking the time to explain the process to me in such detail that a Linux noob like myself could get it right .And of course for creating and maintaining the integration in the first place :+1:

1 Like

I advise to create/use a second TCC account and give it permission to access to the location, via the TCC website (being logged on as your main account when you do so) - ?Grant Access button?.

Sorry to add to an old thread and please excuse my lack of knowledge. I have two evohome controllers and I can see from above it is possible to get it to register with HA. Are there any instructions to follow so I can set this up or has anything changed that can make it easier?
thanks
mark

@Eric-Jan_Oud I have the same problem as you getting this message when I do config.yaml check “Integration error: evoheat - Integration ‘evoheat’ not found”, and it not finds the added integration so I assume I need to grant access also, but can you explain to me how did you do this?

“Now I had to grant execute rights to /usr/share/hassio/homeassistant/custom_components/[new folder]/*, and that single action made it all work.”

I am running HA pre-installed on a “Home Assistant Blue”

or else maybe @zxdavb you can help me out please?

i did already tryed going to SHH terminal (using add-on) > typing /config/custom_components to bring me to custom components folder ant there I typed sudo chmod 777 evoheat/* to grant full access to all users … but this not did change anything for me

For detailed instruction on how to do this, look here: Home Assistant: Multiple Evohome Locations

The above is a first draft: please submit an Issue if that wiki has any problems with it.

Good luck.

@zxdavb I already have a custom _components folder housing several other custom integrations, you mention start with a clean set up, does this mean I need to make a second custom_components folder or can I just add the secondary instance of evohome in my existing folder?

@zxdavb I followed all the steps in your WIKI but still get the message "integration error: ‘evohome_1’ - not found :frowning:

The meaning was to remove all the existing evohome folders from under custom_components, if any.

The custom_components folder, and any of the ‘other’ folders under it - those containing other integrations - should remain unmolested.

I am sorry if the language was not clear.

You can simply add an evohome_1 folder to the custom_components folder, but you must also delete any evohome* folders left over from before.

Regarding the rest, I will check it tomorrow-ish, and get back to you.

In the meantime, could you provide more detail about your installation, and some specifics of how you achieved the instructions in the wiki.

Please include a copy of your configuration.yaml,

@zxdavb I did try to add to my existing custom_components folder following the steps you gave in WIKI using the SHH Terminal add-on also did try to add it by manually download the evohome Integration raw files and copy paste them in evohome_1 folder within custom_components trying with samba share from my PC and trying to add true file editor, all 3 of these ways to add the secondary integration result in the same error message that integration not can be found.

My primary evohome integration runs already for over 1,5 year without problems

Like this I tryed to add it to my configuration.yaml

evohome:
username: “primary account”
password: “##########”
location_idx: “1”
evohome_1:
username: “granted access account”
password: “##########”
location_idx: “0”

And this is my system info running on a “home assistant blue” device:

System Information

version core-2023.8.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.39
arch aarch64
timezone Europe/Bucharest
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4996
Installed Version 1.32.1
Stage running
Available Repositories 1272
Downloaded Repositories 27
AccuWeather
can_reach_server ok
remaining_requests 24
Home Assistant Cloud
logged_in true
subscription_expiration September 15, 2023 at 03:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled true
remote_server eu-central-1-4.ui.nabu.casa
certificate_status ready
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.4
update_channel stable
supervisor_version supervisor-2023.08.1
agent_version 1.5.1
docker_version 23.0.6
disk_total 113.9 GB
disk_used 62.5 GB
healthy true
supported true
board odroid-n2
supervisor_api ok
version_api ok
installed_addons Spotify Connect (0.12.4), Home Assistant Google Drive Backup (0.111.1), File editor (5.6.0), Advanced SSH & Web Terminal (15.0.7), Samba share (10.0.2), MariaDB (2.6.1), ESPHome (2023.8.1), Assistant Relay (0.7.4), Mosquitto broker (6.2.1), Zigbee2MQTT (1.32.2-1)
Dashboards
dashboards 1
resources 16
views 21
mode storage
Recorder
oldest_recorder_run August 9, 2023 at 08:45
current_recorder_run August 19, 2023 at 00:21
estimated_db_size 1640.14 MiB
database_engine mysql
database_version 10.6.12
Sonoff
version 3.5.2 (2ad1cd7)
cloud_online 10 / 10
local_online 10 / 10
Spotify
api_endpoint_reachable ok

@sesame26 Thanks for the additional information…

I apologise: I believe English may not be your native language, and so if I have misunderstood you, please forgive me…

First, I am only needing you to confirm that you followed the instructions in the Wiki exactly. If you added a command, or didn’t execute a command, then do tell me.

I am not interested in using Samba, etc - this is not in the wiki article. Please limit yourself to the exact instructions of the wiki.

Please be precise. For example, use formatting when necessary.

re: the configuration.yaml, I think you meant:

evohome:
  username: "primary account"
  password: "##########"
  location_idx: 1
evohome_1:
  username: "granted access account"
  password: "##########"
  location_idx: 0

Please use the secrets.yaml file as described in the wiki.

Please follow the wiki again, but only via the SSH add-on. I wonder if you have a problem with permissions (I am using a different SSH add-on), so - when you’ve finished, try:

ls -al /config/custom_components/evohome_1

And post the results here.

@sesame26 I just had a look…

I have made a few mistakes in the instructions.

For now, I will remove this bit:

    await asyncio.sleep(5)

… and the manifest.json is missing a comma:

  "requirements": ["evohome-async==0.3.15"]

… it should have a trailing comma:

  "requirements": ["evohome-async==0.3.15"],

So, I will edit the wiki, and post here when it is good for you to try again.

@sesame26 OK, try now. Good luck.

@zxdavb yes I did follow the WIKI exactly as you described everything in there

My configuration.yaml indeed looks like you posted BUT I have, username, password and idx_location values all between " " so I not use 1 as value for idx_location but “1” I have it like this also in original evohome config and it works for 1.5 year already.

I will tomorrow try again your adjusted WIKI and let you know if did succeed or not.

Thanks!

@zxdavb I did try add again and still have the same error that integration can not be found if i run the following line > ls -al /config/custom_components/evohome_1 > I get to see following on the picture I added below to this post

2023-08-19_23-15-00

@sesame26

What did you get when you:

cat /config/custom_components/evohome_1/manifest.json

… and:

cat /config/custom_components/evohome_1/const.py | grep 'DOMAIN'