Commit Graph
5 Commits
Author SHA1 Message Date
Marijn Koesen debf01e220 Read all registers at once
When you read the registers one-by-one, which is what the solaredge_mobus
library is doing, you run into the issue where the value and the scale
are sometimes out of sync.

This happens mostly when the values go up or down a lot, like at the
beginning and at the end of the day. At these times the SolarEdge
inverter can change the scale of the values it's returning.

When you read the value register, the scale might be -2, but in the
time between that request, and the request for the scale, the inverter
has changed the scale to -3. So in the next register read, you will get
-3 for the scale, but have a value in the scale of -2. Now when you do
the value calculation, you end up with a factor 10 difference.

So it's better, and also _much_ faster to read out all the registers
at once and then parse the values from this bigger read out.

I'm planning to do a MR back to solaredge_modbus with this change, so
for now i've just included that code into this project.
2020-06-06 18:40:00 +02:00
Marijn Koesen 8fe07da944 Get poll interval from config 2020-06-04 21:49:44 +02:00
Marijn Koesen 69abaee5e2 Make mqtt topic configurable 2020-06-04 21:34:54 +02:00
Marijn Koesen 79a28d169e Replace the ENV variable with a config file
So it's safer to configure, as we don't need to pass env variables
to a docker run service. Also it's easier to configure without
needing to pass a whole lot of env vars.
2020-06-04 21:27:14 +02:00
Marijn Koesen f436385f67 Initial commit 2020-06-04 21:08:49 +02:00