Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load port power #210

Open
cc120689 opened this issue Nov 23, 2023 · 6 comments
Open

Load port power #210

cc120689 opened this issue Nov 23, 2023 · 6 comments

Comments

@cc120689
Copy link
Contributor

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

@kellerza
Copy link
Owner

Today there are some calculated sensors - or MathSensors - see

MathSensor((175, 169, 166), "Essential power", WATT, factors=(1, 1, -1)),
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)

@cc120689
Copy link
Contributor Author

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!

@kellerza
Copy link
Owner

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 + & -

@cc120689
Copy link
Contributor Author

cc120689 commented Dec 29, 2023

Ok thanks!!
Excuse me, where is the information from all the possible mathematics sensors? I don't see it in the guide

@kellerza
Copy link
Owner

kellerza commented Jan 2, 2024

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

@cc120689
Copy link
Contributor Author

cc120689 commented Jan 3, 2024

Ah ok only + or - are possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants