MQTT-Devices direkt in ASC einbinden

Begonnen von cornelius fillmore, 30 Juli 2019, 07:36:35

Vorheriges Thema - Nächstes Thema

cornelius fillmore

Hallo Forum,
hat einer von euch MQTT-Devices direkt in ASC eingebunden?
Wenn ja wie denn
Oder geht ihr den Weg über ein Rollo-Device?
3 x Fhem 5.9 mit RPI

Beta-User

Wie üblich: zeig' doch bitte erst mal das "Problem", das du hast... (Also z.B.: "Ich habe hier lauter Shelly2 verbaut und will damit meine Rollläden besser steuern, anbei ein list.")

So ist es "Gestocher im Nebel".

Trotzdem noch ein paar allgemeine Anmerkungen:
Es ist grundsätzlich besser, den jeweiligen Aktor den Job machen zu lassen, ROLLO ist daher eine super-Sache, wenn es nicht anders geht.

Geht es aber, jedenfalls, wenn man entweder einen mehrkanaligen Tasmota-geflashten Aktor nutzt (da gibt es eine spezielle firmware-Variante, die das Rolladen-spezifische timing kann) oder einen Shelly2(.5) im Roller-Modus.

Für die Einbindung als MQTT2_DEVICE (verwendest du das?!?) gibt es auch ein paar attrTemplates, mit denen das zum einen recht einfach zu konfigurieren wäre, und zum anderen stehen da über "set <mqtt2-device> attrTemplate ?" einige Hinweise und Links (wenn man den entsprechenden topic-Pfad hat); ansonsten bitte direkt in der file mqtt2.template nachsehen.

Das war übrigens das letzte Mal, dass ich auf eine von dir gestellte unspezifische Frage (s.o.) antworte (dass ich das überhaupt gemacht habe, liegt an dem generischen Titel, der evtl. weitere User hierher leitet...).
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

cornelius fillmore

Anbei die list des Gerätes welches ich das ASC-Modul integrieren möchte

MQTT-Device
Internals:
   CFGFN     
   CID        DVES_CCD134
   DEF        DVES_CCD134
   DEVICETOPIC MQTT2_DVES_CCD134
   FUUID      5d407907-f33f-4662-e0d4-51b36e8de6462d6c
   IODev      MQTT2_FHEM_Server
   LASTInputDev MQTT2_FHEM_Server
   MQTT2_FHEM_Server_MSGCNT 101
   MQTT2_FHEM_Server_TIME 2019-07-30 19:22:14
   MSGCNT     101
   NAME       MQTT2_DVES_CCD134
   NR         5353
   STATE      <a href="http://192.168.0.60" target="_blank">
Online
</a>
set_open
   TYPE       MQTT2_DEVICE
   OLDREADINGS:
   READINGS:
     2019-07-30 19:10:34   Command         Error
     2019-07-30 19:11:02   FallbackTopic   cmnd/DVES_CCD134_fb/
     2019-07-30 19:11:02   GroupTopic      Rollos
     2019-07-30 19:21:11   Heap            28
     2019-07-30 19:11:02   Hostname        sonoff-4404
     2019-07-30 19:11:02   IPAddress       192.168.0.60
     2019-07-30 19:11:02   LWT             Online
     2019-07-30 19:10:34   LedState        2
     2019-07-30 19:21:11   LoadAvg         19
     2019-07-30 19:11:02   Module          Sonoff Dual R2
     2019-07-30 19:11:02   POWER           
     2019-07-30 19:22:14   POWER1          off
     2019-07-30 19:21:11   POWER2          off
     2019-07-30 19:10:32   Restart         Restarting
     2019-07-30 19:11:02   RestartReason   Software/System restart
     2019-07-30 19:22:14   SHUTTER-1_direction 0
     2019-07-30 19:22:14   SHUTTER-1_position 0
     2019-07-30 19:22:14   SHUTTER1        0
     2019-07-30 19:10:53   SaveData        on
     2019-07-30 19:10:33   SetOption26     on
     2019-07-30 19:10:34   SetOption80     on
     2019-07-30 19:10:34   SetOption81     on
     2019-07-30 19:21:11   Sleep           50
     2019-07-30 19:21:11   SleepMode       Dynamic
     2019-07-30 19:10:32   StateText1      off
     2019-07-30 19:10:32   StateText2      on
     2019-07-30 19:10:32   StateText3      toggle
     2019-07-30 19:10:33   StateText4      hold
     2019-07-30 19:10:35   SwitchMode1     3
     2019-07-30 19:10:35   SwitchMode2     3
     2019-07-30 19:21:11   Time            2019-07-30T18:21:10
     2019-07-30 19:21:11   Uptime          0T00:10:14
     2019-07-30 19:11:02   Version         6.6.0.1 stb-1.5(sonoff)
     2019-07-30 19:11:02   WebServerMode   Admin
     2019-07-30 19:21:11   Wifi_AP         1
     2019-07-30 19:21:11   Wifi_BSSId      A0:04:60:39:82:5D
     2019-07-30 19:21:11   Wifi_Channel    13
     2019-07-30 19:21:11   Wifi_DeepSleep  0
     2019-07-30 19:21:11   Wifi_Downtime   0T00:00:04
     2019-07-30 19:21:11   Wifi_Heap       29264
     2019-07-30 19:21:11   Wifi_LinkCount  1
     2019-07-30 19:21:11   Wifi_RSSI       100
     2019-07-30 19:21:11   Wifi_SSId       NETGEAR23
     2019-07-30 19:10:52   shutterclose1   0
     2019-07-30 19:13:23   shuttercloseduration1 20.0
     2019-07-30 19:10:52   shutterinvert1  1
     2019-07-30 19:21:44   shutteropen1    0
     2019-07-30 19:11:28   shutteropenduration1 30.0
     2019-07-30 19:10:49   shutterstop1    41
     2019-07-30 19:21:44   state           set_open
     2019-07-30 19:13:23   x_configuration set SHUTTERCLOSEDURATION 20
Attributes:
   ASC        1
   IODev      MQTT2_FHEM_Server
   cmdIcon    open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50
   comment    After applying the template set SHUTTEROPENDURATION and SHUTTERCLOSEDURATION first.
Use the "set x_configuration" Option. Example: "set x_configuration SHUTTEROPENDURATION 35"
Shutter specific commands available: SHUTTEROPENDURATION, SHUTTERCLOSEDURATION, SHUTTERRELAY, SHUTTER50PERCENT, SHUTTERSETCLOSE, SHUTTERINVERT; you may use this for general setOptions in tasmota also.
commands may need restart to take effect.
For calibration and further information on the available commands see https://github.com/stefanbode/Sonoff-Tasmota/wiki/Shutter-blinds-working-with-two-relays.
   devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red Online:10px-kreis-gruen Offline:10px-kreis-rot 100:fts_shutter_100 0:fts_shutter_10 9\d.*:fts_shutter_90 8\d.*:fts_shutter_80 7\d.*:fts_shutter_70 6\d.*:fts_shutter_60 5\d.*:fts_shutter_50 4\d.*:fts_shutter_40 3\d.*:fts_shutter_30 2\d.*:fts_shutter_20 1\d.*:fts_shutter_10 \b\d\b.*:fts_shutter_10 set_.*:fts_shutter_updown
   model      A_02b_tasmota_2ch_shutter_invert_1
   readingList TELETOPIC/LWT:.* LWT
   STATTOPIC/RESULT:.* { json2nameValue($EVENT) }
   STATTOPIC/POWER1:.* POWER1
   STATTOPIC/POWER1:on {{'state' => 'opening'}}
   STATTOPIC/POWER2:.* POWER2
   STATTOPIC/POWER2:on {{'state' => 'closing'}}
   STATTOPIC/SHUTTER1:.* state
   STATTOPIC/SHUTTER1:.* pct
   TELETOPIC/RESULT:.* { json2nameValue($EVENT) }
   TELETOPIC/STATE:.* { json2nameValue($EVENT) }
   TELETOPIC/SENSOR:.* { json2nameValue($EVENT) }
   TELETOPIC/INFO.:.* { json2nameValue($EVENT) }
   TELETOPIC/UPTIME:.* { json2nameValue($EVENT) }
DVES_CCD134:stat/sonoff/RESULT:.* { json2nameValue($EVENT) }
DVES_CCD134:tele/sonoff/LWT:.* LWT
DVES_CCD134:cmnd/sonoff/POWER:.* POWER
DVES_CCD134:tele/sonoff/INFO1:.* { json2nameValue($EVENT) }
DVES_CCD134:tele/sonoff/INFO2:.* { json2nameValue($EVENT) }
DVES_CCD134:tele/sonoff/INFO3:.* { json2nameValue($EVENT) }
DVES_CCD134:stat/sonoff/POWER1:.* POWER1
DVES_CCD134:stat/sonoff/POWER2:.* POWER2
DVES_CCD134:stat/sonoff/SHUTTER1:.* SHUTTER1
DVES_CCD134:tele/sonoff/RESULT:.* { json2nameValue($EVENT) }
DVES_CCD134:tele/sonoff/STATE:.* { json2nameValue($EVENT) }
DVES_CCD134:tele/sonoff/SENSOR:.* { json2nameValue($EVENT) }
   room       Arbeitszimmer
   setList    close:noArg cmnd/sonoff/SHUTTERCLOSE
   open:noArg cmnd/sonoff/SHUTTEROPEN
   half:noArg cmnd/sonoff/SHUTTERPOSITION 50
   pct:slider,0,1,100 cmnd/sonoff/SHUTTERPOSITION $EVTPART1
   stop:noArg cmnd/sonoff/SHUTTERSTOP
   resetClose:noArg cmnd/sonoff/SHUTTERSETCLOSE
   x_configuration cmnd/sonoff/$EVTPART1 $EVTPART2
   setStateList open close half stop pct
   stateFormat <a href="http://IPAddress" target="_blank">
LWT
</a>
state
   webCmd     :open:close:half:stop:pct

und die List des ASC
Internals:
   FUUID      5d3b415c-f33f-4662-d656-ec86b288b5fb270d
   FVERSION   73_AutoShuttersControl.pm:v0.6.21-s19814/2019-07-10 UNDER DEVELOP
   MID        da39a3ee5e6b4b0d3255bfef95601890afd80709
   NAME       ASC
   NOTIFYDEV  global,ASC,Rollo_Arbeitszimmer,Rollo_Bad,Rollo_EZ_Dach,Rollo_EZ_Velux,Rollo_Esszimmer,Rollo_Galerie_li,Rollo_Galerie_re,Rollo_Kueche,Rollo_Raven,Rollo_Schlafen,Rollo_Wohnen_Mitte,Rollo_Wohnen_li_1,Rollo_Wohnen_li_2,Rollo_Wohnen_re_1,Rollo_Wohnen_re_2,HM_65DEE4,AktuelleTemp,Rollo_Wohnen_re_2,Rollo_Galerie_re,MQTT2_VELUX_Esszimmer_976FB9,Rollo_Galerie_li,Rollo_EZ_Velux,Rollo_Raven,Rollo_Wohnen_li_2,Rollo_Schlafen,Rollo_Kueche,Rollo_Esszimmer,JaroFB,HM_65D84D,Twilight,Rollo_Arbeitszimmer,Rollo_Wohnen_li_1,Rollo_Wohnen_re_1
   NR         500
   NTFY_ORDER 51-ASC
   STATE      created new drive timer
   TYPE       AutoShuttersControl
   VERSION    v0.6.21
   OLDREADINGS:
   READINGS:
     2019-07-29 22:06:58   HM_65D84D_PosValue 0
     2019-07-30 05:06:58   HM_65D84D_lastPosValue 0
     2019-07-29 18:20:03   HM_65DEE4_PosValue 0
     2019-07-30 05:06:58   HM_65DEE4_lastPosValue 0
     2019-07-30 05:06:58   JaroFB_lastPosValue 0
     2019-07-29 05:05:21   MQTT2_VELUX_Esszimmer_976FB9_lastPosValue 0
     2019-07-30 06:12:42   Rollo_Arbeitszimmer_PosValue 100
     2019-07-30 06:30:02   Rollo_Arbeitszimmer_lastPosValue 11.1111111111111
     2019-07-30 19:18:29   Rollo_Arbeitszimmer_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-30 06:30:07   Rollo_Bad_PosValue 0
     2019-07-30 06:30:02   Rollo_Bad_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Bad_nextAstroTimeEvent 30.07.2019 - 21:55
     2019-07-30 06:36:01   Rollo_EZ_Dach_lastPosValue 0
     2019-07-30 19:18:29   Rollo_EZ_Dach_nextAstroTimeEvent 31.07.2019 - 06:00
     2019-07-29 05:30:27   Rollo_EZ_Velux_PosValue 100
     2019-07-30 06:30:02   Rollo_EZ_Velux_lastPosValue 100
     2019-07-30 19:18:29   Rollo_EZ_Velux_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-29 22:06:38   Rollo_Esszimmer_PosValue 99
     2019-07-30 06:30:02   Rollo_Esszimmer_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Esszimmer_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-29 13:36:17   Rollo_Galerie_li_PosValue 0
     2019-07-30 06:30:02   Rollo_Galerie_li_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Galerie_li_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-29 13:36:17   Rollo_Galerie_re_PosValue 0
     2019-07-30 06:30:02   Rollo_Galerie_re_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Galerie_re_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-30 06:10:27   Rollo_Kueche_PosValue 100
     2019-07-30 06:30:02   Rollo_Kueche_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Kueche_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-29 05:30:23   Rollo_Raven_PosValue 100
     2019-07-30 06:30:02   Rollo_Raven_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Raven_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-30 06:30:02   Rollo_Schlafen_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Schlafen_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-30 05:06:58   Rollo_VELUX_Esszimmer_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Wohnen_Mitte_nextAstroTimeEvent 30.07.2019 - 21:55
     2019-07-29 13:35:34   Rollo_Wohnen_li_1_PosValue 0
     2019-07-30 06:30:02   Rollo_Wohnen_li_1_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Wohnen_li_1_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-29 13:35:35   Rollo_Wohnen_li_2_PosValue 0
     2019-07-30 06:30:02   Rollo_Wohnen_li_2_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Wohnen_li_2_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-29 13:35:35   Rollo_Wohnen_re_1_PosValue 0
     2019-07-30 06:30:02   Rollo_Wohnen_re_1_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Wohnen_re_1_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-29 13:35:36   Rollo_Wohnen_re_2_PosValue 0
     2019-07-30 06:30:02   Rollo_Wohnen_re_2_lastPosValue 0
     2019-07-30 19:18:29   Rollo_Wohnen_re_2_nextAstroTimeEvent 30.07.2019 - 22:00
     2019-07-30 05:56:41   ascEnable       on
     2019-07-26 20:51:57   controlShading  on
     2019-07-26 20:07:24   hardLockOut     off
     2019-07-30 19:18:24   room_Arbeitszimmer_SD_Keeloq_Steuerung-_Logik Rollo_Arbeitszimmer
     2019-07-30 19:18:24   room_Bad_Steuerung-_Rolladen Rollo_Bad
     2019-07-30 19:18:24   room_Ezimmer_Steuerung-_Rolladen Rollo_EZ_Dach
     2019-07-30 19:18:24   room_SD_Keeloq_Ezimmer Rollo_EZ_Velux,Rollo_Esszimmer
     2019-07-30 19:18:24   room_SD_Keeloq_Galerie Rollo_Galerie_li,Rollo_Galerie_re
     2019-07-30 19:18:24   room_SD_Keeloq_K__che Rollo_Kueche
     2019-07-30 19:18:24   room_SD_Keeloq_Schlafzimmer Rollo_Raven
     2019-07-30 19:18:24   room_SD_Keeloq_Wohnzimmer Rollo_Wohnen_li_2,Rollo_Wohnen_re_1,Rollo_Wohnen_re_2
     2019-07-30 19:18:24   room_Schlafzimmer Rollo_Schlafen
     2019-07-30 19:18:24   room_Steuerung-_Logik_Wohnzimmer Rollo_Wohnen_li_1
     2019-07-30 19:18:24   room_Steuerung-_Rolladen_Wohnzimmer Rollo_Wohnen_Mitte
     2019-07-26 20:07:24   selfDefense     off
     2019-07-30 19:18:29   state           created new drive timer
     2019-07-28 16:39:21   sunriseTimeWeHoliday on
     2019-07-28 13:13:05   test_PosValue   70
     2019-07-30 19:18:24   userAttrList    rolled out
   helper:
     shuttersList:
       Rollo_Arbeitszimmer
       Rollo_Bad
       Rollo_EZ_Dach
       Rollo_EZ_Velux
       Rollo_Esszimmer
       Rollo_Galerie_li
       Rollo_Galerie_re
       Rollo_Kueche
       Rollo_Raven
       Rollo_Schlafen
       Rollo_Wohnen_Mitte
       Rollo_Wohnen_li_1
       Rollo_Wohnen_li_2
       Rollo_Wohnen_re_1
       Rollo_Wohnen_re_2
   monitoredDevs:
     AktuelleTemp:
       Rollo_Arbeitszimmer ASC_BrightnessSensor
     HM_65D84D:
     HM_65DEE4:
     JaroFB:
     MQTT2_VELUX_Esszimmer_976FB9:
     Rollo_Arbeitszimmer:
     Rollo_EZ_Dach:
     Rollo_EZ_Velux:
     Rollo_Esszimmer:
     Rollo_Galerie_li:
     Rollo_Galerie_re:
     Rollo_Kueche:
     Rollo_Raven:
     Rollo_Schlafen:
     Rollo_Wohnen_li_1:
     Rollo_Wohnen_li_2:
     Rollo_Wohnen_re_1:
     Rollo_Wohnen_re_2:
     Twilight:
       ASC        ASC_twilightDevice
Attributes:
   ASC_autoAstroModeEvening CIVIL
   ASC_autoAstroModeMorning CIVIL
   ASC_autoShuttersControlComfort on
   ASC_autoShuttersControlEvening on
   ASC_autoShuttersControlMorning on
   ASC_brightnessDriveUpDown 1
   ASC_freezeTemp -2
   ASC_tempSensor AktuelleTemp:state
   ASC_twilightDevice Twilight
   devStateIcon selfDefense.terrace:fts_door_tilt created.new.drive.timer:clock .*asleep:scene_sleeping roommate.(awoken|home):user_available residents.(home|awoken):status_available manual:fts_shutter_manual selfDefense.active:status_locked selfDefense.inactive:status_open day.open:scene_day night.close:scene_night shading.in:weather_sun shading.out:weather_cloudy
   icon       fts_shutter_automatic
   room       Steuerung->ASC
3 x Fhem 5.9 mit RPI

Beta-User

Mobil+kurz:ReadingList ist kaputt. Bitte löschen, warten, bis wieder angelegt v. autocreate, RAW-Kopie auf die Seite+template nochmal anwenden.Dann ggf. Beides Posten vor/nach template.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

Beta-User

Etwas längere Fassung:

Im template war ein Fehler drin, aufgrund dem die Variablen STATTOPIC und TELETOPIC nicht aufgelöst werden konnten. Update kommt morgen, kannst du ggf. auch manuell ändern (STATTOPIC wäre stat/sonoff, TELETOPIC tele/sonoff).
Du solltest dem Teil (in dessen Web-Interface, siehe Wiki - Praxisbeispiele) aber ggf. noch einen "besseren" Namen verpassen wie "sonoff", ich empfehle gerne DVES_%06X.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

cornelius fillmore

Zitat von: Beta-User am 31 Juli 2019, 09:55:00
Etwas längere Fassung:

Im template war ein Fehler drin, aufgrund dem die Variablen STATTOPIC und TELETOPIC nicht aufgelöst werden konnten. Update kommt morgen, kannst du ggf. auch manuell ändern (STATTOPIC wäre stat/sonoff, TELETOPIC tele/sonoff).
Dann warte ich
ZitatDu solltest dem Teil (in dessen Web-Interface, siehe Wiki - Praxisbeispiele) aber ggf. noch einen "besseren" Namen verpassen wie "sonoff", ich empfehle gerne DVES_%06X.
Das probiere ich mal aus
3 x Fhem 5.9 mit RPI