Jump to content

Using the manual method to register harmony hubs not working


bigDvette

Recommended Posts

I've been using the Harmony plugin for years and love it.  I've been re-working my network to add some isolation to IOT devices.  I've had some issues, but it has gone pretty well.  Sure would be nice if there was a way to edit IP addresses in plugins in pg3 vs have to go through discovery, but can't figure that out.  

Anyway, I did what I normally do and just tried removing the devices and adding them back to harmony node server.  After reading the docs, it is obvious that discover only works on the same /24 subnet.  So I created custom params and followed instructions (I think).

Essentially, it doesn't even seem to try and read those configuration items.

I've created an entry with:

key = hub_mancaveharmony

value = { 'name': 'Mancave Harmony' , 'host' : '192.168.30.190' }

I have SSH'd in to the Easy and I can ping that address no problem.  When I click discover from either Admin Console or Polyglot screen, it just comes back with an error but log looks like it is does normal discover and then just craps out.

I have it working at the moment.  Essentially I moved the Eisy to my untrusted IOT vlan, let it run discover, shut it all down and moved it back and now it "re-learned" the IP addresses and stored them somewhere (this is why would be nice to be able to edit them) and those IPs are all fixed IPs.

I can't seem to get the manual mode above to work and didn't know if anyone else has used it.

I have same issue with Sonos but it is worse because it does rediscovery every time it starts and doesn't seem to save the IPs. If it can't find them on startup, it just doesn't load anything.  I needed up hacking the Sonos-poly.py on my Eisy to manually add them.

It would be nice for all plugins to allow a manual file method to load devices vs using discovery as setting up the rules form them to talk is fairly easy but getting everything discovered requires mdns repeaters temporarily ... and the Sonos node server just won't work because it has no memory other than node names.

Sent a PM to Jimbo with the log.  Thought I'd see if anyone else runs in to these problems.

 

Link to comment

Thanks, I'm not talking about how to get networking to work.  As indicated, I can access the harmony hubs in their subnet (I consider the EISY a trusted Server and harmony hubs an untrusted IOT so seperate vlans).  The issue is discovery.  Discovery only broadcasts in the same subnet  as far as I can tell.  So the obvious workaround is the manual method which is documented on the git site for the nodeserver, however I can't get THAT to work.  

I worked around the issue by temporarily putting the eisy in the same vlan as the harmony hubs, doing discover, disconnecting it from that vlan and putting it back in it's trusted vlan.  Once the IPs are stored for the hubs, you don't need to do discovery again.  However, that isn't a great option. Would be nice if the documented way to manually add hubs worked which either I am doing something wrong or it is broken.

For clarity, after I seperated them in their own vlans again, I can control the harmony from ISY so I got it working.  

Link to comment
5 hours ago, atmarosi said:

Discovery traffic likely won’t pass the firewall between the two zones without an ALLOW - zones are there to segregate traffic easily. ICMP (ping) isn’t necessarily treated the same as TCP traffic (discovery maybe if it’s doing any two way traffic to inquire)

I'd like the post to stay on point.  There is a manual method for adding Harmony Hubs.  It isn't working, doesn't even try to add the manual nodes. Either I am not putting in the keys right or it is broken.  I don't have problems talking to the harmony from the eisy. It is working fine once the entries have the correct ip address in hubs.json.  So, putting aside trying to do discovery across vlans.  I understand how firewall rules work and they are setup correctly.

So again, thanks for the network conversation, but this is not about that. It is about being able to manually add harmony hubs using the documented method 

Here is the paragraph from the README.md. Items 7 states it can't do discovery across subnets and then there is a section on manually adding.  

===

7.  This should find your Harmony Hubs and add them to the ISY with all devices and activities if your Harmony Hub and Polyglot are on the same subnet. If they are not, then you can manually add the hub address as described in the next section,

====

Manual Hub Entries

If the discover does not work, or you prefer to not use it, you can add customParms in the Polyglot Web UI to tell it about your hubs.

Create a param with the name 'hub_uniqueid' where uniqueid is the address that will be used for the ISY node, and with a value like: { "name": "HarmonyHub FamilyRoom", "host": "192.168.1.86" }

Anytime these params are added or modified you need to run the 'Discover' on the HarmonyController node.

Link to comment
1 hour ago, skunkiechris said:

Same experience.  I grabbed my hub file from PG2 and moved it over, so I'm okay.  But auto discovery was on the completely wrong subnet for some reason, and manual didn't work for me either.

I spent hours trying to fix the code last night.  Manual is commented out I. controller.py.  
 

there seem to be general discovery issues as well .  
 

I was able to get it to add a node and could control activities from the node (power off, change activity) but it would never add the devices to the node.  
 

May take another run at it tomorrow.

Link to comment

I think I figured it out.  I uncommented the manual code and got it to add the hub.  all the definition was in the yaml file for activities and devices, but no devices were created under the hub and no node definitions.  when it creates the node, it sets the address to all lower.  if you for instance use your key as hub_ShopHarmony vs hub_shopharmony, when it goes to build profile it tries to match the node address to the part after hub_ and if not all lower it doesn't match. Changed the manual code to make address.lower() and it adds the nodes. I'm going to start from scratch and put comments in and add back the missing code and changes I made and then figure out where to submit so maybe the node server can be updated in store.

 

Link to comment

Not sure who owns this nodeserver.  In the end to get it to work I only had to 

I added a comment before each change starting with DD 

  1. Uncomment the code that had been commented out when moved to PG3
  2. Change 3 lines of the code.  2 were to change the old way Params were used to self.Params and 1 was to ensure the address was all lower case like it does when it adds the node.

Attached is the Controller.py file for whoever owns this. If we can get this put in the plugin production store everyone can take advantage.

 

Controller.py

Link to comment
  • 2 weeks later...
On 12/3/2023 at 3:21 PM, bigDvette said:

Not sure who owns this nodeserver.  In the end to get it to work I only had to 

I added a comment before each change starting with DD 

  1. Uncomment the code that had been commented out when moved to PG3
  2. Change 3 lines of the code.  2 were to change the old way Params were used to self.Params and 1 was to ensure the address was all lower case like it does when it adds the node.

Attached is the Controller.py file for whoever owns this. If we can get this put in the plugin production store everyone can take advantage.

 

Controller.py 29.53 kB · 1 download

This is finally released, @bmercier gave me a workaround.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.5k
    • Total Posts
      367.6k
×
×
  • Create New...