Kasa hardware
Posted: Wednesday 13 October 2021 19:21
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!
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!