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

KP303 board switching on all plugs at once #51

Open black-malt opened 3 years ago

black-malt commented 3 years ago

When sending 'on' and 'off' commands to the kasa node with 192.168.68.144/0 it will also turn on the other plugs 192.168.68.144/1 and 192.168.68.144/2 at the same time. This behavior did not happen with multiple KP105's on different IP's

To Reproduce kasa node with simple on/off command 192.168.68.144/0 set connection poll interval 10000 event poll interval 15000 output payload - get info debug - not selected

Expected behavior only have selected port turn on/off

Desktop (please complete the following information):

KP303 board UK plug

cdevereu commented 2 years ago

@black-malt Did you find a solution to switch an individual socket using this node?

black-malt commented 2 years ago

@black-malt Did you find a solution to switch an individual socket using this node?

No I haven’t yet, I haven’t put any effort into it either as I had enough single units to cover my project.

Tinbum1 commented 1 year ago

Has anyone been able to sort this?

Debug window of the device shows this so I imagine it is a way to send a command to just one of the 'children'.

msg.payload : Object object sw_ver: "1.0.5 Build 210428 Rel.144721" hw_ver: "1.0" model: "KP303(UK)" deviceId: "xxxxxAC3" oemId: "xxxxxxxCF15" hwId: "8A263122E4686102C1C8C805202C33CD" rssi: -77 longitude_i: -xxxx latitude_i: xxxxxx alias: "TP-LINK_Power Strip_3E46" status: "new" mic_type: "IOT.SMARTPLUGSWITCH" feature: "TIM" mac: "28:87:xxxxxxxx" updating: 0 led_off: 0 children: array[3] 0: object id: "xxxxxAC300" state: 1 alias: "Plug 1" on_time: 0 next_action: object type: -1 1: object id: "xxxxxAC301" state: 1 alias: "Plug 2" on_time: 0 next_action: object type: -1 2: object id: "xxxxxAC302" state: 1 alias: "Plug 3" on_time: 0 next_action: object type: -1 child_num: 3 ntc_state: 0 err_code: 0 timestamp: "2023-01-19T15:58:47+00:00"

cdevereu commented 1 year ago

Has anyone been able to sort this?

Debug window of the device shows this so I imagine it is a way to send a command to just one of the 'children'.

msg.payload : Object object sw_ver: "1.0.5 Build 210428 Rel.144721" hw_ver: "1.0" model: "KP303(UK)" deviceId: "xxxxxAC3" oemId: "xxxxxxxCF15" hwId: "8A263122E4686102C1C8C805202C33CD" rssi: -77 longitude_i: -xxxx latitude_i: xxxxxx alias: "TP-LINK_Power Strip_3E46" status: "new" mic_type: "IOT.SMARTPLUGSWITCH" feature: "TIM" mac: "28:87:xxxxxxxx" updating: 0 led_off: 0 children: array[3] 0: object id: "xxxxxAC300" state: 1 alias: "Plug 1" on_time: 0 next_action: object type: -1 1: object id: "xxxxxAC301" state: 1 alias: "Plug 2" on_time: 0 next_action: object type: -1 2: object id: "xxxxxAC302" state: 1 alias: "Plug 3" on_time: 0 next_action: object type: -1 child_num: 3 ntc_state: 0 err_code: 0 timestamp: "2023-01-19T15:58:47+00:00"

I found that using a change node configured as follows, and passing the data to the Kasa node works for switching individual sockets on the 3-way device. True = ON, False = OFF. 0 = Socket 1 Screenshot 2023-01-19 at 16 34 38

Tinbum1 commented 1 year ago

Great, thanks I'll give that a try. Edit sadly that didn't work.

Tinbum1 commented 1 year ago

I've just realized I was being daft and using node-red-contrib-tplink-io and not node-red-contrib-tplink.

Using this one they do show up individually in the list. Problem solved.