January 15, 20242 yr Author That module USR-DR302 is indeed reasonable from AliExpress (£10 GBP + £5 delivery) . have you seen (or had a go yourself of course) this being used on a SunSynk inverter ? Excellent Idea about using Slipx's yaml if it is Modbus over ethernet then it shouldn't care what device it's talking to (ie my adapter or an esp32) as long as it conforms to the Modbus protocols.. I'll go and have a look at that.. that link didn't seem to do much. Where would go to see the yaml ? thanks
January 16, 20242 yr https://github.com/slipx06/Sunsynk-Home-Assistant-Dash/blob/main/ESPHome-1P-Sunsynk-Deye.yaml This is the single phase inverter yaml I was using it with this Here is examples of integration https://www.home-assistant.io/integrations/modbus/ Edited January 16, 20242 yr by Yuri
January 17, 20242 yr Author thanks Yuri. I'll go and have a read. I work away from home quite often so wont be able to fiddle again until the weekend.. I guess one of the differences between the approach I was thinking of and the esp32 project is the ESP does all the ModBus stuff and uses a web server to talk to Home Assistant where as using a dumb ModBus to rs485 converter the ModBus stuff is done in HA. The register/addresses used in the esp32 yaml would be the same as the ones used in HA but I'm not sure where to stick them in HA so that it communicates with the ModBus slave..
January 17, 20242 yr If I understand correctly you want an ESP32 to talk to the inverter via Modbus and have the data sent to some entities in HA ? If so I can assist with that. I can make you a "Skeleton" sketch with a function to post sensor data to HA. Edited January 17, 20242 yr by MartinViljoen
January 17, 20242 yr Author Wow thanks Martin. I haven’t given up on using the wave share rs485 to Ethernet module yet but I am getting closer to dumping that idea and going the Esp32 route I’ve ordered one of these so I’m ready to go esp32 if need be so I may be back in touch.. thanks very much for the offer.
January 22, 20242 yr Author I found this YouTube thing. https://youtu.be/Xuj2YFZ5zME?feature=shared Very good video nice and clear instructions. I set my wave share exactly as per the video and the read light flashes so it’s doing something. Can someone tell me what I should expect in HA for the entities if the end device isn’t connected ? I can see the entities as defined in the modbus.yaml but with a red error next to them rather than a null or zero. Is this correct ? I’ve then replaced some of the sensor entries with text copied and pasted from Slipx06 script but no data showed.
February 3, 20242 yr Author Managed to get a few hours to try and progress this. Could someone point me in the right direction with the addresses please. Looking at Slipx's yaml - platform: modbus_controller modbus_controller_id: ${modbus_controller_id} name: "sun12k-PV1 Power" id: sun12k_PV1_Power register_type: holding address: 672 unit_of_measurement: "W" state_class: "measurement" accuracy_decimals: 0 value_type: U_WORD The address for The PV input appears to be 672 . I understand this yaml is for the esp32 so need converting to put it in to a ModBus.yaml in HA if I am going to read direct from the Waveshare so this is my complete yaml called modbus.yaml and included in my config.yaml modbus: - name: waveshare1 type: tcp host: 192.168.1.250 port: 502 delay: 2 timeout: 5 sensor: - name: modpvin scan_interval: 10 address: 672 slave: 1 input_type: holding Also in the modbus pdf 672 is listed as temperature ? Is the sun12k in slipx yaml referring to a 12kW inverter and thus the addresses may be different?
February 3, 20242 yr I really enjoy your persistence with this... Here is a link from someone that reads the Sol-Ark/ Sunsynk/ Deye inverters from the modbus. (All the same inverter) GitHub - pbix/HA-solark-PV: Home Assistant integration for the SolArk PV Inverter He is using the 12kw version, so I am sure you can use @slipx protocol for yours.
February 3, 20242 yr Author Hello I will eventually be looking for both PV strings power and inverter output but I'd be happy just seeing any for now. The inverter model is SunSynk 3.6K-sg01lp1
February 3, 20242 yr Author @GVC I'll go and have a look at that , thanks. Just had a read and they are doing it via a USB I'm hoping to do it over my network so rs485 to TCP . Edited February 3, 20242 yr by Perfo
February 3, 20242 yr Author @p_i Ah ok. those don't appear in the slipx yaml so maybe it is different to mine.. I have the additional annoyance that doing a check configuration just locks up my Pi-4 which is very Grring..
February 3, 20242 yr Author Do you know where I can find out what type of input 186 is ? ie is it a holding in put ? I guess it isn't a coil due to it being a value rather than an on off ..
February 3, 20242 yr I would recommend that you use pbix example in the link that I posted and test your protocols on the Modpoll Utility.
February 3, 20242 yr That value IS in slipx's yaml: - platform: modbus_controller # 186 PV1 Power modbus_controller_id: inverter name: "${friendly_name} PV1 Power" id: inverter_esphome_pv1_power register_type: holding address: 186 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: U_WORD They're not in there in numerical order, so you have to search.
February 3, 20242 yr Author @p_i hmmm I though It did search but yep I am wrong it is there. Which is encouraging ...Is value_type: U_WORD in and slipx esp32 yaml the same thing as input_type: U_WORD in ha yaml ? @GVC ok off to read about modpoll and stuff..
February 3, 20242 yr Author A bit tricky that modbus pool. They say to run it from command line but the example does seem to do anything. I notice you can also run it in windows but not sure what I'm doing. However I found I already had it installed as I used this to see if my modbus gadget could be seen on the network .. it can so just got to figure out how to send a fetch command to address 186 ...
February 4, 20242 yr Author I had to dump it again last night due to worldly pressures getting in the way of serious fiddling. Anyway fresh head this morning and modbus poll seems to be giving me a sensible reading for address 186. For those that know what they are talking about ca\n you have a quick scan of my modbus set up ? I say this seems to work as line 6 which I assume is address 186 is a live reading and bar the delay on the sunsynk app appears to be tracking the solar input.. So a massive step forwards. I need to convert this in to a modbus entry in HA now and duplicate my results and I'm away.
February 4, 20242 yr Author The is HA business is very confusing... two config.yaml 's The first one is a completely stripped out config.yaml. When I press check config this works and takes a couple of seconds to check.. This second one crashes HA with no warnings or log entries that I can see it just hangs with the blue circle thing. This happens even if I comment out all the entries in my modbus.yaml like below I've got too many learning curves happening at the same time here and none are converging ont he same spot 🙂 . Can anyone see what I'm doing wrong here ? it must be something pretty basic.
February 4, 20242 yr Author One thing I've figured is it only like sensors and not sensor for tcp/ip modbus.
February 5, 20242 yr Author But this works fine ? Yeahh. # Loads default set of integrations. Do not remove. default_config: # Load frontend themes from the themes folder frontend: themes: !include_dir_merge_named themes automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml #modbus: !include modbus.yaml modbus: - name: waveshare type: tcp host: 192.168.1.250 port: 502 delay: 0 timeout: 5 sensors: - name: modpv address: 186 input_type: holding scan_interval: 5 slave: 1
February 5, 20242 yr Author If anyone reading this is interested. A good clear source of addresses can be got from the excellant Sunsynk power flow card by SlipX. Install the cards then look at the code editor and they are all there nicely lined up: entities: inverter_voltage_154: sensor.solarsynk_2205129054_inverter_voltage load_frequency_192: sensor.solarsynk_2205129054_load_frequency inverter_current_164: sensor.solarsynk_2205129054_inverter_current inverter_power_175: sensor.solarsynk_2205129054_inverter_power inverter_status_59: sensor.solarsynk_2205129054_overall_state grid_power_169: sensor.solarsynk_2205129054_grid_power day_grid_export_77: sensor.solarsynk_2205129054_day_grid_export grid_ct_power_172: sensor.solarsynk_2205129054_grid_ct_power day_load_energy_84: sensor.solarsynk_2205129054_day_load_energy day_pv_energy_108: sensor.solarsynk_2205129054_day_pv_energy pv1_power_186: sensor.solarsynk_2205184086_battery_power1 pv2_power_187: gym2pv2 pv1_voltage_109: sensor.solarsynk_2205129054_pv1_voltage pv1_current_110: sensor.solarsynk_2205129054_pv1_current pv2_voltage_111: sensor.solarsynk_2205129054_pv2_voltage pv2_current_112: sensor.solarsynk_2205129054_pv2_current
February 5, 20242 yr Author hmmm also just noticed the power supply I plugged it in to today is a 5v one and the docs state it'll run on 6v to 36v. It seems to run fine on the 5v as well. Does anyone know if there is a 12v supply that can be picked up in the inverter somewhere there seems to be on other inverters ?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.