Yeelight >>> HOSTUNREACH ... why

346 views
Skip to first unread message

David Dempster

unread,
Mar 18, 2018, 12:21:36 PM3/18/18
to Node-RED
I've been using a Yeelight with the node "yeelight-compat-hue" and all of a sudden am getting the error EHOSTUNREACH

I can ping the device and operate it via Alexa and the app on my tablet.

When I look at node-red-log I see these messages..

18 Mar 16:13:44 - [info] [yeelight-compat-hue-config:lounge] Connecting to Yeelight 192.168.1.12:55443
Error at 192.168.1.12:55443 { Error: connect EHOSTUNREACH 192.168.1.12:55443
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
code: 'EHOSTUNREACH',
errno: 'EHOSTUNREACH',
syscall: 'connect',
address: '192.168.1.12',
port: 55443 }
18 Mar 16:13:47 - [info] [yeelight-compat-hue-config:lounge] Disconnected from 192.168.1.12:55443

Any ideas for me to checkout??

Cheers from David
Message has been deleted
Message has been deleted

Colin Law

unread,
Mar 18, 2018, 12:46:17 PM3/18/18
to node...@googlegroups.com
No need to send your message three times.

Are you pinging it from the machine running node-red?

Have you changed anything since it was working?

What hardware and OS is node red running on?

Always worth trying a reboot of the machine running node-red just in
case its networking has got confused.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/dfe63782-bca6-4ee2-912e-b370804e8e6d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Message has been deleted

David Dempster

unread,
Mar 18, 2018, 1:18:28 PM3/18/18
to Node-RED
Hi Colin,
Just tried pinging the light from the RPi machine running Node-red - doesn't work.

I can ping my router OK from the RPi.

Do you think it could be a networking issue ?

Cheers from david

David Dempster

unread,
Mar 18, 2018, 1:20:28 PM3/18/18
to Node-RED
I've wired together a ping node and a debug node in NR to ping the light.
That regularly returns a ping time of less than 10ms.
How strange is that?



On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

Colin Law

unread,
Mar 18, 2018, 1:29:46 PM3/18/18
to node...@googlegroups.com
On 18 March 2018 at 17:20, David Dempster <david.dem...@gmail.com> wrote:
> I've wired together a ping node and a debug node in NR to ping the light.
> That regularly returns a ping time of less than 10ms.
> How strange is that?

That sounds particularly odd. You can't ping the light from a terminal
on the NR machine, but you can from a ping node? Are you certain you
have not made a typo somewhere?

A possibility is that you have two devices on the network with the
same IP address, that can give very odd inconsistent results
sometimes. Power off the light and make sure that pinging the address
stops working from everywhere.

Did you try a reboot?

Colin
>
>
>
> On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:
>>
>> I've been using a Yeelight with the node "yeelight-compat-hue" and all of
>> a sudden am getting the error EHOSTUNREACH
>>
>> I can ping the device and operate it via Alexa and the app on my tablet.
>>
>> When I look at node-red-log I see these messages..
>>
>> 18 Mar 16:13:44 - [info] [yeelight-compat-hue-config:lounge] Connecting to
>> Yeelight 192.168.1.12:55443
>> Error at 192.168.1.12:55443 { Error: connect EHOSTUNREACH
>> 192.168.1.12:55443
>> at Object.exports._errnoException (util.js:1020:11)
>> at exports._exceptionWithHostPort (util.js:1043:20)
>> at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
>> code: 'EHOSTUNREACH',
>> errno: 'EHOSTUNREACH',
>> syscall: 'connect',
>> address: '192.168.1.12',
>> port: 55443 }
>> 18 Mar 16:13:47 - [info] [yeelight-compat-hue-config:lounge] Disconnected
>> from 192.168.1.12:55443
>>
>> Any ideas for me to checkout??
>>
>> Cheers from David
>
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/cc2d9af4-63f9-4829-8248-1dbd3a3c5820%40googlegroups.com.

Colin Law

unread,
Mar 18, 2018, 1:29:58 PM3/18/18
to node...@googlegroups.com
On 18 March 2018 at 17:18, David Dempster <david.dem...@gmail.com> wrote:
> Hi Colin,
> Just tried pinging the light from the RPi machine running Node-red - doesn't
> work.
>
> I can ping my router OK from the RPi.
>
> Do you think it could be a networking issue ?

That is the one thing you can be certain of.

>
> Cheers from david
>
>
> On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:
>>
>> I've been using a Yeelight with the node "yeelight-compat-hue" and all of
>> a sudden am getting the error EHOSTUNREACH
>>
>> I can ping the device and operate it via Alexa and the app on my tablet.
>>
>> When I look at node-red-log I see these messages..
>>
>> 18 Mar 16:13:44 - [info] [yeelight-compat-hue-config:lounge] Connecting to
>> Yeelight 192.168.1.12:55443
>> Error at 192.168.1.12:55443 { Error: connect EHOSTUNREACH
>> 192.168.1.12:55443
>> at Object.exports._errnoException (util.js:1020:11)
>> at exports._exceptionWithHostPort (util.js:1043:20)
>> at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
>> code: 'EHOSTUNREACH',
>> errno: 'EHOSTUNREACH',
>> syscall: 'connect',
>> address: '192.168.1.12',
>> port: 55443 }
>> 18 Mar 16:13:47 - [info] [yeelight-compat-hue-config:lounge] Disconnected
>> from 192.168.1.12:55443
>>
>> Any ideas for me to checkout??
>>
>> Cheers from David
>
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/4e99c3da-d5e5-4e73-90b1-02260e7e174d%40googlegroups.com.

David Dempster

unread,
Mar 18, 2018, 2:44:27 PM3/18/18
to Node-RED
I've rebooted network, light and RPIs.

I can ping the light from any of my PRis including the one that is running NR for the Yeelight flow.

I can ping the light from a ping node on NR and a debug node.

Very strange.

The error message in the node-red-log seem to indicate a problem with the Javascript in the node.

Any help/advice would be appreciated.



On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

Colin Law

unread,
Mar 18, 2018, 4:22:43 PM3/18/18
to node...@googlegroups.com
You haven't answered my question about whether you changed anything at
the time it stopped working.

Also did you try my suggestion of switching the light off and making
sure that ping now no longer works?

On the pi running node red what does
ifconfig
show? Copy/Paste the result here. In case you don't know, use
Ctrl-Shift-C to copy from the terminal.

Colin
Message has been deleted

David Dempster

unread,
Mar 19, 2018, 4:07:12 AM3/19/18
to Node-RED
Hi Colin,
If it helps - this is part of the node-red-log.

19 Mar 08:05:50 - [info] [yeelight-compat-hue-config:plant] Disconnected from 192.168.1.12:55443
19 Mar 08:05:55 - [info] [yeelight-compat-hue-config:study] Connecting to Yeelight 192.168.1.12:55443
19 Mar 08:05:55 - [info] [yeelight-compat-hue-config:plant] Connecting to Yeelight 192.168.1.12:55443
Error at 192.168.1.12:55443 { Error: connect ECONNREFUSED 192.168.1.12:55443

    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1105:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',

  syscall: 'connect',
  address: '192.168.1.12',
  port: 55443 }
19 Mar 08:05:55 - [info] [yeelight-compat-hue-config:study] Disconnected from 192.168.1.12:55443
Error at 192.168.1.12:55443 { Error: connect ECONNREFUSED 192.168.1.12:55443

    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1105:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',

  syscall: 'connect',
  address: '192.168.1.12',
  port: 55443 }


On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

David Dempster

unread,
Mar 19, 2018, 4:13:37 AM3/19/18
to Node-RED
Hi Colin,
Just spotted these two lines in the node-red-log file.

Looks like within 5 seconds a NR flow is trying to connect to two lights.
I can see where the light called "plant" is located in NR flow - but can't find a node for the other one called "study".

Do you think this might be the cause of my problem?

19 Mar 08:05:55 - [info] [yeelight-compat-hue-config:study] Connecting to Yeelight 192.168.1.12:55443
19 Mar 08:05:55 - [info] [yeelight-compat-hue-config:plant] Connecting to Yeelight 192.168.1.12:55443


On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

David Dempster

