-
Notifications
You must be signed in to change notification settings - Fork 101
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
Wrong offset of Battery temperature sensor in single_phase.py for Deye #353
Comments
This shows the correct temp for register (made custom sensor while)
|
Do all the temperature sensors work like this? |
No, DC and Radiator temperatures readings are correct, only battery has this offset... |
Can you try the latest dev? https://github.com/kellerza/sunsynk/blob/main/src/sunsynk/definitions/single_phase.py#L30 |
seems the value offset doubled with sensors.py main file:
|
From this the offset must be 0
This also results in an offset of 0 - You inherit from Sensor and then create a new method So this custom Sensor should give you the same result: SENSORS += Sensor(182, "Battery Temp", CELSIUS, 0.1) |
Didn't get what you mean... My custom sensor I wrote few messages earlier is working correct. My last message was about your "dev" add-on test with new temp sensor... that showed wrong temp... and code was from addon sensors.py |
Battery temp sensor shows |
This shows the offset is 0 😉 |
So the integrated sensor has extra offset? |
What he means is that by having this definition: SENSORS += Sensor(182, "Battery Temp", CELSIUS, 0.1) You are effectively not setting any offset to the value. In deye modbus docs, it states that the "battery temperature" register is offset by 1000, so therefore the definition of "TempSensor(182, "Battery temperature", CELSIUS, 0.1, offset=1000)" in single-phase definition file. Is the reading you get same on the inverter screen as in Home Assistant/Sunsynk? Also is your inverter recently updated? |
That behavior is just from the beginning of multi add-on usage - 3 firmwares of Deye SUN 6k-SG03/05 inverter incl. stock one. |
I have fixed it. Please try the following docker image: ghcr.io/maslyankov/hass-addon-sunsynk-multi:edge |
@OwlBawl did you manage to test the above version? |
No, it's disconnected for service now, so can't check changes. |
@OwlBawl I realixed what I did wrong here, when you omit the offset it becomes 100, not 0. This aligns with the docs (1000 before the 0.1 factor) and works ok for my Sunsynk Can you try the edge version when you have things back up and running? |
Your environment
Describe the issue/bug and what you expect
Wrong offset of sensor I think
##########
Battery
##########
SENSORS += (
TempSensor(182, "Battery temperature", CELSIUS, 0.1),
in /single_phase.py
(https://github.com/kellerza/sunsynk/tree/main/src/sunsynk/definitions)
Add-on shows 75C
while Solarman shows 25C (correct temp) using the same register [0x00B6] with offset: 1000
I checked the yaml file to be sure.
From Deye ModBus description file:
182 - battery temperature - R [0,3000] - 0.1 - ℃
Real value of offset + 1000
(example 1200 is 20.0 ℃)
The text was updated successfully, but these errors were encountered: