Autor Thema: Fragen zur Konfiguration von Templates  (Gelesen 7288 mal)

Offline coolice

  • Full Member
  • ***
  • Beiträge: 480
Fragen zur Konfiguration von Templates
« am: 06 Mai 2021, 18:13:47 »
Hallo, könnte mir jemand ein Beispiel geben wie ich den Pfeil rechts hinbekomme, sodass die einzelnen Rauchmelder angezeigt werden damit man erkennen kann welcher angeschlagen hat?

Danke vorab.
Grüße Mirco
« Letzte Änderung: 07 Mai 2021, 14:08:59 von jemu75 »

Offline floerke

  • New Member
  • *
  • Beiträge: 7
Antw:Fragen zur Konfiguration von Templates
« Antwort #1 am: 06 Mai 2021, 19:54:53 »
Hallo, könnte mir jemand ein Beispiel geben wie ich den Pfeil rechts hinbekomme, sodass die einzelnen Rauchmelder angezeigt werden damit man erkennen kann welcher angeschlagen hat?

Danke vorab.
Grüße Mirco

Hallo Mirco,
z. B. in dem Du per Link auf eine entsprechende Gruppe verweist. Hier ein Beispiel mit Rollläden.

{ "panel": {"status": ["state:closed:geschlossen:100:success", "state:open:geöffnet:0:success", "state:undefined:teilweise geschlossen :50:success"], "btn": "mdi-chevron-right", "link": "/devices/group=Rollläden"},"name":"Jalousien" }
Viele Grüße

Marian

Gefällt mir Gefällt mir x 2 Liste anzeigen

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 688
    • FHEM App
Antw:Fragen zur Konfiguration von Templates
« Antwort #2 am: 07 Mai 2021, 13:48:16 »
Ein wichtiger Bestandteil von FHEMApp bildet die Konfiguration von Templates. Wenn Ihr Fragen zur Konfiguration via appOptions oder zur Erstellung eigener Templates habt, dann könnt ihr diese hier einstellen.

Offline Cluni

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 853
Antw:Fragen zur Konfiguration von Templates
« Antwort #3 am: 11 Mai 2021, 13:08:26 »
Ich versuche gerade das Shutter-Template zu verändern. Ich hätte gerne, dass bei

geöffnet: der Balken ganz orange
geschlossen: der Balken ganz grün
und dazwischen: der Balken in Prozenten gelb

angezeigt wird.

Dazu habe ich das Template wie folgt verändert:

{
  "name": "shutter3",
  "author": "jemu75/BHE",
  "date": "2021-05-11",
  "status": {
    "bar": ["pct:0:100:success","pct:100:100:orange","pct::%n:yellow"],
    "error": []
  },
  "main": [
    {
      "leftBtn": "mdi-chevron-down",
      "leftClick": ["motor:stop:off","motor::stop"],
      "leftLong": ["motor::off"],
      "leftLongRelease": ["motor::stop"],
      "text": ["motor:up:öffnet...","motor:down:schließt...","pct:1:offen","pct::geschlossen"],
      "rightBtn": "mdi-chevron-up",
      "rightClick": ["motor:stop:on","motor::stop"],
      "rightLong": ["motor::on"],
      "rightLongRelease": ["motor::stop"]
    }
  ],
  "info": {
    "left1": ["motor:up::mdi-window-shutter-alert","motor:down::mdi-window-shutter-alert","pct:1::mdi-window-shutter-open","pct:::mdi-window-shutter"],
    "left2": ["pct::%s% geöffnet"]
  }
}

Damit ist der Balken aber immer komplett grün.

Beim Switch funktioniert das doch auch mit
"bar": ["state:on:100:success","state:off:0:success"],Warum bei mir nicht?

Grüße Bernd

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 688
    • FHEM App
Antw:Fragen zur Konfiguration von Templates
« Antwort #4 am: 11 Mai 2021, 13:24:47 »
Ich versuche gerade das Shutter-Template zu verändern. Ich hätte gerne, dass bei

geöffnet: der Balken ganz orange
geschlossen: der Balken ganz grün
und dazwischen: der Balken in Prozenten gelb

angezeigt wird.

Dazu habe ich das Template wie folgt verändert:

{
  "name": "shutter3",
  "author": "jemu75/BHE",
  "date": "2021-05-11",
  "status": {
    "bar": ["pct:0:100:success","pct:100:100:orange","pct::%n:yellow"],
    "error": []
  },
  "main": [
    {
      "leftBtn": "mdi-chevron-down",
      "leftClick": ["motor:stop:off","motor::stop"],
      "leftLong": ["motor::off"],
      "leftLongRelease": ["motor::stop"],
      "text": ["motor:up:öffnet...","motor:down:schließt...","pct:1:offen","pct::geschlossen"],
      "rightBtn": "mdi-chevron-up",
      "rightClick": ["motor:stop:on","motor::stop"],
      "rightLong": ["motor::on"],
      "rightLongRelease": ["motor::stop"]
    }
  ],
  "info": {
    "left1": ["motor:up::mdi-window-shutter-alert","motor:down::mdi-window-shutter-alert","pct:1::mdi-window-shutter-open","pct:::mdi-window-shutter"],
    "left2": ["pct::%s% geöffnet"]
  }
}

Damit ist der Balken aber immer komplett grün.

Beim Switch funktioniert das doch auch mit
"bar": ["state:on:100:success","state:off:0:success"],Warum bei mir nicht?

Grüße Bernd

Es liegt an der Reihenfolge. Die Wertprüfung bei Zahlenwerte funktioniert nach "größer oder gleich". D.h. die Definition mit dem größten Wert muss immer zuerst angegeben werden. Danach in absteigender Folge alle weitere Werte. In deinem Fall dann
1) 100 -> orange
2) 1 -> yellow
3) 0 -> success
I'm letzten Prüfschritt kannst du den Wert (im Beispiel die 0) weglassen. Dann wird die Farbe für alle restliche Werte angezeigt.

Melde Dich gern, wenn Du noch Fragen hast.  :)

Offline Cluni

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 853
Antw:Fragen zur Konfiguration von Templates
« Antwort #5 am: 11 Mai 2021, 13:36:34 »
Yes, dank dir - kaum macht man es richtig, schon funktioniert es...

Für den Fall, dass jemand das Template haben möchte:

{
{
  "name": "shutter3",
  "author": "jemu75/BHE",
  "date": "2021-05-11",
  "status": {
    "bar": ["pct:100:100:orange","pct:1:%n:yellow","pct:0:100:success"],
    "error": []
  },
  "main": [
    {
      "leftBtn": "mdi-chevron-down",
      "leftClick": ["motor:stop:off","motor::stop"],
      "leftLong": ["motor::off"],
      "leftLongRelease": ["motor::stop"],
      "text": ["motor:up:öffnet...","motor:down:schließt...","pct:100:offen","pct:1:%s %","pct:0:geschlossen"],
      "rightBtn": "mdi-chevron-up",
      "rightClick": ["motor:stop:on","motor::stop"],
      "rightLong": ["motor::on"],
      "rightLongRelease": ["motor::stop"]
    }
  ],
  "info": {
    "left1": ["motor:up::mdi-window-shutter-alert","motor:down::mdi-window-shutter-alert","pct:1::mdi-window-shutter-open","pct:::mdi-window-shutter"]
  }
}
« Letzte Änderung: 11 Mai 2021, 14:40:22 von Cluni »

Offline piet_pit

  • Full Member
  • ***
  • Beiträge: 274
Antw:Fragen zur Konfiguration von Templates
« Antwort #6 am: 11 Mai 2021, 20:39:22 »
Hallo Cluni,

sieht prima aus, würde ich evtl. übernehmen.

Welchen Aktor verwendest du für die Rolladen? Ich habe den Shelly2.5 und experimentiere noch daran herum, habe anstatt

"leftClick": ["motor:stop:off","motor::stop"]
bei Shelly z.B. 

"leftClick": ["state:stop:off","state::stop"]
eingesetzt, klappt nicht so richtig.

Reaktion sollte sein, dass der Rollo bei einmaligen Click fährt (z.B. hoch), bei nochmaligen Click stoppt usw.

Komme da nicht richtig weiter..., evtl. habe ich ja Donnerstag Zeit für weiteres Testen... ;D
VG
Pit


FHEM 6.0 auf Raspberry Pi 3, Rasbian-Stretch
FRITZ!Box 7490
HM-Mod-RPI-PCB
JeeLink
CUNO 1.47

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 688
    • FHEM App
Antw:Fragen zur Konfiguration von Templates
« Antwort #7 am: 11 Mai 2021, 22:57:23 »
Hallo Cluni,

sieht prima aus, würde ich evtl. übernehmen.

Welchen Aktor verwendest du für die Rolladen? Ich habe den Shelly2.5 und experimentiere noch daran herum, habe anstatt

"leftClick": ["motor:stop:off","motor::stop"]
bei Shelly z.B. 

"leftClick": ["state:stop:off","state::stop"]
eingesetzt, klappt nicht so richtig.

Reaktion sollte sein, dass der Rollo bei einmaligen Click fährt (z.B. hoch), bei nochmaligen Click stoppt usw.

Komme da nicht richtig weiter..., evtl. habe ich ja Donnerstag Zeit für weiteres Testen... ;D
VG
Pit

Kannst du bitte mal ein jsonlist2 von einem deiner shelly2.5 Aktoren posten.

Offline piet_pit

  • Full Member
  • ***
  • Beiträge: 274
Antw:Fragen zur Konfiguration von Templates
« Antwort #8 am: 12 Mai 2021, 12:31:55 »
Hallo Jemu75,

anbei dieses jsonlist2 des Shelly2.5, an dem führe ich meine "Experimente" durch.

Ich nutze für den Shelly2.5 das von FHEM bereitgestellte Template MQTT (danke nochmals an Beta-User) sowie das ASC von Cooltux (danke auch an Cooltux).


 {
    "Name":"Buero_Rollo_Vorne",
    "PossibleSets":"opens:noArg closes:noArg open:noArg close:noArg half:noArg stop:noArg pct:slider,0,1,100 x_recalibration:noArg x_update:noArg x_mqttcom attrTemplate:?,General_Info,MQTT2_CLIENT_general_bridge,MQTT2_IO_ignoreRegexp_basic,MQTT2_IO_ignoreRegexp_tasmota,MQTT2_IO_ignoreRegexp_shelly,MQTT2_IO_ignoreRegexp_homeassistant,speechcontrol_general_naming_master_template,speech_recognition_general_naming_master_template,tasmota_basic,tasmota_basic_state_power1,tasmota_1ch+motion+SI7021,tasmota_POW,tasmota_POW_USB_split,tasmota_plug_with_rgbw_split,tasmota_ir,tasmota_rf,tasmota_rf_keys_example,tasmota_use_DS18x20_id,tasmota_zigbee2tasmota_bridge,tasmota_clear_readings_reset_readingsList_and_reboot,tasmota_set_lowercase_texts_and_state1,tasmota_set_uppercase_texts_and_state1,tasmota_set_power1_state_to_power,tasmota_2channel_split,tasmota_2ch_unified,tasmota_2ch_shutter_invert_1,tasmota_2ch_shutter_invert_0,tasmota_4ch_two_shutters_invert_0,tasmota_3channel_input_shelly_i3,tasmota_4channel_split,tasmota_3socketUSB_split,tasmota_4ch_unified_basic_text,tasmota_4ch_unified_icon,tasmota_8ch_unified_icon,tasmota_8channel_split,tasmota_rgb_led_controller,tasmota_rgbw_led,tasmota_rgbcct_light,tasmota_cct_led,tasmota_TuyaMCU_dimmer,tasmota_window_sensor_MC400A,shelly1,shelly_announces,shellyplug,shelly1_w_energy_measuring,shelly1_w_energy_measuring_washer_example,shelly3em,shelly2_split,shelly25_split,shelly2_roller,shelly25_roller_invert_0,shelly25_roller_invert_1,shelly4pro_split,shelly4pro_unified,shellybulb,shellyduo,shellymotion,shellyht,shellyflood,shellygas,shellydw,shelly_ix3,shelly2rgbw_color,shelly2rgbw_4w_split,shellydimmer,ESPurna_single_relay,eBus_daemon_splitter,ems-esp_heater_device,ems-esp_heater_device_outdated,ems-esp_boiler,ems-esp_boiler_outdated,ems-esp_thermostat_read-only,ems-esp_thermostat_read-only_outdated,ems-esp_thermostat_simple,ems-esp_thermostat_RC35_type,ems-esp_thermostat_simple_outdated,ems-esp_thermostat_RC35_type_outdated,zigbee2mqtt_bridge,sonos2mqtt_bridge,sonos2mqtt_speaker,sonos2mqtt_bridge_comfort,InstarCam,wled_controller,go_eCharger,8channel_ethernet_board_split,8channel_ethernet_board_unified,6channel_ethernet_board_6input_split,6channel_ethernet_board_6input_unified,esp_milight_hub_bridge,OpenMQTTGateway_MCU,worx_landroid,wallpanel_app,weewx_weather_station,McLighting,roon",
    "PossibleAttrs":"alias comment:textField-long eventMap:textField-long group room suppressReading userattr userReadings:textField-long verbose:0,1,2,3,4,5  IODev autocreate:0,1 bridgeRegexp:textField-long devicetopic devPos disable:0,1 disabledForIntervals getList:textField-long imageLink jsonMap:textField-long model periodicCmd readingList:textField-long setExtensionsEvent:1,0 setList:textField-long setStateList event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading ASC:0,1,2 alexaName alexaProactiveEvents:1,0 alexaRoom appOptions:textField-long cmdIcon devStateIcon devStateIcon:textField-long devStateStyle fhem_widget_channels fm_type genericDeviceType:ignore,switch,outlet,light,blind,thermometer,thermostat,garage,window,lock homebridgeMapping:textField-long icon siriName sortby webCmd webCmdLabel:textField-long widgetOverride ASC_Adv:on,off ASC_Antifreeze:off,soft,hard,am,pm ASC_Antifreeze_Pos:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 ASC_AutoAstroModeEvening:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeEveningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_AutoAstroModeMorning:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeMorningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_BlockingTime_afterManual ASC_BlockingTime_beforDayOpen ASC_BlockingTime_beforNightClose ASC_BrightnessSensor ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Down:time,astro,brightness,roommate ASC_DriveUpMaxDuration ASC_Drive_Delay ASC_Drive_DelayStart ASC_ExternalTrigger ASC_GuestRoom:on,off ASC_LockOut:soft,hard,off ASC_LockOut_Cmd:inhibit,blocked,protection ASC_Mode_Down:absent,always,off,home ASC_Mode_Up:absent,always,off,home ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Partymode:on,off ASC_Pos_Reading ASC_PrivacyDownValue_beforeNightClose ASC_PrivacyDown_Pos ASC_PrivacyUpValue_beforeDayOpen ASC_PrivacyUp_Pos ASC_RainProtection:on,off ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_AbsentDelay ASC_Self_Defense_Mode:absent,gone,off ASC_Shading_BetweenTheTime ASC_Shading_InOutAzimuth ASC_Shading_MinMax_Elevation ASC_Shading_Min_OutsideTemperature ASC_Shading_Mode:absent,always,off,home ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Shading_StateChange_SunnyCloudy ASC_Shading_WaitingPeriod ASC_Shutter_IdleDetection ASC_ShuttersPlace:window,terrace,awning ASC_SlatPosCmd_SlatDevice ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_TempSensor ASC_Time_Down_Early ASC_Time_Down_Late ASC_Time_Up_Early ASC_Time_Up_Late ASC_Time_Up_WE_Holiday ASC_Up:time,astro,brightness,roommate ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WiggleValue ASC_WindParameters ASC_WindProtection:on,off ASC_WindowRec ASC_WindowRec_PosAfterDayClosed:open,lastManual ASC_WindowRec_subType:twostate,threestate",
    "Internals": {
      "CID": "shellyswitch25_E8DB84AA1A65",
      "DEF": "shellyswitch25_E8DB84AA1A65",
      "DEVICETOPIC": "Buero_Rollo_Vorne",
      "FUUID": "60885abe-f33f-3896-dadb-68bd7993e1d25997",
      "IODev": "pietMQTT2",
      "LASTInputDev": "pietMQTT2",
      "MSGCNT": "65063",
      "NAME": "Buero_Rollo_Vorne",
      "NR": "278",
      "STATE": "<a href=\"http://192.168.178.200\" target=\"_blank\">\ntrue\n</a>\n36/stop",
      "TYPE": "MQTT2_DEVICE",
      "pietMQTT2_MSGCNT": "65063",
      "pietMQTT2_TIME": "2021-05-12 12:23:42"
    },
    "Readings": {
      "ASC_Enable": { "Value":"on", "Time":"2021-04-27 20:53:57" },
      "ASC_ShuttersLastDrive": { "Value":"day open", "Time":"2021-05-12 08:15:09" },
      "ASC_Time_DriveDown": { "Value":"12.05.2021 - 21:51", "Time":"2021-05-12 08:15:01" },
      "ASC_Time_DriveUp": { "Value":"13.05.2021 - 08:15", "Time":"2021-05-12 08:15:01" },
      "IODev": { "Value":"pietMQTT2", "Time":"2021-05-10 18:47:18" },
      "associatedWith": { "Value":"pietASC", "Time":"2021-05-10 18:47:21" },
      "attrTemplateVersion": { "Value":"20210126", "Time":"2021-04-27 20:46:03" },
      "current": { "Value":"stop", "Time":"2021-05-12 12:23:42" },
      "energy": { "Value":"476", "Time":"2021-05-12 12:23:42" },
      "fw_ver": { "Value":"20210429-100559/v1.10.4-g3f94cd7", "Time":"2021-05-11 14:41:01" },
      "id": { "Value":"shellyswitch25-E8DB84AA1A65", "Time":"2021-05-11 14:41:01" },
      "info_actions_stats_skipped": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_cfg_changed_cnt": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_cloud_connected": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_cloud_enabled": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_fs_free": { "Value":"146082", "Time":"2021-04-27 20:46:03" },
      "info_fs_size": { "Value":"233681", "Time":"2021-04-27 20:46:03" },
      "info_has_update": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_inputs_1_event": { "Value":"", "Time":"2021-04-27 20:46:03" },
      "info_inputs_1_event_cnt": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_inputs_1_input": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_inputs_2_event": { "Value":"", "Time":"2021-04-27 20:46:03" },
      "info_inputs_2_event_cnt": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_inputs_2_input": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_mac": { "Value":"E8DB84AA1A65", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_counters_1": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_counters_2": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_counters_3": { "Value":"116.961", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_overpower": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_power": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_timestamp": { "Value":"1619556363", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_total": { "Value":"168", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_counters_1": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_counters_2": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_counters_3": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_overpower": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_power": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_timestamp": { "Value":"1619556363", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_total": { "Value":"66", "Time":"2021-04-27 20:46:03" },
      "info_mqtt_connected": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_overtemperature": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_ram_free": { "Value":"35988", "Time":"2021-04-27 20:46:03" },
      "info_ram_total": { "Value":"49288", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_calibrating": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_current_pos": { "Value":"50", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_last_direction": { "Value":"open", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_overtemperature": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_positioning": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_power": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_safety_switch": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_source": { "Value":"http", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_state": { "Value":"stop", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_stop_reason": { "Value":"normal", "Time":"2021-04-27 20:46:03" },
      "info_serial": { "Value":"25", "Time":"2021-04-27 20:46:03" },
      "info_temperature": { "Value":"60.49", "Time":"2021-04-27 20:46:03" },
      "info_temperature_status": { "Value":"Normal", "Time":"2021-04-27 20:46:03" },
      "info_time": { "Value":"20:46", "Time":"2021-04-27 20:46:03" },
      "info_tmp_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_tmp_tC": { "Value":"60.49", "Time":"2021-04-27 20:46:03" },
      "info_tmp_tF": { "Value":"140.88", "Time":"2021-04-27 20:46:03" },
      "info_unixtime": { "Value":"1619549163", "Time":"2021-04-27 20:46:03" },
      "info_update_has_update": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_update_new_version": { "Value":"20210415-130044/v1.10.3-g23074d0", "Time":"2021-04-27 20:46:03" },
      "info_update_old_version": { "Value":"20210415-130044/v1.10.3-g23074d0", "Time":"2021-04-27 20:46:03" },
      "info_update_status": { "Value":"idle", "Time":"2021-04-27 20:46:03" },
      "info_uptime": { "Value":"306", "Time":"2021-04-27 20:46:03" },
      "info_voltage": { "Value":"230.87", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_connected": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_ip": { "Value":"192.168.178.200", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_rssi": { "Value":"-80", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_ssid": { "Value":"barsch_1", "Time":"2021-04-27 20:46:03" },
      "input0": { "Value":"0", "Time":"2021-05-12 12:23:42" },
      "input1": { "Value":"0", "Time":"2021-05-12 12:23:42" },
      "ip": { "Value":"192.168.178.200", "Time":"2021-05-11 14:41:01" },
      "mac": { "Value":"E8DB84AA1A65", "Time":"2021-05-11 14:41:01" },
      "model": { "Value":"SHSW-25", "Time":"2021-05-11 14:41:01" },
      "new_fw": { "Value":"false", "Time":"2021-05-11 14:41:01" },
      "online": { "Value":"true", "Time":"2021-05-11 14:41:01" },
      "overtemperature": { "Value":"0", "Time":"2021-05-12 12:23:42" },
      "pct": { "Value":"36", "Time":"2021-05-12 12:23:42" },
      "power": { "Value":"0.00", "Time":"2021-05-12 12:23:42" },
      "roller_0_energy": { "Value":"476", "Time":"2021-05-12 12:23:42" },
      "roller_0_power": { "Value":"0.00", "Time":"2021-05-12 12:23:42" },
      "roller_0_stop_reason": { "Value":"normal", "Time":"2021-05-12 12:23:42" },
      "state": { "Value":"36", "Time":"2021-05-12 12:23:42" },
      "temperature": { "Value":"60.86", "Time":"2021-05-12 12:23:42" },
      "temperature_f": { "Value":"141.55", "Time":"2021-05-12 12:23:42" },
      "temperature_status": { "Value":"Normal", "Time":"2021-05-12 12:23:42" },
      "x_mqttcom": { "Value":"set announce", "Time":"2021-04-27 20:46:03" }
    },
    "Attributes": {
      "ASC": "2",
      "ASC_Pos_Reading": "pct",
      "ASC_Time_Up_Early": "08:15",
      "ASC_Up": "time",
      "IODev": "pietMQTT2",
      "appOptions": "{ \"template\": \"shutter\"}",
      "cmdIcon": "open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50",
      "comment": "Shelly 2.5 in Roller-Mode. 100=opened / 0=closed",
      "devStateIcon": ".*/open:fts_shutter_up@red .*/close:fts_shutter_down@red true:10px-kreis-gruen false:10px-kreis-rot 0/stop:fts_shutter_100 100/stop:fts_shutter_10 9\u005cd/stop:fts_shutter_10 8\u005cd/stop:fts_shutter_20 7\u005cd/stop:fts_shutter_30 6\u005cd/stop:fts_shutter_40 5\u005cd/stop:fts_shutter_50 4\u005cd/stop:fts_shutter_60 3\u005cd/stop:fts_shutter_70 2\u005cd/stop:fts_shutter_80 1\u005cd/stop:fts_shutter_90 0\u005cd/stop:fts_shutter_100 set_.*:fts_shutter_updown",
      "event-on-change-reading": "ASC_.*,pct",
      "eventMap": "open:opens close:closes",
      "genericDeviceType": "blind",
      "model": "shelly25_roller_invert_0",
      "readingList": "shellies/shellyswitch25-E8DB84AA1A65/roller/0/pos:.* pct\n  shellies/shellyswitch25-E8DB84AA1A65/status/0/rollers:.* power\n  shellies/shellyswitch25-E8DB84AA1A65/online:.* online\n  shellies/shellyswitch25-E8DB84AA1A65/announce:.* { json2nameValue($EVENT) }\n  shellies/announce:.* { $EVENT =~ m,..id...shellyswitch25-E8DB84AA1A65...mac.*, ? json2nameValue($EVENT) : return }\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0:.* current\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0:open {{'state' => 'opening'}}\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0:close {{'state' => 'closing'}}\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0/pos:.* state\n  shellies/shellyswitch25-E8DB84AA1A65/input/1:.* input1\n  shellies/shellyswitch25-E8DB84AA1A65/input/0:.* input0\n  shellies/shellyswitch25-E8DB84AA1A65/relay/power:.* power\n  shellies/shellyswitch25-E8DB84AA1A65/relay/energy:.* energy\n  shellies/shellyswitch25-E8DB84AA1A65/temperature:.* temperature\n  shellies/shellyswitch25-E8DB84AA1A65/overtemperature:.* overtemperature\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0/power:.* roller_0_power\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0/energy:.* roller_0_energy\n  shellies/shellyswitch25-E8DB84AA1A65/temperature_f:.* temperature_f\nshellyswitch25_E8DB84AA1A65:shellies/shellyswitch25-E8DB84AA1A65/info:.* { json2nameValue($EVENT, 'info_', $JSONMAP) }\nshellyswitch25_E8DB84AA1A65:shellies/shellyswitch25-E8DB84AA1A65/roller/0/stop_reason:.* roller_0_stop_reason\nshellyswitch25_E8DB84AA1A65:shellies/shellyswitch25-E8DB84AA1A65/temperature_status:.* temperature_status",
      "room": "Buero,MQTT2_DEVICE",
      "setList": "open:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command open\n  close:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command close\n  half:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command/pos 50\n  stop:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command stop\n  pct:slider,0,1,100 shellies/shellyswitch25-E8DB84AA1A65/roller/0/command/pos $EVTPART1\n  x_recalibration:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command rc\n  x_update:noArg shellies/shellyswitch25-E8DB84AA1A65/command update_fw\n  x_mqttcom shellies/shellyswitch25-E8DB84AA1A65/command $EVTPART1",
      "setStateList": "open close half stop pct",
      "stateFormat": "<a href=\"http://ip\" target=\"_blank\">\nonline\n</a>\nstate/current",
      "userattr": "ASC_Adv:on,off ASC_Antifreeze:off,soft,hard,am,pm ASC_Antifreeze_Pos:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 ASC_AutoAstroModeEvening:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeEveningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_AutoAstroModeMorning:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeMorningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_BlockingTime_afterManual ASC_BlockingTime_beforDayOpen ASC_BlockingTime_beforNightClose ASC_BrightnessSensor ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Down:time,astro,brightness,roommate ASC_DriveUpMaxDuration ASC_Drive_Delay ASC_Drive_DelayStart ASC_ExternalTrigger ASC_GuestRoom:on,off ASC_LockOut:soft,hard,off ASC_LockOut_Cmd:inhibit,blocked,protection ASC_Mode_Down:absent,always,off,home ASC_Mode_Up:absent,always,off,home ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Partymode:on,off ASC_Pos_Reading ASC_PrivacyDownValue_beforeNightClose ASC_PrivacyDown_Pos ASC_PrivacyUpValue_beforeDayOpen ASC_PrivacyUp_Pos ASC_RainProtection:on,off ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_AbsentDelay ASC_Self_Defense_Mode:absent,gone,off ASC_Shading_BetweenTheTime ASC_Shading_InOutAzimuth ASC_Shading_MinMax_Elevation ASC_Shading_Min_OutsideTemperature ASC_Shading_Mode:absent,always,off,home ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Shading_StateChange_SunnyCloudy ASC_Shading_WaitingPeriod ASC_Shutter_IdleDetection ASC_ShuttersPlace:window,terrace,awning ASC_SlatPosCmd_SlatDevice ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_TempSensor ASC_Time_Down_Early ASC_Time_Down_Late ASC_Time_Up_Early ASC_Time_Up_Late ASC_Time_Up_WE_Holiday ASC_Up:time,astro,brightness,roommate ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WiggleValue ASC_WindParameters ASC_WindProtection:on,off ASC_WindowRec ASC_WindowRec_PosAfterDayClosed:open,lastManual ASC_WindowRec_subType:twostate,threestate",
      "webCmd": ":open:close:half:stop:pct"
    }
  },

vielen Dank und viele Grüße
Pit
FHEM 6.0 auf Raspberry Pi 3, Rasbian-Stretch
FRITZ!Box 7490
HM-Mod-RPI-PCB
JeeLink
CUNO 1.47

Offline Cluni

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 853
Antw:Fragen zur Konfiguration von Templates
« Antwort #9 am: 12 Mai 2021, 13:45:04 »
sieht prima aus, würde ich evtl. übernehmen.

Welchen Aktor verwendest du für die Rolladen? Ich habe den Shelly2.5 und experimentiere noch daran herum...

Hi Pit,

ich benutze schon seit Jahren Homematic Aktoren Typ HM-LC-BL1-FM. Ich habe zwar auch ein paar Shellys zu Hause, aber schon älteren Datums (Shelly 1 und 2). Diese nutze ich aber bis jetzt nicht als Rollladenaktoren. Daher kann ich dir leider nicht sagen, wie das da aussehen müsste, aber wenn ich mir dein list anschaue, dann würde ich sagen, dass das unter main wie folgt aussehen müsste

  "main": [
    {
      "leftBtn": "mdi-chevron-down",
      "leftClick": ["state:stop:close","state::stop"],
      "leftLong": ["state::close"],
      "leftLongRelease": ["state::stop"],
      "text": ["state:opening:öffnet...","state:closing:schließt...","pct:100:offen","pct:1:%s %","pct:0:geschlossen"],
      "rightBtn": "mdi-chevron-up",
      "rightClick": ["state:stop:open","state::stop"],
      "rightLong": ["state::open"],
      "rightLongRelease": ["state::stop"]
    }

Bei "text" müsste man nochmal gucken, ob das so hinhaut.
« Letzte Änderung: 12 Mai 2021, 13:49:31 von Cluni »

Offline Cluni

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 853
Antw:Fragen zur Konfiguration von Templates
« Antwort #10 am: 12 Mai 2021, 13:54:16 »
Gerade nochmal geschaut. Müsste so passen:

{
  "name": "shellyshutter",
  "author": "jemu75/BHE",
  "date": "2021-05-12",
  "status": {
    "bar": ["pct:100:100:orange","pct:1:%n:yellow","pct:0:100:success"],
    "error": []
  },
  "main": [
    {
      "leftBtn": "mdi-chevron-down",
      "leftClick": ["state:stop:close","state::stop"],
      "leftLong": ["state::close"],
      "leftLongRelease": ["state::stop"],
      "text": ["state:opening:öffnet...","state:closing:schließt...","pct:100:offen","pct:1:%s %","pct:0:geschlossen"],
      "rightBtn": "mdi-chevron-up",
      "rightClick": ["state:stop:open","state::stop"],
      "rightLong": ["state::open"],
      "rightLongRelease": ["state::stop"]
    }
  ],
  "info": {
    "left1": ["motor:up::mdi-window-shutter-alert","motor:down::mdi-window-shutter-alert","pct:1::mdi-window-shutter-open","pct:::mdi-window-shutter"]
  }
}

Ich habe das Template nun shellyshutter genannt.

Offline piet_pit

  • Full Member
  • ***
  • Beiträge: 274
Antw:Fragen zur Konfiguration von Templates
« Antwort #11 am: 12 Mai 2021, 14:57:38 »
Hallo Cluni,

vielen Dank für die Hilfe, der Balken und die Farbänderungen klappen einwandfrei.

Was nicht klappt, ist das Verhalten bei leftclick (über den Browser).

1* leftclick > Rollo fährt runter > ok!
2tes mal leftclick > Rollo stoppt kurz (?) und fährt weiter runter, es bleibt nicht stehen >:(

Gleiches wenn das Rollo hoch fährt.

Viele Grüße
Pit
FHEM 6.0 auf Raspberry Pi 3, Rasbian-Stretch
FRITZ!Box 7490
HM-Mod-RPI-PCB
JeeLink
CUNO 1.47

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 688
    • FHEM App
Antw:Fragen zur Konfiguration von Templates
« Antwort #12 am: 12 Mai 2021, 15:00:24 »
Hallo Jemu75,

anbei dieses jsonlist2 des Shelly2.5, an dem führe ich meine "Experimente" durch.

Ich nutze für den Shelly2.5 das von FHEM bereitgestellte Template MQTT (danke nochmals an Beta-User) sowie das ASC von Cooltux (danke auch an Cooltux).


 {
    "Name":"Buero_Rollo_Vorne",
    "PossibleSets":"opens:noArg closes:noArg open:noArg close:noArg half:noArg stop:noArg pct:slider,0,1,100 x_recalibration:noArg x_update:noArg x_mqttcom attrTemplate:?,General_Info,MQTT2_CLIENT_general_bridge,MQTT2_IO_ignoreRegexp_basic,MQTT2_IO_ignoreRegexp_tasmota,MQTT2_IO_ignoreRegexp_shelly,MQTT2_IO_ignoreRegexp_homeassistant,speechcontrol_general_naming_master_template,speech_recognition_general_naming_master_template,tasmota_basic,tasmota_basic_state_power1,tasmota_1ch+motion+SI7021,tasmota_POW,tasmota_POW_USB_split,tasmota_plug_with_rgbw_split,tasmota_ir,tasmota_rf,tasmota_rf_keys_example,tasmota_use_DS18x20_id,tasmota_zigbee2tasmota_bridge,tasmota_clear_readings_reset_readingsList_and_reboot,tasmota_set_lowercase_texts_and_state1,tasmota_set_uppercase_texts_and_state1,tasmota_set_power1_state_to_power,tasmota_2channel_split,tasmota_2ch_unified,tasmota_2ch_shutter_invert_1,tasmota_2ch_shutter_invert_0,tasmota_4ch_two_shutters_invert_0,tasmota_3channel_input_shelly_i3,tasmota_4channel_split,tasmota_3socketUSB_split,tasmota_4ch_unified_basic_text,tasmota_4ch_unified_icon,tasmota_8ch_unified_icon,tasmota_8channel_split,tasmota_rgb_led_controller,tasmota_rgbw_led,tasmota_rgbcct_light,tasmota_cct_led,tasmota_TuyaMCU_dimmer,tasmota_window_sensor_MC400A,shelly1,shelly_announces,shellyplug,shelly1_w_energy_measuring,shelly1_w_energy_measuring_washer_example,shelly3em,shelly2_split,shelly25_split,shelly2_roller,shelly25_roller_invert_0,shelly25_roller_invert_1,shelly4pro_split,shelly4pro_unified,shellybulb,shellyduo,shellymotion,shellyht,shellyflood,shellygas,shellydw,shelly_ix3,shelly2rgbw_color,shelly2rgbw_4w_split,shellydimmer,ESPurna_single_relay,eBus_daemon_splitter,ems-esp_heater_device,ems-esp_heater_device_outdated,ems-esp_boiler,ems-esp_boiler_outdated,ems-esp_thermostat_read-only,ems-esp_thermostat_read-only_outdated,ems-esp_thermostat_simple,ems-esp_thermostat_RC35_type,ems-esp_thermostat_simple_outdated,ems-esp_thermostat_RC35_type_outdated,zigbee2mqtt_bridge,sonos2mqtt_bridge,sonos2mqtt_speaker,sonos2mqtt_bridge_comfort,InstarCam,wled_controller,go_eCharger,8channel_ethernet_board_split,8channel_ethernet_board_unified,6channel_ethernet_board_6input_split,6channel_ethernet_board_6input_unified,esp_milight_hub_bridge,OpenMQTTGateway_MCU,worx_landroid,wallpanel_app,weewx_weather_station,McLighting,roon",
    "PossibleAttrs":"alias comment:textField-long eventMap:textField-long group room suppressReading userattr userReadings:textField-long verbose:0,1,2,3,4,5  IODev autocreate:0,1 bridgeRegexp:textField-long devicetopic devPos disable:0,1 disabledForIntervals getList:textField-long imageLink jsonMap:textField-long model periodicCmd readingList:textField-long setExtensionsEvent:1,0 setList:textField-long setStateList event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading ASC:0,1,2 alexaName alexaProactiveEvents:1,0 alexaRoom appOptions:textField-long cmdIcon devStateIcon devStateIcon:textField-long devStateStyle fhem_widget_channels fm_type genericDeviceType:ignore,switch,outlet,light,blind,thermometer,thermostat,garage,window,lock homebridgeMapping:textField-long icon siriName sortby webCmd webCmdLabel:textField-long widgetOverride ASC_Adv:on,off ASC_Antifreeze:off,soft,hard,am,pm ASC_Antifreeze_Pos:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 ASC_AutoAstroModeEvening:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeEveningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_AutoAstroModeMorning:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeMorningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_BlockingTime_afterManual ASC_BlockingTime_beforDayOpen ASC_BlockingTime_beforNightClose ASC_BrightnessSensor ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Down:time,astro,brightness,roommate ASC_DriveUpMaxDuration ASC_Drive_Delay ASC_Drive_DelayStart ASC_ExternalTrigger ASC_GuestRoom:on,off ASC_LockOut:soft,hard,off ASC_LockOut_Cmd:inhibit,blocked,protection ASC_Mode_Down:absent,always,off,home ASC_Mode_Up:absent,always,off,home ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Partymode:on,off ASC_Pos_Reading ASC_PrivacyDownValue_beforeNightClose ASC_PrivacyDown_Pos ASC_PrivacyUpValue_beforeDayOpen ASC_PrivacyUp_Pos ASC_RainProtection:on,off ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_AbsentDelay ASC_Self_Defense_Mode:absent,gone,off ASC_Shading_BetweenTheTime ASC_Shading_InOutAzimuth ASC_Shading_MinMax_Elevation ASC_Shading_Min_OutsideTemperature ASC_Shading_Mode:absent,always,off,home ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Shading_StateChange_SunnyCloudy ASC_Shading_WaitingPeriod ASC_Shutter_IdleDetection ASC_ShuttersPlace:window,terrace,awning ASC_SlatPosCmd_SlatDevice ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_TempSensor ASC_Time_Down_Early ASC_Time_Down_Late ASC_Time_Up_Early ASC_Time_Up_Late ASC_Time_Up_WE_Holiday ASC_Up:time,astro,brightness,roommate ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WiggleValue ASC_WindParameters ASC_WindProtection:on,off ASC_WindowRec ASC_WindowRec_PosAfterDayClosed:open,lastManual ASC_WindowRec_subType:twostate,threestate",
    "Internals": {
      "CID": "shellyswitch25_E8DB84AA1A65",
      "DEF": "shellyswitch25_E8DB84AA1A65",
      "DEVICETOPIC": "Buero_Rollo_Vorne",
      "FUUID": "60885abe-f33f-3896-dadb-68bd7993e1d25997",
      "IODev": "pietMQTT2",
      "LASTInputDev": "pietMQTT2",
      "MSGCNT": "65063",
      "NAME": "Buero_Rollo_Vorne",
      "NR": "278",
      "STATE": "<a href=\"http://192.168.178.200\" target=\"_blank\">\ntrue\n</a>\n36/stop",
      "TYPE": "MQTT2_DEVICE",
      "pietMQTT2_MSGCNT": "65063",
      "pietMQTT2_TIME": "2021-05-12 12:23:42"
    },
    "Readings": {
      "ASC_Enable": { "Value":"on", "Time":"2021-04-27 20:53:57" },
      "ASC_ShuttersLastDrive": { "Value":"day open", "Time":"2021-05-12 08:15:09" },
      "ASC_Time_DriveDown": { "Value":"12.05.2021 - 21:51", "Time":"2021-05-12 08:15:01" },
      "ASC_Time_DriveUp": { "Value":"13.05.2021 - 08:15", "Time":"2021-05-12 08:15:01" },
      "IODev": { "Value":"pietMQTT2", "Time":"2021-05-10 18:47:18" },
      "associatedWith": { "Value":"pietASC", "Time":"2021-05-10 18:47:21" },
      "attrTemplateVersion": { "Value":"20210126", "Time":"2021-04-27 20:46:03" },
      "current": { "Value":"stop", "Time":"2021-05-12 12:23:42" },
      "energy": { "Value":"476", "Time":"2021-05-12 12:23:42" },
      "fw_ver": { "Value":"20210429-100559/v1.10.4-g3f94cd7", "Time":"2021-05-11 14:41:01" },
      "id": { "Value":"shellyswitch25-E8DB84AA1A65", "Time":"2021-05-11 14:41:01" },
      "info_actions_stats_skipped": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_cfg_changed_cnt": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_cloud_connected": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_cloud_enabled": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_fs_free": { "Value":"146082", "Time":"2021-04-27 20:46:03" },
      "info_fs_size": { "Value":"233681", "Time":"2021-04-27 20:46:03" },
      "info_has_update": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_inputs_1_event": { "Value":"", "Time":"2021-04-27 20:46:03" },
      "info_inputs_1_event_cnt": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_inputs_1_input": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_inputs_2_event": { "Value":"", "Time":"2021-04-27 20:46:03" },
      "info_inputs_2_event_cnt": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_inputs_2_input": { "Value":"0", "Time":"2021-04-27 20:46:03" },
      "info_mac": { "Value":"E8DB84AA1A65", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_counters_1": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_counters_2": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_counters_3": { "Value":"116.961", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_overpower": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_power": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_timestamp": { "Value":"1619556363", "Time":"2021-04-27 20:46:03" },
      "info_meters_1_total": { "Value":"168", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_counters_1": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_counters_2": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_counters_3": { "Value":"0.000", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_overpower": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_power": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_timestamp": { "Value":"1619556363", "Time":"2021-04-27 20:46:03" },
      "info_meters_2_total": { "Value":"66", "Time":"2021-04-27 20:46:03" },
      "info_mqtt_connected": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_overtemperature": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_ram_free": { "Value":"35988", "Time":"2021-04-27 20:46:03" },
      "info_ram_total": { "Value":"49288", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_calibrating": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_current_pos": { "Value":"50", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_last_direction": { "Value":"open", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_overtemperature": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_positioning": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_power": { "Value":"0.00", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_safety_switch": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_source": { "Value":"http", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_state": { "Value":"stop", "Time":"2021-04-27 20:46:03" },
      "info_rollers_1_stop_reason": { "Value":"normal", "Time":"2021-04-27 20:46:03" },
      "info_serial": { "Value":"25", "Time":"2021-04-27 20:46:03" },
      "info_temperature": { "Value":"60.49", "Time":"2021-04-27 20:46:03" },
      "info_temperature_status": { "Value":"Normal", "Time":"2021-04-27 20:46:03" },
      "info_time": { "Value":"20:46", "Time":"2021-04-27 20:46:03" },
      "info_tmp_is_valid": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_tmp_tC": { "Value":"60.49", "Time":"2021-04-27 20:46:03" },
      "info_tmp_tF": { "Value":"140.88", "Time":"2021-04-27 20:46:03" },
      "info_unixtime": { "Value":"1619549163", "Time":"2021-04-27 20:46:03" },
      "info_update_has_update": { "Value":"false", "Time":"2021-04-27 20:46:03" },
      "info_update_new_version": { "Value":"20210415-130044/v1.10.3-g23074d0", "Time":"2021-04-27 20:46:03" },
      "info_update_old_version": { "Value":"20210415-130044/v1.10.3-g23074d0", "Time":"2021-04-27 20:46:03" },
      "info_update_status": { "Value":"idle", "Time":"2021-04-27 20:46:03" },
      "info_uptime": { "Value":"306", "Time":"2021-04-27 20:46:03" },
      "info_voltage": { "Value":"230.87", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_connected": { "Value":"true", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_ip": { "Value":"192.168.178.200", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_rssi": { "Value":"-80", "Time":"2021-04-27 20:46:03" },
      "info_wifi_sta_ssid": { "Value":"barsch_1", "Time":"2021-04-27 20:46:03" },
      "input0": { "Value":"0", "Time":"2021-05-12 12:23:42" },
      "input1": { "Value":"0", "Time":"2021-05-12 12:23:42" },
      "ip": { "Value":"192.168.178.200", "Time":"2021-05-11 14:41:01" },
      "mac": { "Value":"E8DB84AA1A65", "Time":"2021-05-11 14:41:01" },
      "model": { "Value":"SHSW-25", "Time":"2021-05-11 14:41:01" },
      "new_fw": { "Value":"false", "Time":"2021-05-11 14:41:01" },
      "online": { "Value":"true", "Time":"2021-05-11 14:41:01" },
      "overtemperature": { "Value":"0", "Time":"2021-05-12 12:23:42" },
      "pct": { "Value":"36", "Time":"2021-05-12 12:23:42" },
      "power": { "Value":"0.00", "Time":"2021-05-12 12:23:42" },
      "roller_0_energy": { "Value":"476", "Time":"2021-05-12 12:23:42" },
      "roller_0_power": { "Value":"0.00", "Time":"2021-05-12 12:23:42" },
      "roller_0_stop_reason": { "Value":"normal", "Time":"2021-05-12 12:23:42" },
      "state": { "Value":"36", "Time":"2021-05-12 12:23:42" },
      "temperature": { "Value":"60.86", "Time":"2021-05-12 12:23:42" },
      "temperature_f": { "Value":"141.55", "Time":"2021-05-12 12:23:42" },
      "temperature_status": { "Value":"Normal", "Time":"2021-05-12 12:23:42" },
      "x_mqttcom": { "Value":"set announce", "Time":"2021-04-27 20:46:03" }
    },
    "Attributes": {
      "ASC": "2",
      "ASC_Pos_Reading": "pct",
      "ASC_Time_Up_Early": "08:15",
      "ASC_Up": "time",
      "IODev": "pietMQTT2",
      "appOptions": "{ \"template\": \"shutter\"}",
      "cmdIcon": "open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50",
      "comment": "Shelly 2.5 in Roller-Mode. 100=opened / 0=closed",
      "devStateIcon": ".*/open:fts_shutter_up@red .*/close:fts_shutter_down@red true:10px-kreis-gruen false:10px-kreis-rot 0/stop:fts_shutter_100 100/stop:fts_shutter_10 9\u005cd/stop:fts_shutter_10 8\u005cd/stop:fts_shutter_20 7\u005cd/stop:fts_shutter_30 6\u005cd/stop:fts_shutter_40 5\u005cd/stop:fts_shutter_50 4\u005cd/stop:fts_shutter_60 3\u005cd/stop:fts_shutter_70 2\u005cd/stop:fts_shutter_80 1\u005cd/stop:fts_shutter_90 0\u005cd/stop:fts_shutter_100 set_.*:fts_shutter_updown",
      "event-on-change-reading": "ASC_.*,pct",
      "eventMap": "open:opens close:closes",
      "genericDeviceType": "blind",
      "model": "shelly25_roller_invert_0",
      "readingList": "shellies/shellyswitch25-E8DB84AA1A65/roller/0/pos:.* pct\n  shellies/shellyswitch25-E8DB84AA1A65/status/0/rollers:.* power\n  shellies/shellyswitch25-E8DB84AA1A65/online:.* online\n  shellies/shellyswitch25-E8DB84AA1A65/announce:.* { json2nameValue($EVENT) }\n  shellies/announce:.* { $EVENT =~ m,..id...shellyswitch25-E8DB84AA1A65...mac.*, ? json2nameValue($EVENT) : return }\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0:.* current\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0:open {{'state' => 'opening'}}\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0:close {{'state' => 'closing'}}\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0/pos:.* state\n  shellies/shellyswitch25-E8DB84AA1A65/input/1:.* input1\n  shellies/shellyswitch25-E8DB84AA1A65/input/0:.* input0\n  shellies/shellyswitch25-E8DB84AA1A65/relay/power:.* power\n  shellies/shellyswitch25-E8DB84AA1A65/relay/energy:.* energy\n  shellies/shellyswitch25-E8DB84AA1A65/temperature:.* temperature\n  shellies/shellyswitch25-E8DB84AA1A65/overtemperature:.* overtemperature\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0/power:.* roller_0_power\n  shellies/shellyswitch25-E8DB84AA1A65/roller/0/energy:.* roller_0_energy\n  shellies/shellyswitch25-E8DB84AA1A65/temperature_f:.* temperature_f\nshellyswitch25_E8DB84AA1A65:shellies/shellyswitch25-E8DB84AA1A65/info:.* { json2nameValue($EVENT, 'info_', $JSONMAP) }\nshellyswitch25_E8DB84AA1A65:shellies/shellyswitch25-E8DB84AA1A65/roller/0/stop_reason:.* roller_0_stop_reason\nshellyswitch25_E8DB84AA1A65:shellies/shellyswitch25-E8DB84AA1A65/temperature_status:.* temperature_status",
      "room": "Buero,MQTT2_DEVICE",
      "setList": "open:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command open\n  close:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command close\n  half:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command/pos 50\n  stop:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command stop\n  pct:slider,0,1,100 shellies/shellyswitch25-E8DB84AA1A65/roller/0/command/pos $EVTPART1\n  x_recalibration:noArg shellies/shellyswitch25-E8DB84AA1A65/roller/0/command rc\n  x_update:noArg shellies/shellyswitch25-E8DB84AA1A65/command update_fw\n  x_mqttcom shellies/shellyswitch25-E8DB84AA1A65/command $EVTPART1",
      "setStateList": "open close half stop pct",
      "stateFormat": "<a href=\"http://ip\" target=\"_blank\">\nonline\n</a>\nstate/current",
      "userattr": "ASC_Adv:on,off ASC_Antifreeze:off,soft,hard,am,pm ASC_Antifreeze_Pos:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 ASC_AutoAstroModeEvening:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeEveningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_AutoAstroModeMorning:REAL,CIVIL,NAUTIC,ASTRONOMIC,HORIZON ASC_AutoAstroModeMorningHorizon:-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 ASC_BlockingTime_afterManual ASC_BlockingTime_beforDayOpen ASC_BlockingTime_beforNightClose ASC_BrightnessSensor ASC_Closed_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_ComfortOpen_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Down:time,astro,brightness,roommate ASC_DriveUpMaxDuration ASC_Drive_Delay ASC_Drive_DelayStart ASC_ExternalTrigger ASC_GuestRoom:on,off ASC_LockOut:soft,hard,off ASC_LockOut_Cmd:inhibit,blocked,protection ASC_Mode_Down:absent,always,off,home ASC_Mode_Up:absent,always,off,home ASC_Open_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_Partymode:on,off ASC_Pos_Reading ASC_PrivacyDownValue_beforeNightClose ASC_PrivacyDown_Pos ASC_PrivacyUpValue_beforeDayOpen ASC_PrivacyUp_Pos ASC_RainProtection:on,off ASC_Roommate_Device ASC_Roommate_Reading ASC_Self_Defense_AbsentDelay ASC_Self_Defense_Mode:absent,gone,off ASC_Shading_BetweenTheTime ASC_Shading_InOutAzimuth ASC_Shading_MinMax_Elevation ASC_Shading_Min_OutsideTemperature ASC_Shading_Mode:absent,always,off,home ASC_Shading_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Shading_StateChange_SunnyCloudy ASC_Shading_WaitingPeriod ASC_Shutter_IdleDetection ASC_ShuttersPlace:window,terrace,awning ASC_SlatPosCmd_SlatDevice ASC_Sleep_Pos:0,10,20,30,40,50,60,70,80,90,100 ASC_TempSensor ASC_Time_Down_Early ASC_Time_Down_Late ASC_Time_Up_Early ASC_Time_Up_Late ASC_Time_Up_WE_Holiday ASC_Up:time,astro,brightness,roommate ASC_Ventilate_Pos:10,20,30,40,50,60,70,80,90,100 ASC_Ventilate_Window_Open:on,off ASC_WiggleValue ASC_WindParameters ASC_WindProtection:on,off ASC_WindowRec ASC_WindowRec_PosAfterDayClosed:open,lastManual ASC_WindowRec_subType:twostate,threestate",
      "webCmd": ":open:close:half:stop:pct"
    }
  },

vielen Dank und viele Grüße
Pit

Ich denke mit dem Reading current sollte das Problem gut zu lösen sein. Probiere mal bitte folgendes im main-Teil
"main": [
    {
      "leftBtn": "mdi-chevron-down",
      "leftClick": ["current:stop:close","current::stop"],
      "text": ["state:opening:öffnet...","state:closing:schließt...","pct:100:offen","pct:1:%s %","pct:0:geschlossen"],
      "rightBtn": "mdi-chevron-up",
      "rightClick": ["current:stop:open","current::stop"],
    }
]

Wir schauen also im Reading current ob der Aktor den Motor der Jalousie gerade ansteuert. Wenn das Reading den Wert "stop" hat dann bewirkt der Tastendruck, dass die Jalousie geöffnet bzw. bei der anderen Taste geschlossen wird. Wenn das Reading current irgend einen anderen Wert als "stop" hat, dann löst der Tastendruck "stop" aus. Den "longclick" und "longrelease" habe ich fürs erste Mal rausgenommen. Diese können wir konfigurieren, wenn das so klappt.  :)

Offline piet_pit

  • Full Member
  • ***
  • Beiträge: 274
Antw:Fragen zur Konfiguration von Templates
« Antwort #13 am: 12 Mai 2021, 15:26:22 »
Hallo Jemu75,

vielen Dank für deine Hilfe so kurz vor Vatertag....und sorry für den Aufwand.

Leider ist das Verhalten des Rollo unverändert.

VG
Pit

FHEM 6.0 auf Raspberry Pi 3, Rasbian-Stretch
FRITZ!Box 7490
HM-Mod-RPI-PCB
JeeLink
CUNO 1.47

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 688
    • FHEM App
Antw:Fragen zur Konfiguration von Templates
« Antwort #14 am: 12 Mai 2021, 15:39:12 »
Hallo Jemu75,

vielen Dank für deine Hilfe so kurz vor Vatertag....und sorry für den Aufwand.

Leider ist das Verhalten des Rollo unverändert.

VG
Pit

Dann scheint current seinen Wert nicht zu verändern. Du schreibst ja, dass der Motor kurz stoppt und danach gleich wieder anfährt. Das sieht also so aus, als ob der Befehl "close" bzw. "open" erneut gesendet wird. Ich denke es würde Sinn machen, die Veränderung der Readings von dem Shelly 2.5 mal genau zu beobachten. So findet man vielleicht am schnellsten das Reading, welches den aktuellen Motorstatus repräsentiert.

PS.: meine Vermutung kannst du übrigens gern mal prüfen, indem du den debugMode von FHEMApp aktivierst und dann mal in das syslog schaust.