unread,
Mar 19, 2018, 4:36:37 AM3/19/18
to Node-RED
Hi Colin,
I've deleted the NR flow that contained the Yeelight node.
I can't find any other flows that have a Yeelight node.
Rebooted RPi-3 and looked at node-red-log file.
It still shows messages as listed previously.

In regard to answering your question about changes I'd made...
I changed the name of the Yeelight from "study" to "plant" over the weekend.
It seems like it won't let go of the old name!!!

I have other RPis that I could use as a testbench - if you have any suggestions.

Cheers from david

On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

Colin Law

unread,
Mar 19, 2018, 4:41:45 AM3/19/18
to node...@googlegroups.com
I don't know the particular node, does it use a config node for
setting up the ip and so on? If so then you may still have the old
config node there. When you click deploy does it say you have unused
config nodes? If so click where it says to click and then you can open
it and delete it.
If not then you can view config nodes from the hamburger menu and see
if the old one is still there.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/c95b09c1-e7bb-4602-9619-e425dbd73290%40googlegroups.com.

David Dempster

unread,
Mar 19, 2018, 5:12:32 AM3/19/18
to Node-RED
Hi Colin,
Thanks for all your help thus far.

Followed your instructions and deleted the NR flow that contains the Yeelight node.
Then deleted the config from the hamburger menu.
All error messages in node-red-log file then stopped.
Stopped and restarted NR.
No error messages.
Then made a simple flow to inject a '1' into a Yeelight node and a debug node to get status information.
When I deploy I can see a very brief message on the screen saying "connecting" to be followed by "ehostunreach" and the error messages start appearing in node-red-log file.

Cheers from David.



On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

Zenofmud

unread,
Mar 19, 2018, 5:49:36 AM3/19/18
to node...@googlegroups.com
How are you determining the IP address of the Yeelight? i.e. where do you get this address from tout in the configuration part of the yeelight node?
 
-- 
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
--- 
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Colin Law

unread,
Mar 19, 2018, 5:58:33 AM3/19/18
to node...@googlegroups.com
Please post the full node-red log up to the error.

Colin

David Dempster

unread,
Mar 19, 2018, 6:28:31 AM3/19/18
to Node-RED
Hi Paul,
I'm using the light's MAC address in my router as "address reservation", so when the light turns on the router dishes out a fixed IP address.

The IP address appears correctly in the Yeelight App on my tablet.


On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

David Dempster

unread,
Mar 19, 2018, 6:30:57 AM3/19/18
to Node-RED
Here's the log without the Yeelight node.
I'll post the one with the error message shortly.
Cheers from David.

pi@node-red-server:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.140:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Started Node-RED graphical event wiring tool..
19 Mar 09:44:28 - [info]
Welcome to Node-RED
===================
19 Mar 09:44:28 - [info] Node-RED version: v0.18.4
19 Mar 09:44:28 - [info] Node.js  version: v6.13.0
19 Mar 09:44:28 - [info] Linux 4.9.59-v7+ arm LE
19 Mar 09:44:29 - [info] Loading palette nodes
19 Mar 09:44:32 - [info] RedBot version: 0.9.27 (node-red-contrib-chatbot)
Mon, 19 Mar 2018 09:44:36 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at module.js:577:32
global Settings { uib_globalSettings: { debug: false },
  userDir: '/home/pi/.node-red',
  httpNodeRoot: '/' }
19 Mar 09:44:43 - [info] Dashboard version 2.8.2 started at /ui
19 Mar 09:44:45 - [info] Settings file  : /home/pi/.node-red/settings.js
19 Mar 09:44:45 - [info] User directory : /home/pi/.node-red
19 Mar 09:44:45 - [info] Server now running at http://127.0.0.1:1880/
19 Mar 09:44:45 - [info] Active project : testing
19 Mar 09:44:45 - [info] Flows file     : /home/pi/.node-red/projects/testing/flows_node-red-server.json
19 Mar 09:44:45 - [info] [GenericBLE] Start BLE scanning
19 Mar 09:44:47 - [info] Starting flows
19 Mar 09:44:47 - [info] [GenericBLE] Start BLE scanning
19 Mar 09:44:47 - [info] Started flows
19 Mar 09:44:47 - [info] [mqtt-broker:e45b1750.d9ca18] Connected to broker: mqtt://192.168.1.140:1883
19 Mar 09:44:47 - [info] [mqtt-broker:951e5365.838c98] Connected to broker: mqtt://192.168.1.140:1883



On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

David Dempster

unread,
Mar 19, 2018, 6:36:39 AM3/19/18
to Node-RED
Here's the node-red-log from the point of starting NR with the Yeelight node.

pi@node-red-server:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.140:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
Started Node-RED graphical event wiring tool..
19 Mar 10:34:09 - [info]
Welcome to Node-RED
===================
19 Mar 10:34:09 - [info] Node-RED version: v0.18.4
19 Mar 10:34:09 - [info] Node.js  version: v6.13.0
19 Mar 10:34:09 - [info] Linux 4.9.59-v7+ arm LE
19 Mar 10:34:10 - [info] Loading palette nodes
19 Mar 10:34:13 - [info] RedBot version: 0.9.27 (node-red-contrib-chatbot)
Mon, 19 Mar 2018 10:34:17 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.

In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at module.js:577:32
global Settings { uib_globalSettings: { debug: false },
  userDir: '/home/pi/.node-red',
  httpNodeRoot: '/' }
19 Mar 10:34:24 - [info] Dashboard version 2.8.2 started at /ui
19 Mar 10:34:26 - [info] Settings file  : /home/pi/.node-red/settings.js
19 Mar 10:34:26 - [info] User directory : /home/pi/.node-red
19 Mar 10:34:26 - [info] Server now running at http://127.0.0.1:1880/
19 Mar 10:34:26 - [info] Active project : testing
19 Mar 10:34:26 - [info] Flows file     : /home/pi/.node-red/projects/testing/flows_node-red-server.json
19 Mar 10:34:26 - [info] [GenericBLE] Start BLE scanning
19 Mar 10:34:28 - [info] Starting flows
19 Mar 10:34:28 - [info] [yeelight-compat-hue-config:plant] Connecting to Yeelight 192.168.1.12:55443
19 Mar 10:34:28 - [info] [GenericBLE] Start BLE scanning
19 Mar 10:34:28 - [info] Started flows
Error at 192.168.1.12:55443 { Error: connect ECONNREFUSED 192.168.1.12:55443

    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1105:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',

  syscall: 'connect',
  address: '192.168.1.12',
  port: 55443 }
19 Mar 10:34:28 - [info] [yeelight-compat-hue-config:plant] Disconnected from 192.168.1.12:55443
19 Mar 10:34:28 - [info] [mqtt-broker:e45b1750.d9ca18] Connected to broker: mqtt://192.168.1.140:1883
19 Mar 10:34:28 - [info] [mqtt-broker:951e5365.838c98] Connected to broker: mqtt://192.168.1.140:1883
^C
pi@node-red-server:~ $



On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

David Dempster

unread,
Mar 19, 2018, 6:42:05 AM3/19/18
to Node-RED
Just checked...

Using an SSH terminal window I can successfully ping the Yeelight from the RPi running NR.
A NR flow using a ping node works fine as well.

Cheers from David.

On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:

Nick O'Leary

unread,
Mar 19, 2018, 6:52:23 AM3/19/18
to Node-RED Mailing List
Hi David,

It sounds like your lights are not listening on port 55443.

from the readme of the yeelight node (https://flows.nodered.org/node/node-red-contrib-yeelight)

Yeelight is not controllable from inside your LAN by default If you want to integrate lamp into you own smart home solution you have to enable its "developer mode" In this mode lamp listens on UDP 55443 port and responses to commands


Have you done that?

Nick



--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

David Dempster

unread,
Mar 19, 2018, 7:09:13 AM3/19/18
to Node-RED
Hi Nick,
You are a "star" - it was the LAN Control in the Developer Option that had not been ticked.
I feel a right idiot for missing this.

I had it all working last week, then had problems, so I reset the Yeelight account (and forgot all about the LAN Control).

May I thank everyone who helped and gave me advice.

Cheers from David.

On Sunday, March 18, 2018 at 4:21:36 PM UTC, David Dempster wrote:
Reply all
Reply to author
Forward
0 new messages