hassio-addons/addon-node-red

Websocket Input and Websocket Out Nodes #299

GACHAPO posted onGitHub

#Websocket nodes are not connecting as they do in Node Red standalone version

(Why the issue was filed)

Connected Nodes issue

(What you expected to happen)

No connection. Also, when I edit the template node with the HTML, CSS and Javascript when the syntax highlight is on css it shows errors which are not shown in standalone node red.

copy flows from standalone node red to Hass.io Node Red

Node Red Websocket Hassio Node Red

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

<blockquote><div><strong><a href="http://noderedguide.com/node-red-lecture-3-example-3-7-using-websockets-with-node-red/">Node-RED: Lecture 3 – Example 3.7 Using Websockets with Node-RED – Node RED Programming Guide</a></strong></div></blockquote>


:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

posted by addons-assistant[bot] over 5 years ago

So you want something like this?

image

posted by sinclairpaul over 5 years ago

So that works, will close the issue, details are in the screenshot.

posted by sinclairpaul over 5 years ago

When I sais yes,I meant that's what I want, not what I get. There's no connection when I try and feed in your websocket path.

Please advise?

On Sat, 31 Aug 2019, 21:27 Paul Sinclair, notifications@github.com wrote:

Closed #299 https://github.com/hassio-addons/addon-node-red/issues/299.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hassio-addons/addon-node-red/issues/299?email_source=notifications&email_token=AGKGAM6JBTG64J2WNPMH5LLQHLHZVA5CNFSM4ISUP3HKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTLU5SNY#event-2599016759, or mute the thread https://github.com/notifications/unsubscribe-auth/AGKGAM7USLBPB3NUBTVGJZ3QHLHZVANCNFSM4ISUP3HA .

posted by GACHAPO over 5 years ago

When I recreate it, I no longer see the connected info, however the flow works.

