lopelex / node-red-contrib-harmony

Node-RED integration for Harmony hub
MIT License
13 stars 6 forks source link

Something went wrong discovering a harmony hub #10

Closed UserRG closed 3 years ago

UserRG commented 4 years ago

If I opend the Config-Node there is the Message "Something went wrong discovering a harmony hub". Scanning for hubs ist not possible... If i type in the IP-Address there is no function at the ObserveNode... Screenshot1 I trigger an activity to switch on my Plug for TV. But there is no function.

lopelex commented 4 years ago

Need a little more information.

lopelex commented 4 years ago

Hardcore the ip address and enable debug.

UserRG commented 4 years ago

I already did that: HarmonyHubConfig

Whenn I save the Config-Node the function works. But a few hours later there is no function... I ve got another Poblem with Alexa node. The node crashed an Node Red restarts. I delete the Alexa Node, so I will test again with Harmony. But the warning "Something went wrong..." still appears.

UserRG commented 4 years ago

At this evening the problem ist still there... The action doesn't arrive in node red. I restart the Hub and do the configuration on "myharmony" again. But the Message appears again... I debug the Nodes and it works again... I have a fix IP-Adress and I dont't know what I can do... With my Remote-Control the function works perfectly...

lopelex commented 4 years ago

What is output in the node-red console?

UserRG commented 4 years ago

Hi,Just a view Minutes ago I turned the TV on with Harmony remote. Ther are no functions from Node Red. When i look at debug-console there is nothing... If I overwrite the Config-Node the functions ar enabled... for a view hours...I deinstalled all, restart Nodered and installed again. The Problem is the same... Roland -------- Ursprüngliche Nachricht --------Von: lopelex notifications@github.com Datum: 23.03.20 18:18 (GMT+01:00) An: lopelex/node-red-contrib-harmony node-red-contrib-harmony@noreply.github.com Cc: UserRG roland.grund@gmx.de, Author author@noreply.github.com Betreff: Re: [lopelex/node-red-contrib-harmony] Something went wrong   discovering a harmony hub (#10) What is output in the node-red console?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/lopelex/node-red-contrib-harmony/issues/10#issuecomment-602738784", "url": "https://github.com/lopelex/node-red-contrib-harmony/issues/10#issuecomment-602738784", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

famthi commented 4 years ago

same error for me: the harmony hub can't be detected, hard coded IP address doesn't work either. When I activate the debug mode, node red crashes with this log:

`Welcome to Node-RED

19 Apr 14:23:33 - [info] Node-RED version: v0.16.1 19 Apr 14:23:33 - [info] Node.js version: v7.4.0 19 Apr 14:23:33 - [info] Linux 4.19.97-v7l+ arm LE 19 Apr 14:23:34 - [info] Loading palette nodes 19 Apr 14:23:38 - [info] Dashboard version 2.2.1 started at /ui 19 Apr 14:23:38 - [warn] ------------------------------------------------------ 19 Apr 14:23:38 - [warn] [harmonyws-api] SyntaxError: Unexpected identifier 19 Apr 14:23:38 - [warn] ------------------------------------------------------ 19 Apr 14:23:38 - [info] Settings file : /root/.node-red/settings.js 19 Apr 14:23:38 - [info] User directory : /root/.node-red 19 Apr 14:23:38 - [info] Flows file : /root/.node-red/flows_fc8dada4efbc.json 19 Apr 14:23:38 - [info] Server now running at http://127.0.0.1:1880/ 19 Apr 14:23:38 - [info] Starting flows 19 Apr 14:23:38 - [info] [fritzbox-callmonitor:996b8a86.6e7e58] Connecting to fritzbox... 19 Apr 14:23:38 - [info] Started flows 19 Apr 14:23:38 - [info] [fritzbox-callmonitor:996b8a86.6e7e58] Connected to fritzbox 19 Apr 14:23:39 - [info] HarmonyWS open (192.168.1.25) 19 Apr 14:23:39 - [red] Uncaught Exception: 19 Apr 14:23:39 - TypeError: RED.util.encodeObject is not a function at Node.sendDebug (/root/.node-red/node_modules/node-red-contrib-harmony-websocket/nodes/server.js:74:29) at Node.info (/root/.node-red/node_modules/node-red-contrib-harmony-websocket/nodes/server.js:82:18) at Hub.Node.openListener (/root/.node-red/node_modules/node-red-contrib-harmony-websocket/nodes/server.js:15:44) at emitNone (events.js:91:20) at Hub.emit (events.js:185:7) at Harmony.harmony.on (/root/.node-red/node_modules/node-red-contrib-harmony-websocket/lib/hub.js:24:44) at emitNone (events.js:86:13) at Harmony.emit (events.js:185:7) at _client.onOpen.addListener (/root/.node-red/node_modules/harmony-websocket/lib/harmony-websocket.js:115:18) at Timeout._onTimeout (/root/.node-red/node_modules/chnl/dist/channel.cjs.js:2:3240) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5)`

lopelex commented 4 years ago

Is the problem still in the new version?

UserRG commented 4 years ago

Yes, i still got the Message:

I use the Harmony Hub with the “normal” Remote without problems. Sometimes the WLAN-Connection is gone, but it’s only for a few seconds an very rare.

Perhaps there is an other Problem with my Fritz Box…

Mit freundlichem Gruß

Roland Grund

Anschrift: Meisenweg 1, 96179 Rattelsdorf

Mobil: 0176 47375380

Von: lopelex [mailto:notifications@github.com] Gesendet: Donnerstag, 21. Mai 2020 11:18 An: lopelex/node-red-contrib-harmony node-red-contrib-harmony@noreply.github.com Cc: Author author@noreply.github.com; UserRG roland.grund@gmx.de Betreff: Re: [lopelex/node-red-contrib-harmony] Something went wrongdiscovering a harmony hub (#10)

Is the problem still in the new version?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lopelex/node-red-contrib-harmony/issues/10#issuecomment-631979937 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4S3AXNW4MQ2WNB2ZU5DPTRSTWTNANCNFSM4LPSGNDQ .

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/lopelex/node-red-contrib-harmony/issues/10#issuecomment-631979937", "url": "https://github.com/lopelex/node-red-contrib-harmony/issues/10#issuecomment-631979937", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

DesignDawg commented 4 years ago

I am having the exact same issue. I've had this set up and running for several months+, from back when the nodes were called "HWS Command," "HWS Activity," etc. I updated tonight to 2.2.1, and not only do my flows not recognize the nodes, but the nodes can no longer comment with my hubs or get any activities or commands.

I get the "Something went wrong discovering an Harmony Hub" error. I can't get it to discover, and I can't hard code the IPs and get anything to work.

I ended up NPM installing v. 1.3, and it works again

lopelex commented 4 years ago

Maybe it is due to nodejs and node-red outdated version. I can not reproduce the error.

DesignDawg commented 4 years ago

I had wondered about that, actually. Is the new version dependent on a particular version of node/node-red? I hadn't updated because it was working fine, but I'd be happy to try in a clone of my container.

One more question, though: it seems like, since you've added new nodes and changed the names of the old ones, it breaks the flows anyway. Is there a way to make it replace the old ones with the new ones, or will they have to be rewired manually?

On Sun, May 24, 2020, 8:39 AM lopelex notifications@github.com wrote:

Maybe it is due to nodejs and node-red outdated version. I can not reproduce the error.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lopelex/node-red-contrib-harmony/issues/10#issuecomment-633225077, or unsubscribe https://github.com/notifications/unsubscribe-auth/APWLGZBSVFPH4D6ZI5QDLPTRTEIPJANCNFSM4LPSGNDQ .

lopelex commented 4 years ago

Try to export the flow as json and rename the nodes with text editor and then import it again.

DesignDawg commented 4 years ago

Thanks! Will try it later and report back.

On Sun, May 24, 2020, 8:59 AM lopelex notifications@github.com wrote:

Try to export the flow as json and rename the nodejs with the text editor and then import it again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lopelex/node-red-contrib-harmony/issues/10#issuecomment-633227426, or unsubscribe https://github.com/notifications/unsubscribe-auth/APWLGZHTMUJJDLUHN5MK3ADRTEK2HANCNFSM4LPSGNDQ .

DesignDawg commented 4 years ago

image Alright. Can confirm. Updating to latest version of Node and node-RED did the trick! Funny, this was a fresh Docker install last night, and I assumed the source I installed from was the latest version, but somehow it was actually older than my previous one!

Thanks for continuing to develop and support. This project is a fantastic solution.

I will update my flows now, and (duh...why didn't I think of that?) just changing the text and reimporting makes total sense!

JasonBSteele commented 4 years ago

Just installed and tried to configure but got the error in the OP.

I updated to the latest Node Red as suggested above but that didn't work.

22 Jun 19:51:30 - [info] Node-RED version: v1.0.6 22 Jun 19:51:30 - [info] Node.js version: v12.18.0 22 Jun 19:51:30 - [info] Linux 4.19.75-v7+ arm LE

Manually setting the IP is working fine.

CaptainSweatpants commented 4 years ago

Updating Node-Red to 7.0 fixed this issue for me (mostly). I still get that “something went wrong...” error, but not nearly as much as before.

kapet commented 3 years ago

Bug is here: https://github.com/lopelex/node-red-contrib-harmony/blob/master/nodes/server.html#L47

There's a '/' in front of the 'hws', this works if the admin UI as at / but breaks if I set httpAdminRoot. The 404 error is visible in the Chrome dev console when the "Something went wrong etc" message is shown.

lopelex commented 3 years ago

Cool, thx. Never used httpAdminRoot.