Danimal4326 / homebridge-ecoplug

Homebridge plugin for the Eco Plug
MIT License
30 stars 15 forks source link

Error { Error: send EADDRNOTAVAIL 255.255.255.255:25 #5

Closed tarbychark closed 7 years ago

tarbychark commented 7 years ago

I keep running into the following error when I use the stock eco.js file:

[EcoPlug] Error { Error: send EADDRNOTAVAIL 255.255.255.255:25 at Object.exports._errnoException (util.js:1028:11) at exports._exceptionWithHostPort (util.js:1051:20) at SendWrap.afterSend [as oncomplete] (dgram.js:403:11) code: 'EADDRNOTAVAIL', errno: 'EADDRNOTAVAIL', syscall: 'send', address: '255.255.255.255', port: 25 }

If I change the '255.255.255.255' to the actual IP address of one of the plugs, it will pick it up fine. However, I am never able to get multiple plugs detected at once.

I am very much a beginner with this kind of stuff, so any additional insight on this set up issue would be greatly appreciated!

Thanks!

NorthernMan54 commented 7 years ago

I presume your running this on a raspberryPI ? Can you run 'ifconfig -a', output should look like this.

ifconfig -a
eth0      Link encap:Ethernet  HWaddr b8:27:eb:b0:b1:00  
          inet addr:192.168.1.226  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1
          RX packets:132765731 errors:0 dropped:76 overruns:0 frame:0
          TX packets:62601147 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4288056003 (3.9 GiB)  TX bytes:1471051571 (1.3 GiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:190578 errors:0 dropped:0 overruns:0 frame:0
          TX packets:190578 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:40573803 (38.6 MiB)  TX bytes:40573803 (38.6 MiB)
tarbychark commented 7 years ago

Thanks for the quick response! I'm actually running it on macOS (10.12.4). Here's the output for that command:

ifconfig -a lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP> inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 nd6 options=201<PERFORMNUD,DAD> gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether ac:29:3a:98:bb:73 inet6 fe80::10b6:9b1c:8b20:eb38%en1 prefixlen 64 secured scopeid 0x4 inet 10.0.1.23 netmask 0xffffff00 broadcast 10.0.1.255 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active en3: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV> ether ec:1a:59:3d:1e:3a nd6 options=201<PERFORMNUD,DAD> media: autoselect (none) status: inactive fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078 lladdr c8:2a:14:ff:fe:7f:71:6c nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive fw1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078 lladdr ec:1a:59:7b:a0:71:20:e9 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500 options=60<TSO4,TSO6> ether d2:00:17:f7:16:c0 media: autoselect status: inactive en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV> ether c8:2a:14:34:43:51 nd6 options=201<PERFORMNUD,DAD> media: autoselect (none) status: inactive p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304 ether 0e:29:3a:98:bb:73 media: autoselect status: inactive awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484 ether da:a8:d8:08:0d:2d inet6 fe80::d8a8:d8ff:fe08:d2d%awdl0 prefixlen 64 scopeid 0xb nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=63<RXCSUM,TXCSUM,TSO4,TSO6> ether d2:00:17:f7:16:c0 Configuration: id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0 maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200 root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0 ipfilter disabled flags 0x2 member: en2 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 8 priority 0 path cost 0 nd6 options=201<PERFORMNUD,DAD> media: status: inactive utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000 inet6 fe80::d1c3:41cc:8e00:18a9%utun0 prefixlen 64 scopeid 0xd nd6 options=201<PERFORMNUD,DAD> ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1200 inet 10.10.1.2 --> 10.10.1.1 netmask 0xffffff00 utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::e35d:eb8:35fe:d367%utun1 prefixlen 64 scopeid 0xf nd6 options=201<PERFORMNUD,DAD>

Danimal4326 commented 7 years ago

You can try using the subnet specific broadcast address, in your case it would be 10.0.1.255

tarbychark commented 7 years ago

That did the trick! Thanks! Will close out the issue.