Closed sander closed 11 years ago
New plan, just discussed: wlt_server.py only sends a [P0, P1, …] power value array when there’s an update. We need to set option 4 (immediate power report) to 1 (1%) and hope that doesn’t overload the network. The client will use the power value to interpolate linearly: every ms, a small amount of kWh is added depending on the currently stored power value.
We can test this over the next weeks and see whether it is accurate enough. If not, we need to do some back-and-forth syncing with the server, based on the plugs’ stored energy values.
Now Magdalena can also see the bug reports here! New version to be tested on Monday 11/11.
Fixed in commits d98b7f7fc and e250c4756. The effect is nice and enhanced when you use a small measurement value, possible since commit c11c88d91.
This fix currently makes the Plugwise and ‘fake random data’ implementations unusable. If the tests go well we can get rid of the Plugwise implementation. It makes sense to reimplement ‘fake random data’ sometime for demos.
This will allow a more realtime-like view. Currently, the interpolation is not done or done on the server side, so that the client receives an update every 1 s or less often.