Shows as deleted?
That one worked.
I have SRNE inverter. Can someone guide me how to connect it with Home Assistant through ESP32 ?
Just started to add in support for these SRNE Inverters into my custom_component.
Itās limited at the moment and Iāll carry on adding to it over the next few days. Unless someone wants to look how the registers are defined in the plugin_srne and submit a PR.
I would gladly do it if I had the time but life doesnt allow it currently
offtopic, is anyone having issues with your sensors after latest update? Most of my values have went crazy after yesterdays updateā¦!
see this thread: Anyone else having MODBUS issues?
Does anyone have this working over the Bluetooth adapter my solar is in a shed in the back yard not able to run network cable
Hi Mattie,
Iāve purchased this waveshare RS485 to ETH adapter and have pluged in the respective cables (Ground pin 2, B- pin 7, and A+ pin 8) and setup my baud rate and port to be the same as yours and used the modbus template you provided as an example but always get the error:
āReceived 0 bytes, unpack error unpack requires a buffer of 2 bytesā
I can see in the Wareshare portal that the RX and TX values are going up:
But still nothing, I have the ASF48100S200-H inverter so very similar to yours.
Any tips or help would be appreciated, here is my HA yaml, I have modbus working with my victron gear no issues there. Just need to get this inverter communicating.
#modbus:
-
name: SRNEInverter
type: rtuovertcp
host: 192.168.10.198
port: 8888
sensors:#Battery level percentage
- name: Modbus_Inverter_BatteryLevel
scan_interval: 60
unit_of_measurement: ā%ā
slave: 1
scale: 1
address: 256
unique_id: 700
input_type: holding
- name: Modbus_Inverter_BatteryLevel
You should get a state on Modbus_Inverter_BatteryLevel with my config. If you copied every setting it should be fine and it sounds like your ha ip is the one showing up in the waveshare gateway? So itās collection something?
What does your modbus config look like?
I have managed to integrate my SRNE inverter to HA using ESP32 & ESPHome addon.
Part of my yaml file is as follows.
esphome:
name: srne
friendly_name: SRNE
esp32:
board: esp32dev
framework:
type: arduino
# Enable Home Assistant API
api:
encryption:
key: "+EMWnue33wLGXOUUcZdBgtEcWOJjQIPoN7E3WbVj2UA="
ota:
password: "27a70d64573b33d2dc248577739abfa5"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
use_address: 192.168.1.16
manual_ip:
static_ip: 192.168.1.16
gateway: 192.168.1.1
subnet: 255.255.255.0
uart:
id: mod_bus
tx_pin: 19
rx_pin: 18
baud_rate: 9600
stop_bits: 1
modbus:
id: tdt1_modbus
flow_control_pin: 4
modbus_controller:
- id: srne1
address: 0x01
modbus_id: tdt1_modbus
setup_priority: -10
update_interval: 15000ms #data refresh rate
sensor:
- platform: modbus_controller
modbus_controller_id: srne1
name: "Inverter Frequency" #name for HA
id: srne_inverter_freq #id for HA
register_type: holding
address: 0x0218
unit_of_measurement: Hz
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: srne1
name: "Output Priority" #name for HA
id: srne_output_priority #id for HA
register_type: holding
address: 0xE204
- platform: modbus_controller
modbus_controller_id: srne1
name: "Charger Priority" #name for HA
id: srne_charger_priority #id for HA
register_type: holding
address: 0xE20F
Since E204 support read write both, how can I change the value of that registry through Home Assistant?
What I want to do is to change the Output priority UTI, SBU, SOL through HA automation.
Is this possible?
I tried the following way
switch:
- platform: template
name: "Output Priority Switch"
id: output_priority_switch
turn_on_action:
- modbus.write_register:
id: tdt1_modbus
address: 0xE204
value: 1
turn_off_action:
- modbus.write_register:
id: tdt1_modbus
address: 0xE204
value: 0
But it gives me the error
switch.template: [source /config/esphome/srne.yaml:52]
platform: template
name: Output Priority Switch
id: output_priority_switch
turn_on_action:
Unable to find action with the name āmodbus.write_registerā.
modbus.write_register:
id: tdt1_modbus
address: 57860
value: 1
How can I do this?
Please help
Esphome is beyond my knowledge unfortunately. I have no clue
under the select section use this:
select:
- platform: modbus_controller
modbus_controller_id: srne
id: Output_priority
name: ${name}_Output_priority
address: 0xE204
value_type: U_WORD
icon: mdi:power
optionsmap:
āSOLā: 0
āUTIā: 1
āSBUā: 2
Thank you for the reply. This is how I put your code in my srne.yaml file
select:
- platform: modbus_controller
modbus_controller_id: srne1
name: "Output Prority" #name for HA
id: srne_output_priority #id for HA
address: 0xE204
value_type: U_WORD
icon: mdi:power
optionsmap:
āSOLā: 0
āUTIā: 1
āSBUā: 2
it gives me following when I try to send the code to ESP32
sensor.modbus_controller: [source /config/esphome/srne.yaml:176]
platform: modbus_controller
modbus_controller_id: srne1
name: Output Priority
ID srne_output_priority redefined! Check select->0->id.
id: srne_output_priority
register_type: holding
address: 57860
disabled_by_default: False
force_update: False
bitmask: 0xFFFFFFFF
skip_updates: 0
force_new_range: False
response_size: 0
value_type: U_WORD
register_count: 0
Please help
Unrelated, but if you have any Openwrt device around and donāt want to buy the bridge:
You can install the kmod-usb-serial-ch341 and use the usb port on your device to connect to the usb port in the srne inverter, then install mbusd on openwrt and it will act as a brige for you.
I happened to have one traveler router that I didnāt use anymore, so I set it up as a wifi client, and viola, Iām getting my metrics with the configuration that @Mattie posted above.
A friend created the full esphome integration. I created a card to easily connect to it, https://github.com/SeByDocKy/myESPhome/blob/8dc25d9a12194c6a29289947f18026ab353aceae/code/srne.yaml
I actually got the Waveshare RS485 to ETH converter but I realized late that I would need to connect it to a routerās ethernet port. I use a Starlink device and I do not want to spend more money for an ethernet adapter, so Iām going the SRNE to HA through ESPHome route. Letās see how it goes.
If it still matters you could buy a Unifi AP ac pro or another accesspoint able to wirelessly connect to a WiFi the Unifi AP then has a Ethernet port where you can plug in a waveshare gw.
This would cost more money than getting the ethernet adapter for my Starlink. If the ESP32 doesnāt work well, Iāll fall back to the Waveshare method.
Understandable
@Dimumal can you share how you connected the Inverter to the ESP32? Do you have a wire schematic buy chance?