reinhard-brandstaedter / solarflow-control

A tool to automatically control Zendure's Solarflow hub with more flexibility to match home power demand
69 stars 12 forks source link

smt.getPower() and zero_offset #220

Closed busaku closed 5 months ago

busaku commented 5 months ago

https://github.com/reinhard-brandstaedter/solarflow-control/blob/9452879f77c53f070c316293de0f1f9833a3f360/src/solarflow/solarflow-control.py#L190

on this line, i think we missed the zero_offset. Maybe it would be a good idea to switch it to here: https://github.com/reinhard-brandstaedter/solarflow-control/blob/9452879f77c53f070c316293de0f1f9833a3f360/src/solarflow/smartmeters.py#L108

:)

reinhard-brandstaedter commented 5 months ago

True. But wouldn't move it to the smartmeter function. SMT should always return the true value, the offset is just for steering.

busaku commented 5 months ago

You are right, maybe you can implement a "getPowerWithOffset()" function :) Is it possible to do PullRequests (with you as a reviewer?) ?

busaku commented 5 months ago

https://github.com/reinhard-brandstaedter/solarflow-control/blob/9452879f77c53f070c316293de0f1f9833a3f360/src/solarflow/smartmeters.py#L41

For debbuging may its possible to add the zero_offset here too, like Predict: ...W (Calculated: ...W)