elgatho
(Chris)
December 20, 2024, 5:12pm
1
I’m trying to read values from the device over modbus, with esphome.
From debug i have
[16:35:01][I][:057]: Lambda incoming value=10752.000000 - data array size is 2
[16:35:01][I][:058]: Sensor properties: adress = 0xB4C, offset = 0x0 value type=3
[16:35:01][I][:061]: data[0]=0x00 (42)
[16:35:01][I][:061]: data[0]=0x3FF00000 (0)
[16:35:01][I][:065]: Sensor value: = 42
How to get data from sensor?
sensor:
- platform: modbus_controller
modbus_controller_id: Heater
name: "External temp"
id: temperature_outside
register_type: holding
address: 0x0b4c
device_class: temperature
value_type: S_WORD
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
result = 1075,2
is it possible to get this data without lambda?
Karosm
(Karosm)
December 20, 2024, 7:52pm
3
You haven’t posted any lambda. Post your complete yaml for best support…
elgatho
(Chris)
December 20, 2024, 9:26pm
4
now i’m using lambda like that
lambda: |-
int value = data[1] << 8 | data[0];
return value ;
I’m just wounering if it’s possible to do it without lambda
nickrout
(Nick Rout)
December 21, 2024, 4:32am
6
I don’t believe so, why anyway?
elgatho
(Chris)
December 21, 2024, 11:50am
7
ok go it, last thing.
I’m getting value of the sensor
- platform: modbus_controller
modbus_controller_id: mbd
name: "temp comfort boiler"
id: temperature_boil_komfort
register_type: holding
address: 0x0b67
value_type: U_WORD
unit_of_measurement: "°C"
device_class: temperature
accuracy_decimals: 1
filters:
- multiply: 0.1
lambda: |-
int value = data[3] << 8 | data[2];
return value ;
I’m trying to change temp with command
select:
- platform: modbus_controller
id: onoffsel1
name: "Temp comfort boiler set"
address: 0x0b67
value_type: U_WORD
entity_category: config
icon: "mdi:toggle-switch"
optionsmap:
"45": 45
"46": 46
But when i set value
46 - temp is set 1177,6
45 - temp is set 1152
Any idea?
Karosm
(Karosm)
December 21, 2024, 3:29pm
8
It would be more productive if you post a link to your devices modbus protocol.
elgatho
(Chris)
December 21, 2024, 3:34pm
9
unfortunatley, vendor don’t wan’t to share that information, so everything is reverse engineering
Karosm
(Karosm)
December 21, 2024, 3:46pm
10
So what are you getting out from modbus sensor with U-WORD without that lambda?
Maybe it’s FP32 from two registers? Or something else…
What you know about those registers after reverse engineering?