Open Didou30 opened 11 months ago
Hi,
There is currently no full support for an off grid inverter mainly because of not knowing which information would be relevant and would be missing.
if you are using a usb to serial device and running HA in docker yes you will have to add access to that device for the HA container.
hello,
thanks for your response, all the information would be relevant to see the modbus register, but I don't know how to implement them! Growatt OffGrid SPF5000 Modbus RS485 RTU Protocol.pdf
This code in YAML for Esphome content all informations: `text_sensor:
sensor:
platform: wifi_signal name: "WiFi Signal Sensor" update_interval: 60s
platform: modbus_controller address: 0 register_type: "read" internal: true accuracy_decimals: 0 id: status
platform: modbus_controller name: "${friendly_name} Inverter Temperature" address: 25 register_type: "read" unit_of_measurement: °C device_class: temperature entity_category: diagnostic state_class: measurement icon: mdi:thermometer value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} PV Temperature" address: 32 register_type: "read" unit_of_measurement: °C device_class: temperature state_class: measurement entity_category: diagnostic icon: mdi:thermometer value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} DC‐DC Temperature " address: 26 register_type: "read" unit_of_measurement: °C device_class: temperature entity_category: diagnostic state_class: measurement icon: mdi:thermometer value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} AC Input Voltage" address: 20 register_type: "read" unit_of_measurement: V device_class: VOLTAGE state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} AC Charge Current" address: 68 register_type: "read" unit_of_measurement: A device_class: CURRENT entity_category: diagnostic state_class: measurement icon: mdi:flash value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} AC charge watt (low) " address: 14 register_type: "read" unit_of_measurement: W device_class: POWER state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 2 filters:
platform: modbus_controller name: "${friendly_name} AC input watt (low) " address: 37 register_type: "read" unit_of_measurement: W device_class: POWER state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 2 filters:
platform: modbus_controller name: "${friendly_name} AC charge Energy today " address: 57 register_type: "read" unit_of_measurement: KW device_class: POWER state_class: total_increasing entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 2 filters:
platform: modbus_controller name: "${friendly_name} Output active power (low) " address: 10 register_type: "read" unit_of_measurement: W device_class: power state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 2 filters:
platform: modbus_controller name: "${friendly_name} AC output Volt" address: 22 register_type: "read" unit_of_measurement: V device_class: voltage state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} Output Current " address: 34 register_type: "read" unit_of_measurement: A device_class: current state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} AC discharge watt (low) " address: 70 register_type: "read" unit_of_measurement: W device_class: power state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} PV1 charge power (high) " address: 3 register_type: "read" unit_of_measurement: Wh device_class: power state_class: measurement icon: mdi:solar-power value_type: U_DWORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} PV1 voltage " address: 1 register_type: "read" unit_of_measurement: V device_class: voltage state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} Buck1 current" address: 7 register_type: "read" unit_of_measurement: A device_class: current state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} Epv1_today H" address: 48 register_type: "read" unit_of_measurement: KW state_class: total_increasing device_class: energy icon: mdi:solar-power value_type: U_DWORD accuracy_decimals: 1 filters:
platform: modbus_controller name: "${friendly_name} Battery volt (M3)" address: 17 register_type: "read" unit_of_measurement: V device_class: voltage state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 2 filters:
platform: modbus_controller name: "${friendly_name} Bus Voltage" address: 19 register_type: "read" unit_of_measurement: V device_class: voltage state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 2 filters:
platform: modbus_controller name: "${friendly_name} fan speed" address: 82 register_type: "read" unit_of_measurement: "%" device_class: POWER_FACTOR state_class: measurement entity_category: diagnostic icon: mdi:flash value_type: U_WORD accuracy_decimals: 0 filters:
select:
platform: modbus_controller name: "${friendly_name} Charge Source" address: 01 value_type: U_WORD optionsmap: "Pv Priority": 0 "Pv&Uti": 1 "Only Pv": 2
platform: modbus_controller name: "${friendly_name} Output Source" address: 02 value_type: U_WORD optionsmap: "Bat Priority": 0 "Pv Priority": 1 "Uti Priority": 2 "Pv&Uti Priority": 3
platform: modbus_controller name: "${friendly_name} Uti Output Start Time" address: 03 value_type: U_WORD optionsmap: "0h": 0 "1h": 1 "2h": 2 "3h": 3 "4h": 4 "5h": 5 "6h": 6 "7h": 7 "8h": 8 "9h": 9 "10h": 10 "11h": 11 "12h": 12 "13h": 13 "14h": 14 "15h": 15 "16h": 16 "17h": 17 "18h": 18 "19h": 19 "20h": 20 "21h": 21 "22h": 22 "23h": 23
platform: modbus_controller name: "${friendly_name} Uti Output End Time" address: 04 value_type: U_WORD optionsmap: "0h": 0 "1h": 1 "2h": 2 "3h": 3 "4h": 4 "5h": 5 "6h": 6 "7h": 7 "8h": 8 "9h": 9 "10h": 10 "11h": 11 "12h": 12 "13h": 13 "14h": 14 "15h": 15 "16h": 16 "17h": 17 "18h": 18 "19h": 19 "20h": 20 "21h": 21 "22h": 22 "23h": 23
platform: modbus_controller name: "${friendly_name} Uti Charge Start Time" address: 05 value_type: U_WORD optionsmap: "0h": 0 "1h": 1 "2h": 2 "3h": 3 "4h": 4 "5h": 5 "6h": 6 "7h": 7 "8h": 8 "9h": 9 "10h": 10 "11h": 11 "12h": 12 "13h": 13 "14h": 14 "15h": 15 "16h": 16 "17h": 17 "18h": 18 "19h": 19 "20h": 20 "21h": 21 "22h": 22 "23h": 23
platform: modbus_controller name: "${friendly_name} Uti Charge End Time" address: 06 value_type: U_WORD optionsmap: "0h": 0 "1h": 1 "2h": 2 "3h": 3 "4h": 4 "5h": 5 "6h": 6 "7h": 7 "8h": 8 "9h": 9 "10h": 10 "11h": 11 "12h": 12 "13h": 13 "14h": 14 "15h": 15 "16h": 16 "17h": 17 "18h": 18 "19h": 19 "20h": 20 "21h": 21 "22h": 22 "23h": 23
platform: modbus_controller name: "${friendly_name} PV Input Mode" address: 07 value_type: U_WORD optionsmap: "Independent": 0 "Parallel": 1
platform: modbus_controller name: "${friendly_name} AC Input Mode" address: 08 value_type: U_WORD optionsmap: "APL,90‐280VAC": 0 "UPS,170‐280VAC": 1
platform: modbus_controller
name: "${friendly_name} Output Volt Type"
address: 18
value_type: U_WORD
optionsmap:
"208 VAC": 0
"230 VAC": 1
"240 VAC": 2
platform: modbus_controller name: "${friendly_name} Output Freq Type" address: 19 value_type: U_WORD optionsmap: "50 Hz": 0 "60 Hz": 1
platform: modbus_controller
name: "${friendly_name} Over Load Restart"
address: 20
value_type: U_WORD
optionsmap:
"Yes": 0
"No": 1
"Swith to UTI": 2
platform: modbus_controller name: "${friendly_name} Over Temperature Restart" address: 21 value_type: U_WORD optionsmap: "Yes": 0 "No": 1
platform: modbus_controller name: "${friendly_name} Buzzer on/off enable" address: 22 value_type: U_WORD optionsmap: "Enable": 0 "Disable": 1
platform: modbus_controller name: "${friendly_name} Maximum Ac Charge Current" address: 38 value_type: U_WORD optionsmap: # 0 - 99 "5": 5 "10": 10 "15": 15 "20": 20 "25": 25 "30": 30 "35": 35 "40": 40 "45": 45 "50": 50 "55": 55 "60": 60 "65": 65 "70": 70 "75": 75 "80": 80 "85": 85 "90": 90 "95": 95
platform: modbus_controller name: "${friendly_name} Bat Low Volt Switch To Uti" address: 37 value_type: U_WORD optionsmap: # check manual 44 - ?? "44,0": 440 "44,2": 442 "44,6": 446 "44,8": 448 "45,0": 450 "45,2": 452 "45,4": 454 "45,6": 456 "45,8": 458 "46,0": 460 "46,2": 462
platform: modbus_controller
name: "${friendly_name} Mains to battery operating point"
address: 95
value_type: U_WORD
optionsmap:
"48,0": 480
"48,2": 482
"48,4": 484
"48,6": 486
"49,0": 490
"49,2": 492
"49,4": 494
"49,6": 496
"49,8": 498
"50,0": 500
"51,0": 510
"52,0": 520
`
I have made an initial concept for support of the Offgrid SPF inverter. Please be aware that it's has not been tested yet. This is not including the select sensors from above only readable sensor values.
https://github.com/WouterTuinstra/Homeassistant-Growatt-Local-Modbus/tree/offgrid-inverter
Hello, Thanks you, i will test
Hello,
I have tested the integration and found an issue that wouldn't allow you to use the new protocol this has been fixed. Now I would like to get a verification that the items are getting decoded correctly and optionally suggestions for the default naming convention used by the integration.
Hello,
i will tested next week, thanks
Hi WouterTuinstra,
I also have an offgrid inverter (same as Didou30 you have - SPF 5000 ES) and after many strugle with the other way (using growatt servers) I am really happy that you made a local version! :)
I am started to use the offgrid branch, added the custom repo, started the config_flow. I chose serial, and entered the serial port (/dev/serial/by-id/usb-04e2_1410-if00) and the rest (left default). And I get "Unkown error occured".
I am not running hacs in docker. The ls -l /dev/ttyACM0 shows root and audio. I added the hassio user to the audio group, not sure what user is executing the serial port reading in hacs. (And ha is new to me, so not sure if I added the right user (hassio). :(
Could you help me what to check, where can I find log file to see what is failing?
Your quick response would be very much apprecieted :)
Thank you,
I found the logs but did not understand why is this failing:
^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, *request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 296, in async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 392, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/growatt_local/config_flow.py", line 287, in async_step_serial await server.close() File "/config/custom_components/growatt_local/API/growatt.py", line 74, in close await self.client.close() TypeError: object NoneType can't be used in 'await' expression
Hello,
not tested, i hope this week..
Hello,
In order to access the device within a docker container it has to be added when starting the container.
So you would have to add the device argument when creating the hass container:
--device="/dev/ttyACM0"
I'm not sure why the client would become None at this point
Hi WouterTuinstra,
Thank you for your quick response. I tried to figure out how to do that, but unfortunately, I did not succeed. Could you help how to do this?
I started with a flashed SD card on a RPI4 (HA OS as I can remember), so it is not me who is running it in a container. I checked by ssh-ing into the PI that in docker it is running these containers: [image: image.png] But I don't know who is running this, I could not find a compose.yaml to edit the parameters (--device=/dev/ttyACM0). (the HA OS has a boot time "supervisor" as I tried to
I tried to stop it and rerun it, with the below command, but then all my settings are lost (luckily I renamed the original one as a backup :))
docker run -d \ --name homeassistant \ --privileged \ --restart=unless-stopped \ -e TZ=Europe/Budapest \ -v /config \ --network=host \ --device="/dev/ttyACM0" \ ghcr.io/home-assistant/home-assistant:stable
Your help would be very much appreciated. :)
WouterTuinstra @.***> ezt írta (időpont: 2023. szept. 5., K, 20:37):
Hello,
In order to access the device within a docker container it has to be added when starting the container. So you would have to add the device argument when creating the hass container: --device="/dev/ttyACM0"
I'm not sure why the client would become None at this point
— Reply to this email directly, view it on GitHub https://github.com/WouterTuinstra/Homeassistant-Growatt-Local-Modbus/issues/6#issuecomment-1707133102, or unsubscribe https://github.com/notifications/unsubscribe-auth/A64FFH4Z43WPLSL2NFWIAL3XY5WNXANCNFSM6AAAAAA2727YMU . You are receiving this because you commented.Message ID: <WouterTuinstra/Homeassistant-Growatt-Local-Modbus/issues/6/1707133102@ github.com>
Hi @verjoz,
I'm afraid that I can't help with that because I'm not running HA OS and do not know where it's original docker configration to startup Home Assistant would be located.
You could explore an alternative methode to run a serial to network converter tool.
Ok, thank you, will try.
WouterTuinstra @.***> ezt írta (időpont: 2023. szept. 29., P, 11:48):
Hi @verjoz https://github.com/verjoz,
I'm afraid that I can't help with that because I'm not running HA OS and do not know where it's original docker configration to startup Home Assistant would be located.
You could explore an alternative methode to run a serial to network converter tool.
— Reply to this email directly, view it on GitHub https://github.com/WouterTuinstra/Homeassistant-Growatt-Local-Modbus/issues/6#issuecomment-1740614584, or unsubscribe https://github.com/notifications/unsubscribe-auth/A64FFH634HRRF24SEMSEYVTX42KN3ANCNFSM6AAAAAA2727YMU . You are receiving this because you were mentioned.Message ID: <WouterTuinstra/Homeassistant-Growatt-Local-Modbus/issues/6/1740614584@ github.com>
hello,
thanks for your response, all the information would be relevant to see the modbus register, but I don't know how to implement them! Growatt OffGrid SPF5000 Modbus RS485 RTU Protocol.pdf
Newer version of RTU protocol OffGrid-Modbus-RS485RS232-RTU-Protocol-V0.17-20220622
Hello,
does this repository support SPF 5000 ES and the usb of the inverter must be connected to the HA server?
Thanks for your response.