Comments (4)
Very good job anyway !
from sofar2mqtt-python.
Thanks for raising this. Can you send me a screenshot or copy and paste some values?
It can be difficult trying to aggregate values from different registers as the read requests are made separately. I'm currently exploring an alternative approach to read all the values.
from sofar2mqtt-python.
I don't have an example right now. but yesterday at the end of the day , with the actual sofar-hyd-ep.json. If active_power = -10 or -20 (reported negative sometimes on my system) and load _power=800 then grid is 800 - (-20) = 820 instead of 800. Which make sens if active_power can really be negative (this i don't know, maybe only measurment error) .
Even stranger case : if active_power is zero and load_power is 800 then grid is -800 ??? it look like grid = 800 - 0= -800.
I tried to modify the grid in json inverting the active_power and load_power in the substract , and also invert : (chaged to false), witch gives as follows. Until now i didn't see any problems, i will report if the same occure tonight.
I suspect something wrong in the substract calculation or even may be in the actual size of the numbers (like wrong type of int read from registers (?) .. well i don't really know) .
I am testing this (as a workaround):
{
"name": "grid",
"aggregate": [
"load_power",
"active_power"
],
"agg_function": "subtract",
"invert": false,
"ha": {
"name": "Sofar:Grid power",
"unique_id": "sofar_grid_power",
"device_class": "power",
"unit_of_measurement": "W",
"state_class": "measurement",
"icon": "mdi:flash"
}
},
from sofar2mqtt-python.
I realized that i forgot to confirme that it work now with the grid calculation changes. Thanks for your last commit, and work!
from sofar2mqtt-python.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sofar2mqtt-python.