Zum Thema OVMS lass ich mal den Home Assistant code da den ich nutze, um meinen smart über MQTT zu integrieren: (*your_mqtt_topic* muss mit dem richtigen topic getauscht werden)
Code
binary_sensor:
- name: ovms_smart44_charge_status
state_topic: "*your_mqtt_topic*/metric/v/c/charging"
device_class: battery_charging
payload_on: "yes"
payload_off: "no"
availability:
topic: "*your_mqtt_topic*/metric/s/v3/connected"
payload_available: "yes"
payload_not_available: "no"
sensor:
- name: ovms_smart44_soc
state_topic: "*your_mqtt_topic*/metric/v/b/soc"
unit_of_measurement: "%"
device_class: battery
availability:
topic: "*your_mqtt_topic*/metric/s/v3/connected"
payload_available: "yes"
payload_not_available: "no"
- name: ovms_smart44_12v
state_topic: "*your_mqtt_topic*/metric/v/b/12v/voltage"
unit_of_measurement: "V"
device_class: battery
- name: ovms_smart44_est_range
state_topic: "*your_mqtt_topic*/metric/v/b/range/est"
unit_of_measurement: "km"
device_class: battery
- name: ovms_smart44_latitude
state_topic: "*your_mqtt_topic*/metric/v/p/latitude"
- name: ovms_smart44_longitude
state_topic: "*your_mqtt_topic*/metric/v/p/longitude"
Alles anzeigen
Damit die Position aktualisiert und angezeigt wird, habe ich noch folgende Automatisierung:
Code
alias: Smart44 Location
description: ""
trigger:
- platform: state
entity_id: sensor.ovms_smart44_longitude
- platform: state
entity_id: sensor.ovms_smart44_latitude
condition: []
action:
- service: device_tracker.see
data_template:
dev_id: smart44
gps:
- "{{ states('sensor.ovms_smart44_latitude') }}"
- "{{ states('sensor.ovms_smart44_longitude') }}"
battery: "{{ states('sensor.ovms_smart44_soc') }}"
mode: restart
Alles anzeigen
Mit dem folgenden Script starte ich den Klima Booster: (ist aber auch als funktion in der aktuellen "test" firmware für den smart eq enthalten)
Code
alias: smart44_climate-booster
sequence:
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/01/command/wake-up
payload: can can1 tx st 350 C1 1B 73 57 14 70 96 85
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/02/command/wake-up
payload: can can1 tx st 350 C1 1B 73 57 14 70 96 85
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/01/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/02/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/03/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/04/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/05/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/06/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/07/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/08/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/09/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
- service: mqtt.publish
metadata: {}
data:
qos: "0"
topic: *your_mqtt_topic*/client/10/command/climate-booster
payload: can can1 tx st 634 00 01 00 00
mode: single
icon: mdi:air-conditioner
Alles anzeigen