<details> [{"id":"ad9d106b.f403d","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"e60f811.747c68","type":"websocket in","z":"ad9d106b.f403d","name":"","server":"815d9e43.7fca","client":"","x":370,"y":120,"wires":[["38fc139a.646a2c"]]},{"id":"4d5ff9dd.f720b8","type":"websocket out","z":"ad9d106b.f403d","name":"","server":"","client":"7bb6c9e3.850368","x":330,"y":260,"wires":[]},{"id":"5499ceba.37423","type":"inject","z":"ad9d106b.f403d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":180,"wires":[["4d5ff9dd.f720b8"]]},{"id":"38fc139a.646a2c","type":"debug","z":"ad9d106b.f403d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":600,"y":140,"wires":[]},{"id":"815d9e43.7fca","type":"websocket-listener","z":"","path":"/ws/example","wholemsg":"false"},{"id":"7bb6c9e3.850368","type":"websocket-client","z":"","path":"ws://localhost:1880/endpoint/ws/example","tls":"","wholemsg":"false"}] </details>

posted by sinclairpaul over 5 years ago

To add, if I delete and recreate the endpoints, the connected flag appears, this is unlikely to be an issue with the addon, but more likely a Node-Red/Docker issue.

posted by sinclairpaul over 5 years ago

Interestingly my webpage is called simple and yours is called example. Example connects, but simple doesn't my end...................not sure why?

On Sun, Sep 1, 2019 at 12:08 AM Paul Sinclair notifications@github.com wrote:

To add, if I delete and recreate the endpoints, the connected flag appears, this is unlikely to be an issue with the addon, but more likely a Node-Red/Docker issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hassio-addons/addon-node-red/issues/299?email_source=notifications&email_token=AGKGAM3SMFOB35TDOVQJRUDQHL2X5A5CNFSM4ISUP3HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TW2ZI#issuecomment-526871909, or mute the thread https://github.com/notifications/unsubscribe-auth/AGKGAM43QBNELD3BELIURKTQHL2X5ANCNFSM4ISUP3HA .

posted by GACHAPO over 5 years ago

Does the flow actually work?, I am thinking this is actually a cosmetic issue. Also please test using http://yourhaaddress:1880 as well.

posted by sinclairpaul over 5 years ago

I'm not running docker.

Node Red is loaded through Hassio.

This is where I am at;

[image: image.png]

[image: image.png] Has always worked previous;y when not through Hassio and Node Red standalone.

On Sun, Sep 1, 2019 at 12:10 AM Glenn Chapman glenn.ajp.chapman@gmail.com wrote:

Interestingly my webpage is called simple and yours is called example. Example connects, but simple doesn't my end...................not sure why?

On Sun, Sep 1, 2019 at 12:08 AM Paul Sinclair notifications@github.com wrote:

To add, if I delete and recreate the endpoints, the connected flag appears, this is unlikely to be an issue with the addon, but more likely a Node-Red/Docker issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hassio-addons/addon-node-red/issues/299?email_source=notifications&email_token=AGKGAM3SMFOB35TDOVQJRUDQHL2X5A5CNFSM4ISUP3HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TW2ZI#issuecomment-526871909, or mute the thread https://github.com/notifications/unsubscribe-auth/AGKGAM43QBNELD3BELIURKTQHL2X5ANCNFSM4ISUP3HA .

posted by GACHAPO over 5 years ago

Hi Paul,

Please see below the unexpected tokens and indent errors in the template node. This is the same node used successfully in the standalone Node Red. Could this possibly be where the issue now lies?

[image: image.png]

Glenn

On Sun, Sep 1, 2019 at 12:29 AM Glenn Chapman glenn.ajp.chapman@gmail.com wrote:

I'm not running docker.

Node Red is loaded through Hassio.

This is where I am at;

[image: image.png]

[image: image.png] Has always worked previous;y when not through Hassio and Node Red standalone.

On Sun, Sep 1, 2019 at 12:10 AM Glenn Chapman glenn.ajp.chapman@gmail.com wrote:

Interestingly my webpage is called simple and yours is called example. Example connects, but simple doesn't my end...................not sure why?

On Sun, Sep 1, 2019 at 12:08 AM Paul Sinclair notifications@github.com wrote:

To add, if I delete and recreate the endpoints, the connected flag appears, this is unlikely to be an issue with the addon, but more likely a Node-Red/Docker issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hassio-addons/addon-node-red/issues/299?email_source=notifications&email_token=AGKGAM3SMFOB35TDOVQJRUDQHL2X5A5CNFSM4ISUP3HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TW2ZI#issuecomment-526871909, or mute the thread https://github.com/notifications/unsubscribe-auth/AGKGAM43QBNELD3BELIURKTQHL2X5ANCNFSM4ISUP3HA .

posted by GACHAPO over 5 years ago

Hi Paul,

Am I best to put this issue back through Github?

Kind Regards

Glenn

On Sun, Sep 1, 2019 at 8:31 AM Glenn Chapman glenn.ajp.chapman@gmail.com wrote:

Hi Paul,

Please see below the unexpected tokens and indent errors in the template node. This is the same node used successfully in the standalone Node Red. Could this possibly be where the issue now lies?

[image: image.png]

Glenn

On Sun, Sep 1, 2019 at 12:29 AM Glenn Chapman glenn.ajp.chapman@gmail.com wrote:

I'm not running docker.

Node Red is loaded through Hassio.

This is where I am at;

[image: image.png]

[image: image.png] Has always worked previous;y when not through Hassio and Node Red standalone.

On Sun, Sep 1, 2019 at 12:10 AM Glenn Chapman < glenn.ajp.chapman@gmail.com> wrote:

Interestingly my webpage is called simple and yours is called example. Example connects, but simple doesn't my end...................not sure why?

On Sun, Sep 1, 2019 at 12:08 AM Paul Sinclair notifications@github.com wrote:

To add, if I delete and recreate the endpoints, the connected flag appears, this is unlikely to be an issue with the addon, but more likely a Node-Red/Docker issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hassio-addons/addon-node-red/issues/299?email_source=notifications&email_token=AGKGAM3SMFOB35TDOVQJRUDQHL2X5A5CNFSM4ISUP3HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5TW2ZI#issuecomment-526871909, or mute the thread https://github.com/notifications/unsubscribe-auth/AGKGAM43QBNELD3BELIURKTQHL2X5ANCNFSM4ISUP3HA .

posted by GACHAPO over 5 years ago

@GACHAPO You already are.., replying to the emails updates the Github issue. Unfortunately it does not seem to do well with the images, so can you post those directly on the issue.

posted by sinclairpaul over 5 years ago

Thanks Paul,

I have decided to go back and use the Node Red Library version of a website as found here and import the flow to Node Red running in docker and also in Hassio - Node Red to see the difference.

https://flows.nodered.org/flow/8666510f94ad422e4765

Docker - version shows

image

Webpage served at ipaddress:1880/simple

image

Hassio - Node Red

image

No webpage served

Only other difference is i'm using duckdns on Hassio and local on docker. However I can reach node red admin duckdns.org:1880 without an issue.

Thanks in advance

<blockquote><div><strong><a href="https://flows.nodered.org/flow/8666510f94ad422e4765">Library - Node-RED</a></strong></div></blockquote>

posted by GACHAPO over 5 years ago

I think I see the issue, can you make sure you connect to the site at http://ipaddress:1880/endpoint/simple the endpoint part is important

As the addon uses HA auth we break out the Dashboard/Hosting parts to a subfolder.

image

If you look at the nodes, they will have a message on them like the following

image

posted by sinclairpaul over 5 years ago

Nice one Paul,

This is now resolved - thanks so much for your help

posted by GACHAPO over 5 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

posted by addons-assistant[bot] over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests