Open ZeliardM opened 1 day ago
Many thanks @ZeliardM! A pr would be great to the tests/fixtures/smart/
folder but otherwise I can create one myself at some point.
@sdb9696 I can get that pushed up later today. Thanks!
Remember to install pre-commit
and it will update SUPPORTED.md
for you.
Question, will adding the device to the fixtures allow discovery to work correctly? I have issues where the CLI discovery works but not in the Library.
Using CLI, I can pass the username and password and get all 10 of the users devices discovered, but when using the library in my plug-in, it throws a type error.
Not sure if it makes a difference, but all of the other HS200 files are under IOT and this one is under SMART, that may be why the model doesn't operate correctly because it's trying to treat it as a IOT device instead of a SMART device?
I updated the device_fixtures.py for the switch_smart to include the HS200 as well.
Created PR: https://github.com/python-kasa/python-kasa/pull/1303
I’m guessing that the issue is in the usage in the library. Can you point me to the plug in code and upload the error you’re seeing? It may be that you’re still using the library as it was pre SMART support being added.
I found this issue but it’s confusing me because the fixture you’ve uploaded has all the correct fields inmgt_encrypt_schm
. Are you sure the fixture is from one of the devices that failed with mgt_encrypt_schm field required (type=value_error.missing)
?
N.B. Master branch has migrated to mashumaro from pydantic but that doesn’t seem to explain the validation error based on the fixture.
@sdb9696 Yes, the fixture was done on the affected machine with the issue. There are multiple HS200 on their network and the older IOT devices work but this SMART does not.
I’ll get a log and post it here in a bit.
Maybe we could sync up on discord with the person affected? I can’t work out how the fixture creation can work and the library then fail. Must be something else going on. (My handle is the same, sdb9696)
Hello, I have a user with my Homebridge plugin that has a new hardware and firmware revision for the HS200 (US).
I have the fixture file here. HS200(US)_5.26_1.0.3.json
Please advise if there is anything else you need. Thanks!