MBolt
(MBolt)
April 19, 2021, 6:43pm
1
When using the following modbus configuration loverlace is getting unreachable in a few minutes after starting up.
modbus:
- name: SMA
type: tcp
host: 192.168.15.35
port: 502
This code is deprecated but seems to give issues right now.
I am trying to change the code to someting like:
modbus:
- name: "SMA"
type: tcp
host: 192.168.15.35
port: 502
sensors:
- name: "SMApwrL1"
hub: SMA
unit_of_measurement: kW
slave: 3
register: 30777
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
but getting errors when checking the config file:
nvalid config for [modbus]: [hub] is an invalid option for [modbus]. Check: modbus->modbus->0->sensors->0->hub. (See /config/configuration.yaml, line 81).
(line 81 is at line starting with: modbus:)
What is wrong with my code? This should be ok right?
OPalat
April 19, 2021, 6:51pm
2
As far as I can tell, the line “hub: SMA” in block
- name: "SMApwrL1"
hub: SMA
unit_of_measurement: kW
should not be there.
However I myself have some problems with the nes mosbus sensor definiton, as after rewriting my config I cannot connect read my server.
MBolt
(MBolt)
April 19, 2021, 6:51pm
3
MBolt:
modbus:
- name: SMA
Just went back to my old situation and changed the following:
modbus:
- name: "SMA"
This does not change the situation.
Modbus seems to be broken right now.
MBolt
(MBolt)
April 19, 2021, 7:03pm
4
Ok have changed to the following in my configuration.yaml. This should be right, right? But still get: Invalid config for [modbus]: [register] is an invalid option for [modbus]. Check: modbus->modbus->0->sensors->0->register. (See /config/configuration.yaml, line 91).
modbus:
- name: "SMA"
type: tcp
host: IP_ADDRESS
port: 502
sensors:
- name: "SMApwrL1"
unit_of_measurement: kW
slave: 3
register: 30777
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMApwrL2"
unit_of_measurement: kW
slave: 3
register: 30779
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMApwrL3"
unit_of_measurement: kW
slave: 3
register: 30781
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMAcurL1"
unit_of_measurement: A
slave: 3
register: 30977
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMAcurL2"
unit_of_measurement: A
slave: 3
register: 30979
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMAcurL3"
unit_of_measurement: A
slave: 3
register: 30981
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMAvoltL1"
unit_of_measurement: V
slave: 3
register: 30783
count: 2
data_type: uint
scale: 0.01
precision: 1
scan_interval: 5
- name: "SMAvoltL2"
unit_of_measurement: V
slave: 3
register: 30785
count: 2
data_type: uint
scale: 0.01
precision: 1
scan_interval: 5
- name: "SMAvoltL3"
unit_of_measurement: V
slave: 3
register: 30787
count: 2
data_type: uint
scale: 0.01
precision: 1
scan_interval: 5
- name: "SMAnetHZ"
unit_of_measurement: Hz
slave: 3
register: 30803
count: 2
data_type: uint
scale: 0.01
precision: 2
scan_interval: 5
- name: "SMApwr"
unit_of_measurement: kW
slave: 3
register: 30775
count: 2
data_type: int
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMAtotal"
unit_of_measurement: MW
slave: 3
register: 30529
count: 2
data_type: uint
scale: 0.000001
precision: 2
scan_interval: 5
- name: "SMAtoday"
unit_of_measurement: kWh
slave: 3
register: 30535
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 5
- name: "SMAtempinternal"
slave: 3
register: 34113
count: 2
data_type: uint
scale: 0.1
precision: 2
scan_interval: 5
- name: "SMAtempambient"
slave: 3
register: 34609
count: 2
data_type: uint
scale: 0.1
precision: 2
scan_interval: 5
- name: "SMAdevtype"
slave: 3
register: 30053
count: 2
data_type: int
scan_interval: 5
- name: "SMAgridrelay"
slave: 3
register: 30217
count: 2
data_type: int
scan_interval: 5
- name: "SMAderating"
slave: 3
register: 30219
count: 2
data_type: int
scan_interval: 5
- name: "SMAcondition"
slave: 3
register: 30201
count: 2
data_type: int
scan_interval: 5
OPalat
April 19, 2021, 7:06pm
5
register is address in the new config
MBolt
(MBolt)
April 19, 2021, 7:37pm
6
Thank you. That was a simple error
But after fixin this error, after a minute or so Lovelace is not responding anymore. I think there are issues with the new modbus implementation.
It should be working right wit the code below. Or am I overloading modbus some how with this scan interval and reading all these parameters?
modbus:
- name: SMA
type: tcp
host: MY_IPADDRESS
port: 502
sensors:
- name: SMApwrL1
unit_of_measurement: kW
slave: 3
address: 30777
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 15
- name: SMApwrL2
unit_of_measurement: kW
slave: 3
address: 30779
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 15
- name: SMApwrL3
unit_of_measurement: kW
slave: 3
address: 30781
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 15
- name: SMAcurL1
unit_of_measurement: A
slave: 3
address: 30977
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 15
- name: SMAcurL2
unit_of_measurement: A
slave: 3
address: 30979
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 15
- name: SMAcurL3
unit_of_measurement: A
slave: 3
address: 30981
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 15
- name: SMAvoltL1
unit_of_measurement: V
slave: 3
address: 30783
count: 2
data_type: uint
scale: 0.01
precision: 1
scan_interval: 15
- name: SMAvoltL2
unit_of_measurement: V
slave: 3
address: 30785
count: 2
data_type: uint
scale: 0.01
precision: 1
scan_interval: 15
- name: SMAvoltL3
unit_of_measurement: V
slave: 3
address: 30787
count: 2
data_type: uint
scale: 0.01
precision: 1
scan_interval: 15
- name: SMAnetHZ
unit_of_measurement: Hz
slave: 3
address: 30803
count: 2
data_type: uint
scale: 0.01
precision: 2
scan_interval: 15
- name: SMApwr
unit_of_measurement: kW
slave: 3
address: 30775
count: 2
data_type: int
scale: 0.001
precision: 2
scan_interval: 15
- name: SMAtotal
unit_of_measurement: MW
slave: 3
address: 30529
count: 2
data_type: uint
scale: 0.000001
precision: 2
scan_interval: 15
- name: SMAtoday
unit_of_measurement: kWh
slave: 3
address: 30535
count: 2
data_type: uint
scale: 0.001
precision: 2
scan_interval: 15
- name: SMAtempinternal
slave: 3
address: 34113
count: 2
data_type: uint
scale: 0.1
precision: 2
scan_interval: 15
- name: SMAtempambient
slave: 3
address: 34609
count: 2
data_type: uint
scale: 0.1
precision: 2
scan_interval: 15
- name: SMAdevtype
slave: 3
address: 30053
count: 2
data_type: int
scan_interval: 15
- name: SMAgridrelay
slave: 3
address: 30217
count: 2
data_type: int
scan_interval: 15
- name: SMAderating
slave: 3
address: 30219
count: 2
data_type: int
scan_interval: 15
- name: SMAcondition
slave: 3
address: 30201
count: 2
data_type: int
scan_interval: 15
00and00
(andrew)
April 29, 2021, 3:39pm
7
I have the same problem. Is there any solution?
MBolt
(MBolt)
May 1, 2021, 6:35pm
8
After installing 2021.4.6 modbus with the new syntax works for me again.
Slebeig
(Sle)
May 11, 2021, 1:00pm
9
Seems to be again broken in 2021.5.2
Lovelace freezes short after startup. No Problem if i disable ModBus serial RTU with 2021.5.2
There have been some fixes with 2021.5/2021.5.1/2021.5.2 but they will freeze HA if you use at least serial modbus, havn’T tested with modbuy via tcp.
I reverted to 2021.4.6 as Modbus serial will work with this.
Mesiee
(Jan)
May 22, 2021, 10:33pm
10
Same issue for me. When I switch modbus device to TCP , HA freeze and no respond at all.No logs now error…just freez
Same issue here for me for ModBus RTU, I was wondering what was going wrong, now I know… Lovelace is frozen.