Comments (5)
It could be done to set up a template to set the Meter active Power to Zero if it's got an unreasonably high value (for example if it's over 30kw.)
from sungrow-shx-inverter-modbus-home-assistant.
for me it looks like expected behaviour:
The meter is connected between grid and house wires and is powered by one 'incoming' phase from the grid.
If the grid is off, the meter does not have power. All RS485 read/write requests will return 0xFFFF FFFF. This raw value is interpreted as a signed integer, so 0x7FFF FFFF (2 147 483 647 decimal)
We could use a template sensor to check the raw value for 0x 7FFF FFFF and set the sensor to "unavailable".
It is somehow easily testable: Just switch off your circuit breakers and have a look .
It should be just 4 sensors, right? Total power and phase A-C power.
from sungrow-shx-inverter-modbus-home-assistant.
Yes I think template for this value would be the correct way to go. I'm just not sure if it should be "unavailable", or just zero. In case of blackout, zero would be closer to reality.
Yes I think it's needed for 4 sensors.
from sungrow-shx-inverter-modbus-home-assistant.
I do not use the package in the form as here in the repository. I have split it into modbus, template and helper. So I don't have to restart HA with every change.
And unfortunately not so fit with GitHub and pull requests yet. But here is my change to the sensors:
- I renamed the 4 modbus sensors and added a
_raw
to the name. - as a sample for one of the sensors, here is my template sensor definition:
- name: sg_meter_active_power
unique_id: 20737f1c-544e-4daf-8fcb-282462c4e28a
device_class: power
state_class: measurement
unit_of_measurement: W
state: "{{ states('sensor.sg_meter_active_power_raw') | float(0) }}"
availability: "{{ states('sensor.sg_meter_active_power_raw') | int(0) != 0x7FFFFF }}"
Sensor is unavailable
in case of black-out. I think that is the best state for that case.
from sungrow-shx-inverter-modbus-home-assistant.
done in dabc6ec
thank you for the hint with the "availability" parameter. I adapted all templates to this and readability got improved :)
And unfortunately not so fit with GitHub and pull requests yet. But here is my change to the sensors:
I am still learning all this, too (svn is enough at work for my things...). Just give it a try next time - I won't bite, if something goes wrong! ;)
from sungrow-shx-inverter-modbus-home-assistant.
Related Issues (20)
- 2 sensors not available in the tesla dashbaord by louis HOT 1
- Zwei Wechselrichter. Daten unterschiedlich in HA und iSolarCloud | Two inverters. Different data in HA and iSolarCloud HOT 18
- Strange outage HOT 1
- Force charge and all other modbus write registers don't work HOT 1
- Retrieved data through modbus not containing data of both inverters HOT 1
- Battery Capacity wrong HOT 9
- Battery dis/charging power sensors don't work. HOT 5
- Load 1 ON/OFF Mode Switch for the DO-port holding register 130011 or more complex DO-Configuration and Load Control Mode by using registers 13001-13016 HOT 3
- Entities are no longer available or jumping between available and unavailable HOT 28
- NO VALUE after Home Assistant >= 2024.04 HOT 68
- Second Inverter ist changing between unavailable and avalaible every few seconds
- Undocumented Holding Registers destroys SH10RT Config HOT 6
- Yearly Export jumps about 1100kWh on May 1st HOT 1
- Modbus no longer works HOT 7
- Some values ββare missing after updating to 2024.5.2 HOT 2
- Battery charging/discharging power using wrong registers? HOT 1
- sungrow update no battery forced mode HOT 2
- total_dc_power over a million watts HOT 3
- Self-consume mode not triggering HOT 2
- 16bit integer wraparound error on Single phase hybrid inverters battery current sensor
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 sungrow-shx-inverter-modbus-home-assistant.