Firstly awesome work @WeekendWarrior1 to get this up and running! Reverse engineering the bluetooth comms protocol is next level.
In setting up my emerald ems, I did notice that the "power" output sensor seems to be off by a factor of 2-5 from the actual power output.
I believe I've tracked down the issue down to the average power equation, and specifically to the conversion between energy [wh] and power [w]
pulse_multiplier_ = (standard_update_interval / (pulses_per_kwh / kw_to_w_conversion));
float avg_watts_within_interval = pulses_within_interval * this->pulse_multiplier_;
In trying to balance the units in the equations I believe we're missing a conversion between "secounds" and "hours". I'll have a stab at an updated formula when I get a chance outside of work.
Firstly awesome work @WeekendWarrior1 to get this up and running! Reverse engineering the bluetooth comms protocol is next level.
In setting up my emerald ems, I did notice that the "power" output sensor seems to be off by a factor of 2-5 from the actual power output.
I believe I've tracked down the issue down to the average power equation, and specifically to the conversion between energy [wh] and power [w]
pulse_multiplier_ = (standard_update_interval / (pulses_per_kwh / kw_to_w_conversion));float avg_watts_within_interval = pulses_within_interval * this->pulse_multiplier_;In trying to balance the units in the equations I believe we're missing a conversion between "secounds" and "hours". I'll have a stab at an updated formula when I get a chance outside of work.