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
17 stars 15 forks source link

Update to support multi-plug devices (HS300). #4

Closed MaddyTP closed 4 years ago

MaddyTP commented 4 years ago
MaddyTP commented 4 years ago

Support for multi-plug devices required a major rewrite of smart-plug.js.

Tested and working on HS300.

2020-05-21 09_22_44-Window

caseyjhol commented 4 years ago

Was going to merge this as part of the next release - any reason you closed it?

MaddyTP commented 4 years ago

Closed it to work through an issue where the child devices were being inserted into the device array out of order, causing the wrong plug to come on when sending payload. There was also a short delay in returning the child devices which was causing an error if a payload was sent to the node too quickly after startup/deploy.

Will also need the code tested on a single plug device to verify it works properly, all I have is a HS300 for testing.

caseyjhol commented 4 years ago

I see. Thanks for your work on this. I only have access to the smart switches right now, so we'll need somebody else to test too.

MaddyTP commented 4 years ago

Glad to be of help! I'll have a new PR up from a fresh fork once the issues are worked out, hopefully by end of next weekend.

MaddyTP commented 4 years ago

New PR is up.