Hi,
Just wanted to share this, as I could not find this info here, but, it works beautifully!
So, I've had TPLink plug for a while and used a script from here to make it work. It's one that works only with the old firmware and it works with the plugs only. I recently got some BL50 bulbs. The old on/off only script for the plugs does not work with them.
I found this - https://github.com/python-kasa/python-kasa
It's a complete kasa plug including discovery, for lights, plugs, strip, the lot! Does brightness, colours. etc. too. All tested and working well. Super easy to install with a 'pip install python-kasa', too.
For me, using windows, I have to have a batch file in the middle and call it like this, using the switch on/off actions
script://C:\PROGRA~2\Domoticz\scripts\kasa.bat --host 192.168.2.13 --plug off
The kasa.bat simply contains
cmd /c kasa %1 %2 %3 %4 %5
I could not get python scripts to run directly from Domoticz for whatever reason, but this does the trick and has been working well for a long time.
Hope this might help someone.
If anyone knows how to pass the dimmer value from a switch / dimmer slider to the On/Off action, please let me know. That'd be the icing on the cake!
Kasa hardware
Moderator: leecollings
- waltervl
- Posts: 5907
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Kasa hardware
Did you check this thread for a TP-Link plugin?
https://domoticz.com/forum/viewtopic.php?f=56&t=32774
https://domoticz.com/forum/viewtopic.php?f=56&t=32774
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 26
- Joined: Thursday 28 December 2017 20:51
- Target OS: Windows
- Domoticz version: 3.8153
- Contact:
Re: Kasa hardware
Hi - That's Tapo, not Kasa, I think. Different hardware/protocol, same people (tplink). My experience so far, Kasa works, tapo is junk
But, yes - I did read that thread. Bought the tapo bulbs first as they were a little cheaper than the kasa ones. Could not even get them to detect the wifi. Gave up after 2 hours and ordered the kasa ones. 10 minutes, all setup. Amazing....

- waltervl
- Posts: 5907
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Kasa hardware
Ok, I missed that difference
. The TP-Link plugin is based on a similar python library so perhaps it is easy to modify the tapo plugin into a kasa plugin.
There is also another TPlink plugin https://github.com/lordzurp/domoticz-tplink-smartplug,
Perhaps also to be used as inspiration.

There is also another TPlink plugin https://github.com/lordzurp/domoticz-tplink-smartplug,
Perhaps also to be used as inspiration.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest