Autor Thema: HASS mit FHEM  (Gelesen 20554 mal)

Offline eddso

  • New Member
  • *
  • Beiträge: 27
Antw:HASS mit FHEM
« Antwort #15 am: 02 Dezember 2019, 21:38:41 »
Die screens sehen ja super aus.
@hasemp: Mich würde interessieren wie du es mit der Plot in der Kachel gemacht hast.

Gruß Edu
BananaPI+SATA SSD: Docker: fhem + alexa-fhem, zigbee2mqtt, nginx, mqtt, mysql.

Offline xobd

  • New Member
  • *
  • Beiträge: 17
Antw:HASS mit FHEM
« Antwort #16 am: 11 Dezember 2019, 11:42:18 »
Hallo zusammen,

vielleicht wärst jemand so nett und ist mir ein bischen behilflich.

Bin ebenfalls schon seit Jahren mit FHEM unterweg, habe jetzt auch Home Assistant wegen der GUI.
Möchte meine FHEM-Geräte, vorallem MAX! via MQTT und MQTT_GENERIC_BRIDGE nach HA bringen.
Zig Versuche, nichts klappt.
Kann mir vielleicht mal jemand aus seiner fhem.cfg die relevanten Passagen zum Einrichten in der Konfiguration zusenden.
Habe auch einen Ansatz von Matthias Kleine verfolgt, klappt auch nicht.

Auf meinem Raspi läuft FHEM, HA und Mosquitto
HA --> Mosquitto klappt
FHEM --> Mosquitto nicht

vielleicht fehlt mir nur ne Kleinigkeit.
Wäre Dir super Dankbar für einen Tipp

gruß
Christoph


Hier ein paar Auszüge aus meiner Konfiguration:


#--------------------
# Heizung - MAX Thermostat - Wohnzimmer
#--------------------
define MAX_133de7 MAX HeatingThermostatPlus 133de7
setuuid MAX_133de7 5c671e9d-f33f-58b8-a860-488718d47d4dffe7
attr MAX_133de7 userattr mqttAlias:textField-long mqttDefaults:textField-long mqttDisable:both,incoming,outgoing mqttForward:all,none mqttPublish:textField-long mqttSubscribe:textField-long weekprofile
attr MAX_133de7 IODev cm
attr MAX_133de7 alexaName Heizung Wohnzimmer
attr MAX_133de7 alexaRoom Wohnzimmer
attr MAX_133de7 alias Hz_Wz
attr MAX_133de7 group Heizung
attr MAX_133de7 icon sani_heating_temp
attr MAX_133de7 mqttName Wz_Hz_mqtt
attr MAX_133de7 mqttRoom Wohnzimmer
attr MAX_133de7 room HomeAssistant,Heizkörper,Wohnzimmer
attr MAX_133de7 weekprofile Plan_Hz_Wz
define FileLog_MAX_133de7 FileLog ./log/MAX_133de7-%Y.log MAX_133de7
setuuid FileLog_MAX_133de7 5c671e9d-f33f-58b8-54cd-8bb2ae7492cb56ba
attr FileLog_MAX_133de7 logtype text
attr FileLog_MAX_133de7 room Logs,Wohnzimmer
define SVG_FileLog_MAX_133de7_1 SVG FileLog_MAX_133de7:SVG_FileLog_MAX_133de7_1:CURRENT
setuuid SVG_FileLog_MAX_133de7_1 5c671e9d-f33f-58b8-c06f-57ca4b6299c21569
attr SVG_FileLog_MAX_133de7_1 room Wohnzimmer,Plots



#--------------------
# MQTT_GENERIC_BRIDGE
#--------------------
#
#define SYS_MQTT MQTT_DEVICE

defmod mqttGenericBridge MQTT_GENERIC_BRIDGE mqtt TYPE=MAX
#defmod mqttGenericBridge MQTT_GENERIC_BRIDGE mqtt MAX_133de7,MAX_0eb000,MAX_0eb051,MAX_0f0492
#defmod mqttGenericBridge MQTT_GENERIC_BRIDGE mqtt room=HomeAssistant
#define mqttGenericBridge MQTT_GENERIC_BRIDGE mqtt MAX_133de7,MAX_0eb000
#setuuid mqttGenericBridge 5ddbd1d3-f33f-58b8-d882-a31aac55a2e0f5a3
attr mqttGenericBridge IODev Mosquitto
#attr mqttGenericBridge alias MQTT generic bridge
attr mqttGenericBridge group MQTT
attr mqttGenericBridge room IO_Devices
attr mqttGenericBridge stateFormat dev: device-count in: incoming-count out: outgoing-count

#--------------------
# MQTT
# https://haus-automatisierung.com/nodered/2017/12/13/node-red-tutorial-reihe-part-4-verbindung-fhem.html
#--------------------
#
#define Mosquitto MQTT 127.0.0.1:1883
define Mosquitto MQTT2_CLIENT 127.0.0.1:1883
#setuuid Mosquitto 5ddbd1d3-f33f-58b8-1c1e-6c595805ddba17ad
attr Mosquitto room MQTT
define n_publish_mqtt notify .*:.* {\
   my $mqttRoom = AttrVal($NAME, 'mqttRoom', '');;\
   my $mqttName = AttrVal($NAME, 'mqttName', '');;\
   my @mqttReadings = split(/,/, AttrVal($NAME, 'mqttReadings', ''));;\
\
   if ($mqttRoom ne '' && $mqttName ne '') {\
        my $reading = "";;\
        my $message = "";;\
\
      if ($EVENT =~ qr/(.*?): (.*)/p) {\
         $reading = $1;;\
         $message = $2;;\
      } else {\
         $reading = "state";;\
         $message = $EVENT;;\
      }\
\
      if (grep(/^$reading/, @mqttReadings)) {\
            my $topic = "/FHEM/$mqttRoom/$mqttName/$reading";;\
\
            fhem("set Mosquitto publish $topic $message");;\
      }\
   }\
}
setuuid n_publish_mqtt 5ddbd1d3-f33f-58b8-f836-28a17cd3dee956bf
attr n_publish_mqtt alias Alle Events an MQTT übermitteln
attr n_publish_mqtt group SystemLogik
attr n_publish_mqtt room Logik
define mqttPublishList readingsGroup <Name>,<MQTT-Raum>,<MQTT-Name> .*:?mqttRoom,?mqttName
setuuid mqttPublishList 5ddbd1d3-f33f-58b8-bf59-f8208a0cb97314fc
attr mqttPublishList room MQTT
FHEM 5.8 auf Raspberry 3
CUL 868 (1.62) / MAX Cube 868 (V 1.24.01 a-culfw Build 204) / MAX! / Z-Wave / FRITZ!DECT 200

Offline hsepm

  • Full Member
  • ***
  • Beiträge: 214
Antw:HASS mit FHEM
« Antwort #17 am: 13 Dezember 2019, 20:56:44 »
Die screens sehen ja super aus.
@hasemp: Mich würde interessieren wie du es mit der Plot in der Kachel gemacht hast.

Gruß Edu

Ich bin zwar hsepm, aber ich antworte mal ;)

Home Assistant hat eine Oberfläche namens Lovelace und es gibt dafür Standard-Cards und Custom-Cards.

Eine dieser Custom Cards ist mini-graph-card https://github.com/kalkih/mini-graph-card.

Diese Card zeigt einen Sensor oder mehrere Sensoren und konfigurierbare Charts. Konfiguriert wird in YAML.

Der Thread zu mini-graph-card: https://community.home-assistant.io/t/lovelace-mini-graph-card/71385

Offline hsepm

  • Full Member
  • ***
  • Beiträge: 214
Antw:HASS mit FHEM
« Antwort #18 am: 14 Dezember 2019, 10:03:45 »
Hallo zusammen,

vielleicht wärst jemand so nett und ist mir ein bischen behilflich.

[...]


Ich habe es so aufgesetzt, dass ich alle Geräte bei Bedarf MQTT-fähig machen kann. mosquitto läuft auf dem fhem-Host.

define MQTT_Broker MQTT 127.0.0.1:1883
define MQTTGeneric MQTT_GENERIC_BRIDGE
attr MQTTGeneric IODev MQTT_Broker
attr MQTTGeneric stateFormat incoming-count

und dann z.B. für ein Rollo:

attr BU_RO_Fenster mqttDefaults retain=1
attr BU_RO_Fenster mqttPublish pct:topic="haus/buero/fenster/position"
attr BU_RO_Fenster mqttSubscribe pct:stopic={"haus/buero/fenster/position/set"} state:stopic={"haus/buero/fenster/state/set"}

Offline crom

  • Newbie
  • Beiträge: 2
Antw:HASS mit FHEM
« Antwort #19 am: 24 Februar 2020, 15:44:04 »
Hallo Zusammen im Forum.
Bis jetzt hab ich meine Antworten immer durch lesen im Forum beantworten können.
Bin jetzt seit 3 Jahren mit fhem unterwegs, wollte aber als Zweitsystem nun home assistent aufsetzen.
Da mein fhem sehr weit ausgebaut ist wollte ich die fhem-werte per mqtt (mosquitto in fhem) an home assistent übermitteln.
Soweit passt das auch ich sehe die Werte in der Console.
Von der fhem-Seite aus, bin ich damit durch.
Allerdings weiß ich auf home-assistant-Seite nicht weiter.
Ich weiß ,dass das nicht das hass.io Forum ist. Allerdings wird hier genau das Thema diskutiert und es ist das fehlende Puzzlestückchen.
Wie würde es denn auf home-assistant-Seite weitergehen, wenn in fhem alles im mqtt-broker läuft.

Grüße
cROM

Offline hsepm

  • Full Member
  • ***
  • Beiträge: 214
Antw:HASS mit FHEM
« Antwort #20 am: 24 Februar 2020, 17:35:34 »
Ich muss gestehen, dass bei mir inzwischen 80% meiner Heimautomation auf Home Assistant Core mit Nodered-Addon (als DOIF-Alternative) läuft. FHEM benutze ich weiterhin für Langzeit-Logging und CUL-Support.

Die Gewichte haben sich bei mir also verschoben. Die Automatisierung ist komplett nach Nodered gewandert. Ich habe in HA 0 Automatisierungen und in FHEM 0 DOIFs.

Generell ist es aber problemlos möglich, alle FHEM Geräte via MQTT an HA anzubinden, bzw. irgendwelche ZigBee-Netzwerke via Deconz oder Zigbee2Mqtt an FHEM und HA gleichzeitig anzubinden.

Beispiele für per MQTT angebundene FHEM-Geräte aus configuration.yaml:

# SYSSTAT
sensor: 
  - platform: mqtt
    name: "fhem_memory_use_percent"
    state_topic: "fhem/memory/usage"
    unit_of_measurement: "%"
    value_template: '{{ value | round(1) }}'
  - platform: mqtt
    name: "fhem_cpu_use_percent"
    state_topic: "fhem/cpu/usage"
    unit_of_measurement: "%"
    value_template: '{{ value | round(1) }}'
  - platform: mqtt
    name: "fhem_cpu_temp"
    state_topic: "fhem/cpu/temperature"
    unit_of_measurement: "°C"
    value_template: '{{ value | round(1) }}'

# Intertechno Schaltsteckdose
light:
  - platform: mqtt
    name: "Kamin"
    command_topic: "haus/esszimmer/kamin/set"
    state_topic: "haus/esszimmer/kamin"
    payload_on: "on"
    payload_off: "off"

# ROLLO
cover:
  - platform: mqtt
    name: "buero_fenster"
    command_topic: "haus/buero/fenster/state/set"
    set_position_topic: "haus/buero/fenster/position/set"
    position_topic: "haus/buero/fenster/position"
    position_open: 0
    position_closed: 100
    value_template: '{{ value | int }}'     
    retain: false
    qos: 1
    payload_open: "open"
    payload_close: "closed"
    payload_stop: "stop"
    state_open: open
    state_closed: closed
 

Nachtrag:

MQTT-Integration muss natürlich in HA aktiviert sein. Entweder manuell oder über Einstellungen --> Integrationen --> "+"
Theoretisch kann HA auch MQTT Autodiscovery, allerdings muss dafür per FHEM-Gerät eine MQTT-JSON-Nachricht zur Konfiguration erzeugt werden. Einfacher ist die manuelle Konfiguration per configuration.yaml.
« Letzte Änderung: 24 Februar 2020, 18:02:49 von hsepm »
Gefällt mir Gefällt mir x 2 Liste anzeigen

Offline crom

  • Newbie
  • Beiträge: 2
Antw:HASS mit FHEM
« Antwort #21 am: 25 Februar 2020, 00:06:13 »
Hallo hsepm!
Genau das hatte mir gefehlt. Nun klappt bei mir die Kommunikation zwischen fhem und Homeassistent.

Vielen Dank
cROM

Offline Christian1

  • New Member
  • *
  • Beiträge: 19
Antw:HASS mit FHEM
« Antwort #22 am: 31 Mai 2020, 12:35:51 »
Hello everybody, hello hsepm,

I have read carefully this post about how to send messages between Home Assistant and FHEM, but I am a beginner in FHEM and I don't understand all the process to make connexions with these 2 applications. Please can you help me to solve my problem : I want to launch/control my eltako FSB61NP (that I have succeeded to define on FHEM) with Home Assistant. I understand that the next steps are :
   1) to install/configure a MQTT server with Home Assistant (I have chosen MQTT Mosquitto broker : is it the good choice ?)
   2) to install/configure a MQTT on FHEM : but I don't understand which type of MQTT (and how) is the best and more compatible to send/receive message with the Home Assistant MQTT ?
   3) I understand that the 2 last things are to declare a cover on configuration.yaml, and a automation on automations.yaml but I really don't know what to write. Can you help me with the FHEM Eltako FSB61 definition bellow to understand/know what I should write ?
Thank you very much in advance for your help

Christian

define EnO_switch1_FSB61 EnOcean 05235687
setuuid EnO_switch1_FSB61 5ed2e2c0-f33f-2658-73bb-b4b6e746b02195bc
attr EnO_switch1_FSB61 IODev TCM310_0
attr EnO_switch1_FSB61 eep A5-3F-7F
attr EnO_switch1_FSB61 manufID 00D
attr EnO_switch1_FSB61 model Eltako_FSB61
attr EnO_switch1_FSB61 room EnOcean
attr EnO_switch1_FSB61 subType manufProfile
attr EnO_switch1_FSB61 webCmd opens:stop:closes
define FileLog_EnO_switch1_FSB61 FileLog ./log/EnO_switch1_FSB61-%Y.log EnO_switch1_FSB61
setuuid FileLog_EnO_switch1_FSB61 5ed2e2c0-f33f-2658-c8dd-01dd1c5e4b2c77c0
attr FileLog_EnO_switch1_FSB61 logtype text
attr FileLog_EnO_switch1_FSB61 room EnOcean

Offline Wuppi68

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2295
  • On the Highway to Shell
Antw:HASS mit FHEM
« Antwort #23 am: 01 Juni 2020, 00:32:41 »
Hi,

if you need FHEM for enocean only take a look at https://github.com/embyt/enocean-mqtt
if you need FHEM for more then this one it's best to wait for our specialists - they know the real threats for "mirror" a FHEM Device to MQTT.

And yes, mosquito is definitely not a bad choice

Ralf
Jetzt auf nem I3 und primär Homematic - kein Support für cfg Editierer

Support heißt nicht wenn die Frau zu Ihrem Mann sagt: Geh mal bitte zum Frauenarzt, ich habe Bauchschmerzen

Offline Christian1

  • New Member
  • *
  • Beiträge: 19
Antw:HASS mit FHEM
« Antwort #24 am: 01 Juni 2020, 23:41:53 »
Hi Ralf,

I thank you for your answer !
I am interested by your answer, because at this moment, I am drowned on how to configure MQTT , but I am determined to reach my project.
I think that I am quite close to the result, but as a beginner (that's why probably I have chosen Home Assistant), I discover too much new things (FHEM, MQTT, german ;-) ), beta-user takes the time to try to explain/help me in another threat (MQTT), but the very end is hard to reach for me :-(

Yes I need FHEM only for enocean,
So that's why I am also interested to your proposal that I have read carefully. I really would like to use this github enocean-mqtt, but I am beginner in this Unix process and the explanations are not enough acurate for me, I am pratically just able to type line by line what I need to do :-( 

For instance,
- does this enocean-mqtt already on my Raspberry PI, do I need to de something previously, on just open a terminal ?
- it asks to "download this repository to an arbritary directory" but I even don't know where the data are saved when I will write "pip install enocean-mqtt"
- I don't know if I need to setup as a daemon, as a docker container (I just know that I have installed Home Assistant in a container, and FHEM by the usual "sudo wget http://fhem.de/fhem-6.0.deb && sudo dpkg -i fhem-6.0.deb")
- I see /dev/ttyUSB0 but I use an EnOcean PI GPI so I use /dev/ttyS0 > I don't know if it is compatible ? I haven't find for the moment this parameter in the github
- In enoceanmqtt.conf.sample, some commands are # but I don't know if I need it (ssl certificate, mqtt_publish_json...), and most of all, even if I have succeeded to detect my actuator and my remote control (and to get their ID...), I don't know how to configure it into the enoceanmqtt.conf

What do you think about all that ?

Christian

Offline Wuppi68

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2295
  • On the Highway to Shell
Antw:HASS mit FHEM
« Antwort #25 am: 05 Juni 2020, 00:09:21 »
Hi Ralf,

I thank you for your answer !
I am interested by your answer, because at this moment, I am drowned on how to configure MQTT , but I am determined to reach my project.
I think that I am quite close to the result, but as a beginner (that's why probably I have chosen Home Assistant), I discover too much new things (FHEM, MQTT, german ;-) ), beta-user takes the time to try to explain/help me in another threat (MQTT), but the very end is hard to reach for me :-(

Yes I need FHEM only for enocean,
So that's why I am also interested to your proposal that I have read carefully. I really would like to use this github enocean-mqtt, but I am beginner in this Unix process and the explanations are not enough acurate for me, I am pratically just able to type line by line what I need to do :-( 

For instance,
- does this enocean-mqtt already on my Raspberry PI, do I need to de something previously, on just open a terminal ?
- it asks to "download this repository to an arbritary directory" but I even don't know where the data are saved when I will write "pip install enocean-mqtt"
- I don't know if I need to setup as a daemon, as a docker container (I just know that I have installed Home Assistant in a container, and FHEM by the usual "sudo wget http://fhem.de/fhem-6.0.deb && sudo dpkg -i fhem-6.0.deb")
- I see /dev/ttyUSB0 but I use an EnOcean PI GPI so I use /dev/ttyS0 > I don't know if it is compatible ? I haven't find for the moment this parameter in the github
- In enoceanmqtt.conf.sample, some commands are # but I don't know if I need it (ssl certificate, mqtt_publish_json...), and most of all, even if I have succeeded to detect my actuator and my remote control (and to get their ID...), I don't know how to configure it into the enoceanmqtt.conf

What do you think about all that ?

Christian

sorry for the long waiting.

I only took a quick look to the git repository and it looks well. You can run it "easily" within docker. You can find the docker image here: https://hub.docker.com/r/flopon/enocean-mqtt at the "tags" tab you will find instruction to get the ready image. Or just type in "docker run flopon/enocean-mqtt" to single start this image. I don't use it. If you have further questions you can ask me to get it basically running
Jetzt auf nem I3 und primär Homematic - kein Support für cfg Editierer

Support heißt nicht wenn die Frau zu Ihrem Mann sagt: Geh mal bitte zum Frauenarzt, ich habe Bauchschmerzen

Offline rizo

  • Full Member
  • ***
  • Beiträge: 241
Antw:HASS mit FHEM
« Antwort #26 am: 17 November 2020, 14:54:52 »
Hallo liebe Leute

Ich bin gerade angefangen Home Assistant zu nutzen und Geräte von Fhem per mqtt zu "teilen".

Schalter und Schaltbare Steckdosen sind alle kein Problem gewesen.

Ich scheitere allerdings bei den Thermostaten.

Hat da jmd ein Config Beispiel?

Offline rizo

  • Full Member
  • ***
  • Beiträge: 241
Antw:HASS mit FHEM
« Antwort #27 am: 20 November 2020, 12:08:26 »
Niemand der helfen kann?

Offline NecDd

  • New Member
  • *
  • Beiträge: 19
Antw:HASS mit FHEM
« Antwort #28 am: 21 März 2021, 14:18:16 »
Hi @rizo,
a bit late but hope it still helps.

My config:
-Raspberry Pi @ Raspbian Lite
-Docker +Portainer
-Home Assistnat Supervised in Docker
-MQTT integration in Home Assistant
-Fhem (normaly installed)

In FHEM:
1.
defmod hass_MQTT2 MQTT2_CLIENT 172.30.32.1:1883
attr hass_MQTT2 clientId fhem
attr hass_MQTT2 keepaliveTimeout 60
attr hass_MQTT2 msgAfterConnect -r fhem/connection/status connected
attr hass_MQTT2 msgBeforeDisconnect -r fhem/connection/status disconnected
attr hass_MQTT2 qosMaxQueueLength 100
attr hass_MQTT2 room MQTT
attr hass_MQTT2 username mqtt

IP of HA you can find it over SSH withifconfigSecure it woth a User+Pass in HA. In FHEM attr hass_MQTT2 username mqtt and set hass_MQTT2 password <your_password>
define a MQTT Bridge in FHEM:
defmod mqttGeneric MQTT_GENERIC_BRIDGE
attr mqttGeneric IODev ha_MQTT2
attr mqttGeneric event-aggregator incoming-count:120,outgoing-count:120,transmission-state:120
attr mqttGeneric globalDefaults sub:qos=2 pub:qos=0 retain=1 base={"fhem/$device"}
attr mqttGeneric globalPublish *:topic={"fhem/$device/$reading"}
attr mqttGeneric icon mqtt_bridge_2
attr mqttGeneric room MQTT
attr mqttGeneric stateFormat in: incoming-count out: outgoing-count devices: device-count
attr mqttGeneric verbose 0

The Thermostat (MAX!) in FHEM:
defmod HT_Ba MAX HeatingThermostat 13822d
attr HT_Ba IODev CUL.MAX
attr HT_Ba model HeatingThermostat
attr HT_Ba mqttDefaults base={"$base/HT/Ba"}
attr HT_Ba mqttPublish *:topic={"fhem/$device/$reading"}
attr HT_Ba mqttSubscribe desiredTemperature:stopic={"$base/desiredTemperature"}
attr HT_Ba room MAX
Of course you will need a CUL or a MAX! Bridge to comunicate with it. You can use a Homematic TRV defined in FHEM, but you have to change the mqttSubscribe desiredTemperature to desired-temp.

In Home Assistant (MQTT and File editor integrations must be active):
in /config/configuration.yaml: climate: !include climate.yaml
Create a empty file climate.yaml
In climate.yaml:
### 1. TRV Bathroom
- platform: "mqtt"
   name: "HT_Ba"
   retain: false
   current_temperature_topic: "fhem/HT_Ba/temperature"
   temperature_state_topic: "fhem/HT_Ba/desiredTemperature"
   temperature_command_topic: "fhem/HT_Ba/HT/Ba/desiredTemperature"
   min_temp: 5
   max_temp: 25
   temp_step: 0.5
   modes: ["auto","manual","off","boost"]
   mode_state_topic: "fhem/HT_Ba/mode"
### 1. END TRV Bathroom ################
For HomeMatic TRV change the reading acording to readings of the thermostat, or use MQTT.fx to find/see them.


in /config/configuration.yaml: sensor: !include sensors.yaml

In sensors.yaml:
### 1 sensors TRV Bathroom ################
- platform: "mqtt"
  name: "HT_Ba valveposition"
  state_topic: "fhem/HT_Ba/valveposition"
  unit_of_measurement: "%"
#
- platform: "mqtt"
  state_topic: "fhem/HT_Ba/temperature"
  name: "HT_Ba temperature"
  unit_of_measurement: "°C"
#
- platform: "mqtt"
  name: "HT_Ba desiredTemperature"
  state_topic: "fhem/HT_Ba/desiredTemperature"
  unit_of_measurement: "°C"

- platform: "mqtt"
  name: "HT_Ba mode"
  state_topic: "fhem/HT_Ba/mode"

- platform: "mqtt"
  name: "HT_Ba battery"
  state_topic: "fhem/HT_Ba/battery"
   

To use the BOOST function, create a Switch:
in /config/configuration.yaml: switch: !include switch.yaml
In switch.yaml:
- platform: mqtt
  name: "Ba_Boost"
  command_topic: "fhem/HT_Ba/HT/Ba/desiredTemperature"
  state_topic: "fhem/HT_Ba/mode"
  payload_on: "boost"
  payload_off: "manual"
  state_on: "boost"
  state_off: "manual"
  optimistic: true
  qos: 0
  retain: true

In HA, you can use Thermostat Card pointing it to the right entity. In atached picture I use "custom:simple-thermostat" Installed over HACS.

Best Regards
Gefällt mir Gefällt mir x 1 Liste anzeigen

Offline NecDd

  • New Member
  • *
  • Beiträge: 19
Antw:HASS mit FHEM
« Antwort #29 am: 22 März 2021, 10:27:06 »
Forgot to put the config for HomeMatic TRV  (HM-CC-RT-DN):

defmod HT_Bucatarie CUL_HM 21DD9F04
attr HT_Bucatarie userattr lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
attr HT_Bucatarie genericDeviceType thermostat
attr HT_Bucatarie group 0_HT
attr HT_Bucatarie homebridgeMapping TargetTemperature=desired-temp::desired-temp,minValue=5,maxValue=29,minStep=0.5,nocache=1\
CurrentTemperature=HT_Bucatarie:measured-temp,nocache=1\
StatusLowBattery=TH_Bucatarie:battery,values=ok:BATTERY_LEVEL_NORMAL;;;;/^.*/:BATTERY_LEVEL_LOW\
TargetHeatingCoolingState=heatingState,values=OFF:0;;;;HEAT:1;;;;COOL:2;;;;AUTO:3,cmds=OFF:controlManu+off;;;;HEAT:controlMode+boost;;;;AUTO:controlMode+auto;;;;COOL:controlManu+17.0\
CurrentHeatingCoolingState=heatingState,values=OFF:0;;;;HEAT:1;;;;COOL:2;;;;AUTO:0,valud=OFF
attr HT_Bucatarie model HM-CC-RT-DN
attr HT_Bucatarie mqttDefaults base={"$base/HT_Bu"}
attr HT_Bucatarie mqttPublish *:topic={"fhem/$device/$reading"}
attr HT_Bucatarie mqttSubscribe desired-temp:stopic={"$base/desired-temp"} controlMode:stopic={"$base/controlMode"}
attr HT_Bucatarie peerIDs 00000000
attr HT_Bucatarie room Incalzire Centrala
attr HT_Bucatarie siriName Kitchen Heating

Actualy you have to take care that the mqttPub and mqttSub are diferent topics bcz you can runn in a comand loop.
Homebridge integration you don't have to use it. I use it just bcz my whife has an Iphone and she find it confortable.

HASS as a Switch for Boost:
##################################
### -= BOOST=- ###################
##################################
######
- platform: mqtt
  name: "Boost_Bu"
  command_topic: "fhem/HT_Bucatarie/HT_Bu/controlMode"
  state_topic: "fhem/HT_Bucatarie/controlMode"
  payload_on: "boost"
  payload_off: "manual"
  state_on: "boost"
  state_off: "manual"
  optimistic: true
  qos: 0
  retain: true
####

HASS Climate:
### HT Bucatarie
- platform: "mqtt"
  name: "HT_Bu"
  retain: false
  current_temperature_topic: "fhem/HT_Bucatarie/measured-temp"
  temperature_state_topic: "fhem/HT_Bucatarie/desired-temp"
  temperature_command_topic: "fhem/HT_Bucatarie/HT_Bu/desired-temp"
  min_temp: 5
  max_temp: 25
  temp_step: 0.5
  modes: ["auto","manual","off","boost"]
  mode_state_topic: "fhem/HT_Bucatarie/controlMode"
### 1. END ################

HASS sensors for TRV:
## MQTT HT Bucatarie
- platform: "mqtt"
  name: "HT_Bu valveposition"
  state_topic: "fhem/HT_Bucatarie/ValvePosition"
  unit_of_measurement: "%"
#
- platform: "mqtt"
  name: "HT_Bu temperature"
  state_topic: "fhem/HT_Bucatarie/measured-temp"
  unit_of_measurement: "°C"
#
- platform: "mqtt"
  name: "HT_Bu desiredTemperature"
  state_topic: "fhem/HT_Bucatarie/desired-temp"
  unit_of_measurement: "°C"

- platform: "mqtt"
  name: "HT_Bu mode"
  state_topic: "fhem/HT_Bucatarie/controlMode"
## HT Bucatarie Battery State ###
- platform: "mqtt"
  name: "HT_Bu battery"
  state_topic: "fhem/HT_Bucatarie/battery"
#
# TH Bucatarie Battery Level ###
- platform: "mqtt"
  name: "TH_Bu Battery"
  state_topic: "fhem/TH_Bucatarie/batteryLevel"
  unit_of_measurement: "V"
#

Window sensors has to be defined as Binary Sensors:
MAX! config @HA
################
#   -= Bucatarie=-   #
- platform: mqtt
  name: "Win_Bu"
  device_class: opening
  state_topic: "fhem/W_BuUP/onoff"
  payload_on: "1"
  payload_off: "0"
  qos: 0
HomeMatic (HM-SEC-SCO) config @HA
#   -= Door Intrare=-   #
- platform: mqtt
  name: "Door_Intrare"
  device_class: opening
  state_topic: "fhem/USA/state"
  payload_on: "opened"
  payload_off: "closed"
  qos: 0
Gefällt mir Gefällt mir x 1 Liste anzeigen

 

decade-submarginal