Hallo zusammen,
ich habe 2 warm- und kaltweiss LED-Stripes (5050) an einem Shelly RGBW2 angeschlossen (jeweils die 2 Steuerleitungen eines Stripes an die 4 Output Kanäle des RGBW2) und diesen in "white Mode" gesetzt. Meine Idee ist die 2 Kanäle eines Stripes in einem fhem MQTT2_DEVICE zusammenzufassen.
Jetzt würde ich gerne in einem fhem device auch die Möglichkeit haben mit einem "on" Befehl die Kanäle 1 und 2 gleichzeitig einzuschalten.
Die Umgehungslösung über notify/doif funktioniert.
Schöner wäre jedoch auch diese Funktion im MQTT2_DEVICE abzubilden.
Dafür muss ich, soweit ich es weiß, bei der Original FW "nur" 2 Befehle senden.
Hat einer von euch eine Idee, wie ich das umsetzen kann?
Vielen Dank,
Gernot
Das hier funktioniert nicht:
defmod MQTT2_shellyrgbw2_6EAB2B MQTT2_DEVICE shellyrgbw2_6EAB2B
attr MQTT2_shellyrgbw2_6EAB2B IODev MQTT2
attr MQTT2_shellyrgbw2_6EAB2B autocreate 1
attr MQTT2_shellyrgbw2_6EAB2B comment Channel CW and WW for MQTT2_shellyrgbw2_6EAB2B, see also MQTT2_shellyrgbw2_6EAB2B_CH3
attr MQTT2_shellyrgbw2_6EAB2B genericDeviceType light
attr MQTT2_shellyrgbw2_6EAB2B icon light_control
attr MQTT2_shellyrgbw2_6EAB2B jsonMap brightness:pct
attr MQTT2_shellyrgbw2_6EAB2B model shelly2rgbw_4w_split
attr MQTT2_shellyrgbw2_6EAB2B readingList shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:.* {json2nameValue($EVENT,'ww_',$JSONMAP)}\
shellies/26_shellyrgbw2-6EAB2B_AB/white/1:.* ww_state\
shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set:.* { json2nameValue($EVENT,'ww_',$JSONMAP) }\
shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:.* {json2nameValue($EVENT,'cw_',$JSONMAP)}\
shellies/26_shellyrgbw2-6EAB2B_AB/white/0:.* cw_state\
shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set:.* { json2nameValue($EVENT,'cw_',$JSONMAP) }\
shellies/26_shellyrgbw2-6EAB2B_AB/status:.* { json2nameValue($EVENT, '', $JSONMAP) }\
shellies/26_shellyrgbw2-6EAB2B_AB/announce:.* { json2nameValue($EVENT, '', $JSONMAP) }\
shellies/26_shellyrgbw2-6EAB2B_AB/settings:.* { json2nameValue($EVENT, '', $JSONMAP) }
attr MQTT2_shellyrgbw2_6EAB2B room 99_MQTT2_DEVICE
attr MQTT2_shellyrgbw2_6EAB2B setList on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on;;;;shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on\
off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on;;;;shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off \
cw_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off\
cw_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on\
cw_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"}\
cw_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}\
ww_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off\
ww_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on\
ww_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"}\
ww_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}\
x_update:noArg shellies/26_shellyrgbw2-6EAB2B_AB/command update_fw\
x_mqttcom shellies/26_shellyrgbw2-6EAB2B_AB/command $EVTPART1\
x_httpcom { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVTPART1.",".ReadPassword($defs{$NAME})) }\
x_httpcom_login {StorePassword($defs{$NAME},$EVTPART1) }\
reboot:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
status:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
settings:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
shelly:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }
attr MQTT2_shellyrgbw2_6EAB2B setStateList on off cw_on cw_off ww_on ww_off cw_pct_on ww_pct_on x_update x_mqttcom x_httpcom reboot status settings shelly
attr MQTT2_shellyrgbw2_6EAB2B webCmd on:off:ww_pct:cw_pct
genausowenig, wie mit dem Versuch es mit Perl:
...
attr MQTT2_shellyrgbw2_6EAB2B setList on:noArg { fhem("set $NAME cw_on");fhem("set $NAME ww_on")}
...
)
Der myUtils Code dazu:
##############################################
# $Id: myShellyUtils.pm supernova1963 $
#
# myUtils für shellies:
# http commnands an Shelly senden und Rückgabe json - string als sub topic /<httpCMND> des
# Shelly topics zu publizieren
# Bitte am "shelly MQTT2_DEVICE" das Attribut setList um folgende Zeile eränzen:
# x_httpCMND { X_PerformShellyHttpRequest($hash,<IP des Shelly>,$EVTPART1[,<username:password>]}
# für den Aufruf und der Auswertung des http commnads erweitern
package main;
use strict;
use warnings;
use POSIX;
sub
mySHELLYUtils_Initialize($$)
{
my ($hash) = @_;
}
# Enter you functions below _this_ line.
sub X_PerformShellyHttpRequest($$)
{
my ($name, $shelly) = @_;
my $hash = $defs{$name};
my ($IP, $httpCMND, $httpCMND_Login) = split(/\,/,$shelly);
my $shellyURL = "";
if ($IP eq "" || !defined($IP))
{
Log3 $hash, 3, $hash->{NAME}.": Parameter IP ist nicht definiert!";
return;
}
if ($httpCMND eq "" || !defined($httpCMND))
{
Log3 $hash, 3, $hash->{NAME}.": Parameter httpCMND ist nicht definiert!";
return;
}
if ($httpCMND_Login eq "" || !defined($httpCMND_Login))
{
$shellyURL = "http://".$IP."/".$httpCMND;
}
else
{
if ( $httpCMND_Login =~ m/:/i)
{
$shellyURL = "http://".$httpCMND_Login."@".$IP."/".$httpCMND;
}
else
{
Log3 $hash, 3, $hash->{NAME}.": <user>:<password> nicht gesetzt oder fehlerhaft!";
return;
}
}
$hash->{helper}{httpCMND} = $httpCMND;
my $param = {
url => $shellyURL,
timeout => 5,
hash => $hash, # Muss gesetzt werden, damit die Callback funktion wieder $hash hat
method => "GET", # Lesen von Inhalten
header => "User-Agent: TeleHeater/2.2.3\r\nAccept: application/json", # Den Header gemäß abzufragender Daten ändern
callback => \&X_ParseShellyHttpResponse # Diese Funktion soll das Ergebnis dieser HTTP Anfrage bearbeiten
};
HttpUtils_NonblockingGet($param); # Starten der HTTP Abfrage. Es gibt keinen Return-Code.
}
sub X_ParseShellyHttpResponse($)
{
my ($param, $err, $data) = @_;
my $hash = $param->{hash};
my $name = $hash->{NAME};
my $rc = "";
my $httpCMND = $hash->{helper}{httpCMND};
my $IOdevice = InternalVal($name,"LASTInputDev","");
my $shellyID = ReadingsVal($name,"id","");
if($err ne "") # wenn ein Fehler bei der HTTP Abfrage aufgetreten ist
{
Log3 $name, 3, "Fehler bei dem URL-Aufruf: ".$param->{url}." - $err"; # Eintrag fürs Log
#readingsSingleUpdate($hash, "fullResponse", "ERROR", 0); # Readings erzeugen
$hash->{helper}{fullResponse} = "ERROR: ".$err;
}
elsif($data ne "") # wenn die Abfrage erfolgreich war ($data enthält die Ergebnisdaten des HTTP Aufrufes)
{
Log3 $name, 3, $param->{url}." returned: $data"; # Eintrag fürs Log
# An dieser Stelle die Antwort parsen / verarbeiten mit $data
#readingsSingleUpdate($hash, "fullResponse", $data, 0);
my $json = new JSON;
my $perl_scalar = $json->decode($data);
$hash->{helper}{fullResponse} = $json->pretty->encode($perl_scalar);
$rc = fhem("set ".$IOdevice." publish -r shellies/".$shellyID."/".$httpCMND." ".$data);
Log3 $name, 3, $name.": rc json2reading: ".json2reading($name, $data);
}
# Damit ist die Abfrage zuende.
# Evtl. einen InternalTimer neu schedulen
}
sub StorePassword($$) {
my ($hash, $password) = @_;
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
my $key = getUniqueId().$index;
my $enc_pwd = "";
my $name = $hash->{NAME};
if(eval "use Digest::MD5;1")
{
$key = Digest::MD5::md5_hex(unpack "H*", $key);
$key .= Digest::MD5::md5_hex($key);
}
for my $char (split //, $password)
{
my $encode=chop($key);
$enc_pwd.=sprintf("%.2x",ord($char)^ord($encode));
$key=$encode.$key;
}
my $err = setKeyValue($index, $enc_pwd);
if(defined($err)) {
Log3 $hash->{NAME}, 3, "$name: error while saving the password - $err";
return "error while saving the password - $err";
}
Log3 $hash->{NAME}, 3, "$name: password successfully saved";
return "password successfully saved";
}
sub ReadPassword($) {
my ($hash) = @_;
my $name = $hash->{NAME};
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
my $key = getUniqueId().$index;
my ($password, $err);
Log3 $name, 4, "($name) - Read password from file";
($err, $password) = getKeyValue($index);
if ( defined($err) )
{
Log3 $name, 4, "($name) - unable to read password from file: $err";
return undef;
}
if ( defined($password) )
{
if ( eval "use Digest::MD5;1" )
{
$key = Digest::MD5::md5_hex(unpack "H*", $key);
$key .= Digest::MD5::md5_hex($key);
}
my $dec_pwd = '';
for my $char (map { pack('C', hex($_)) } ($password =~ /(..)/g))
{
my $decode=chop($key);
$dec_pwd.=chr(ord($char)^ord($decode));
$key=$decode.$key;
}
return $dec_pwd;
}
else
{
Log3 $name, 4, "($name) - No password in file";
return undef;
}
}
1;
=pod
=item summary Utilitiies for Shelly devices as MQTT2_CLIENT.
=item summary_DE Hilfsprogramme für Shellies, die als MQTT2_CLIENT definiert sind.
=begin html
<a name="myShellyUtils"></a>
<h3>myShellyUtils</h3>
Please look at German help <a href="commandref_de.html#mySHELLYUtils">myShellyUtils</a>
=end html
=begin html_DE
<a name="myShellyUtils"></a>
<h3>myShellyUtils</h3>
<h3>setlist Befehle</h3>
<ul>
<code>X_PerformShellyHttpRequest(<device>,<ip>,<command>,<user:password>)</code>
<br>
Führt einen Shelly http Befehl aus und führt ein MQTT publish mit dem zurückgegebenen json - String aus.<br>
Sollte der Shelly ein <b>RESTRICT LOGIN</b> besitzen, muss vorab einmalig der login zu diesem fhem device festgelegt werden.<br>
<b>StorePassword</b>.
<br>
<code>set <device name> x_httpcom_login <user:password></code><br>
Dabei muss der user und das password dem "RESTRICT LOGIN" des Shelly entsprechen
<br>
Beispiele:<br>
<ul>
<code>attr device setlist settings:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVTPART1.",".ReadPassword($defs{$NAME})) }</code><br>
</ul>
</ul>
=end html_DE
=cut
P.S.: Mit tasmota hatte ich es bereits umgesetzt. Da gibt es den backlog command, mit dem ich 2 Befehle an den RGBW2 senden kann.
Schau mal in die mqtt2 attr Template Datei. Oder schau dir generell die templates mal an.
Variante A) eines der templates wird eh schon alles haben was du willst.
Variante B) du muss es selber leicht anpassen.
Denke aber das du dadurch alle deine Fragen beantwortet bekommst und das beste kommt noch - du erfährst noch mehr und entdeckst direkt neue Fragen ;)
Edit: ach ja und fürs Verständnis der templates ggf noch die Doku seitens shelly zum Thema mqtt. Da kannst du die setlist / resdinglist Befehle gut ableiten.
Gruß,
87insane
Gesendet von meinem LM-G810 mit Tapatalk
Vielen Dank für die Antwort, 87insane.
Ich habe nur das 4-Channel Shelly gefunden, dass kenne ich.
Auch das Suchen nach einem setlist befehl, der mehrere MQTT commands "published" habe ich in der gesamten Datei nicht gefunden.
Könntest du bitte etwas konkreter werden, ich weiß nicht, was du meinst?
Gernot
Es gibt mehrere setlist Kommandos in den ganzen templates bei denen auch mehrere bzw zusammen gesetzte Befehle gesendet werden.
An sich kannst du gerade bei dem shelly rgb2 Template einen mega zusammengebauten Befehl begutachten.
Dein Vorhaben hat bei mir, nachdem ich das nun 8 mal gelesen habe aber auch noch nicht ganz Klick gemacht. Kann auch sein das ich noch etwas falsch verstehe.
Gesendet von meinem LM-G810 mit Tapatalk
MQTT2 kann nicht mit einem set Befehl mehrere topics publishen.
Um zwei Kanaele auf einmal zu schalten empfehle ich structure.
Als Hack gilt ein dummy mit notify und als ganz uebler Hack ein cmdalias :)
Nochmals, danke, 87insane
leider wird dieser Befehl (und es ist auch nur 1 publish command mit zusammengesetzten json als value) nur im color Mode vom Shelly RGBW2 unterstützt.
Ich möchte das für tasmota geflashten RGBW2 umgesetzte mit der originalen FW realisieren (https://www.shelly-support.eu/forum/index.php?thread/2306-meine-umsetzung-eines-rgbw2-mit-2-led-stripes-5050-ww-cw/&postID=28532#post28532)
Danke, rudolfkoenig,
dann doch mit notify
Gernot
@rudolfkoenig: Jetzt mal ganz grundlegend... Warum nicht?
Ich meine wenn ich im Perl Zweig dahinter einfach zwei Befehle mit einem set absetze, ist das zwar gefudelt aber müsste doch klappen?
Mal eben kurz aus einem meiner Fudel Geräte rauß gekramt...
setList switch:on,off,refresh {fhem("set wol_kai_pc $EVTPART1")}
Im Perl Part muss das doch möglich sein, einfach den zweiten Befehl dahinter zu schieben? (Gefudelt aber finde ich besser als x weitere Geräte).
EDIT: Das natürlich mit publish Befehlen von mqtt.....
ZitatIch meine wenn ich im Perl Zweig dahinter einfach zwei Befehle mit einem set absetze, ist das zwar gefudelt aber müsste doch klappen?
Ja, sollte tun, ist in meinen Augen die gleiche Hack-Klasse wie cmdalias.
Oh! Ganz übel! Ich las davon.
Spaß bei Seite. In solchen Momenten freunde ich mich mit FHEM meist wieder an, wenn ich sauer bin. Ich mag es nicht wenn ich für "Eine Sache" x-Geräte haben muss. Im Bereich von MQTT kann man sich super viel selber "hacken". Dazu noch einfach in einer Zeile und auch in dem Gerät wo man das braucht. Mit cmdalias kam ich z.B. noch nie klar :(
Aber okay. Es geht also über viele Wege, wie immer in FHEM ;) Welche wäre am Ende aus Programmierer-Sicht die Beste (Zeit/Ressorcen)? Ich meine wir reden über nichts wildes aber immer wenn ich mal in einem "nicht MQTT" Gerät unterwegs bin, wird es meist komplizierter als sonst. Bei MQTT kann ich in FHEM auch direkt in den Readings, Dinge hinterlegen und mir alles zurecht biegen. Das weiß Du sicher alles aber da bin ich auch echt neugierig wie Du das siehst!
Ich habe folgendes versucht:
attr MQTT2_shellyrgbw2_6EAB2B setList on:noArg { fhem("set $NAME cw_on");;;;fhem("set $NAME ww_on")} \
off:noArg { fhem("set $NAME cw_off");;;;fhem("set $NAME ww_off")} \
cw_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off\
cw_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on\
cw_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"}\
cw_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}\
ww_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off\
ww_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on\
ww_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"}\
ww_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}\
Das Ergebnis:
2020.03.24 20:18:51 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B on
2020-03-24 20:18:51 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B set_on
2020.03.24 20:18:51 3 : Bad regexp: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^MQTT2:{ <-- HERE :.*$/ at ./FHEM/10_MQTT2_DEVICE.pm line 546.
Was mache ich falsch?
Auch folgendes funktioniert nicht:
attr MQTT2_shellyrgbw2_6EAB2B setList on:noArg { fhem("set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on");;fhem("set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on")} \
off:noArg { fhem("set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off");;fhem("set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off")} \
cw_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off\
cw_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on\
cw_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"}\
cw_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}\
ww_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off\
ww_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on\
ww_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"}\
ww_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}\
Ergebnis:
2020-03-24 20:38:16 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B set_on
2020.03.24 20:38:16 3 : Bad regexp: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^MQTT2:{ <-- HERE :.*$/ at ./FHEM/10_MQTT2_DEVICE.pm line 546.
Die "Bad regexp" Zeile hat mit einem readingList was zu tun.
Ich habe gerade die Meldung erweitert, damit man auch das problematische Regexp sieht.
Bin gespannt was morgen hier steht. Du muss auch nicht doppelt in fhem("") gehen. Macht es ggf einfacher.
Bist aber in meinen Augen nah dran. Morgen gucke ich wieder nach und helfe fleißig :)
Edit: mich würde noch interessieren woher du kopierst..sieht aus wie aus einem Template. Wenn du das so in die Liste kopierst, wird es nicht gehen können.
Gesendet von meinem LM-G810 mit Tapatalk
Wenn es nicht unbedingt MQTT2_DEVICE sein muss, dann kann MQTT_GENERIC_BRIDGE ein event (aus einem Reading) auf zwei Topics posten.
in etwa so:
attr <device name> mqttPublish state:topic=topic1 state!2:topic=topic2
Ich habe folgendes geändert:
- Ein update und einen restart durchgeführt
- Aus dem readingList Attribut alles nicht notwendige entfernt,
- Aus dem setList Attribut alles nicht im Zusammenhang stehende entfernt und die verbliebenen getestet
- Den Perl Code für on:noArg und off:noArg gekürzt (in einer fhem()-Funktion zusammengeführt
Das Ergebnis weicht imo nicht von dem gestrigen ab (Einrückung der Rückgaben habe ich für die Übersicht hinzugefügt):
2020.03.25 09:30:28 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B ww_on
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_on
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_state: on
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 92
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_overpower: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_power: 27.97
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_ison: true
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_timer_remaining: 0
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_has_timer: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_state: on
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 on
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_timer_remaining: 0
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 91
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_has_timer: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_overpower: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_ison: true
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_power: 27.67
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 has_timer: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 pct: 91
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 timer_remaining: 0
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 power: 27.67
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 overpower: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 ison: true
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 off
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 mode: white
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 timer_remaining: 0
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 pct: 50
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 has_timer: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 ison: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 overpower: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 power: 0.00
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 off
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 pct: 50
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 mode: white
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 timer_remaining: 0
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 has_timer: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 overpower: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 ison: false
2020-03-25 09:30:28 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 power: 0.00
2020.03.25 09:30:31 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B ww_off
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_off
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_state: on
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 92
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_overpower: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_ison: true
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_power: 27.97
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_has_timer: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_timer_remaining: 0
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 off
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_state: off
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 has_timer: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 pct: 91
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 timer_remaining: 0
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 power: 27.67
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 overpower: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 ison: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_power: 27.67
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_ison: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_overpower: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_has_timer: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_timer_remaining: 0
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 91
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 off
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 overpower: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 ison: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 power: 0.00
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 pct: 50
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 mode: white
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 timer_remaining: 0
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 has_timer: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 off
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 power: 0.00
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 ison: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 overpower: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 has_timer: false
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 timer_remaining: 0
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 mode: white
2020-03-25 09:30:31 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 pct: 50
2020.03.25 09:30:33 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B ww_pct 32
2020-03-25 09:30:33 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:30:33 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 brightness: 32
2020-03-25 09:30:33 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:30:33 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 32
2020-03-25 09:30:33 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_state: on
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_has_timer: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_timer_remaining: 0
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_power: 10.75
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_ison: true
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_overpower: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 92
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_state: off
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 off
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 32
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_timer_remaining: 0
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_has_timer: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_overpower: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_ison: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_power: 0.00
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 ison: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 overpower: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 power: 0.00
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 timer_remaining: 0
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 pct: 32
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 has_timer: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 off
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 overpower: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 ison: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 power: 0.00
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 pct: 50
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 timer_remaining: 0
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 mode: white
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 has_timer: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 off
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 mode: white
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 timer_remaining: 0
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 pct: 50
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 has_timer: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 ison: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 overpower: false
2020-03-25 09:30:34 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 power: 0.00
2020.03.25 09:30:36 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B cw_on
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_on
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_state: on
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_timer_remaining: 0
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_has_timer: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_power: 10.75
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_ison: true
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_overpower: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 92
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 off
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_state: off
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_overpower: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_has_timer: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_power: 0.00
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_ison: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 32
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_timer_remaining: 0
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 timer_remaining: 0
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 pct: 32
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 has_timer: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 ison: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 overpower: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 power: 0.00
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 off
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 has_timer: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 pct: 50
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 mode: white
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 timer_remaining: 0
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 power: 0.00
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 overpower: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 ison: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 off
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 power: 0.00
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 ison: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 overpower: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 has_timer: false
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 timer_remaining: 0
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 mode: white
2020-03-25 09:30:36 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 pct: 50
2020.03.25 09:30:38 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B cw_off
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_off
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_state: off
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_ison: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_power: 11.68
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_timer_remaining: 0
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_has_timer: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 92
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_overpower: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 off
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_state: off
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_overpower: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_has_timer: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_power: 0.00
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_ison: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_timer_remaining: 0
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 32
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 has_timer: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 pct: 32
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 timer_remaining: 0
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 power: 0.00
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 overpower: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 ison: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 off
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 power: 0.00
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 ison: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 overpower: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 has_timer: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 timer_remaining: 0
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 mode: white
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 pct: 50
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 off
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 mode: white
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 timer_remaining: 0
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 pct: 50
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 has_timer: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 ison: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 overpower: false
2020-03-25 09:30:38 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 power: 0.00
2020.03.25 09:30:40 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B cw_pct 56
2020-03-25 09:30:40 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 56
2020-03-25 09:30:40 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:30:40 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_state: off
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_timer_remaining: 0
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_has_timer: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_ison: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_power: 0.00
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_overpower: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 56
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 off
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_state: off
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 power: 0.00
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 overpower: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 ison: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 has_timer: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 pct: 32
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 timer_remaining: 0
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_timer_remaining: 0
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 32
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_overpower: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_has_timer: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_power: 0.00
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_ison: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 off
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 power: 0.00
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 overpower: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 ison: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 has_timer: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 pct: 50
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 mode: white
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 timer_remaining: 0
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 off
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 has_timer: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 pct: 50
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 mode: white
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 timer_remaining: 0
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 power: 0.00
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 overpower: false
2020-03-25 09:30:41 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 ison: false
2020.03.25 09:36:11 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B on
2020-03-25 09:36:11 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B on
2020.03.25 09:36:11 3 : Bad regexp MQTT2:{:.*: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^MQTT2:{ <-- HERE :.*$/ at ./FHEM/10_MQTT2_DEVICE.pm line 546.
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_state: off
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_pct: 56
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_overpower: false
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_power: 0.00
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_ison: false
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_mode: white
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_timer_remaining: 0
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B cw_has_timer: false
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_state: off
2020-03-25 09:36:13 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 off
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_timer_remaining: 0
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_pct: 32
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_has_timer: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_mode: white
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_overpower: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_ison: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_power: 0.00
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 power: 0.00
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 ison: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 overpower: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 has_timer: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 timer_remaining: 0
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 mode: white
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH2 pct: 32
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 off
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 pct: 50
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 timer_remaining: 0
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 mode: white
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 has_timer: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 overpower: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 ison: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH3 power: 0.00
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 off
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 mode: white
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 timer_remaining: 0
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 pct: 50
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 has_timer: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 ison: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 overpower: false
2020-03-25 09:36:14 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B_CH4 power: 0.00
2020.03.25 09:36:16 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B off
2020-03-25 09:36:16 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B off
2020.03.25 09:36:16 3 : Bad regexp MQTT2:{:.*: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^MQTT2:{ <-- HERE :.*$/ at ./FHEM/10_MQTT2_DEVICE.pm line 546.
Das list der vollständigkeitshalber:
Internals:
CID shellyrgbw2_6EAB2B
DEF shellyrgbw2_6EAB2B
DEVICETOPIC MQTT2_shellyrgbw2_6EAB2B
FUUID 5e74d5b5-f33f-8c20-53fb-1b24ef17a78cb94e
FVERSION 10_MQTT2_DEVICE.pm:0.215010/2020-03-24
IODev MQTT2
LASTInputDev MQTT2
MQTT2_MSGCNT 514
MQTT2_TIME 2020-03-25 10:04:16
MSGCNT 514
NAME MQTT2_shellyrgbw2_6EAB2B
NR 174
STATE off
TYPE MQTT2_DEVICE
JSONMAP:
brightness pct
READINGS:
2020-03-25 09:17:17 auth true
2020-03-25 10:04:16 cw_has_timer false
2020-03-25 10:04:16 cw_ison false
2020-03-25 10:04:16 cw_mode white
2020-03-25 10:04:16 cw_overpower false
2020-03-25 10:04:16 cw_pct 56
2020-03-25 10:04:16 cw_power 0.00
2020-03-25 10:04:16 cw_state off
2020-03-25 10:04:16 cw_timer_remaining 0
2020-03-25 09:17:17 fw 20200309-104453/v1.6.0@43056d58
2020-03-25 09:08:11 fw_ver 20200309-104453/v1.6.0@43056d58
2020-03-25 09:08:11 id 26_shellyrgbw2-6EAB2B_AB
2020-03-25 09:08:11 ip 192.168.1.91
2020-03-25 09:17:17 mac ECFABC6EAB2B
2020-03-25 09:08:11 new_fw false
2020-03-25 09:17:17 num_outputs 4
2020-03-25 09:36:16 state off
2020-03-25 09:17:17 type SHRGBW2
2020-03-25 10:04:16 ww_has_timer false
2020-03-25 10:04:16 ww_ison false
2020-03-25 10:04:16 ww_mode white
2020-03-25 10:04:16 ww_overpower false
2020-03-25 10:04:16 ww_pct 32
2020-03-25 10:04:16 ww_power 0.00
2020-03-25 10:04:16 ww_state off
2020-03-25 10:04:16 ww_timer_remaining 0
helper:
fullResponse {
"mac" : "ECFABC6EAB2B",
"type" : "SHRGBW2",
"auth" : true,
"fw" : "20200309-104453/v1.6.0@43056d58",
"num_outputs" : 4
}
httpCMND shelly
Attributes:
IODev MQTT2
autocreate 1
comment Channel CW and WW for MQTT2_shellyrgbw2_6EAB2B, see also MQTT2_shellyrgbw2_6EAB2B_CH3
genericDeviceType light
icon light_control
jsonMap brightness:pct
model shelly2rgbw_4w_split
readingList shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:.* { json2nameValue($EVENT,'ww_',$JSONMAP) }
shellies/26_shellyrgbw2-6EAB2B_AB/white/1:.* ww_state
shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set:.* { json2nameValue($EVENT,'ww_',$JSONMAP) }
shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:.* { json2nameValue($EVENT,'cw_',$JSONMAP) }
shellies/26_shellyrgbw2-6EAB2B_AB/white/0:.* cw_state
shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set:.* { json2nameValue($EVENT,'cw_',$JSONMAP) }
shellies/26_shellyrgbw2-6EAB2B_AB/status:.* { json2nameValue($EVENT, '', $JSONMAP) }
shellies/26_shellyrgbw2-6EAB2B_AB/announce:.* { json2nameValue($EVENT, '', $JSONMAP) }
shellies/26_shellyrgbw2-6EAB2B_AB/settings:.* { json2nameValue($EVENT, '', $JSONMAP) }
room 99_MQTT2_DEVICE
setList on:noArg { fhem("set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;;set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1")}
off:noArg { fhem("set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;;set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1")}
cw_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off
cw_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on
cw_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"}
cw_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}
ww_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off
ww_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on
ww_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"}
ww_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}
webCmd on:off:ww_on:ww_off:ww_pct:cw_on:cw_off:cw_pct
Zitat von: 87insane am 24 März 2020, 21:40:50
Edit: mich würde noch interessieren woher du kopierst..sieht aus wie aus einem Template. Wenn du das so in die Liste kopierst, wird es nicht gehen können.
Ich habe aus der raw Definition kopiert.
ZitatDas Ergebnis weicht imo nicht von dem gestrigen ab
Doch, liefert aber keine neuen Erkenntnisse.
Einer der readingList Zeilen beginnt mit MQTT2:{, offensichtlich nicht in der MQTT2_DEVICE-Instanz, was Du verdaechtigst.
Ich habe das Modul jetzt erweitert, dass auch Instanzname ausgegeben wird.
Die Instanz sollte man aber auch mit dem folgenden Befehl finden:
list readingList=.+MQTT2.+ NAME
Hab mich gestern damit noch beschäftigt gehabt, bei mir klappt das (getestet an einem Tasmota_RGBW-Bulb) nur mit einem sleep zwischen den Befehlen, sonst wird immer nur der letzte Befehl ausgeführt.
test:noArg { fhem("set $NAME pct 80;sleep 1;set $NAME rgb 3535CC")}
Gruß
Thomas
Das list readingList=.+MQTT2.+ NAME
hat folgende 2 Ergebnisse identifiziert:
MQTT2_MQTT2 MQTT2_MQTT2
Diese werden scheinbar automatisch gebildet. Nachdem ich dieses Device gelöscht habe, und einen Befehl am kritischen Device ausgeführt habe, gab der event Monitor folgendes aus:
2020.03.25 11:52:05 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B ww_on
2020.03.25 11:52:05 2 : autocreate: define MQTT2_MQTT2 MQTT2_DEVICE MQTT2 MQTT2
2020.03.25 11:52:05 2 : autocreate: define FileLog_MQTT2_MQTT2 FileLog /log/MQTT2_DEVICE/MQTT2_MQTT2-%Y-%m.log MQTT2_MQTT2
2020.03.25 11:52:05 1 : define FileLog_MQTT2_MQTT2 FileLog /log/MQTT2_DEVICE/MQTT2_MQTT2-%Y-%m.log MQTT2_MQTT2: Can't open /log/MQTT2_DEVICE/MQTT2_MQTT2-2020-03.log: No such file or directory
2020.03.25 11:52:05 1 : ERROR: Can't open /log/MQTT2_DEVICE/MQTT2_MQTT2-2020-03.log: No such file or directory
2020-03-25 11:52:05 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B ww_on
...
Führe ich die "Problem-Befehle" aus:
2020.03.25 12:16:43 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B on
2020-03-25 12:16:43 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B on
2020.03.25 12:16:43 3 : Bad regexp MQTT2:{:.*: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^MQTT2:{ <-- HERE :.*$/ at ./FHEM/10_MQTT2_DEVICE.pm line 546.
2020.03.25 12:16:48 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B off
2020-03-25 12:16:48 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B off
2020.03.25 12:16:48 3 : Bad regexp MQTT2:{:.*: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^MQTT2:{ <-- HERE :.*$/ at ./FHEM/10_MQTT2_DEVICE.pm line 546.
Das list des neue angelegten MQTT2_MQTT2 Devices:
Internals:
CFGFN
CID MQTT2
DEF MQTT2
DEVICETOPIC MQTT2_MQTT2
FUUID 5e7b37d5-f33f-8c20-6294-bfed0e812f4424d1
IODev MQTT2
LASTInputDev MQTT2
MQTT2_MSGCNT 3
MQTT2_TIME 2020-03-25 12:10:44
MSGCNT 3
NAME MQTT2_MQTT2
NR 277
STATE ???
TYPE MQTT2_DEVICE
READINGS:
2020-03-25 12:15:59 Power1 0
2020-03-25 12:10:44 white_0_command off
2020-03-25 12:10:35 white_1_command off
Attributes:
IODev MQTT2
readingList MQTT2:shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command:.* white_1_command
MQTT2:shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command:.* white_0_command
MQTT2:home/00_ERDGESCHOSS/03_KUECHE/03_Dunstabzugshaube/cmnd/Power1:.* Power1
room 99_MQTT2_DEVICE
Zitat2020.03.25 11:52:05 1 : ERROR: Can't open /log/MQTT2_DEVICE/MQTT2_MQTT2-2020-03.log: No such file or directory
Ich gehe davon aus, dass du bei den autocreate Instanz das fileLog Attribut auf /log/MQTT2_DEVICE/%NAME-%Y-%m.log gesetzt hast, aber das Verzeichnis /log/MQTT2_DEVICE nicht erstellt hast. Vermutlich sollte es log/MQTT2_DEVICE/%NAME-%Y-%m.log heissen (ohne fuehrenden /), das Verzeichnis /opt/fhem/log/MQTT2_DEVICE muss aber weiterhin erstellt werden.
Zitat2020.03.25 12:16:48 3 : Bad regexp MQTT2:{:.*
Dafuer muesste ich genauer wissen was MQTT2_CLIENT empfangen hat, bitte ein "attr MQTT2 verbose 5" Log vom Sendevorgang hier anhaengen.
Hey,
um das einfach mal ganz simpel zu testen habe ich mal folgendes probiert:
Einem Gerät diesen Befehl hinzugefügt.
x_test:noArg {fhem "set MQTT2_shelly1pm_E649CE on; set MQTT2_shelly1pm_005A2D on;";}
klappt auch.
Also könnte man diverse Befehle, direkt im Gerät hinterlegen.
EDIT:
Dein Beispiel:
on:noArg { fhem "set $NAME BEFEHL; set $NAME BEFEHL;";}
Bitte guck dir genau an was bei mir anders ist als bei dir. Denke dann schaffst du es ohne Probleme.
Ich habe setList gem. Empfehlung 87insane angepaßt und verbose des MQTT2_SERVER auf 5 gestellt.
2020.03.25 16:27:15 3 : MQTT2_DEVICE set MQTT2_shellyrgbw2_6EAB2B A_on
2020.03.25 16:27:15 5 : MQTT2: PUBLISH {fhem "set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1;";}
2020.03.25 16:27:15 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => {fhem:"set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1;";}
2020.03.25 16:27:15 5 : out: PUBLISH: 0(190)(1)(0)(5){fhem"set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1;";}
2020.03.25 16:27:15 5 : MQTT2: dispatch autocreate=complex\000MQTT2\000{fhem\000"set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;set MQTT2_shellyrgbw2_6EAB2B shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1;";}
2020-03-25 16:27:15 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_on
2020.03.25 16:27:15 3 : Bad regexp MQTT2:{fhem:.*: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^MQTT2:{ <-- HERE fhem:.*$/ at ./FHEM/10_MQTT2_DEVICE.pm line 546.
2020.03.25 16:27:19 5 : in: PINGREQ: (192)(0)
2020.03.25 16:27:19 4 : MQTT2_192.168.1.113_50507 PINGREQ
2020.03.25 16:27:19 5 : out: PINGRESP: (208)(0)
2020.03.25 16:27:19 5 : in: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/0off
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/0:off
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/0:off
2020.03.25 16:27:19 5 : out: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/0off
2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/0\000off
2020.03.25 16:27:19 5 : in: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : out: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status\000{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : in: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/1off
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/1:off
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/1:off
2020.03.25 16:27:19 5 : out: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/1off
2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/1\000off
2020.03.25 16:27:19 5 : in: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : out: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status\000{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":57,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : in: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/2off
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/2:off
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/2:off
2020.03.25 16:27:19 5 : out: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/2off
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B white_0: off
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_CW_has_timer: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_CW_timer_remaining: 0
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_CW_overpower: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_CW_power: 0.00
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_CW_pct: 57
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_CW_ison: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_CW_mode: white
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B white_1: off
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_WW_power: 0.00
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_WW_overpower: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_WW_mode: white
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_WW_pct: 57
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_WW_timer_remaining: 0
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_WW_ison: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B A_WW_has_timer: false
<
2020.03.25 16:27:19 5 : in: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : out: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status\000{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : in: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/3off
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/3:off
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/3:off
2020.03.25 16:27:19 5 : out: PUBLISH: 0.(0))shellies/26_shellyrgbw2-6EAB2B_AB/white/3off
2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/3\000off
div class='fhemlog'>2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/2\000off</div>2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B white_2: off
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_CW_timer_remaining: 0
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_CW_power: 0.00
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_CW_overpower: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_CW_has_timer: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_CW_ison: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_CW_pct: 50
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_CW_mode: white
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B white_3: off
2020.03.25 16
2020.03.25 16:27:19 4 : MQTT2_192.168.1.91_46609 shellyrgbw2-6EAB2B PUBLISH shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2_192.168.1.111_57476 mqtt-explorer-2d48ce89 => shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status:{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : out: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
2020.03.25 16:27:19 5 : MQTT2: dispatch autocreate=complex\000shellyrgbw2_6EAB2B\000shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status\000{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}
:27:19 5 : in: PUBLISH: 0(164)(1)(0)0shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status{"ison":false,"has_timer":false,"timer_remaining":0,"mode":"white","brightness":50,"power":0.00,"overpower":false}</div>2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_WW_ison: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_WW_power: 0.00
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_WW_mode: white
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_WW_pct: 50
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_WW_has_timer: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_WW_overpower: false
2020-03-25 16:27:19 MQTT2_DEVICE MQTT2_shellyrgbw2_6EAB2B B_WW_timer_remaining: 0
Das Problemdevice:
Internals:
CFGFN
CID shellyrgbw2_6EAB2B
DEF shellyrgbw2_6EAB2B
DEVICETOPIC MQTT2_shellyrgbw2_6EAB2B
FUUID 5e7b4229-f33f-8c20-2151-6c47a4ca36ccde84
IODev MQTT2
LASTInputDev MQTT2
MQTT2_MSGCNT 3906
MQTT2_TIME 2020-03-25 16:32:49
MSGCNT 3906
NAME MQTT2_shellyrgbw2_6EAB2B
NR 340
STATE A_on
TYPE MQTT2_DEVICE
JSONMAP:
brightness pct
white_0 A_WW
white_1 A_CW
white_2 B_WW
white_3 B_CW
OLDREADINGS:
READINGS:
2020-03-25 16:32:49 A_CW_has_timer false
2020-03-25 16:32:49 A_CW_ison false
2020-03-25 16:32:49 A_CW_mode white
2020-03-25 16:32:49 A_CW_overpower false
2020-03-25 16:32:49 A_CW_pct 57
2020-03-25 16:32:49 A_CW_power 0.00
2020-03-25 16:32:49 A_CW_timer_remaining 0
2020-03-25 16:32:49 A_WW_has_timer false
2020-03-25 16:32:49 A_WW_ison false
2020-03-25 16:32:49 A_WW_mode white
2020-03-25 16:32:49 A_WW_overpower false
2020-03-25 16:32:49 A_WW_pct 57
2020-03-25 16:32:49 A_WW_power 0.00
2020-03-25 16:32:49 A_WW_timer_remaining 0
2020-03-25 16:32:49 B_CW_has_timer false
2020-03-25 16:32:49 B_CW_ison false
2020-03-25 16:32:49 B_CW_mode white
2020-03-25 16:32:49 B_CW_overpower false
2020-03-25 16:32:49 B_CW_pct 50
2020-03-25 16:32:49 B_CW_power 0.00
2020-03-25 16:32:49 B_CW_timer_remaining 0
2020-03-25 16:32:49 B_WW_has_timer false
2020-03-25 16:32:49 B_WW_ison false
2020-03-25 16:32:49 B_WW_mode white
2020-03-25 16:32:49 B_WW_overpower false
2020-03-25 16:32:49 B_WW_pct 50
2020-03-25 16:32:49 B_WW_power 0.00
2020-03-25 16:32:49 B_WW_timer_remaining 0
2020-03-25 16:27:15 state A_on
2020-03-25 16:32:49 white_0 off
2020-03-25 16:32:49 white_1 off
2020-03-25 16:32:49 white_2 off
2020-03-25 16:32:49 white_3 off
Attributes:
IODev MQTT2
jsonMap brightness:pct white_0:A_WW white_1:A_CW white_2:B_WW white_3:B_CW
readingList shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0:.* white_0
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:.* { json2nameValue($EVENT, 'A_CW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1:.* white_1
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:.* { json2nameValue($EVENT, 'A_WW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2:.* white_2
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status:.* { json2nameValue($EVENT, 'B_CW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3:.* white_3
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status:.* { json2nameValue($EVENT, 'B_WW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/online:.* online
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/announce:.* { json2nameValue($EVENT, '', $JSONMAP) }
room 99_MQTT2_DEVICE
setList A_on:noArg {fhem "set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1;";}
A_off:noArg {fhem "set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1;";}
A_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off
A_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on
A_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"}
A_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}
A_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off
A_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on
A_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"}
A_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}
B_on:noArg {fhem "set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command $EVTPART1;set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command $EVTPART1;";}
B_off:noArg {fhem "set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command $EVTPART1;set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command $EVTPART1;";}
B_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command off
B_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command on
B_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"mode":"white","brightness":"$EVTPART1"}
B_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}
B_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command off
B_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command on
B_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"mode":"white","brightness":"$EVTPART1"}
B_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}
webCmd A_on:A_off:A_WW_on:A_WW_off:A_WW_pct:A_CW_on:A_CW_off:A_CW_pct
Du weiß wofür verbose ist?
Testen kannst auch nur du, da du die Hardware dafür hast.
A_on:noArg {fhem "set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command $EVTPART1;set $NAME shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command $EVTPART1;";}
In $EVTPART1 steht mMn jetzt A_on, du willst doch on ?
Ist wohl eine Verkettung von Problemen (wie so oft):
- in der setList war hinter dem } noch ein Leerzeichen, damit wird es nicht als Perl Expression erkannt, sondern als "topic message", und damit ist das topic { oder {fhem.
- im MQTT2_SERVER ist rePublish gesetzt (warum eigentlich?), damit wird dieses Topic dem gleichen FHEM wieder zum Verarbeiten gegeben
- wg. autocreate wird ein MQTT2_DEVICE Instanz angelegt, der in seiner naiven Art annimt, dass ein topic nur aus "normalen" Zeichen besteht, und es ungeaendert als regexp anlegt. Leider muss man "neuerdings" { in Regexp schuetzen, abgesehen davon darf ein topic bis auf Null alles enthalten.
Ich habe jetzt das Modul geaendert:
- bei einem Perl Expression wird das Leerzeichen hinten ignoriert. Leerzeichen vorne war bisher auch kein Thema weil Trennzeichen.
- beim automatisches Anlegen des Topic-Regexps wird alles ausser a-z0-9_/- in die \x Notation konvertiert.
Vielen Dank für die Unterstützung, Euch allen,
Morgen werde ich es dann wohl schaffen.
Entschuldigt meine Fehler und Versäumnisse, die Euch soviel Zeit gekostet haben.
Dennoch glaube ich, dass ich auf Sicht nicht der einzige sein werde, der zwei 5050 LED Stripes mit cw und ww LED's, anschließen und steuern will.
Die sind wirklich hell genug um sie im Badezimmer einzusetzen.
Danke,
Gernot
Die Lösung und warum du diesen Weg gewählt hast, darfst du gern mitteilen :)
Gesendet von meinem LM-G810 mit Tapatalk
Es funktioniert soweit alles, wie ich es mir vorgestellt habe.
Vielen Dank, noch einmal an alle Beteiligten!
lg
Gernot
Hier das funktionierende List:
Internals:
CID shellyrgbw2_6EAB2B
DEF shellyrgbw2_6EAB2B
DEVICETOPIC 26_WandStripes
FUUID 5e7b4229-f33f-8c20-2151-6c47a4ca36ccde84
FVERSION 10_MQTT2_DEVICE.pm:0.215180/2020-03-25
IODev MQTT2
LASTInputDev MQTT2
MQTT2_MSGCNT 2714
MQTT2_TIME 2020-03-26 18:23:49
MSGCNT 2714
NAME 26_WandStripes
NR 177
STATE LED Wand ist aus!
aktuell
off
true
TYPE MQTT2_DEVICE
JSONMAP:
brightness pct
READINGS:
2020-03-26 18:23:49 A_CW off
2020-03-26 18:23:49 A_CW_has_timer false
2020-03-26 18:23:49 A_CW_ison false
2020-03-26 18:23:49 A_CW_mode white
2020-03-26 18:23:49 A_CW_overpower false
2020-03-26 18:23:49 A_CW_pct 25
2020-03-26 18:23:49 A_CW_power 0.00
2020-03-26 18:23:49 A_CW_timer_remaining 0
2020-03-26 18:23:49 A_WW off
2020-03-26 18:23:49 A_WW_has_timer false
2020-03-26 18:23:49 A_WW_ison false
2020-03-26 18:23:49 A_WW_mode white
2020-03-26 18:23:49 A_WW_overpower false
2020-03-26 18:23:49 A_WW_pct 90
2020-03-26 18:23:49 A_WW_power 0.00
2020-03-26 18:23:49 A_WW_timer_remaining 0
2020-03-26 18:23:49 B_CW off
2020-03-26 18:23:49 B_CW_has_timer false
2020-03-26 18:23:49 B_CW_ison false
2020-03-26 18:23:49 B_CW_mode white
2020-03-26 18:23:49 B_CW_overpower false
2020-03-26 18:23:49 B_CW_pct 25
2020-03-26 18:23:49 B_CW_power 0.00
2020-03-26 18:23:49 B_CW_timer_remaining 0
2020-03-26 18:23:49 B_WW off
2020-03-26 18:23:49 B_WW_has_timer false
2020-03-26 18:23:49 B_WW_ison false
2020-03-26 18:23:49 B_WW_mode white
2020-03-26 18:23:49 B_WW_overpower false
2020-03-26 18:23:49 B_WW_pct 90
2020-03-26 18:23:49 B_WW_power 0.00
2020-03-26 18:23:49 B_WW_timer_remaining 0
2020-03-26 18:23:49 CW_pct 25
2020-03-26 18:23:49 StatusText LED Wand ist aus!
2020-03-26 18:23:49 SystemState aktuell
2020-03-26 18:23:49 WW_pct 90
2020-03-26 18:23:49 consumption 0
2020-03-26 15:57:07 fw_ver 20200309-104453/v1.6.0@43056d58
2020-03-26 15:57:07 id 26_shellyrgbw2-6EAB2B_AB
2020-03-26 15:57:07 ip 192.168.1.91
2020-03-26 15:57:07 mac ECFABC6EAB2B
2020-03-26 15:57:07 new_fw false
2020-03-26 15:57:07 online true
2020-03-26 18:23:49 state off
Attributes:
IODev MQTT2
alias LED Wand
devStateIcon devStateIcon A_WW_on:hue_filled_lightstrip@orangered:A_WW_off
A_WW_off:hue_filled_lightstrip@navajowhite:A_WW_on
A_CW_on:hue_filled_lightstrip@midnightblue:A_CW_off
A_CW_off:hue_filled_lightstrip@lightblue:A_CW_on
A_on:on@OrangeRed:A_off
A_off:off:A_off
B_WW_on:hue_filled_lightstrip@orangered:B_WW_off
B_WW_off:hue_filled_lightstrip@navajowhite:B_WW_on
B_CW_on:hue_filled_lightstrip@midnightblue:B_CW_off
B_CW_off:hue_filled_lightstrip@lightblue:B_CW_on
B_on:on@OrangeRed:B_off
B_off:off:B_off
WW_on:hue_filled_lightstrip@orangered:A_WW_off
WW_off:hue_filled_lightstrip@navajowhite:A_WW_on
CW_on:hue_filled_lightstrip@midnightblue:A_CW_off
CW_off:hue_filled_lightstrip@lightblue:A_CW_on
on:on@OrangeRed:off
off:off:off
info:rc_INFO@Darkblue
true:10px-kreis-gruen
false:10px-kreis-rot
veraltet:refresh@OrangeRed:Upgrade
aktuell:rc_BLANK
devStateStyle style="text-align:right"
icon light_led_stripe
jsonMap brightness:pct
readingList shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0:.* A_CW
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:.* { json2nameValue($EVENT, 'A_CW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1:.* A_WW
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:.* { json2nameValue($EVENT, 'A_WW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2:.* B_CW
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status:.* { json2nameValue($EVENT, 'B_CW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3:.* B_WW
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status:.* { json2nameValue($EVENT, 'B_WW_', $JSONMAP) }
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/online:.* online
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/announce:.* { json2nameValue($EVENT, '', $JSONMAP) }
room temp,99_MQTT2_DEVICE
setList A_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off
A_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on
A_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"}
A_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"turn":"on","brightness":"$EVTPART1"}
A_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off
A_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on
A_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"}
A_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"turn":"on","brightness":"$EVTPART1"}
B_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command off
B_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command on
B_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"mode":"white","brightness":"$EVTPART1"}
B_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"turn":"on","brightness":"$EVTPART1"}
B_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command off
B_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command on
B_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"mode":"white","brightness":"$EVTPART1"}
B_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"turn":"on","brightness":"$EVTPART1"}
A_on:noArg {fhem "set $NAME A_CW_on;set $NAME A_WW_on;";}
A_off:noArg {fhem "set $NAME A_CW_off;set $NAME A_WW_off;";}
B_on:noArg {fhem "set $NAME B_CW_on;set $NAME B_WW_on;";}
B_off:noArg {fhem "set $NAME B_CW_off;set $NAME B_WW_off;";}
on:noArg {fhem "set $NAME A_CW_on;set $NAME A_WW_on;set $NAME B_CW_on;set $NAME B_WW_on;";}
off:noArg {fhem "set $NAME A_CW_off;set $NAME A_WW_off;set $NAME B_CW_off;set $NAME B_WW_off;";}
WW_pct:colorpicker,CT,0,1,100 {fhem "set $NAME A_WW_pct $EVTPART1;set $NAME B_WW_pct $EVTPART1;";}
WW_pct_on:colorpicker,CT,0,1,100 {fhem "set $NAME A_WW_pct_on $EVTPART1;set $NAME B_WW_pct_on $EVTPART1;";}
CW_pct:colorpicker,BRI,0,1,100 {fhem "set $NAME A_CW_pct $EVTPART1;set $NAME B_CW_pct $EVTPART1;";}
CW_pct_on:colorpicker,BRI,0,1,100 {fhem "set $NAME A_CW_pct_on $EVTPART1;set $NAME B_CW_pct_on $EVTPART1;";}
stateFormat StatusText
SystemState
state
online
userReadings consumption
{
return (ReadingsNum($NAME,"A_WW_power",0) + ReadingsNum($NAME,"A_CW_power",0) + ReadingsNum($NAME,"B_WW_power",0) + ReadingsNum($NAME,"B_CW_power",0))
},
state
{
if (ReadingsVal($NAME,"A_CW","off") eq "off") {
if (ReadingsVal($NAME,"A_WW","off") eq "off") {
if (ReadingsVal($NAME,"B_CW","off") eq "off") {
if (ReadingsVal($NAME,"B_WW","off") eq "off") {
return "off";
}
}
}
}
return "on";
},
WW_pct
{
if (ReadingsVal($NAME,"A_WW_pct","A") eq ReadingsVal($NAME,"B_WW_pct","B")) {
return ReadingsVal($NAME,"A_WW_pct","A");
}
return "0";
},
CW_pct
{
if (ReadingsVal($NAME,"A_CW_pct","A") eq ReadingsVal($NAME,"B_CW_pct","B")) {
return ReadingsVal($NAME,"A_CW_pct","0");
}
return "0";
},
StatusText
{
my $result = "";
if (uc(ReadingsVal($NAME,"state","")) eq "OFF") {
$result = 'ist aus';
}
else {
$result = ' ist an (ACW='.ReadingsVal($NAME,"A_CW","").'/AWW='.ReadingsVal($NAME,"A_WW","").'/BCW='.ReadingsVal($NAME,"B_CW","").'/BWW='.ReadingsVal($NAME,"B_WW","").")";
}
return AttrVal($NAME,"alias","")." ".$result."!";
},
SystemState
{
if ( ReadingsVal($NAME,"new_fw","false") ne "false") {
return "veraltet";
}
else {
return "aktuell";
}
}
webCmd WW_pct:CW_pct
Zitat von: rudolfkoenig am 25 März 2020, 17:47:10
...
- im MQTT2_SERVER ist rePublish gesetzt (warum eigentlich?), ...
Ich habe eine 99_myShellyUtils.pm - Datei mit ein paar Hilfsfunktionen, um neben den per MQTT verfügbaren Befehlen und Abfragen auch die der "Common HTTP API" zu nutzen. Damit das
$rc = fhem("set ".$IOdevice." publish -r shellies/".$shellyID."/".$httpCMND." ".$data);
funktioniert habe ich dem MQTT2_SERVER das republish gesetzt. (Kann man bestimmt auch eleganter lösen?!)
##############################################
# $Id: myShellyUtils.pm supernova1963 $
#
# myUtils für shellies:
# http commnands an Shelly senden und Rückgabe json - string als sub topic /<httpCMND> des
# Shelly topics zu publizieren
# Bitte am "shelly MQTT2_DEVICE" das Attribut setList um folgende Zeile eränzen:
# x_httpCMND { X_PerformShellyHttpRequest($hash,<IP des Shelly>,$EVTPART1[,<username:password>]}
# für den Aufruf und der Auswertung des http commnads erweitern
package main;
use strict;
use warnings;
use POSIX;
use HttpUtils;
use JSON;
use Data::Dumper;
sub
mySHELLYUtils_Initialize($$)
{
my ($hash) = @_;
}
# Enter you functions below _this_ line.
sub X_PerformShellyHttpRequest($$)
{
my ($name, $shelly) = @_;
my $hash = $defs{$name};
my ($IP, $httpCMND, $httpCMND_Login) = split(/\,/,$shelly);
my $shellyURL = "";
if ($IP eq "" || !defined($IP))
{
Log3 $hash, 3, $hash->{NAME}.": Parameter IP ist nicht definiert!";
return;
}
if ($httpCMND eq "" || !defined($httpCMND))
{
Log3 $hash, 3, $hash->{NAME}.": Parameter httpCMND ist nicht definiert!";
return;
}
if ($httpCMND_Login eq "" || !defined($httpCMND_Login))
{
$shellyURL = "http://".$IP."/".$httpCMND;
}
else
{
if ( $httpCMND_Login =~ m/:/i)
{
$shellyURL = "http://".$httpCMND_Login."@".$IP."/".$httpCMND;
}
else
{
Log3 $hash, 3, $hash->{NAME}.": <user>:<password> nicht gesetzt oder fehlerhaft!";
return;
}
}
$hash->{helper}{httpCMND} = $httpCMND;
my $param = {
url => $shellyURL,
timeout => 5,
hash => $hash,
method => "GET",
header => "User-Agent: TeleHeater/2.2.3\r\nAccept: application/json",
callback => \&X_ParseShellyHttpResponse
};
HttpUtils_NonblockingGet($param);
}
sub X_ParseShellyHttpResponse($)
{
my ($param, $err, $data) = @_;
my $hash = $param->{hash};
my $name = $hash->{NAME};
my $rc = "";
my $httpCMND = $hash->{helper}{httpCMND};
my $IOdevice = InternalVal($name,"LASTInputDev","");
my $shellyID = ReadingsVal($name,"id","");
if($err ne "")
{
Log3 $name, 3, "Fehler bei dem URL-Aufruf: ".$param->{url}." - $err";
$hash->{helper}{fullResponse} = "ERROR: ".$err;
}
elsif($data ne "")
{
Log3 $name, 3, $param->{url}." returned: $data";
my $json = new JSON;
my $perl_scalar = $json->decode($data);
$hash->{helper}{fullResponse} = $json->pretty->encode($perl_scalar);
$rc = fhem("set ".$IOdevice." publish -r shellies/".$shellyID."/".$httpCMND." ".$data);
#Log3 $name, 3, $name.": rc json2reading: ".json2reading($name, $data);
}
# Damit ist die Abfrage zuende.
# Evtl. einen InternalTimer neu schedulen
}
sub StorePassword($$) {
my ($hash, $password) = @_;
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
my $key = getUniqueId().$index;
my $enc_pwd = "";
my $name = $hash->{NAME};
if(eval "use Digest::MD5;1")
{
$key = Digest::MD5::md5_hex(unpack "H*", $key);
$key .= Digest::MD5::md5_hex($key);
}
for my $char (split //, $password)
{
my $encode=chop($key);
$enc_pwd.=sprintf("%.2x",ord($char)^ord($encode));
$key=$encode.$key;
}
my $err = setKeyValue($index, $enc_pwd);
if(defined($err)) {
Log3 $hash->{NAME}, 3, "$name: error while saving the password - $err";
return "error while saving the password - $err";
}
Log3 $hash->{NAME}, 3, "$name: password successfully saved";
return "password successfully saved";
}
sub ReadPassword($) {
my ($hash) = @_;
my $name = $hash->{NAME};
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
my $key = getUniqueId().$index;
my ($password, $err);
Log3 $name, 4, "($name) - Read password from file";
($err, $password) = getKeyValue($index);
if ( defined($err) )
{
Log3 $name, 4, "($name) - unable to read password from file: $err";
return undef;
}
if ( defined($password) )
{
if ( eval "use Digest::MD5;1" )
{
$key = Digest::MD5::md5_hex(unpack "H*", $key);
$key .= Digest::MD5::md5_hex($key);
}
my $dec_pwd = '';
for my $char (map { pack('C', hex($_)) } ($password =~ /(..)/g))
{
my $decode=chop($key);
$dec_pwd.=chr(ord($char)^ord($decode));
$key=$decode.$key;
}
return $dec_pwd;
}
else
{
Log3 $name, 4, "($name) - No password in file";
return undef;
}
}
1;
=pod
=item summary Utilitiies for Shelly devices as MQTT2_CLIENT.
=item summary_DE Hilfsprogramme für Shellies, die als MQTT2_CLIENT definiert sind.
=begin html
<a name="myShellyUtils"></a>
<h3>myShellyUtils</h3>
Please look at German help <a href="commandref_de.html#mySHELLYUtils">myShellyUtils</a>
=end html
=begin html_DE
<a name="myShellyUtils"></a>
<h3>myShellyUtils</h3>
<h3>setlist Befehle</h3>
<ul>
<code>X_PerformShellyHttpRequest(<device>,<ip>,<command>,<user:password>)</code>
<br>
Führt einen Shelly http Befehl aus und führt ein MQTT publish mit dem zurückgegebenen json - String aus.<br>
Sollte der Shelly ein <b>RESTRICT LOGIN</b> besitzen, muss vorab einmalig der login zu diesem fhem device festgelegt werden.<br>
<b>StorePassword</b>.
<br>
<code>set <device name> x_httpcom_login <user:password></code><br>
Dabei muss der user und das password dem "RESTRICT LOGIN" des Shelly entsprechen
<br>
Beispiele:<br>
<ul>
<code>attr device setlist settings:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVTPART1.",".ReadPassword($defs{$NAME})) }</code><br>
</ul>
</ul>
=end html_DE
=cut
Zitat von: 87insane am 25 März 2020, 19:15:28
Die Lösung und warum du diesen Weg gewählt hast, darfst du gern mitteilen :)
Na dann mal los:
Ich baue gerade eine Dusche im KG (siehe Anhang Dusch.png).
Wie man vielleicht erkennen kann möchte ich rundherum LED Stripes einsetzen. Ich habe mich für
4 von LTRGBW Super Hell 5M 5050 SMD 24V 600LEDs Dual White 2800K-7000K LED Streifen Warmweiß Kaltweiß Farbtemperatur Bicolor-LED-Stripe Wasserdicht IP67 (https://smile.amazon.de/gp/product/B07GBZVTMD/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1) entschieden, u.A. da kein Fenster möglich ist, und, meine Regierung warmweiss im Normalfall bevorzugt, in einigen Ausnahmefällen es aber "klinisch" hell benötigt.
Es kommen 3 LED Stripes zum Einsatz (2 für die "Rundum-Beleuchtung" und 1 für die Dusche, die separat schaltbar sein soll).
Da ich eh eine Bestellung von Shellies zum Testen bei ALLTERCO ROBOTICS machen habe ich die Shelly RGBW2 mit bestellt.
Die werden in LED Aluminium Fliesenprofile eingelegt und werden von 2 240 W 24V Netzteilen versorgt.
Da ich noch auf die Fliesen (aus Italien) warten muss, mache ich mir derzeit Gedanken um die Steuerung.
Wenn ich fertig bin sende ich gerne auf pm-Anfrage Bilder....
lg
Gernot
Was habe ich mir dabei gedacht?
set - Befehle Aufbau:
- A|B = LED-Streifen 1 oder 2
- WW|CW = Kanäle: WarmWhite oder ColdWhite
- on|off = ein oder ausschalten
- pct = Dimmwert in Prozent festlegen ohne einschalten
- pct_on =Dimmwert in Prozent festlegen und und diesen Kanal mit diesem Dimmwert einschalten
Der Shelly RGBW2 hat im "white" mode 4 Kanäle. 2 Kanäle werden für den jeweiligen Streifen benötigt (siehe Anhang Schema_Anschluss).
Beispiele:
- set <devicename> A_WW_on
= Schaltet den 2. Kanal = WarmWhite des 1. LED Streifens (mit dem zuletzt festgelegten Dimmwert) ein - set <devicename> B_CW_pct <0..100>
= Setzt den Wert des 1. Kanal (3. des RGBW2) = ColdWhite des 2. LED Streifens auf den angebegeben % - Wert - set <devicename> A_on
= Schaltet den 1. LED Streifen ein (beide Kanäle mit den zuletzt eingegebenen Dimmwerten) - set <devicename> B_on
= Schaltet den 2. LED Streifen ein (beide Kanäle mit den zuletzt eingegebenen Dimmwerten) - set <devicename> WW_pct <0..100>
= Setzt den Dimmwert beider WarmWhite Kanäle der LED Streifen auf den angegebenen Wert - set <devicename> on
= Schaltet beide LED Streifen (alle 4 Kanäle) mit dem zuletzt eingegebenen Dimmwert ein
Die Anzeige im fhemweb beschränkt sich auch das Ein-/Ausschalten beider LED Streifen und das setzen der % - Werte beider Streifen auf den ausgewählten Wert für WarmWhite und ColdWhite.
Der Rest ist "Spielerei" zu einheitlichen Anzeige (DevStateIcon: StatusText, Hinweis auf Firmware-Update mit Update Funktion, An/Aus Symbol, Online Status Symbol mit Verlinkung auf die Web Oberfläche und webCMD zur Steuerung der WW-/CW- Kanäle)
raw Definition:
defmod 26_WandStripes MQTT2_DEVICE shellyrgbw2_6EAB2B
attr 26_WandStripes IODev MQTT2
attr 26_WandStripes alias Stripes Wand
attr 26_WandStripes devStateIcon devStateIcon A_WW_on:hue_filled_lightstrip@orangered:A_WW_off \
A_WW_off:hue_filled_lightstrip@navajowhite:A_WW_on \
A_CW_on:hue_filled_lightstrip@midnightblue:A_CW_off \
A_CW_off:hue_filled_lightstrip@lightblue:A_CW_on \
A_on:on@OrangeRed:A_off \
A_off:off:A_off\
B_WW_on:hue_filled_lightstrip@orangered:B_WW_off \
B_WW_off:hue_filled_lightstrip@navajowhite:B_WW_on \
B_CW_on:hue_filled_lightstrip@midnightblue:B_CW_off \
B_CW_off:hue_filled_lightstrip@lightblue:B_CW_on \
B_on:on@OrangeRed:B_off \
B_off:off:B_off\
WW_on:hue_filled_lightstrip@orangered:A_WW_off \
WW_off:hue_filled_lightstrip@navajowhite:A_WW_on \
CW_on:hue_filled_lightstrip@midnightblue:A_CW_off \
CW_off:hue_filled_lightstrip@lightblue:A_CW_on \
on:on@OrangeRed:off \
off:off:off \
info:rc_INFO@Darkblue \
true:10px-kreis-gruen \
false:10px-kreis-rot \
veraltet:refresh@OrangeRed:Upgrade \
aktuell:rc_BLANK\
attr 26_WandStripes devStateStyle style="text-align:right"
attr 26_WandStripes icon light_led_stripe
attr 26_WandStripes jsonMap brightness:pct
attr 26_WandStripes readingList shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0:.* A_CW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:.* { json2nameValue($EVENT, 'A_CW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1:.* A_WW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:.* { json2nameValue($EVENT, 'A_WW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2:.* B_CW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status:.* { json2nameValue($EVENT, 'B_CW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3:.* B_WW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status:.* { json2nameValue($EVENT, 'B_WW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/online:.* online\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/announce:.* { json2nameValue($EVENT, '', $JSONMAP) } \
shellies/announce:.* { $EVENT =~ m,..id...26_shellyrgbw2-6EAB2B_AB...mac.*, ? json2nameValue($EVENT) : undef }\
attr 26_WandStripes room temp,99_MQTT2_DEVICE
attr 26_WandStripes setList A_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off \
A_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on \
A_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"} \
A_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"turn":"on","brightness":"$EVTPART1"} \
A_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off \
A_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on \
A_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"} \
A_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"turn":"on","brightness":"$EVTPART1"} \
B_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command off \
B_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command on \
B_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"mode":"white","brightness":"$EVTPART1"} \
B_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"turn":"on","brightness":"$EVTPART1"} \
B_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command off \
B_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command on \
B_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"mode":"white","brightness":"$EVTPART1"} \
B_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"turn":"on","brightness":"$EVTPART1"} \
A_on:noArg {fhem "set $NAME A_CW_on;;set $NAME A_WW_on;;";;} \
A_off:noArg {fhem "set $NAME A_CW_off;;set $NAME A_WW_off;;";;} \
B_on:noArg {fhem "set $NAME B_CW_on;;set $NAME B_WW_on;;";;} \
B_off:noArg {fhem "set $NAME B_CW_off;;set $NAME B_WW_off;;";;} \
on:noArg {fhem "set $NAME A_CW_on;;set $NAME A_WW_on;;set $NAME B_CW_on;;set $NAME B_WW_on;;";;} \
off:noArg {fhem "set $NAME A_CW_off;;set $NAME A_WW_off;;set $NAME B_CW_off;;set $NAME B_WW_off;;";;} \
WW_pct:colorpicker,CT,0,1,100 {fhem "set $NAME A_WW_pct $EVTPART1;;set $NAME B_WW_pct $EVTPART1;;";;} \
WW_pct_on:colorpicker,CT,0,1,100 {fhem "set $NAME A_WW_pct_on $EVTPART1;;set $NAME B_WW_pct_on $EVTPART1;;";;} \
CW_pct:colorpicker,BRI,0,1,100 {fhem "set $NAME A_CW_pct $EVTPART1;;set $NAME B_CW_pct $EVTPART1;;";;} \
CW_pct_on:colorpicker,BRI,0,1,100 {fhem "set $NAME A_CW_pct_on $EVTPART1;;set $NAME B_CW_pct_on $EVTPART1;;";;} \
x_mqttcom shellies/26_shellyrgbw2-6EAB2B_AB/command $EVTPART1 \
x_httpcom { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVTPART1.",".ReadPassword($defs{$NAME})) } \
x_httpcom_login {StorePassword($defs{$NAME},$EVTPART1) } \
x_update:noArg shellies/26_shellyrgbw2-6EAB2B_AB/command update_fw \
reboot:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
status:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
settings:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
shelly:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
attr 26_WandStripes stateFormat StatusText\
SystemState\
state\
connection
attr 26_WandStripes userReadings consumption\
{ \
return (ReadingsNum($NAME,"A_WW_power",0) + ReadingsNum($NAME,"A_CW_power",0) + ReadingsNum($NAME,"B_WW_power",0) + ReadingsNum($NAME,"B_CW_power",0)) \
},\
state\
{\
if (ReadingsVal($NAME,"A_CW","off") eq "off") {\
if (ReadingsVal($NAME,"A_WW","off") eq "off") {\
if (ReadingsVal($NAME,"B_CW","off") eq "off") {\
if (ReadingsVal($NAME,"B_WW","off") eq "off") {\
return "off";;\
}\
}\
}\
}\
return "on";; \
},\
WW_pct\
{\
if (ReadingsVal($NAME,"A_WW_pct","A") eq ReadingsVal($NAME,"B_WW_pct","B")) {\
return ReadingsVal($NAME,"A_WW_pct","A");;\
}\
return "0";;\
},\
CW_pct\
{\
if (ReadingsVal($NAME,"A_CW_pct","A") eq ReadingsVal($NAME,"B_CW_pct","B")) {\
return ReadingsVal($NAME,"A_CW_pct","0");;\
}\
return "0";;\
},\
StatusText \
{\
my $result = "";;\
if (uc(ReadingsVal($NAME,"state","")) eq "OFF") {\
$result = 'ist aus';;\
}\
else {\
$result = ' ist an (ACW='.ReadingsVal($NAME,"A_CW","").'/AWW='.ReadingsVal($NAME,"A_WW","").'/BCW='.ReadingsVal($NAME,"B_CW","").'/BWW='.ReadingsVal($NAME,"B_WW","").")";;\
}\
return AttrVal($NAME,"alias","")." ".$result."!";;\
},\
SystemState \
{\
if ( ReadingsVal($NAME,"new_fw","false") ne "false") {\
return "veraltet";;\
}\
else {\
return "aktuell";;\
}\
},\
connection \
{\
if ( ReadingsVal($NAME,"online","") eq "true") {\
return "<a href='http://".ReadingsVal($NAME,"ip","")."' target='_blank'>".FW_makeImage("10px-kreis-gruen","true")."</a>";;\
}\
else {\
return "<a href='http://".ReadingsVal($NAME,"ip","")."' target='_blank'>".FW_makeImage("10px-kreis-rot","false")."</a>";;\
}\
\
}
attr 26_WandStripes webCmd WW_pct:CW_pct
99_myShellyUtils.pm:
##############################################
# $Id: myShellyUtils.pm supernova1963 $
#
# myUtils für shellies:
# http commnands an Shelly senden und Rückgabe json - string als sub topic /<httpCMND> des
# Shelly topics zu publizieren
# Bitte am "shelly MQTT2_DEVICE" das Attribut setList um folgende Zeile eränzen:
# x_httpCMND { X_PerformShellyHttpRequest($hash,<IP des Shelly>,$EVTPART1[,<username:password>]}
# für den Aufruf und der Auswertung des http commnads erweitern
package main;
use strict;
use warnings;
use POSIX;
use HttpUtils;
use JSON;
use Data::Dumper;
sub
mySHELLYUtils_Initialize($$)
{
my ($hash) = @_;
}
# Enter you functions below _this_ line.
sub X_Switch2Channels($)
{
my ($name,$chn1,$chn2,$state) = @_;
fhem "set $name $chn1 $state";
fhem "set $name $chn2 $state";
}
sub X_PerformShellyHttpRequest($$)
{
my ($name, $shelly) = @_;
my $hash = $defs{$name};
my ($IP, $httpCMND, $httpCMND_Login) = split(/\,/,$shelly);
my $shellyURL = "";
if ($IP eq "" || !defined($IP))
{
Log3 $hash, 3, $hash->{NAME}.": Parameter IP ist nicht definiert!";
return;
}
if ($httpCMND eq "" || !defined($httpCMND))
{
Log3 $hash, 3, $hash->{NAME}.": Parameter httpCMND ist nicht definiert!";
return;
}
if ($httpCMND_Login eq "" || !defined($httpCMND_Login))
{
$shellyURL = "http://".$IP."/".$httpCMND;
}
else
{
if ( $httpCMND_Login =~ m/:/i)
{
$shellyURL = "http://".$httpCMND_Login."@".$IP."/".$httpCMND;
}
else
{
Log3 $hash, 3, $hash->{NAME}.": <user>:<password> nicht gesetzt oder fehlerhaft!";
return;
}
}
$hash->{helper}{httpCMND} = $httpCMND;
my $param = {
url => $shellyURL,
timeout => 5,
hash => $hash, # Muss gesetzt werden, damit die Callback funktion wieder $hash hat
method => "GET", # Lesen von Inhalten
header => "User-Agent: TeleHeater/2.2.3\r\nAccept: application/json", # Den Header gemäß abzufragender Daten ändern
callback => \&X_ParseShellyHttpResponse # Diese Funktion soll das Ergebnis dieser HTTP Anfrage bearbeiten
};
HttpUtils_NonblockingGet($param); # Starten der HTTP Abfrage. Es gibt keinen Return-Code.
}
sub X_ParseShellyHttpResponse($)
{
my ($param, $err, $data) = @_;
my $hash = $param->{hash};
my $name = $hash->{NAME};
my $rc = "";
my $httpCMND = $hash->{helper}{httpCMND};
my $IOdevice = InternalVal($name,"LASTInputDev","");
my $shellyID = ReadingsVal($name,"id","");
if($err ne "") # wenn ein Fehler bei der HTTP Abfrage aufgetreten ist
{
Log3 $name, 3, "Fehler bei dem URL-Aufruf: ".$param->{url}." - $err"; # Eintrag fürs Log
#readingsSingleUpdate($hash, "fullResponse", "ERROR", 0); # Readings erzeugen
$hash->{helper}{fullResponse} = "ERROR: ".$err;
}
elsif($data ne "") # wenn die Abfrage erfolgreich war ($data enthält die Ergebnisdaten des HTTP Aufrufes)
{
Log3 $name, 3, $param->{url}." returned: $data"; # Eintrag fürs Log
# An dieser Stelle die Antwort parsen / verarbeiten mit $data
#readingsSingleUpdate($hash, "fullResponse", $data, 0);
my $json = new JSON;
my $perl_scalar = $json->decode($data);
$hash->{helper}{fullResponse} = $json->pretty->encode($perl_scalar);
$rc = fhem("set ".$IOdevice." publish -r shellies/".$shellyID."/".$httpCMND." ".$data);
#Log3 $name, 3, $name.": rc json2reading: ".json2reading($name, $data);
}
# Damit ist die Abfrage zuende.
# Evtl. einen InternalTimer neu schedulen
}
sub StorePassword($$) {
my ($hash, $password) = @_;
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
my $key = getUniqueId().$index;
my $enc_pwd = "";
my $name = $hash->{NAME};
if(eval "use Digest::MD5;1")
{
$key = Digest::MD5::md5_hex(unpack "H*", $key);
$key .= Digest::MD5::md5_hex($key);
}
for my $char (split //, $password)
{
my $encode=chop($key);
$enc_pwd.=sprintf("%.2x",ord($char)^ord($encode));
$key=$encode.$key;
}
my $err = setKeyValue($index, $enc_pwd);
if(defined($err)) {
Log3 $hash->{NAME}, 3, "$name: error while saving the password - $err";
return "error while saving the password - $err";
}
Log3 $hash->{NAME}, 3, "$name: password successfully saved";
return "password successfully saved";
}
sub ReadPassword($) {
my ($hash) = @_;
my $name = $hash->{NAME};
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
my $key = getUniqueId().$index;
my ($password, $err);
Log3 $name, 4, "($name) - Read password from file";
($err, $password) = getKeyValue($index);
if ( defined($err) )
{
Log3 $name, 4, "($name) - unable to read password from file: $err";
return undef;
}
if ( defined($password) )
{
if ( eval "use Digest::MD5;1" )
{
$key = Digest::MD5::md5_hex(unpack "H*", $key);
$key .= Digest::MD5::md5_hex($key);
}
my $dec_pwd = '';
for my $char (map { pack('C', hex($_)) } ($password =~ /(..)/g))
{
my $decode=chop($key);
$dec_pwd.=chr(ord($char)^ord($decode));
$key=$decode.$key;
}
return $dec_pwd;
}
else
{
Log3 $name, 4, "($name) - No password in file";
return undef;
}
}
1;
=pod
=item summary Utilitiies for Shelly devices as MQTT2_CLIENT.
=item summary_DE Hilfsprogramme für Shellies, die als MQTT2_CLIENT definiert sind.
=begin html
<a name="myShellyUtils"></a>
<h3>myShellyUtils</h3>
Please look at German help <a href="commandref_de.html#mySHELLYUtils">myShellyUtils</a>
=end html
=begin html_DE
<a name="myShellyUtils"></a>
<h3>myShellyUtils</h3>
<h3>setlist Befehle</h3>
<ul>
<code>X_PerformShellyHttpRequest(<device>,<ip>,<command>,<user:password>)</code>
<br>
Führt einen Shelly http Befehl aus und führt ein MQTT publish mit dem zurückgegebenen json - String aus.<br>
Sollte der Shelly ein <b>RESTRICT LOGIN</b> besitzen, muss vorab einmalig der login zu diesem fhem device festgelegt werden.<br>
<b>StorePassword</b>.
<br>
<code>set <device name> x_httpcom_login <user:password></code><br>
Dabei muss der user und das password dem "RESTRICT LOGIN" des Shelly entsprechen
<br>
Beispiele:<br>
<ul>
<code>attr device setlist settings:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVTPART1.",".ReadPassword($defs{$NAME})) }</code><br>
</ul>
</ul>
=end html_DE
=cut