[Modul] Shelly Gen2+

Danke!
Gerade kam noch ein Fix, der nochaml speziell auf die Namen der Variablen eingeht, wenn diese im Shelly benannt wurden.
Und Min und Max Werte werden nun vom Shelly übernommen bei den Darstellungen. :slight_smile:

Grüße,
Kai

1 „Gefällt mir“

Hi Kai,
ich hab auch mal bei der bekannten Wallbox umgestellt und es wurden alle Variablen angelegt und scheinen auch aktualisiert zu werden, funktioniert gut.
Bei der Stromstärke (Ladelimit) werden die min/max Werte korrekt übernommen, jedoch passt die Schrittweite nicht, es lässt sich nur 6/11/16A einstellen.
Beim Konfigurieren der Variable „Ladestatus“ kommt eine Fehlermeldung:

Ungültiges Formular

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047

Warning: Undefined array key "IconActive" in C:\Program Files\Symcon\presentations\valuePresentationForm.php on line 1047
[{"type":"SelectIcon","name":"ICON","caption":"Default Icon"},{"type":"SelectColor","name":"COLOR","caption":"Background Color","onChange":["$hasIcon = false;","$hasBackgroundColor = false;","$hasContentColor = false;","$newValues = [];","foreach(isset($OPTIONS) ? $OPTIONS : $INTERVALS as $option) {","  $option[\"IconDisplay\"] = $option[\"IconActive\"] ? $option[\"IconValue\"] : \"Default\";","  $option[\"ColorDisplay\"] = $option[\"ColorActive\"] ? $option[\"ColorValue\"] : $COLOR;","  $option[\"ContentColorDisplay\"] = $option[\"ContentColorActive\"] ? $option[\"ContentColorValue\"] : $CONTENT_COLOR;","  $newValues[] = $option;","  if ($option[\"IconActive\"]) {","    $hasIcon = true;","  }","  if ($option[\"ColorActive\"]) {","    $hasBackgroundColor = true;","  }","  if ($option[\"ContentColorActive\"]) {","    $hasContentColor = true;","  }","}","IPS_UpdateFormField(\"OPTIONS\", \"columns.4.visible\", $hasIcon, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.7.visible\", $hasBackgroundColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.10.visible\", $hasContentColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"values\", json_encode($newValues), $id);","IPS_UpdateFormField(\"INTERVALS\", \"values\", json_encode($newValues), $id);"]},{"type":"SelectColor","name":"CONTENT_COLOR","caption":"Text Color","onChange":["$hasIcon = false;","$hasBackgroundColor = false;","$hasContentColor = false;","$newValues = [];","foreach(isset($OPTIONS) ? $OPTIONS : $INTERVALS as $option) {","  $option[\"IconDisplay\"] = $option[\"IconActive\"] ? $option[\"IconValue\"] : \"Default\";","  $option[\"ColorDisplay\"] = $option[\"ColorActive\"] ? $option[\"ColorValue\"] : $COLOR;","  $option[\"ContentColorDisplay\"] = $option[\"ContentColorActive\"] ? $option[\"ContentColorValue\"] : $CONTENT_COLOR;","  $newValues[] = $option;","  if ($option[\"IconActive\"]) {","    $hasIcon = true;","  }","  if ($option[\"ColorActive\"]) {","    $hasBackgroundColor = true;","  }","  if ($option[\"ContentColorActive\"]) {","    $hasContentColor = true;","  }","}","IPS_UpdateFormField(\"OPTIONS\", \"columns.4.visible\", $hasIcon, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.7.visible\", $hasBackgroundColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.10.visible\", $hasContentColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"values\", json_encode($newValues), $id);","IPS_UpdateFormField(\"INTERVALS\", \"values\", json_encode($newValues), $id);"],"transparentCaption":"Default"},{"type":"Select","name":"DISPLAY_TYPE","caption":"Display type","options":[{"value":0,"caption":"Text Only"},{"value":1,"caption":"Icons Only"}]},{"type":"RowLayout","items":[{"type":"ValidationTextBox","name":"PREFIX","caption":"Prefix"},{"type":"ValidationTextBox","name":"SUFFIX","caption":"Suffix"}]},{"type":"CheckBox","name":"MULTILINE","caption":"Multiline"},{"type":"List","name":"OPTIONS","add":true,"delete":true,"columns":[{"name":"Value","caption":"Value","add":"","width":"80px","edit":{"type":"ValidationTextBox"}},{"name":"Caption","caption":"Caption","add":"","width":"auto","edit":{"type":"ValidationTextBox"}},{"name":"IconActive","caption":"","edit":{"type":"CheckBox"},"add":false,"width":"0px","visible":false},{"name":"IconValue","caption":"","edit":{"type":"SelectIcon"},"add":"","width":"0px","visible":false},{"name":"IconDisplay","caption":"Icon","add":"Loading...","width":"100px","visible":false},{"name":"ColorActive","caption":"","edit":{"type":"CheckBox"},"add":false,"width":"0px","visible":false},{"name":"ColorValue","caption":"Background Color","add":-1,"width":"100px","edit":{"type":"SelectColor"},"visible":false},{"name":"ColorDisplay","caption":"Background Color","add":-1,"width":"130px","edit":{"type":"SelectColor"},"visible":false},{"name":"ContentColorActive","caption":"","edit":{"type":"CheckBox"},"add":false,"width":"0px","visible":false},{"name":"ContentColorValue","caption":"Text Color","add":-1,"width":"100px","edit":{"type":"SelectColor"},"visible":false},{"name":"ContentColorDisplay","caption":"Text Color","add":-1,"width":"100px","edit":{"type":"SelectColor","transparentCaption":"Default"},"visible":false}],"form":["$edit = json_decode(\"{\\\"type\\\":\\\"ValidationTextBox\\\"}\", true);","$edit[\"width\"] = \"100%\";","$edit[\"name\"] = \"Value\";","$edit[\"caption\"] = \"Value\";","return [","  $edit,","  [","    \"type\" => \"ValidationTextBox\",","    \"name\" => \"Caption\",","    \"caption\" => \"Caption\",","    \"width\" => \"100%\"","  ],","  [","    \"type\" => \"RowLayout\",","    \"items\" => [","      [","        \"type\" => \"CheckBox\",","        \"name\" => \"IconActive\",","        \"caption\" => \"Overwrite Icon\",","        \"width\" => \"200px\",","        \"onChange\" => 'IPS_UpdateFormField(\"IconValue\", \"visible\", $IconActive, $id);'","      ],","      [","        \"type\" => \"SelectIcon\",","        \"name\" => \"IconValue\",","        \"caption\" => \"Icon\",","        \"width\" => \"200px\",","        \"visible\" => isset($OPTIONS[\"IconActive\"]) ? $OPTIONS[\"IconActive\"] : false","      ]","    ]","  ],","  [","    \"type\" => \"RowLayout\",","    \"items\" => [","      [","        \"type\" => \"CheckBox\",","        \"name\" => \"ColorActive\",","        \"caption\" => \"Overwrite Background Color\",","        \"width\" => \"200px\",","        \"onChange\" => 'IPS_UpdateFormField(\"ColorValue\", \"visible\", $ColorActive, $id);'","      ],","      [","        \"type\" => \"SelectColor\",","        \"name\" => \"ColorValue\",","        \"caption\" => \"Background Color\",","        \"width\" => \"200px\",","        \"visible\" => isset($OPTIONS[\"ColorActive\"]) ? $OPTIONS[\"ColorActive\"] : false","      ]","    ]","  ],","  [","    \"type\" => \"RowLayout\",","    \"items\" => [","      [","        \"type\" => \"CheckBox\",","        \"name\" => \"ContentColorActive\",","        \"caption\" => \"Overwrite Text Color\",","        \"width\" => \"200px\",","        \"onChange\" => 'IPS_UpdateFormField(\"ContentColorValue\", \"visible\", $ContentColorActive, $id);'","      ],","      [","        \"type\" => \"SelectColor\",","        \"name\" => \"ContentColorValue\",","        \"caption\" => \"Text Color\",","        \"transparentCaption\" => \"Default\",","        \"width\" => \"200px\",","        \"visible\" => isset($OPTIONS[\"ContentColorActive\"]) ? $OPTIONS[\"ContentColorActive\"] : false","      ]","    ]","  ],","];"],"values":[{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1},{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1},{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1},{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1},{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1},{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1},{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1},{"IconDisplay":"Default","ColorDisplay":-1,"ContentColorDisplay":-1}],"onAdd":["$hasIcon = false;","$hasBackgroundColor = false;","$hasContentColor = false;","$newValues = [];","foreach(isset($OPTIONS) ? $OPTIONS : $INTERVALS as $option) {","  $option[\"IconDisplay\"] = $option[\"IconActive\"] ? $option[\"IconValue\"] : \"Default\";","  $option[\"ColorDisplay\"] = $option[\"ColorActive\"] ? $option[\"ColorValue\"] : $COLOR;","  $option[\"ContentColorDisplay\"] = $option[\"ContentColorActive\"] ? $option[\"ContentColorValue\"] : $CONTENT_COLOR;","  $newValues[] = $option;","  if ($option[\"IconActive\"]) {","    $hasIcon = true;","  }","  if ($option[\"ColorActive\"]) {","    $hasBackgroundColor = true;","  }","  if ($option[\"ContentColorActive\"]) {","    $hasContentColor = true;","  }","}","IPS_UpdateFormField(\"OPTIONS\", \"columns.4.visible\", $hasIcon, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.7.visible\", $hasBackgroundColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.10.visible\", $hasContentColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"values\", json_encode($newValues), $id);","IPS_UpdateFormField(\"INTERVALS\", \"values\", json_encode($newValues), $id);"],"onEdit":["$hasIcon = false;","$hasBackgroundColor = false;","$hasContentColor = false;","$newValues = [];","foreach(isset($OPTIONS) ? $OPTIONS : $INTERVALS as $option) {","  $option[\"IconDisplay\"] = $option[\"IconActive\"] ? $option[\"IconValue\"] : \"Default\";","  $option[\"ColorDisplay\"] = $option[\"ColorActive\"] ? $option[\"ColorValue\"] : $COLOR;","  $option[\"ContentColorDisplay\"] = $option[\"ContentColorActive\"] ? $option[\"ContentColorValue\"] : $CONTENT_COLOR;","  $newValues[] = $option;","  if ($option[\"IconActive\"]) {","    $hasIcon = true;","  }","  if ($option[\"ColorActive\"]) {","    $hasBackgroundColor = true;","  }","  if ($option[\"ContentColorActive\"]) {","    $hasContentColor = true;","  }","}","IPS_UpdateFormField(\"OPTIONS\", \"columns.4.visible\", $hasIcon, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.7.visible\", $hasBackgroundColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"columns.10.visible\", $hasContentColor, $id);","IPS_UpdateFormField(\"OPTIONS\", \"values\", json_encode($newValues), $id);","IPS_UpdateFormField(\"INTERVALS\", \"values\", json_encode($newValues), $id);"]},{"type":"ExpansionPanel","caption":"Preview Chart Settings","items":[{"type":"CheckBox","name":"SHOW_PREVIEW","caption":"Show Preview"},{"type":"Select","name":"PREVIEW_STYLE","caption":"Display Style","options":[{"value":0,"caption":"Behind the value"},{"value":1,"caption":"Below the value"},{"value":2,"caption":"Above the value"}]}]}]

Verlinke ich diese Variable ins Webfront lässt es sich nicht öffnen:

Ansonsten, was meinst du mit

Auch gerne die Powered by Shelly Geräte über den Konfigurator mal als Generes Shelly Device anlegen

das verstehe ich nicht bzw. von wo der Screenshot kommt welchen du gepostet hast.

gruß

Das ist nun gefixt.
Der Screenshot stammt vom Konfigurator, wenn es ein XT1 Gerät ist, wahrscheinlich hast du kein XT1 Gerät.

Grüße,
Kai

Bin jetzt mal auf die Testing läuft bis jetzt unauffällig weiter.

1 „Gefällt mir“

Ebenfalls auf Testing und bisher ohne negativem Befund.

1 „Gefällt mir“