Hallo,
ich habe eine RGB Lampe auf die ich Tasmota geflasht habe. Als Gerätetyp habe ich H801 eingestellt. Die Lampe lässt sich damit Über Tasmota wie gewünscht steuern. (Helligkeit, Weiss, Farbe und Farb Temp)
Leider wird über Alexa die Lampe nur als Dimmbare Lampe erkannt. (An/Aus und Helligkeit)
Um sie über Alexa komplett zu steuern muss ich wahrscheinlich das HomebridgeMapping anpassen. Leider komme ich mit dem Mapping überhaupt nicht zurecht und brauche dabei Hilfe.
List der Leuchte:
Internals:
CID DVES_A6C388
DEF DVES_A6C388
DEVICETOPIC MQTT2_DVES_A6C388
FUUID 5f7f5f18-f33f-8133-0753-2291c07c28e22bd3
IODev MQTT_Server
LASTInputDev MQTT_Server
MQTT_Server_MSGCNT 29
MQTT_Server_TIME 2020-10-16 11:06:42
MSGCNT 29
NAME MQTT2_DVES_A6C388
NR 1027
STATE off
TYPE MQTT2_DEVICE
JSONMAP:
Channel_1 0
Channel_2 0
Channel_3 0
Channel_4 white
Channel_5 0
Dimmer pct
HSBColor 0
POWER1 0
READINGS:
2020-10-13 19:23:57 BASE 18
2020-10-16 11:06:42 CT 358
2020-10-16 11:06:42 Color 0000002F44
2020-10-13 19:23:57 FLAG 15
2020-10-16 11:06:42 Fade off
2020-10-13 19:24:03 FallbackTopic cmnd/DVES_A6C388_fb/
2020-10-13 19:23:57 GPIO_1 255
2020-10-13 19:23:57 GPIO_10 255
2020-10-13 19:23:57 GPIO_11 255
2020-10-13 19:23:57 GPIO_12 255
2020-10-13 19:23:57 GPIO_13 255
2020-10-13 19:23:57 GPIO_2 255
2020-10-13 19:23:57 GPIO_3 255
2020-10-13 19:23:57 GPIO_4 255
2020-10-13 19:23:57 GPIO_5 255
2020-10-13 19:23:57 GPIO_6 255
2020-10-13 19:23:57 GPIO_7 255
2020-10-13 19:23:57 GPIO_8 255
2020-10-13 19:23:57 GPIO_9 255
2020-10-13 19:24:03 GroupTopic cmnd/tasmotas/
2020-10-16 11:06:42 Heap 26
2020-10-13 19:24:03 Hostname tasmota_A6C388-0904
2020-10-13 19:24:03 IPAddress 192.168.0.104
2020-10-13 19:24:48 LWT Offline
2020-10-16 11:06:42 LedTable on
2020-10-16 11:06:42 LoadAvg 19
2020-10-13 19:24:03 Module H801
2020-10-16 11:06:42 MqttCount 9
2020-10-13 19:23:57 NAME Generic
2020-10-13 19:24:03 RestartReason Software/System restart
2020-10-13 19:18:07 SaveData on
2020-10-16 11:06:42 Scheme 0
2020-10-13 19:18:07 SetOption26 on
2020-10-16 11:06:42 Sleep 50
2020-10-16 11:06:42 SleepMode Dynamic
2020-10-16 11:06:42 Speed 1
2020-10-13 19:18:06 StateText1 off
2020-10-13 19:18:07 StateText2 on
2020-10-13 19:18:07 StateText3 toggle
2020-10-13 19:18:07 StateText4 hold
2020-10-16 11:06:42 Time 2020-10-16T10:06:41
2020-10-16 11:06:42 Uptime 2T15:41:32
2020-10-16 11:06:42 UptimeSec 229292
2020-10-13 19:24:03 Version 8.5.1(tasmota)
2020-10-13 19:24:03 WebServerMode Admin
2020-10-16 11:06:42 White 45
2020-10-16 11:06:42 Wifi_AP 1
2020-10-16 11:06:42 Wifi_BSSId DC:39:6F:B7:E8:BF
2020-10-16 11:06:42 Wifi_Channel 1
2020-10-16 11:06:42 Wifi_Downtime 0T00:00:10
2020-10-16 11:06:42 Wifi_LinkCount 6
2020-10-16 11:06:42 Wifi_RSSI 84
2020-10-16 11:06:42 Wifi_SSId Home TS 1
2020-10-16 11:06:42 Wifi_Signal -58
2020-10-13 19:18:05 attrTemplateVersion 20200522 or prior
2020-10-16 11:06:42 pct 45
2020-10-13 19:21:15 saturation 0
2020-10-16 10:16:23 state off
2020-10-16 08:56:07 subscriptions cmnd/DVES_A6C388_fb/# cmnd/WeMos_02_A6C388/# cmnd/tasmotas/#
2020-10-16 11:06:42 white 18
Attributes:
IODev MQTT_Server
alexaName bürolicht
alias Bel_Büro
autocreate 0
comment NOTE: For on-for-timer SetExtensions are used. You may add on-for-timer option running on the device. The following is limited to 1h max duration, but will not affect future simple "on" commands:<br>on-for-timer {my $duration = $EVTPART1*10; 'cmnd/cmnd/tasmota_A6C388/Backlog POWER1 1; delay '.$duration.'; POWER1 0'}<br>See the "Praxisbeispiele" in the wiki for "pulseTime1" alternative option and it's restrictions.
devStateIcon {Color::devStateIcon($name,"rgb","Color","pct","state")}
genericDeviceType light
group Beleutung
homebridgeMapping rgb=Color,cmd=Color,minStep=10
icon light_control
jsonMap POWER1:0 Dimmer:pct Channel_4:white Channel_1:0 Channel_2:0 Channel_3:0 HSBColor:0 Channel_5:0
model tasmota_rgbcct_led
readingList tele/tasmota_A6C388/LWT:.* LWT
tele/WeMos_02_A6C388/STATE:.* { json2nameValue($EVENT,'',$JSONMAP) }
tele/WeMos_02_A6C388/SENSOR:.* { json2nameValue($EVENT,'',$JSONMAP) }
tele/WeMos_02_A6C388/INFO.:.* { json2nameValue($EVENT,'',$JSONMAP) }
tele/WeMos_02_A6C388/UPTIME:.* { json2nameValue($EVENT,'',$JSONMAP) }
stat/WeMos_02_A6C388/RESULT:.* { json2nameValue($EVENT,'',$JSONMAP) }
stat/WeMos_02_A6C388/RESULT:.* { $EVENT =~ m,HSBColor...(\d+)\,(\d+)\,(\d+), ? $2 eq ReadingsVal($NAME,"saturation","unknown") ? return : { "saturation"=>$2 } : return }
stat/WeMos_02_A6C388/POWER1:.* state
room 07_Buero,98_Alexa,MQTT2_DEVICE
setList off:noArg cmnd/WeMos_02_A6C388/POWER1 0
on:noArg cmnd/WeMos_02_A6C388/POWER1 1
toggle:noArg cmnd/WeMos_02_A6C388/POWER1 2
Color:colorpicker,RGB cmnd/WeMos_02_A6C388/COLOR
pct:colorpicker,BRI,0,5,100 cmnd/WeMos_02_A6C388/DIMMER
dimup:noArg { my $num=int((ReadingsNum($NAME,'pct',0)+4)/10)*10+10; return qq {cmnd/WeMos_02_A6C388/Dimmer $num}; }
dimdown:noArg { my $num=int((ReadingsNum($NAME,'pct',0)+7)/10)*10-10; return qq {cmnd/WeMos_02_A6C388/Dimmer $num}; }
white:colorpicker,BRI,0,5,100 { "cmnd/WeMos_02_A6C388/COLOR ". sprintf("000000%02X",$EVTPART1*2.55) }
CT:colorpicker,CT,153,5,500 cmnd/WeMos_02_A6C388/CT
setStateList on off toggle
webCmd pct:white:Color:CT
webCmdLabel Helligkeit
:Weiss
:Farbe
:Temp
Hi,Tip. Hier schon gelesen?
Link (https://forum.fhem.de/index.php/topic,60244.msg659891.html#msg659891)
oder
Link (https://haus-automatisierung.com/hardware/fhem/2017/01/21/fhem-tutorial-reihe-part-24-amazon-echo-alexa-fhem-custom-skill.html)
mfg mr_petz
ich schaue schon seit Tagen im Board und im Netz danach, bekomme das aber einfach nicht hin. Hatte gedacht, das es vielleicht irgendwo schon ein passendes Mapping für Tasmota gibt.
probiere mal aus. kombiniere auch mit deinen readings (letzte könnte passen...) :
attr <device> homebridgeMapping
clear
On=power,valueOn=on,valueOff=off,cmdOn=on,cmdOff=off
Brightness=bright,cmd=bright,minStep=10
Hue=hue,cmd=hue,minStep=10
Saturation=sat,cmd=sat,minStep=10
StatusActive=state,valueOn=opened,valueOff=disconnected
oder
clear
On=state,valueOn=on,valueOff=off,cmdOn=on,cmdOff=off
Brightness=gain,minValue=0,maxValue=100,minStep=1,cmd=gain_on
Hue=rgb,cmd=rgb_on
white=white,cmd=white_on
oder
clear
On=Status,valueOn=on,valueOff=off,cmdOn=Status+on,cmdOff=Status+off
Brightness=Helligkeit,minValue=0,maxValue=100,minStep=1,cmd=Helligkeit
Hue=RGB,cmd=RGB
Saturation=Saturation,cmd=Saturation
oder
On=onoff,valueOn=1,valueOff=0,cmdOn=on,cmdOff=off,valueBrightness=pct
ColorTemperature=ct,cmd=ct
Saturation=saturation,cmd=saturation
oder
On=onoff,valueOn=1,valueOff=0,cmdOn=on,cmdOff=off,valueBrightness=pct
Hue=ct,cmd=ct
Saturation=saturation,cmd=saturation
ps Info:
https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-property-schemas.html#Color (https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-property-schemas.html#Color)
Zitat von: mr_petz am 17 Oktober 2020, 16:48:19
probiere mal aus. kombiniere auch mit deinen readings (letzte könnte passen...) :
Habe sie mal ausprobiert.
Hue=Color,cmd=Color damit bekomme ich zwar die Möglichkeit in der Alexa App nun die Farbe auszuwählen, aber die stimmt nicht.
Ich denke das Alexa auf Hue Dezimalwerte erwartet, aber von meinem Color Reading nur einen Hex Wert bekommt (zb. 2B4FFF0000)
Einen Hue Wert oder einen anderen Dezimalwert der Farbe komme ich von Tasmota nicht als Reading.
pct ist dein Reading für die Farbe?
probiere mal:
Hue=pct,cmd=pct
nein, pct ist die Helligkeit, die funktioniert auch. Farbe ist nur in Color
meine readings sind:
pct - Helligkeit
Color - Farbe
CT - Farb Temp
Zitat von: hanswerner1 am 19 Oktober 2020, 13:40:50
Ich denke das Alexa auf Hue Dezimalwerte erwartet, aber von meinem Color Reading nur einen Hex Wert bekommt (zb. 2B4FFF0000)
Einen Hue Wert oder einen anderen Dezimalwert der Farbe komme ich von Tasmota nicht als Reading.
Könntest du ein userreading machen wo dein Hex in Dez umgerechnet wird?
es sollte doch 3xdez kommen?
HSBColor
stat/WeMos_02_A6C388/RESULT:.* { $EVENT =~ m,HSBColor...(\d+)\,(\d+)\,(\d+), ? $2 eq ReadingsVal($NAME,"saturation","unknown") ? return : { "saturation"=>$2 } : return }
Zitat von: mr_petz am 19 Oktober 2020, 14:44:46
es sollte doch 3xdez kommen?
HSBColor
stat/WeMos_02_A6C388/RESULT:.* { $EVENT =~ m,HSBColor...(\d+)\,(\d+)\,(\d+), ? $2 eq ReadingsVal($NAME,"saturation","unknown") ? return : { "saturation"=>$2 } : return }
ich habe ein Reading saturation, da steht aber immer 0 drin.
Zitat von: mr_petz am 19 Oktober 2020, 14:37:40
Könntest du ein userreading machen wo dein Hex in Dez umgerechnet wird?
Das müsste ja dann in beide Richtungen umgerechnet werden, einmal der Color Wert aus Tasmota in Hue und dann der HUE Wert von Alexa wieder im Color, damit auch Änderungen in Alexa an Tasmota wieder übergeben werden.
Letzter Versuch. Schau hier:
https://forum.fhem.de/index.php/topic,50648.msg424566.html#msg424566
(https://forum.fhem.de/index.php/topic,50648.msg424566.html#msg424566)
ändern in:
userReadings RGB:rgb.* {my @a=split(/ /,ReadingsVal("MQTT2_DVES_A6C388","state","00"));sprintf("%02x%02x%02x%02x%02x", $a[1],$a[2],$a[3],$a[4],$a[5])}
homebridgeMapping Hue=rgb::RGB Saturation=rgb::RGB Brightness=RGB
sonst kann ich dir auch nicht mehr versuchen zu helfen...
Damit habe ich es leider auch nicht hinbekommen. Es wird kein Userreading erzeugt.
Ich habe heute den Wemos von Tasmota auf esp_rgbww_firmware umgeflasht. Damit funktioniert Alexa auf anhieb, auch ohne homebridgemapping.
Trotzdem vielen Dank für Deine Hilfe mr_petz