jtburgess / indigo-TP-LInk

Indigo Plugin for TP-Link SmartPlugs, powerStrips, dimmer switches, and dimmable bulbs; (coming someday color bulbs)
The Unlicense
2 stars 4 forks source link

Cannot add two smart bulb types to system #15

Open skrasnow opened 1 year ago

skrasnow commented 1 year ago

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new device@192.168.4.54.

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

jtburgess commented 1 year ago

Sorry it's taken so long to get back to you.

When you added to tplink_dimmer_plugin.py, did you include the ‘(‘? It should look like this (at about line 15)

"KL50(", # comment...

I don’t know why the ‘(‘ is there, but that’s the way the device is reporting itself, and the code has to match exactly.

-- John

On May 22, 2023, at 2:01 PM, skrasnow @.***> wrote:

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new @.***

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAHALJ5VOFRPNQ27UIA7ITXHOSZJANCNFSM6AAAAAAYKY6MOY. You are receiving this because you are subscribed to this thread.

skrasnow commented 1 year ago

John - thank you for your reply. I tried adding "KL50(" and also "KL50(US)" to the set but neither worked. Attached is the Indigo log.

Stan Krasnow | わ | email: @.*** | telephone: +1-914-282-1430 |

On Wed, May 24, 2023 at 11:48 AM John Burgess @.***> wrote:

Sorry it's taken so long to get back to you.

When you added to tplink_dimmer_plugin.py, did you include the ‘(‘? It should look like this (at about line 15)

"KL50(", # comment...

I don’t know why the ‘(‘ is there, but that’s the way the device is reporting itself, and the code has to match exactly.

-- John

On May 22, 2023, at 2:01 PM, skrasnow @.***> wrote:

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new @.***

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHAHALJ5VOFRPNQ27UIA7ITXHOSZJANCNFSM6AAAAAAYKY6MOY . You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1561426580, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJZ5Y7DOEY25LCAUHFZ3PLXHYUVXANCNFSM6AAAAAAYKY6MOY . You are receiving this because you authored the thread.Message ID: @.***>

May 25, 2023 at 10:17:40 AM Indigo Cocoa client disconnected Indigo Cocoa client connected

Note: The following result with “KL50(US)” as the device type in the Python set:

May 25, 2023 at 10:18:28 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:19:01 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:19:16 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:19:42 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:21:37 AM TP-Link Devices Polling stopped for new @.***

May 25, 2023 at 10:21:53 AM Indigo Cocoa client disconnected

Note: The following result with “KL50(“ as the device type in the Python set:

May 25, 2023 at 10:22:23 AM Indigo Cocoa client connected

May 25, 2023 at 10:22:47 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:23:04 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:23:52 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:24:37 AM TP-Link Devices Error (plugin.py:actionControlDevice:413): send "Front Door" "on"" failed with result "{"error": "python error 'unpack requires a buffer of 4 bytes' from command {\"smartlife.iot.smartbulb.lightingservice\":{\"transition_light_state\":{\"ignore_default\":1,\"transition_period\":,\"mode\":\"normal\",\"brightness\":100,\"on_off\":1}}}"}"

May 25, 2023 at 10:24:56 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:25:37 AM TP-Link Devices Polling stopped for new @.*** Indigo Cocoa client disconnected

May 25, 2023 at 10:26:24 AM Indigo Cocoa client connected

May 25, 2023 at 10:26:52 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:27:22 AM TP-Link Devices Polling started for new @.*** TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

TP-Link Devices Polling stopped for new @.*** Error (client) refreshElem

jtburgess commented 1 year ago

Strange. I’ll have another look …Stay tuned.-- JohnOn May 25, 2023, at 1:11 PM, skrasnow @.***> wrote: John - thank you for your reply. I tried adding "KL50(" and also "KL50(US)" to the set but neither worked. Attached is the Indigo log.

Stan Krasnow | わ | email: @.*** | telephone: +1-914-282-1430 |

On Wed, May 24, 2023 at 11:48 AM John Burgess @.***> wrote:

Sorry it's taken so long to get back to you.

When you added to tplink_dimmer_plugin.py, did you include the ‘(‘? It should look like this (at about line 15)

"KL50(", # comment...

I don’t know why the ‘(‘ is there, but that’s the way the device is reporting itself, and the code has to match exactly.

-- John

On May 22, 2023, at 2:01 PM, skrasnow @.***> wrote:

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new @.***

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHAHALJ5VOFRPNQ27UIA7ITXHOSZJANCNFSM6AAAAAAYKY6MOY . You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1561426580, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJZ5Y7DOEY25LCAUHFZ3PLXHYUVXANCNFSM6AAAAAAYKY6MOY . You are receiving this because you authored the thread.Message ID: @.***>

May 25, 2023 at 10:17:40 AM Indigo Cocoa client disconnected Indigo Cocoa client connected

Note: The following result with “KL50(US)” as the device type in the Python set:

May 25, 2023 at 10:18:28 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:19:01 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:19:16 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:19:42 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:21:37 AM TP-Link Devices Polling stopped for new @.***

May 25, 2023 at 10:21:53 AM Indigo Cocoa client disconnected

Note: The following result with “KL50(“ as the device type in the Python set:

May 25, 2023 at 10:22:23 AM Indigo Cocoa client connected

May 25, 2023 at 10:22:47 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:23:04 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:23:52 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:24:37 AM TP-Link Devices Error (plugin.py:actionControlDevice:413): send "Front Door" "on"" failed with result "{"error": "python error 'unpack requires a buffer of 4 bytes' from command {\"smartlife.iot.smartbulb.lightingservice\":{\"transition_light_state\":{\"ignore_default\":1,\"transition_period\":,\"mode\":\"normal\",\"brightness\":100,\"on_off\":1}}}"}"

May 25, 2023 at 10:24:56 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:25:37 AM TP-Link Devices Polling stopped for new @.*** Indigo Cocoa client disconnected

May 25, 2023 at 10:26:24 AM Indigo Cocoa client connected

May 25, 2023 at 10:26:52 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:27:22 AM TP-Link Devices Polling started for new @.*** TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

TP-Link Devices Polling stopped for new @.*** Error (client) refreshElem

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

jtburgess commented 1 year ago

I tested with:dimmerModels = {    "KL100", # lightbulb (if not dimmable, does it follow Relay properties and commands?)    "KL110", # dimmable bulb    "KL120", # tunable-white bulb    "KL130", # multicolor bulb    "KL430", # multicolor bulb    "KL50(", # <——-}And it works. So somehow your change isn’t being loaded and executed.The change isn’t loading? You didn’t update the correct source? Something else? BTW, I just compare the first 5 chars of the model name reported by the actual device to eliminate distinctions between (US) and (EU) etc.This is the first device I’ve encountered that doesn’t have a 5 character base name!-- JohnOn May 25, 2023, at 6:33 PM, John Burgess @.> wrote:Strange. I’ll have another look …Stay tuned.-- JohnOn May 25, 2023, at 1:11 PM, skrasnow @.> wrote: John - thank you for your reply. I tried adding "KL50(" and also "KL50(US)" to the set but neither worked. Attached is the Indigo log.

Stan Krasnow | わ | email: @.*** | telephone: +1-914-282-1430 |

On Wed, May 24, 2023 at 11:48 AM John Burgess @.***> wrote:

Sorry it's taken so long to get back to you.

When you added to tplink_dimmer_plugin.py, did you include the ‘(‘? It should look like this (at about line 15)

"KL50(", # comment...

I don’t know why the ‘(‘ is there, but that’s the way the device is reporting itself, and the code has to match exactly.

-- John

On May 22, 2023, at 2:01 PM, skrasnow @.***> wrote:

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new @.***

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHAHALJ5VOFRPNQ27UIA7ITXHOSZJANCNFSM6AAAAAAYKY6MOY . You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1561426580, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJZ5Y7DOEY25LCAUHFZ3PLXHYUVXANCNFSM6AAAAAAYKY6MOY . You are receiving this because you authored the thread.Message ID: @.***>

May 25, 2023 at 10:17:40 AM Indigo Cocoa client disconnected Indigo Cocoa client connected

Note: The following result with “KL50(US)” as the device type in the Python set:

May 25, 2023 at 10:18:28 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:19:01 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:19:16 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:19:42 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:21:37 AM TP-Link Devices Polling stopped for new @.***

May 25, 2023 at 10:21:53 AM Indigo Cocoa client disconnected

Note: The following result with “KL50(“ as the device type in the Python set:

May 25, 2023 at 10:22:23 AM Indigo Cocoa client connected

May 25, 2023 at 10:22:47 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:23:04 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:23:52 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:24:37 AM TP-Link Devices Error (plugin.py:actionControlDevice:413): send "Front Door" "on"" failed with result "{"error": "python error 'unpack requires a buffer of 4 bytes' from command {\"smartlife.iot.smartbulb.lightingservice\":{\"transition_light_state\":{\"ignore_default\":1,\"transition_period\":,\"mode\":\"normal\",\"brightness\":100,\"on_off\":1}}}"}"

May 25, 2023 at 10:24:56 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:25:37 AM TP-Link Devices Polling stopped for new @.*** Indigo Cocoa client disconnected

May 25, 2023 at 10:26:24 AM Indigo Cocoa client connected

May 25, 2023 at 10:26:52 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:27:22 AM TP-Link Devices Polling started for new @.*** TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

TP-Link Devices Polling stopped for new @.*** Error (client) refreshElem

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

skrasnow commented 1 year ago

John - you wrote "So somehow your change isn’t being loaded and executed.The change isn’t loading?You didn’t update the correct source? "

I updated "tplink_dimmer_plugin.py". Is that the correct Python module?

Thank you for your patience.

Stan | わ | email: @.*** | telephone: +1-914-282-1430 |

On Fri, May 26, 2023 at 9:25 PM John Burgess @.***> wrote:

I tested with:dimmerModels = { "KL100", # lightbulb (if not dimmable, does it follow Relay properties and commands?) "KL110", # dimmable bulb "KL120", # tunable-white bulb "KL130", # multicolor bulb "KL430", # multicolor bulb "KL50(", # <——-}And it works. So somehow your change isn’t being loaded and executed.The change isn’t loading? You didn’t update the correct source? Something else? BTW, I just compare the first 5 chars of the model name reported by the actual device to eliminate distinctions between (US) and (EU) etc.This is the first device I’ve encountered that doesn’t have a 5 character base name!-- JohnOn May 25, 2023, at 6:33 PM, John Burgess @.> wrote:Strange. I’ll have another look …Stay tuned.-- JohnOn May 25, 2023, at 1:11 PM, skrasnow @.> wrote: John - thank you for your reply. I tried adding "KL50(" and also "KL50(US)" to the set but neither worked. Attached is the Indigo log.

Stan Krasnow | わ | email: @.*** | telephone: +1-914-282-1430 |

On Wed, May 24, 2023 at 11:48 AM John Burgess @.***> wrote:

Sorry it's taken so long to get back to you.

When you added to tplink_dimmer_plugin.py, did you include the ‘(‘? It should look like this (at about line 15)

"KL50(", # comment...

I don’t know why the ‘(‘ is there, but that’s the way the device is reporting itself, and the code has to match exactly.

-- John

On May 22, 2023, at 2:01 PM, skrasnow @.***> wrote:

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new @.***

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15>, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHAHALJ5VOFRPNQ27UIA7ITXHOSZJANCNFSM6AAAAAAYKY6MOY

. You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1561426580 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOJZ5Y7DOEY25LCAUHFZ3PLXHYUVXANCNFSM6AAAAAAYKY6MOY

. You are receiving this because you authored the thread.Message ID: @.***>

May 25, 2023 at 10:17:40 AM Indigo Cocoa client disconnected Indigo Cocoa client connected

Note: The following result with “KL50(US)” as the device type in the Python set:

May 25, 2023 at 10:18:28 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:19:01 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:19:16 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:19:42 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:21:37 AM TP-Link Devices Polling stopped for new @.***

May 25, 2023 at 10:21:53 AM Indigo Cocoa client disconnected

Note: The following result with “KL50(“ as the device type in the Python set:

May 25, 2023 at 10:22:23 AM Indigo Cocoa client connected

May 25, 2023 at 10:22:47 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:23:04 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:23:52 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:24:37 AM TP-Link Devices Error (plugin.py:actionControlDevice:413): send "Front Door" "on"" failed with result "{"error": "python error 'unpack requires a buffer of 4 bytes' from command {\"smartlife.iot.smartbulb.lightingservice\":{\"transition_light_state\":{\"ignore_default\":1,\"transition_period\":,\"mode\":\"normal\",\"brightness\":100,\"on_off\":1}}}"}"

May 25, 2023 at 10:24:56 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:25:37 AM TP-Link Devices Polling stopped for new @.*** Indigo Cocoa client disconnected

May 25, 2023 at 10:26:24 AM Indigo Cocoa client connected

May 25, 2023 at 10:26:52 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:27:22 AM TP-Link Devices Polling started for new @.*** TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

TP-Link Devices Polling stopped for new @.*** Error (client) refreshElem

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1565134709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJZ5YYICB42Y6LXC6Q6563XIFJZHANCNFSM6AAAAAAYKY6MOY . You are receiving this because you authored the thread.Message ID: @.***>

jtburgess commented 1 year ago

Yes, a “Smart Bulb” is what I call a dimmer.I’m just grasping at straws here, because when I test the code, it works.Is it possible the code is in multiple locations?Maybe you need to disable the plug-in and then re-enable it?BTW, I have updated GitHub with version 1.0.0.1 to include ‘KL50(‘, and other minor changes for another user.I’m not at home so I have no way to test, I.e., I can’t check for stupid typos, etc.But if you want to try that, feel free.Keep a copy of what you’re currently running, so you can revert.-- JohnOn May 27, 2023, at 4:03 PM, skrasnow @.***> wrote: John - you wrote "So somehow your change isn’t being loaded and executed.The change isn’t loading?You didn’t update the correct source? "

I updated "tplink_dimmer_plugin.py". Is that the correct Python module?

Thank you for your patience.

Stan | わ | email: @.*** | telephone: +1-914-282-1430 |

On Fri, May 26, 2023 at 9:25 PM John Burgess @.***> wrote:

I tested with:dimmerModels = { "KL100", # lightbulb (if not dimmable, does it follow Relay properties and commands?) "KL110", # dimmable bulb "KL120", # tunable-white bulb "KL130", # multicolor bulb "KL430", # multicolor bulb "KL50(", # <——-}And it works. So somehow your change isn’t being loaded and executed.The change isn’t loading? You didn’t update the correct source? Something else? BTW, I just compare the first 5 chars of the model name reported by the actual device to eliminate distinctions between (US) and (EU) etc.This is the first device I’ve encountered that doesn’t have a 5 character base name!-- JohnOn May 25, 2023, at 6:33 PM, John Burgess @.> wrote:Strange. I’ll have another look …Stay tuned.-- JohnOn May 25, 2023, at 1:11 PM, skrasnow @.> wrote: John - thank you for your reply. I tried adding "KL50(" and also "KL50(US)" to the set but neither worked. Attached is the Indigo log.

Stan Krasnow | わ | email: @.*** | telephone: +1-914-282-1430 |

On Wed, May 24, 2023 at 11:48 AM John Burgess @.***> wrote:

Sorry it's taken so long to get back to you.

When you added to tplink_dimmer_plugin.py, did you include the ‘(‘? It should look like this (at about line 15)

"KL50(", # comment...

I don’t know why the ‘(‘ is there, but that’s the way the device is reporting itself, and the code has to match exactly.

-- John

On May 22, 2023, at 2:01 PM, skrasnow @.***> wrote:

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new @.***

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15>, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHAHALJ5VOFRPNQ27UIA7ITXHOSZJANCNFSM6AAAAAAYKY6MOY

. You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1561426580 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOJZ5Y7DOEY25LCAUHFZ3PLXHYUVXANCNFSM6AAAAAAYKY6MOY

. You are receiving this because you authored the thread.Message ID: @.***>

May 25, 2023 at 10:17:40 AM Indigo Cocoa client disconnected Indigo Cocoa client connected

Note: The following result with “KL50(US)” as the device type in the Python set:

May 25, 2023 at 10:18:28 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:19:01 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:19:16 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:19:42 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:21:37 AM TP-Link Devices Polling stopped for new @.***

May 25, 2023 at 10:21:53 AM Indigo Cocoa client disconnected

Note: The following result with “KL50(“ as the device type in the Python set:

May 25, 2023 at 10:22:23 AM Indigo Cocoa client connected

May 25, 2023 at 10:22:47 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:23:04 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:23:52 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:24:37 AM TP-Link Devices Error (plugin.py:actionControlDevice:413): send "Front Door" "on"" failed with result "{"error": "python error 'unpack requires a buffer of 4 bytes' from command {\"smartlife.iot.smartbulb.lightingservice\":{\"transition_light_state\":{\"ignore_default\":1,\"transition_period\":,\"mode\":\"normal\",\"brightness\":100,\"on_off\":1}}}"}"

May 25, 2023 at 10:24:56 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:25:37 AM TP-Link Devices Polling stopped for new @.*** Indigo Cocoa client disconnected

May 25, 2023 at 10:26:24 AM Indigo Cocoa client connected

May 25, 2023 at 10:26:52 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:27:22 AM TP-Link Devices Polling started for new @.*** TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

TP-Link Devices Polling stopped for new @.*** Error (client) refreshElem

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1565134709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJZ5YYICB42Y6LXC6Q6563XIFJZHANCNFSM6AAAAAAYKY6MOY . You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

skrasnow commented 1 year ago

John - thank you so much! I used GitHub to get the latest version of the plug-in and all is working as designed. I am very grateful for your help.

I agree with your thesis that, somehow, the python module I changed was not being loaded. I'm not sure what is occurring. Thanks to you, that's all history now!

Regards -

Stan | わ | email: @.*** | telephone: +1-914-282-1430 |

On Sat, May 27, 2023 at 9:47 PM John Burgess @.***> wrote:

Yes, a “Smart Bulb” is what I call a dimmer.I’m just grasping at straws here, because when I test the code, it works.Is it possible the code is in multiple locations?Maybe you need to disable the plug-in and then re-enable it?BTW, I have updated GitHub with version 1.0.0.1 to include ‘KL50(‘, and other minor changes for another user.I’m not at home so I have no way to test, I.e., I can’t check for stupid typos, etc.But if you want to try that, feel free.Keep a copy of what you’re currently running, so you can revert.-- JohnOn May 27, 2023, at 4:03 PM, skrasnow @.***> wrote: John - you wrote "So somehow your change isn’t being loaded and executed.The change isn’t loading?You didn’t update the correct source? "

I updated "tplink_dimmer_plugin.py". Is that the correct Python module?

Thank you for your patience.

Stan | わ | email: @.*** | telephone: +1-914-282-1430 |

On Fri, May 26, 2023 at 9:25 PM John Burgess @.***> wrote:

I tested with:dimmerModels = { "KL100", # lightbulb (if not dimmable, does it follow Relay properties and commands?) "KL110", # dimmable bulb "KL120", # tunable-white bulb "KL130", # multicolor bulb "KL430", # multicolor bulb "KL50(", # <——-}And it works. So somehow your change isn’t being loaded and executed.The change isn’t loading? You didn’t update the correct source? Something else? BTW, I just compare the first 5 chars of the model name reported by the actual device to eliminate distinctions between (US) and (EU) etc.This is the first device I’ve encountered that doesn’t have a 5 character base name!-- JohnOn May 25, 2023, at 6:33 PM, John Burgess @.> wrote:Strange. I’ll have another look …Stay tuned.-- JohnOn May 25, 2023, at 1:11 PM, skrasnow @.> wrote: John - thank you for your reply. I tried adding "KL50(" and also "KL50(US)" to the set but neither worked. Attached is the Indigo log.

Stan Krasnow | わ | email: @.*** | telephone: +1-914-282-1430 |

On Wed, May 24, 2023 at 11:48 AM John Burgess @.***> wrote:

Sorry it's taken so long to get back to you.

When you added to tplink_dimmer_plugin.py, did you include the ‘(‘? It should look like this (at about line 15)

"KL50(", # comment...

I don’t know why the ‘(‘ is there, but that’s the way the device is reporting itself, and the code has to match exactly.

-- John

On May 22, 2023, at 2:01 PM, skrasnow @.***> wrote:

I am trying to add two TP Link bulbs to a new system, models KL50 and KL135. I get the following message: May 22, 2023 at 11:06:29 AM

TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again. TP-Link Devices Polling started for new @.***

I tried modifying tplink_dimmer_plugin.py to add the devices, reloaded the reloaded the plugin, but it still didn't work. Is there something else I need to do?

Thank you.

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15>, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AHAHALJ5VOFRPNQ27UIA7ITXHOSZJANCNFSM6AAAAAAYKY6MOY

. You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub <

https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1561426580

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AOJZ5Y7DOEY25LCAUHFZ3PLXHYUVXANCNFSM6AAAAAAYKY6MOY

. You are receiving this because you authored the thread.Message ID: @.***>

May 25, 2023 at 10:17:40 AM Indigo Cocoa client disconnected Indigo Cocoa client connected

Note: The following result with “KL50(US)” as the device type in the Python set:

May 25, 2023 at 10:18:28 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:19:01 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:19:16 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:19:42 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:21:37 AM TP-Link Devices Polling stopped for new @.***

May 25, 2023 at 10:21:53 AM Indigo Cocoa client disconnected

Note: The following result with “KL50(“ as the device type in the Python set:

May 25, 2023 at 10:22:23 AM Indigo Cocoa client connected

May 25, 2023 at 10:22:47 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised

May 25, 2023 at 10:23:04 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:23:52 AM TP-Link Devices Polling started for new @.***

May 25, 2023 at 10:24:37 AM TP-Link Devices Error (plugin.py:actionControlDevice:413): send "Front Door" "on"" failed with result "{"error": "python error 'unpack requires a buffer of 4 bytes' from command

{\"smartlife.iot.smartbulb.lightingservice\":{\"transition_light_state\":{\"ignore_default\":1,\"transition_period\":,\"mode\":\"normal\",\"brightness\":100,\"on_off\":1}}}"}"

May 25, 2023 at 10:24:56 AM TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

May 25, 2023 at 10:25:37 AM TP-Link Devices Polling stopped for new @.*** Indigo Cocoa client disconnected

May 25, 2023 at 10:26:24 AM Indigo Cocoa client connected

May 25, 2023 at 10:26:52 AM TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:getSubType:127): model 'KL50(' is not recognised TP-Link Devices Error (plugin.py:selectTpDevice:584): Error: selected and actual Device types don't match (tplinkSmartBulb vs unknown) TP-Link Devices Error (plugin.py:selectTpDevice:585): Delete and try again.

May 25, 2023 at 10:27:22 AM TP-Link Devices Polling started for new @.*** TP-Link Devices Device Info for: Front Door TP-Link Devices TPlink device type: tplinkSmartBulb TP-Link Devices TP Link model: KL50(US) TP-Link Devices IP address: 192.168.4.54 TP-Link Devices Error Error in plugin execution ExecuteAction:

File "plugin.py", line 480, in actionControlUniversal File "plugin.py", line 429, in getInfo type: key mac not found in dict

TP-Link Devices Polling stopped for new @.*** Error (client) refreshElem

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1565134709 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOJZ5YYICB42Y6LXC6Q6563XIFJZHANCNFSM6AAAAAAYKY6MOY

. You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/jtburgess/indigo-TP-LInk/issues/15#issuecomment-1565791628, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJZ5Y7L7SYFAJUV3OHFO3DXIKVDZANCNFSM6AAAAAAYKY6MOY . You are receiving this because you authored the thread.Message ID: @.***>