Multiple ISY994's

I am new to Home Assistant with very little coding experience but I now have a Raspberry Pi 4B running hassio 0.105.3.

I have two ISY994’s, one in my home and one in my detached shop. I have the one in my home working with hassio and would like to add the second but keep running into errors.

Here is what I have in my configuration.yaml

# Universal Devices ISY994 (House)
isy994:
  host: !secret isy_house_url
  username: !secret isy_house_username
  password: !secret isy_house_password

# Universal Devices ISY994 (Shop)
isy994:
  host: !secret isy_shop_url
  username: !secret isy_shop_username
  password: !secret isy_shop_password

But this gives vsc error…

File ‘configuration.yaml’ could not be parsed, it was referenced from path ‘configuration.yaml’.This file will be ignored. Error(s): - YAMLSemanticError: Map keys must be unique; “isy994” is repeated (Line: 2)

Another post recommended a 2nd HA server with exposed devices over SSL.

The second ISY994 was my only solution due to separate electrical services however both house & shop are on the same LAN. I wanted to make sure I wasn’t missing a simple configuration change that could make this work from a single instance of HA.

Thank you for any input.
Tim

I don’t know if the integration allows multiple ISY units, but the error that you are receiving is saying that the second “isy994:” reference is not allowed. When defining multiple switches, cameras, etc., you would use a single map key followed by the multiple definitions. So, I would start by trying removing the second “isy994:” and have the two units defined inline.

If I had to guess, I would say this would not work as there does not seem to be any reference to including multiple ISY units. If so, then another experiment you can try is to have one ISY on the main integration (i.e., what you describe above) and the second on the custom component that is available. If that works, the only potential issue is that the description of the custom component says that it is intended to join the main integration; the custom component may not be updated after that occurs.

Looks like there is also a previous discussion on this topic:

hads514, I have tried both versions of the isy994 with the current being 1.0.11 from HACS. I also tried your suggestion to have two instances but get similar errors.

Thank you for your suggestions.

tim

Just seeing this. If you tag a member as @NAME, e,g., @TimWing, they get a notification.

Out of curiosity, did you have one ISY on the standard component and one on the custom component? If yes, I understand this was not successful.

@hads514 So I have tried this using a fresh installation of hassio on RPi4 using only the HACS-ISY994: v1.0.12-beta1

configuration.yaml

Universal Devices ISY994

isy994:
host: http://192.168.0.3:80
host: http://192.168.0.2:80
username: !secret isy_username
password: !secret isy_password

2020-02-26 20:59:48 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key “host”. Check lines 20 and 21.

2020-02-26 20:59:48 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for isy994 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2020-02-26 20:59:48 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

The first host address is always “Unavailable” while second host address is the one that resolves.

I would not have expected it (i.e., trying to include two ISY994 units) to work in the way depicted. The normal way to include separate devices under a single map key is:

