caseyjhol / node-red-contrib-tplink

A collection of Node-RED nodes for TP-Link Smart Home devices
https://www.npmjs.com/package/node-red-contrib-tplink-iot
MIT License
16 stars 16 forks source link

Does scanning work for anyone? #63

Open chanchiem opened 1 year ago

chanchiem commented 1 year ago

Describe the bug I have about 4 TP-Link bulbs in my network. I am able to manually do an arp-scan on my network and confirm that the devices exist (and therefore set the IP on the node to control it), but I'm unable to scan through the node configuration. Is this happening for anyone else as well?

To Reproduce Steps to reproduce the behavior: Create a Kasa node red node. Double click it Click on the scan button

Expected behavior There should be a list of devices

Screenshots If applicable, add screenshots to help explain your problem. image

Scan results: image

Desktop (please complete the following information):

dgulliver commented 1 year ago

Hi @chanchiem,

Yes I am having the same issue. I just updated to 1.0.1 hoping this resolved the issue but still get the error "No TP Link devices found" even though HA see's them no problem image

I'm running node-red 3.0.2 in docker.

Desktop (please complete the following information): OS: [e.g. iOS] Windows 10 Browser [e.g. chrome, safari] Chrome Version [e.g. 22] 108.0.5359.125

normanr commented 1 year ago

Do the devices show up if you use the tplink-smarthome-api cli to search for them? (you can also try python-kasa's cli).

My devices didn't initially respond to (any) broadcast discovery packets, but then I remembered that I need to specifically allow broadcasts through my network firewall (and after that they showed up without any issues).

dgulliver commented 1 year ago

Do the devices show up if you use the tplink-smarthome-api cli to search for them? (you can also try python-kasa's cli).

My devices didn't initially respond to (any) broadcast discovery packets, but then I remembered that I need to specifically allow broadcasts through my network firewall (and after that they showed up without any issues).

Hi @normanr,

yeah when I performed tplink-smarthome-api search I got a list of devices: image

normanr commented 1 year ago

Can you try running the same scan from within docker? What networking mode are you using for docker? Apparently bridge mode doesn't work, and host mode needs to be used instead, ref: https://github.com/node-red/node-red/issues/3432#issuecomment-1034141733

dgulliver commented 1 year ago

Can you try running the same scan from within docker? What networking mode are you using for docker? Apparently bridge mode doesn't work, and host mode needs to be used instead, ref: node-red/node-red#3432 (comment)

Hi @normanr,

My current node-red container as bridge mode. I installed a new node-red container with host for networking mode instead, installed node-red-contrib-tplink, placed a kasa node on the flow hit the search button and after a few moments a list of my available devices appeared image.

So as you say looks like node-red should be installed with host mode instead.

@chanchiem, Is this the same for you?

Thanks normanr!

Regards Darren

UNOPARATOR commented 1 year ago

@dgulliver, thanks for the suggestion, I was having the same error with my Node-RED running in docker (in unRAID) for awhile, but I don't remember changing networking mode at any time. I might be remembering it working while my TP-Link flow as running on my RaspberryPI and when I migrated my flow, I never bothered to check if it was working... Anyway, thank you again. :)