gablau / node-red-contrib-blynk-ws

Old/Legacy Blynk library implementation for Node-RED using WebSockets
MIT License
31 stars 10 forks source link

Connection within Docker #26

Closed jmorris644 closed 3 years ago

jmorris644 commented 3 years ago

When setting up the connection within Docker I need to use the container name instead of a URL or ip address. When I use the conatiner name and I deploy node-red it throws a warning that the blynk node is not properly configured. Continuing deployment ignores the error and the connection works.

It would be great if the error is not thrown at all.

877dev commented 3 years ago

image

Try this with your Pi's IP address. Sometimes containers are in host mode, therefore the internal name does not work. I can't remember if that's the case here.

jmorris644 commented 3 years ago

The internal name actually works and it connects. But node-red throws a bypassable config error when deploying.

jmorris644 commented 3 years ago

As a temporary fix I commented out the validation code in blynk-ws-client.html for the path field.

gablau commented 3 years ago

Hi Joe, could you provide me the exact string which is not validated? These are some valid strings:

ws://www.example.it/aaaat
ws://www.example.it
ws://example/aaaat
ws://example
wss://example.it:3000/aaaat
wss://example:3000/aaaat
wss://example:3000
ws://192.168.1.1:3000/aaaaa
ws://192.168.1.1/aaaaa
ws://192.168.1.1

best regards

jmorris644 commented 3 years ago

ws://blynk_server:8080/websockets

gablau commented 3 years ago

ok, the problem is the underscore character that doesn't validate the url. i'll fix this in next release

jmorris644 commented 3 years ago

:)

gablau commented 3 years ago

fixed in 1.0.4 version