Closed germtuna closed 3 years ago
Nothing drastic, just support for the HS300.
Thanks for the contribution, I'll take a look and then commit it into the main branch when I get a chance. J.
No worries. It occurred to be that I did not update the relevant bits in README.md. Let me know if you want me to do so.
Thanks for that fix. Just having a look at the other stuff. Looks good. Just out of interest have you tested it with the KP303 as well to ensure that it doesn't break anything?
If it all works and you were interested, the other thing that could be developed on top is a way to auto detect the type of device and then change the number of sockets shown on the UI to only show either 3 or 6 sockets dependent on the users device. This is possible through using the control lib that I am using as an interface to the sockets. Although I haven't done this myself as I don't understand the complex networking setup that OctoPrint uses when sending data too and from the website UI. Then again I'm not one for web development anyway.
I only have the HS300 (6 outlets) so I could not test. Based on the behavior before the changes, it only detected the first 3 outlets on the HS300 but worked with the 3 it found. I suspect (not looked) that the kasa python library just enumerates the device and passes it. That would lead me to assume that the KP303 would still work, but to your point the gui may not reflect the number of sockets appropriately. I will poke around a bit.
sure. Ive made a couple of changes and will push them in a second back into this section. make sure you pull them back down once I've pushed them up.
Hi give it a pull now and see the changes I have made I think it'll all work but please test it thoroughly before you confirm it works. Each plug one at a time as this will ensure all settings are working correctly.
Pulled, Uninstalled, Reinstalled. Each plug was tested individually on/off successfully as well as all at once. Looks ok to me.
fantastic. All that is left then is for me to change the version numbering in a few places so that the auto-update feature on OctoPrint will work and not annoy users with a popup. After that I can release it to the public. Thanks for you input.
I did not add additional functionality per se, only the ability to see and configure sockets on the HS300 (and presumably other >3 socket Kasa strips). Tested functionality running:
OctoPi 0.18.0.0
I did not regression test against other smartstrips (I only have the HS300).