louisbertelsmann / sungrow-wallbox-modbus-homeassistant Goto Github PK
View Code? Open in Web Editor NEWA Sungrow Wallbox addition to Homeassistant. Currently supported models: AC011E-01 (L1)
A Sungrow Wallbox addition to Homeassistant. Currently supported models: AC011E-01 (L1)
Hi Louis
There are two unique_ids with name wb1_rated_voltage. One for Rated voltage and also for Working mode.
Regards Sunny
Hi, without the Dashboard data i can not use your excellent project. Please upload an installation guide how to build the dashboard. Thx a lot!
Hi,
thank you for creating this integration. It's exactly what I'm currently searching for. Unfortunately I cannot get it to work.
The inverter integration from @mkaiser works flawlessly for me (https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant).
That is until I add just any one modbus item from your intergration to read. Then the whole integration stops working and all sensors become unavailable in Home Assistant. I think this is because nobody responds and the Modbus reads are timing out in the background.
I tried using several device id for the wallbox sensors (eg. 248, 3), but cannot read any register. Also when using a Modbus Tester software or pyModbus, I can read the inverters registers just fine, but no other device id (other than 1) seems to work.
To be clear: I am connecting to the SH8.0RT via the rear integrated LAN port, not the WiNet-S-Dongle. All values from the inverter are working fine. I just want to integrate the wallbox into Home Assistant.
My solar technician has already updated the firmware of the inverter and wallbox, this didn't change anything.
What am I missing here?
Why was the remote control removed with the last merge? Isn't it needed for starting and stopping?
The values I get for "Charging start time" and "Charging end time" are not correct:
I tried to get the correct values with modbus-cli and was successful with the following:
modbus dongle:502 -s 3 i@21319/I --byte-order=mixed
Parsed 0 registers definitions from 1 files
21319: 1707007290 0x65bedd3a
modbus dongle:502 -s 3 i@21317/I --byte-order=mixed
Parsed 0 registers definitions from 1 files
21317: 1706937153 0x65bdcb41
Those values are UNIX timestamps and could be converted to date/time. Unfortunately, I dont know how to configure the "--byte-order=mixed" option in HA yaml. Do you know how to do that?
Thanks & regards
Sunny
Hi Louis
I think the elif statement is missing the value:
{% elif ((states('sensor.phase_switching_status_raw') | int(default=0)) == ) %}
Regards Sunny
The isolar app allowes different modes lilke manual, surplus loading, time based loading, etc.
Currently I'm experimenting with tmjo's card https://github.com/tmjo/charger-card.
There is a way to use templates https://github.com/tmjo/charger-card/blob/master/src/templates/const_template.ts to create/add custom brands. For now, I use an existing template which I temporary have adapted to @Louisbertelsmann project. Maybe we can finish the whole thing and get a template ready for Sungrow to use.
type: custom:charger-card
entity: sensor.charging_power
brand: sungrow
show_leds: true
details:
name:
entity_id: sensor.wallbox_device_type
attribute: name
status:
entity_id: sensor.charging_status
currentlimits:
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 20
- 32
- 63
statetext:
Available: Available
Preparing: Plugged in
SuspendedEV: Stopped (Car)
Charging: Charging
Finishing: Finishing
collapsiblebuttons:
group1:
text: Details
icon: mdi:speedometer
group2:
text: Information
icon: mdi:information
group3:
text: Config
icon: mdi:cog
info_left:
- entity_id: sensor.charging_status
text: Availability
icon: mdi:gas-station-in-use-outline
info_right:
- entity_id: sensor.charging_energy
text: voltage
icon: mdi:car-turbocharger
unit_show: true
- entity_id: sensor.charging_power
text: power
icon: mdi:power-socket-fr
unit_show: true
group1:
- entity_id: sensor.charging_duration
text: Charging duration
icon: mdi:timelapse
unit_show: false
- entity_id: sensor.charged_range
text: Charged range
icon: mdi:highway
unit_show: false
- entity_id: sensor.charging_start_time
text: Last Config Update
icon: mdi:timer-play
- entity_id: sensor.charging_end_time
text: Last Data transfer
icon: mdi:timer-stop
group2:
- entity_id: binary_sensor.charging_status_id
text: S/N
- entity_id: sensor.charging_status_id_tag
text: TagID
- entity_id: sensor.charging_status_reconnects
text: Reconnects
- entity_id: sensor.charging_status_transaction_id
text: TransactionID
- entity_id: sensor.charging_status_model
text: Model
- entity_id: sensor.charging_status_features
text: OCPP features
- entity_id: sensor.charging_status_temperature
text: Temperature
unit_show: true
group3:
- entity_id: sensor.charging_status_version_firmware
text: Firmware
- entity_id: sensor.charging_status_status_firmware
text: Firmware-status
- entity_id: sensor.output_current_setting
text: Current Limit
icon: mdi:current-ac
type: dropdown
service: number.set_value
service_data:
entity_id: input_number.set_wb1_output_current
value: '#SERVICEVAL#'
stats:
default:
- entity_id: sensor.charging_status_stop_reason
text: Stop reason
- entity_id: sensor.charging_status_error_code_connector
text: Error (connector)
- entity_id: sensor.charging_status_error_code
text: Error (ocpp)
Available:
- entity_id: sensor.charging_status_stop_reason
text: Stop reason
- entity_id: sensor.charging_status_error_code_connector
text: Error (connector)
- entity_id: sensor.charging_status_error_code
text: Error (ocpp)
SuspendedEV:
- entity_id: sensor.charging_status_energy_session
text: Energy charged
unit_show: true
- entity_id: sensor.charging_status_stop_reason
text: Stop reason
- entity_id: sensor.charging_status_error_code_connector
text: Error (connector)
- entity_id: sensor.charging_status_error_code
text: Error (ocpp)
Preparing:
- entity_id: sensor.charging_status_stop_reason
text: Stop reason
Charging:
- entity_id: sensor.charging_status_energy_session
text: session_energy
unit_show: true
- entity_id: sensor.charging_status_stop_reason
text: Stop reason
- entity_id: sensor.charging_status_error_code_connector
text: Error (connector)
- entity_id: sensor.charging_status_error_code
text: Error (ocpp)
- entity_id: sensor.charging_status_current_offered
text: Max Current
- entity_id: sensor.charging_status_time_session
text: Charging time elapsed
toolbar_left:
default:
- service: switch.toggle
service_data:
entity_id: input_select.set_wb_charger_enable
text: Toggle on charging
icon: mdi:play-speed
- service: button.press
service_data:
entity_id: input_select.set_wb_remote_control
text: Toggle off charger
icon: hass:stop
- service: number.set_value
service_data:
entity_id: input_number.set_wb1_output_current
value: '#SERVICEVAL#'
type: dropdown
text: Set max current
icon: hass:current-ac
Available:
- service: switch.toggle
service_data:
entity_id: undefined
text: Toggle charging
icon: hass:flash
- service: button.press
service_data:
entity_id: undefined
text: Restart charger
icon: hass:restart
- service: number.set_value
service_data:
entity_id: undefined
value: '#SERVICEVAL#'
type: dropdown
text: Set max current
icon: hass:current-ac
SuspendedEV:
- service: switch.turn_off
service_data:
entity_id: undefined
text: Stop charging
icon: hass:flash-alert
- service: button.press
service_data:
entity_id: undefined
text: Restart charger
icon: hass:restart
- service: number.set_value
service_data:
entity_id: undefined
value: '#SERVICEVAL#'
type: dropdown
text: Set max current
icon: hass:current-ac
SuspendedEVSE:
- service: switch.turn_on
service_data:
entity_id: undefined
text: Stop charing
icon: hass:flash-alert
- service: button.press
service_data:
entity_id: undefined
text: Restart charger
icon: hass:restart
- service: number.set_value
service_data:
entity_id: undefined
value: '#SERVICEVAL#'
type: dropdown
text: Set max current
icon: hass:current-ac
Charging:
- service: switch.turn_off
service_data:
entity_id: undefined
text: Stop charging
icon: hass:stop
- service: button.press
service_data:
entity_id: undefined
text: Restart charger
icon: hass:restart
- service: number.set_value
service_data:
entity_id: undefined
value: '#SERVICEVAL#'
type: dropdown
text: Set max current
icon: hass:current-ac
Finishing:
- service: button.press
service_data:
entity_id: undefined
text: Restart charger
icon: hass:restart
- service: switch.toggle
service_data:
entity_id: undefined
text: Toggle charging
icon: hass:flash
Preparing:
- service: switch.turn_on
service_data:
entity_id: undefined
text: Stop charing
icon: hass:flash-alert
- service: button.press
service_data:
entity_id: undefined
text: Restart charger
icon: hass:restart
- service: number.set_value
service_data:
entity_id: undefined
value: '#SERVICEVAL#'
type: dropdown
text: Set max current
icon: hass:current-ac
chargerImage: White
customImage: \local\sungrow_wb_bl.png
customCardTheme: theme_transp_blue
compact_view: false
show_toolbar: true
show_name: true
show_status: true
show_stats: true
show_collapsibles: true
``
Currently I am only able to stop and restart a running session. I cannot initially start a session via home assistant. The wallbox is in "EMS" mode and connected to an SH8.0RT inverter. Also when I set the output current or the working mode, these settings are reverted after a few seconds. I can confirm, that the commands actually reach the wallbox, because I can see the charging power change briefly and I also double checked using a modbus tcp debug client (EasyModbus). It seems like either the inverter or the iSolarCloud (ocpp?) is overwriting the modbus registers every few seconds.
Did somebody manage to fully control the wallbox over modbus tcp using the Winet-S modbus tcp server?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.