mabunixda / node-red-contrib-alexa-home

MIT License
32 stars 10 forks source link

After updating to 1.x only listening on IPv6 interface #51

Closed Tranquility76 closed 5 years ago

Tranquility76 commented 5 years ago

Helllo,

while having the same issues as described in #16 I did some research and figured out, that node-red is only listening on TCP 60000 on the IPv6 interface.

With this "iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 60000" cannot work a it is an IPv4 rule.

On the other side it is listening on UDP 60000 at the IPv4 interface.

I was not able to figure out why the controller node only listens on IPv6 interfaces for TCP 60000.

mabunixda commented 5 years ago

@Tranquility76 but node-red is listening on all ipv4 only? Normally the output is just for ipv6 listed even when ipv4 is also listening.

Did you try a curl http://127.0.0.1:6000/ ?

Tranquility76 commented 5 years ago

Okay, curl and test-netconnection (Powershell from a remote system) show that TCP 60000 is open. Strange that netstat is showing the listening port for IPv6 but not IPv4 …

curl http://127.0.0.1:60000

0 - Alexa Hub node Id: 0
UUID: f6543a06-da50-11ba-8d8f-7b92fedbdd29
BaseURL: http://127.0.0.1:60000

TCP 80 is working as well from remote machines.

Now I only still have the problem that discovery is not working… ☹

Sebastian

Von: Martin Buchleitner notifications@github.com Gesendet: Freitag, 6. September 2019 08:14 An: mabunixda/node-red-contrib-alexa-home node-red-contrib-alexa-home@noreply.github.com Cc: Sebastian Probst sebastian@probst-net.de; Mention mention@noreply.github.com Betreff: Re: [mabunixda/node-red-contrib-alexa-home] After updating to 1.x only listening on IPv6 interface (#51)

@Tranquility76https://github.com/Tranquility76 but node-red is listening on all ipv4 only? Normally the output is just for ipv6 listed even when ipv4 is also listening.

Did you try a curl http://127.0.0.1:6000/ ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mabunixda/node-red-contrib-alexa-home/issues/51?email_source=notifications&email_token=AAYDOEUXXUO2MVQWNGBWJPTQIHYJ5A5CNFSM4IUE7YL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6B3GMY#issuecomment-528724787, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAYDOEX5DMIR54ANK3ICG5DQIHYJ5ANCNFSM4IUE7YLQ.

mabunixda commented 5 years ago

On the latest version of the node you can also change the port of the hub to 80 and remove the iptables statement - so you could remove 1 component of complexity ...

Can you post the http requests to the alexa-controller of the logfile of node-red? Or you can change the logging details to debug to get more information.

At the moment i get no problems on my setup with gen2 and gen3 devices

Tranquility76 commented 5 years ago

6 Sep 14:18:59 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /alexa-home/setup.xml 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/POST -> /api 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/POST -> /api 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /alexa-home/setup.xml 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/POST -> /api 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/c4db45d0406a58 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/97f61e1e505 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/c4db45d0406a58 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/97f61e1e505 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/c4db45d0406a58 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/97f61e1e505 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/c4db45d0406a58 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/97f61e1e505 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/c4db45d0406a58 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/97f61e1e505 6 Sep 14:19:00 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:01 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/c4db45d0406a58 6 Sep 14:19:01 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:01 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/97f61e1e505 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /alexa-home/setup.xml 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/c4db45d0406a58 6 Sep 14:19:02 - [info] [alexa-home-controller:Alexa Controller] 80/GET -> /api/c6260f982b43a226b5542b967f612ce/lights/7a8c84eb4f1a5c

This time three (out of around 15) devices have been discovered. Running discovery a second time gives „no new devices“.

If I delete the discovered devices in the Alexa app and start a new discovery, only the same three devices are discovered again. (with version 0.x all devices have been discovered)

Von: Martin Buchleitner notifications@github.com Gesendet: Freitag, 6. September 2019 11:12 An: mabunixda/node-red-contrib-alexa-home node-red-contrib-alexa-home@noreply.github.com Cc: Sebastian Probst sebastian@probst-net.de; Mention mention@noreply.github.com Betreff: Re: [mabunixda/node-red-contrib-alexa-home] After updating to 1.x only listening on IPv6 interface (#51)

On the latest version of the node you can also change the port of the hub to 80 and remove the iptables statement - so you could remove 1 component of complexity ...

Can you post the http requests to the alexa-controller of the logfile of node-red? Or you can change the logging details to debug to get more information.

At the moment i get no problems on my setup with gen2 and gen3 devices

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mabunixda/node-red-contrib-alexa-home/issues/51?email_source=notifications&email_token=AAYDOERUSIJYH5FEUGCCWSLQIINH3A5CNFSM4IUE7YL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CIH6I#issuecomment-528778233, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAYDOER5GFCGMSDYV2IAHFDQIINH3ANCNFSM4IUE7YLQ.

mabunixda commented 5 years ago

Can you post the output of "/api/c6260f982b43a226b5542b967f612ce/lights" ?

Tranquility76 commented 5 years ago

{"97f61e1e505": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Gästebad","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"91222535933718": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Dimmable light","name": "Fernseher","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"a65fa89fcc7b48": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Sitz Fenster","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"1ac49194163f6e": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Warmwasser","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"1960e3c9385f2c": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Esstisch","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"8d83a328567e7": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Weihnachtsbaum","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"64395b7d612b74": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Tannenbaum","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"d35933452f104": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Deckenfluter","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"f587eba0150f18": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Vitrine","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"9d2c3081c0ad9": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Plattenspieler","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"7a8c84eb4f1a5c": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Dimmable light","name": "AppleTV","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"8320807d4b40f": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Zisterne","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"87ab07c19d20c8": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Gartenpumpe","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"5c1745154ff8dc": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Robbi Schaf","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"fd28a0c1ab1fd": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Pool","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"c4db45d0406a58": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Dimmable light","name": "Schallplatte","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"e7b60010b4cb": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Extended color light","name": "Platte","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"5dea31f557a51": {"state": {"on": false,"bri": 254,"hue": 0,"sat": 254,"effect": "none","xy": [0.0,0.0],"ct": 199,"colormode": "ct","reachable": true,"alert":"none","mode":"homeautomation"},"swupdate": {"state": "noupdates","lastinstall": "2019-09-06T12:34:25"},"type": "Dimmable light","name": "Wohnbereich","modelid": "LCT007","manufacturername": "Philips","productname": "Hue color lamp","swversion": "5.105.0.21169","uniqueid":"00:11:22:33:44:55:66:77-88"},"_emptyIteratorStopper": {}}

Von: Martin Buchleitner notifications@github.com Gesendet: Freitag, 6. September 2019 14:31 An: mabunixda/node-red-contrib-alexa-home node-red-contrib-alexa-home@noreply.github.com Cc: Sebastian Probst sebastian@probst-net.de; Mention mention@noreply.github.com Betreff: Re: [mabunixda/node-red-contrib-alexa-home] After updating to 1.x only listening on IPv6 interface (#51)

Can you post the output of "/api/c6260f982b43a226b5542b967f612ce/lights" ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mabunixda/node-red-contrib-alexa-home/issues/51?email_source=notifications&email_token=AAYDOEXSDZOBGCPRERNHOILQIJERXA5CNFSM4IUE7YL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CWKYY#issuecomment-528835939, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAYDOEQXJ6UDS6DTLPA7ZADQIJERXANCNFSM4IUE7YLQ.

mabunixda commented 5 years ago

interessting - i expected more umlaute ;-) So the node "Gästebad" is detected correct? When i review the 2 log outputs both types you are using are detected within those 3 items? Or did i miss something and just 1 type of items is available in alexa?

Which node/node-red/alexa version/generation are you using?

Tranquility76 commented 5 years ago

😃

„Gästebad“ is detected and working with no type configured in the node. „AppleTV“ is detected and working with type „dimable light“ in the node.

I already played around with the type in the node settings but it does not matter.

Node-RED Version: v0.20.8 Node.js Version: v10.16.3 NPM version: 6.10.2

Alexa Echo Gen2 / Alexa Dot Gen2 and Gen3 (log output was done with Dot Gen3)

mabunixda commented 5 years ago

You might try to bind the hub to a dedicated IP with an env variable ALEXA_IP ... otherwise i think this i more a detection/communication problem as in #53