Hallo,
ich versuche den Link V1 in meinen Home Assistant einzubinden und gleichzeitig weitere Erfahrungen mit MQTT zu sammeln.
Vorab ein großen Dank für eure Hilfe!
Für mein Verständnis: Das LinkV1 und der HA befinden sich auf den gleichen Server und kommunizieren auf dem passenden Topic.
Müsste nicht das LINKV1 die Temperaturwerte und Wlansignalstärke immer senden oder werden diese über den HA immer abgefragt?
Im MQTT Brocker(Mosquitto) werden mir die Entitäten angezeigt, allerdings wird das Gerät sofort nach HA Neustart unbekannt.
im MQTT Explorer sehe ich keine Kommunikation vom LINKV1 zum Home Assistant, außer eine von mir angetriggerte Automation
Hier meine Einträge in der configuration.yaml, die ich aus diesen Forum entnommen und auf mich angepasst habe:
mqtt:
sensor:
- name: "WLanThermo"
unique_id: "LINKV1"
state_topic: &wt_topic "WLanThermo/LINKV1/status/data"
value_template: "{{ value_json.system.soc }}"
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
device: &wt_device
name: "WLanThermo"
configuration_url: &wt_url "http://192.168.178.108/"
hw_version: "V1"
manufacturer: "WlanThermo"
model: "Link V1"
identifiers: ["WlanThermo V1 LINK"]
enabled_by_default: true
# Wifi signal strength
- name: "Signal strength"
unique_id: "wlanthermo_signal_strength"
state_topic: *wt_topic
value_template: "{{ value_json.system.rssi }}"
unit_of_measurement: "dBm"
device_class: signal_strength
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
# Channel 1
- name: "Channel 1 name"
value_template: "{{value_json.channel[0].name}}"
unique_id: "wlan_thermo_channel_1_name"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 color"
value_template: "{{value_json.channel[0].color}}"
unique_id: "wlan_thermo_channel_1_color"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 current temp"
value_template: "{{value_json.channel[0].temp}}"
unique_id: "wlan_thermo_channel_1_temp"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 max temp"
value_template: "{{value_json.channel[0].max}}"
unique_id: "wlan_thermo_channel_1_max"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 min temp"
value_template: "{{value_json.channel[0].min}}"
unique_id: "wlan_thermo_channel_1_min"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
# Channel 2
- name: "Channel 2 name"
value_template: "{{value_json.channel[1].name}}"
unique_id: "wlan_thermo_channel_2_name"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 color"
value_template: "{{value_json.channel[1].color}}"
unique_id: "wlan_thermo_channel_2_color"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 current temp"
value_template: "{{value_json.channel[1].temp}}"
unique_id: "wlan_thermo_channel_2_temp"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 max temp"
value_template: "{{value_json.channel[1].max}}"
unique_id: "wlan_thermo_channel_2_max"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 min temp"
value_template: "{{value_json.channel[1].min}}"
unique_id: "wlan_thermo_channel_2_min"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
Die Automation unter automations.yaml:
- id: '1565774399160'
alias: WLANThermo update channels min/max from MQTT
trigger:
- entity_id:
- sensor.wlantermo_wlanthermo
platform: state
condition: []
action:
- data_template:
entity_id: input_number.wlanthermo_channel_1_min
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').0.min }}'
action: input_number.set_value
- data_template:
entity_id: input_number.wlanthermo_channel_1_max
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').0.max }}'
action: input_number.set_value
- data_template:
entity_id: input_number.wlanthermo_channel_2_min
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').1.min }}'
action: input_number.set_value
- data_template:
entity_id: input_number.wlanthermo_channel_2_max
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').1.max }}'
action: input_number.set_value
- id: '1565867288673'
alias: WLANThermo set channel 1 min
trigger:
- entity_id: input_number.wlanthermo_channel_1_min
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":1,"min":''+states(''input_number.wlanthermo_channel_1_min'')+''}''
}}'
- id: '1565867288674'
alias: WLANThermo set channel 1 max
trigger:
- entity_id: input_number.wlanthermo_channel_1_max
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":1,"max":''+states(''input_number.wlanthermo_channel_1_max'')+''}''
}}'
- id: '1565867288675'
alias: WLANThermo set channel 2 min
trigger:
- entity_id: input_number.wlanthermo_channel_2_min
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":2,"min":''+states(''input_number.wlanthermo_channel_2_min'')+''}''
}}'
- id: '1565867288676'
alias: WLANThermo set channel 2 max
trigger:
- entity_id: input_number.wlanthermo_channel_2_max
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":2,"max":''+states(''input_number.wlanthermo_channel_2_max'')+''}''
}}'
ich versuche den Link V1 in meinen Home Assistant einzubinden und gleichzeitig weitere Erfahrungen mit MQTT zu sammeln.
Vorab ein großen Dank für eure Hilfe!
Für mein Verständnis: Das LinkV1 und der HA befinden sich auf den gleichen Server und kommunizieren auf dem passenden Topic.
Müsste nicht das LINKV1 die Temperaturwerte und Wlansignalstärke immer senden oder werden diese über den HA immer abgefragt?
Im MQTT Brocker(Mosquitto) werden mir die Entitäten angezeigt, allerdings wird das Gerät sofort nach HA Neustart unbekannt.
im MQTT Explorer sehe ich keine Kommunikation vom LINKV1 zum Home Assistant, außer eine von mir angetriggerte Automation
Hier meine Einträge in der configuration.yaml, die ich aus diesen Forum entnommen und auf mich angepasst habe:
mqtt:
sensor:
- name: "WLanThermo"
unique_id: "LINKV1"
state_topic: &wt_topic "WLanThermo/LINKV1/status/data"
value_template: "{{ value_json.system.soc }}"
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
device: &wt_device
name: "WLanThermo"
configuration_url: &wt_url "http://192.168.178.108/"
hw_version: "V1"
manufacturer: "WlanThermo"
model: "Link V1"
identifiers: ["WlanThermo V1 LINK"]
enabled_by_default: true
# Wifi signal strength
- name: "Signal strength"
unique_id: "wlanthermo_signal_strength"
state_topic: *wt_topic
value_template: "{{ value_json.system.rssi }}"
unit_of_measurement: "dBm"
device_class: signal_strength
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
# Channel 1
- name: "Channel 1 name"
value_template: "{{value_json.channel[0].name}}"
unique_id: "wlan_thermo_channel_1_name"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 color"
value_template: "{{value_json.channel[0].color}}"
unique_id: "wlan_thermo_channel_1_color"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 current temp"
value_template: "{{value_json.channel[0].temp}}"
unique_id: "wlan_thermo_channel_1_temp"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 max temp"
value_template: "{{value_json.channel[0].max}}"
unique_id: "wlan_thermo_channel_1_max"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 1 min temp"
value_template: "{{value_json.channel[0].min}}"
unique_id: "wlan_thermo_channel_1_min"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
# Channel 2
- name: "Channel 2 name"
value_template: "{{value_json.channel[1].name}}"
unique_id: "wlan_thermo_channel_2_name"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 color"
value_template: "{{value_json.channel[1].color}}"
unique_id: "wlan_thermo_channel_2_color"
state_topic: *wt_topic
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 current temp"
value_template: "{{value_json.channel[1].temp}}"
unique_id: "wlan_thermo_channel_2_temp"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 max temp"
value_template: "{{value_json.channel[1].max}}"
unique_id: "wlan_thermo_channel_2_max"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
- name: "Channel 2 min temp"
value_template: "{{value_json.channel[1].min}}"
unique_id: "wlan_thermo_channel_2_min"
state_topic: *wt_topic
unit_of_measurement: "°C"
device_class: temperature
json_attributes_topic: *wt_topic
json_attributes_template: "{{ value_json | tojson }}"
expire_after: 60
device: *wt_device
enabled_by_default: true
Die Automation unter automations.yaml:
- id: '1565774399160'
alias: WLANThermo update channels min/max from MQTT
trigger:
- entity_id:
- sensor.wlantermo_wlanthermo
platform: state
condition: []
action:
- data_template:
entity_id: input_number.wlanthermo_channel_1_min
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').0.min }}'
action: input_number.set_value
- data_template:
entity_id: input_number.wlanthermo_channel_1_max
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').0.max }}'
action: input_number.set_value
- data_template:
entity_id: input_number.wlanthermo_channel_2_min
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').1.min }}'
action: input_number.set_value
- data_template:
entity_id: input_number.wlanthermo_channel_2_max
value: '{{ state_attr(''sensor.wlanthermo'', ''channel'').1.max }}'
action: input_number.set_value
- id: '1565867288673'
alias: WLANThermo set channel 1 min
trigger:
- entity_id: input_number.wlanthermo_channel_1_min
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":1,"min":''+states(''input_number.wlanthermo_channel_1_min'')+''}''
}}'
- id: '1565867288674'
alias: WLANThermo set channel 1 max
trigger:
- entity_id: input_number.wlanthermo_channel_1_max
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":1,"max":''+states(''input_number.wlanthermo_channel_1_max'')+''}''
}}'
- id: '1565867288675'
alias: WLANThermo set channel 2 min
trigger:
- entity_id: input_number.wlanthermo_channel_2_min
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":2,"min":''+states(''input_number.wlanthermo_channel_2_min'')+''}''
}}'
- id: '1565867288676'
alias: WLANThermo set channel 2 max
trigger:
- entity_id: input_number.wlanthermo_channel_2_max
platform: state
condition: []
action:
- service: mqtt.publish
data_template:
topic: WLanThermo/LINKV1/set/channels
retain: true
payload: '{{ ''{"number":2,"max":''+states(''input_number.wlanthermo_channel_2_max'')+''}''
}}'