Replies: 1 comment
-
In case anyone ever reads this, I've gotten things to work. It was helpful to read this section from the Node-RED docs:
After that is set up, in my function module I have:
After that, I can use the client for various operations:
Note that getting HallBathMirrorSwitchPromise and executing outputInfo happen asynchronously, facilitated by the JavaScript promise/(resolve/reject) mechanism. You will hit the first return statement long before outputInfo is executed, despite what it may appear. |
Beta Was this translation helpful? Give feedback.
-
I'm in interesting in using the api functionality available in the tplink-smarthome-api module function. However, I'm having problems even accessing the Client constructor.
Am I crazy or can this be done and if so, can someone point me the in the right direction?
Any help greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions