Every time I call kasa state on my KP115 plug, the On since: date-time field changes value slightly. As it represents a fixed point in time, it should not be changing. Perhaps just needs rounding to the nearest second?
matthew@XPS2:~ $ kasa --host 192.168.0.131 --type plug state
== Computer speakers - KP115(UK) ==
Host: 192.168.0.131
Device state: ON
== Generic information ==
Time: 2022-01-29 08:41:15
Hardware: 1.0
Software: 1.0.16 Build 210205 Rel.163735
MAC (rssi): CC:32:E5:18:3A:6E (-64)
Location: {'latitude': 55.9143, 'longitude': -3.2013}
== Device specific information ==
LED state: True
On since: 2022-01-29 08:11:47.643296
== Current State ==
<EmeterStatus power=6.042 voltage=245.143 current=0.05 total=0.081>
matthew@XPS2:~ $ kasa --host 192.168.0.131 --type plug state
..
On since: 2022-01-29 08:11:48.409994
..
matthew@XPS2:~ $ kasa --host 192.168.0.131 --type plug state
..
On since: 2022-01-29 08:11:47.986349
..
The first PR reduces the granularity of the returned uptime but it doesn't solve the problem completely but makes it less visible. The second PR fixes the issue properly by using the time from the device, but it is based on the modularize branch whose merge back to the master branch is unknown.
Activity
rytilahti commented on Jan 29, 2022
The first PR reduces the granularity of the returned uptime but it doesn't solve the problem completely but makes it less visible. The second PR fixes the issue properly by using the time from the device, but it is based on the modularize branch whose merge back to the master branch is unknown.
mrankine commented on Jan 29, 2022
Thanks for the speedy fix!
rytilahti commented on Jan 29, 2022
Sure thing, I think this can be left open for the time being until modularize gets merged back to fix this properly.