doolu
(holi)
September 19, 2022, 8:07pm
1
Hi
i have an modbus sensor:
- name: isg_betriebsstatus
input_type: input
address: 2500
slave: 1
the value of the sensor is bitcoded:
HK 1 PUMPE B0
HK 2 PUMPE B1
AUFHEIZPROGRAMM B2
NHZ STUFEN IN BETRIEB B3
WP IM HEIZBETRIEB B4
WP IM WARMWASSERBETRIEB B5
VERDICHTER IN BETRIEB B6
SOMMERBETRIEB AKTIV B7
KUEHLBETRIEB AKTIV B8
MIN. EINE IWS IM ABTAUBETRIEB B9
SILENTMODE 1 AKTIV B10
SILENTMODE 2 AKTIV (WP AUS) B11
for example i get a value of 81 = 01010001
which means bit 0 (HK 1 PUMPE ), bit 4(WP IM HEIZBETRIEB) and bit 6 (VERDICHTER IN BETRIEB ) are active
how can i show these values in homeassitant?
VDRainer
(đ»)
September 19, 2022, 8:36pm
2
Welcome to HA!
Take a look here:
sure, this is my sensor setup
binary_sensor:
- platform: template
sensors:
e3dc_emergency_power_available:
friendly_name: "E3DC Emergency Power available"
value_template: "{{ states('sensor.e3dc_ems_state')|int|bitwise_and(4) > 0 }}"
e3dc_battery_loading_blocked:
friendly_name: "E3DC Battery loading blocked"
value_template: "{{ states('sensor.e3dc_ems_state')|int|bitwise_and(1) > 0 }}"
e3dc_battery_unloading_blocked:
friendly_name:âŠ
doolu
(holi)
September 20, 2022, 6:35pm
3
thanks. that was the right hint. i will try that.
doolu
(holi)
October 10, 2022, 7:35pm
4
here my working config for the stiebel eltron heat pump. i hope it will help others.
` modbus:
name: âisgâ
type: tcp
host: 192.168.1.xx
port: 502
sensors:
name: isg_aussentemperatur
input_type: input
address: 506
unit_of_measurement: °C
slave: 1
scale: 0.1
precision: 1
name: isg_ISTTEMPERATUR_HK_1
input_type: input
address: 507
unit_of_measurement: °C
state_class: measurement
slave: 1
scale: 0.1
precision: 1
name: isg_SOLLTEMPERATUR_HK_1
input_type: input
address: 509
unit_of_measurement: °C
state_class: measurement
slave: 1
scale: 0.1
precision: 1
name: isg_RUECKLAUFEMPERATUR_WP_1
input_type: input
address: 541
unit_of_measurement: °C
state_class: measurement
slave: 1
scale: 0.1
precision: 1
name: isg_VORLAUFTEMPERATUR_WP_1
input_type: input
address: 542
unit_of_measurement: °C
state_class: measurement
slave: 1
scale: 0.1
precision: 1
name: isg_betriebsstatus
input_type: input
address: 2500
slave: 1
name: isg_evu-sperre
input_type: input
address: 2501
slave: 1
name: isg_PUFFERLADEPUMPE_1
input_type: input
address: 2511
slave: 1
name: isg_VERDICHTER_1
input_type: input
address: 2541
slave: 1
name: isg_WASSERVOLUMENSTROM_WP_1
input_type: input
address: 547
unit_of_measurement: l/m
state_class: measurement
slave: 1
scale: 0.1
precision: 1
name: isg_VD_HEIZEN_TAG
input_type: input
address: 3510
unit_of_measurement: kWh
state_class: total
slave: 1
scale: 1
precision: 1
device_class: energy
name: isg_VD_HEIZEN_SUMME
input_type: input
address: 3511
unit_of_measurement: kWh
state_class: total_increasing
slave: 1
scale: 1
precision: 1
device_class: energy
template:
sensor:
name: âTotal aktueller Stromverbrauchâ
unit_of_measurement: âWattâ
state: >
{{ states(âsensor.shellyem3_485519c9ac6c_channel_c_powerâ) | float + states(âsensor.shellyem3_485519c9ac6c_channel_b_powerâ)|float + states(âsensor.shellyem3_485519c9ac6c_channel_a_powerâ)|float}}
binary_sensor:
name: âisg_betriebsstatus_hk1_pumpeâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(1) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_hk2_pumpeâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(2) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_aufheizprogrammâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(4) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_NHZ_STUFEN_IN_BETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(8) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_HEIZBETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(16) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_WARMWASSERBETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(32) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_VERDICHTERâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(64) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_SOMMERBETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(128) > 0 }}"
device_class: ârunningâ `
Hello everyone,
Iâm struggeling with my bitcoded value from my LWZ.
In my isg_sensors.yaml Iâve got a sensor representing the systemstatus called âBetriebsstatusâ
- name: 'HEIZUNG-BETRIEBSSTATUS'
slave: 1
address: 2000
input_type: input
data_type: uint16
At present I got the value 17.
In a second file called binary_sensor.yaml I hava got separate sensors to get the different status out of the bitcoded value.
- platform: template
sensors:
isg_betriebsstatus_hk1_pumpe:
friendly_name: "Heizung Schaltprogramm aktiv"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(1) > 0 }}"
isg_betriebsstatus_hk2_pumpe:
friendly_name: "Heizung Verdichter"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(2) > 0 }}"
isg_betriebsstatus_aufheizprogramm:
friendly_name: "Heizung Heizen"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(4) > 0 }}"
isg_betriebsstatus_en:
friendly_name: "Heizung KĂŒhlen"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(8) > 0 }}"
isg_betriebsstatus_heizbetrieb:
friendly_name: "Heizung Warmwasserbereitung"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(16) > 0 }}"
isg_betriebsstatus_waremwasserbetrieb:
friendly_name: "Heizung Elektr. NE"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(32) > 0 }}"
isg_betriebsstatus_verdichter:
friendly_name: "Heizung Service"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(64) > 0 }}"
isg_betriebsstatus_sommerbetrieb:
friendly_name: "ISG State Summer Mode active"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(128) > 0 }}"
isg_betriebsstatus_kuehlbetrieb:
friendly_name: "ISG State Cooling active"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(256) > 0 }}"
isg_betriebsstatus_auftauen:
friendly_name: "ISG State Defrost active"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(512) > 0 }}"
isg_betriebsstatus_silentmode1_active:
friendly_name: "ISG State Silentmode1 active"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(1024) > 0 }}"
isg_betriebsstatus_silentmode2_active:
friendly_name: "ISG State Silentmode2 active"
value_template: "{{ states('sensor.HEIZUNG-BETRIEBSSTATUS')|int|bitwise_and(2048) > 0 }}"
My dashboard shows for all binary sensors the vale ânot availibleâ. I can not get it run.
Does anybode have an idea, where to find the mistake or waht to change?
doolu:
binary_sensor:
name: âisg_betriebsstatus_hk1_pumpeâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(1) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_hk2_pumpeâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(2) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_aufheizprogrammâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(4) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_NHZ_STUFEN_IN_BETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(8) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_HEIZBETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(16) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_WARMWASSERBETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(32) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_VERDICHTERâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(64) > 0 }}"
device_class: ârunningâ
name: âisg_betriebsstatus_SOMMERBETRIEBâ
state: " {{ states(âsensor.isg_betriebsstatusâ)|int|bitwise_and(128) > 0 }}"
device_class: ârunningâ `
exactly what i was looking for! Thank you very much!
1 Like