isy994:
  host: [http://192.168.0.3:80](http://192.168.0.3/)
  username: !secret isy_username
  password: !secret isy_password
  host: [http://192.168.0.3:80](http://192.168.0.2/)
  username: !secret isy_username
  password: !secret isy_password

The above would assume that the username and password are identical on both units. However, I think the other discussion on this topic has established that this does not work.

Having not installed the custom integration, I had hoped that it would have a configuration process that is different from the standard component. However, from your message, I am gathering that you did install the custom integration and it appears that the configuration entry is identical to the standard component (the warning error is typical of custom components/integrations). However, it may still be worth one more shot using the style of configuration entry that I describe above. Alternatively, you could always try communicating with the developer to see if they would consider an enhancement to the code.

@shbatm I am using a fresh install of hassio 106.2 & HACS ISY994 v1.0.14. Maybe this is not integrated but I thought multiple ISY994’s is supported. I am still having some problems.

The issue seems to be defining multiple hosts.

isy994:
  host: http://192.168.0.2:80
  host: http://192.168.0.3:80
  username: !secret isy_username
  password: !secret isy_password

The above configuration only shows devices connected to the host: http://192.168.0.3:80 and ignores the host: http://192.168.0.2:80.

If I switch order of the hosts then the host: http://192.168.0.2:80 is recognized and the host: http://192.168.0.3:80 is ignored.

If there any information I can provide to help diagnose this?

Thank you.

Stay on v1.0.12-beta1 for right now until you confirm everything works (I have not merged the changes for multiple hosts yet in v1.0.14. You need to have Show Betas enabled for ISY994 in HACS (in the 3 dot menu on the installation page).

The multiple hosts need to be defined as a list ( with a - for each ).

isy994:
  - host: http://192.168.0.2:80
    username: !secret isy_username
    password: !secret isy_password
  - host: http://192.168.0.3:80
    username: !secret isy_username
    password: !secret isy_password

Let me know if it works properly and I’ll push the changes to the newest branch.

@shbatm With v1.0.12-beta1 installed and a - for each host as shown below, I get configuration errors.

image

isy994:
  - host: http://192.168.0.2:80
    username: !secret isy_username
    password: !secret isy_password
  - host: http://192.168.0.3:80
    username: !secret isy_username
    password: !secret isy_password

image

That’s the correct formatting. I wonder 2 things: 1) I’ve been having some issues where HACS is saying it updated an installation, but it really didn’t. Try removing the integration and re-installing to make sure i’ts actually installing correctly. and 2) HA may be trying to validate against the current config version–if you’ve tried number 1, you may have to force HA to restart (don’t just restart from within HA; restart from the command line or reboot the computer/vm).

New Beta Version:

I found the source of half the problem with the issue you raised here, so please make sure you update to v1.0.14-beta2. The other half of the issue with the “does not create unique ids” comes from “old” entities when you tried the isy994_2 method. You’ll need to clear everything out of .storage/core.restore_states and .storage/core.entity_registry that were added by that method (may be easier to delete the two files and let them regenerate, but that will wipe out any customizations you’ve made on the entity_id names).

I’ve tested this by added two instances of my single controller (and a temp work around to make sure I don’t get the unique_id error) and it appeared to be working properly. Please let me know if you have any issues.

Tagging @simplextech because I don’t know if he’s seen this thread.

@shbatm, v1.0.14-beta2 seems to be working for me now…Sweet!

Something I noticed…

I have two z-wave door lock’s, one on each ISY994.


But only one was recognized in hassio.
image

They share the same node ID (ZW003_1) which means they have a conflicting unique_id in Hass. I bet you have 1 integration does not provide unique id's error.

I need to make a change in PyISY to expose which ISY each node is reporting from so it can be tagged in the unique ID. I’ll do that when I get a chance.

Figured that was it. I assume the ID’s would be unique if they were both on the same ISY. I checked to see if there was a way to change the ID in ISY but have not had any luck.

Thanks again for your help. Cheers

Pushed v1.0.14-beta3.

Please note: This update prepends the UUID from the ISY controller onto each entity’s node address. This will create duplicate entities the first time it runs. It’s strongly suggested you remove any ISY994 entities from the Entity Register before restarting Home Assistant (or remove them manually from the config/.storage/core.entity_registry and config/.storage/core.restore_states while Home Assistant is not running).

@TimWing There is a new version on the master branch (will be 1.2.0 soon) that adds a config flow. Can you please see if you can set up two ISYs using the integrations page?

@shbatm Seems to be working via integrations.
SNAG-0000

However I have two zwave door locks but only the house is showing and not the shop.

Can you please check your logs for any errors or issues? The duplicate ZW003_1 shouldn’t have been an issue with this version, but I might have missed something.

@shbatm I finally had a chance to get back on this.

So I wiped everything ISY994 from my test hassio also deleting the core.entity_registry & core.restore_state from the config.storage folder.

After a restart, I installed one of my two ISY994’s via Configuration/Integrations. I started with the Shop ISY (the one that was not showing the zwave door lock) and everything went well, the zwave lock for the shop shows now :>). Since this went so well I decided to install the ISY994 for the house but this did not work for some reason.

Here is the error log…

2020-03-17 17:13:13 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ISY - House (192.168.0.3) for isy994
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 215, in async_setup
    hass, self
  File "/config/custom_components/isy994/__init__.py", line 515, in async_setup_entry
    log=_LOGGER,
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/pyisy/isy.py", line 81, in __init__
    self.programs = Programs(self, xml=self.conn.get_programs())
  File "/usr/local/lib/python3.7/site-packages/pyisy/programs/__init__.py", line 95, in __init__
    self.parse(xml)
  File "/usr/local/lib/python3.7/site-packages/pyisy/programs/__init__.py", line 264, in parse
    pobj.update(data=data)
  File "/usr/local/lib/python3.7/site-packages/pyisy/programs/program.py", line 108, in update
    prunning = (data["plastrun"] >= data["plastup"]) or data["prunning"]
KeyError: 'plastrun'

The Shop lists all but the House shows none.
image

Did you happen to try more than once? Not much has changed in the Programs code, not sure why it would have choked like that unless it just got a bad update from the ISY. I’ll check and see if I can find anything obvious.