caseyjhol/node-red-contrib-tplink

Several issues with 0.4.1

Closed this issue · 4 comments

Shows connected, even if plug has no power
In node-red-log is correctly

TCP 192.168.178.32:9999 Error: connect EHOSTUNREACH 192.168.178.32:9999
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
  errno: 'EHOSTUNREACH',
  code: 'EHOSTUNREACH',
  syscall: 'connect',
  address: '192.168.178.32',
  port: 9999
}

Trying to turn the device on or off via injecting true or false doesn’t work, it prints
"TypeError: msg.payload.includes is not a function"

Now even injecting getMeterInfo doesn’t work anymore. Just nothing is printed. It only starts working and printing after injection of {"events":["getMeterUpdateEvents","getPowerEvents"]} from this changenode

[{"id":"a12e2aa7.295ea8","type":"change","z":"1ce15e53.bf3222","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"events\":[\"getMeterUpdateEvents\",\"getPowerEvents\"]}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":340,"wires":[["68fcedc3.371a24"]]}]

Which browser are you running?

Chrome. However this should not matter as Node-RED normally "runs ins background"

@JsBergbau I just pushed out v0.4.2, which should address some of your issues. Although, I'm still not sure why getMeterInfo wouldn't be working for you. I don't have a plug to test it on, but when testing it on my switches, I do get a proper error back telling me my device is not supported when passing getMeterInfo (which tells me the function is at least being called).

The rest of your issues should be fixed in v0.4.3, but let me know if anything else is not working.