sunsynk
sunsynk copied to clipboard
Load port power
Hello again John, this is not a bug, it is more of a question to implement a new sensor or calculate it. I would like to know what would be the sensor that gives the exact measurement of the power in the physical load port of the inverter, normal sensors do not change if the inverter is connected as a grid inverter or as an isolated one, however the deye cloud application identifies the data from UPS power. Can you think of how to calculate it? thank you
Today there are some calculated sensors - or MathSensors - see https://github.com/kellerza/sunsynk/blob/655ce5c0a2a5fe8edd6139398ee02a4ccb6156b0/src/sunsynk/definitions.py#L100 for some examples
Of you want to build a new one, try to view all the interested registers at the same time to see how they are related. This works really nice in the template developer tools once you’ve added the individual sensors (or even dev tools - states, if you can filter on a similar name)
ok, thank you very much, I'm going to try and see if I can figure it out, I'll add them in mysensors.py, right? Greetings and Merry Christmas!
Yes, add them in mysensors, as an example:
SENSORS += [
Sensor(175, "register 175", WATT),
Sensor(169, "register 169", WATT),
Sensor(166, "register 166", WATT),
]
Then also make sure your schedule for WATT reads often,- i.e. every second or 2 - https://kellerza.github.io/sunsynk/reference/schedules
Then you can play with templates to do a calc until you find the combination that works. Once you find it create a MathSensor
or create you own custom sensor to do the calc between the registers if this is more than + & -
Ok thanks!! Excuse me, where is the information from all the possible mathematics sensors? I don't see it in the guide
You will have to look at the code. Sensors.py likely
the mathsensor simply adds registers together. Some + some -, depending on the sign of the factor
Ah ok only + or - are possible