Dummy mit Icon eines anderen Geräts

Begonnen von bigtruite, 07 Oktober 2019, 13:55:23

Vorheriges Thema - Nächstes Thema

Beta-User

Sofern sich das TASMOTA_DEVICE nicht wesentlich anders verhält wie MQTT_DEVICE müßte auch sowas gehen:
defmod Stehlampe TASMOTA_DEVICE lc06 lc06/%topic%/%prefix%
attr Stehlampe userattr lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
attr Stehlampe IODev mqttbroker
attr Stehlampe event-on-change-reading .*
attr Stehlampe genericDeviceType light
attr Stehlampe group Licht
attr Stehlampe homebridgeMapping Hue=verb=stelle,valuePrefix=auf,values=rot:1;;grün:2,blau:3\
Brightness=Dimmer::prozent,minValue=0,maxValue=100
attr Stehlampe icon light_floor_lamp
attr Stehlampe publishSet on off lc06/lc06/cmnd/POWER1
attr Stehlampe publishSet_Color lc06/lc06/cmnd/COLOR
attr Stehlampe publishSet_dimmer lc06/lc06/cmnd/DIMMER
attr Stehlampe room Wohnzimmer
attr Stehlampe verbose 0
attr Stehlampe webCmd on:off:dimmer:Color FF000000:Color 00FF0000:Color 0000FF00:Color F7F7F7F7:
attr Stehlampe widgetOverride dimmer:slider,1,1,100 Color:colorpicker,RGB

Leider packt der Code das JSON selbst aus, daher kann man den Kreis wegen der Rückmeldung dann nicht so gefahrlos schließen wie bei MQTT2_DEVICE...
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

bigtruite

Hallo Byte09,

geht nicht. An der Stehlampe passiert gar nichts....

Grüße

bigtruite

Zitat von: Byte09 am 08 Oktober 2019, 11:52:13
ist noch nicht fertig , du kannst aber mal versuchen , ob eine ansteuerung überhaupt funktioniert.

gruss Byte09

defmod dummytotasmota MSwitch    # FreeCmd MSwitch_Self
attr dummytotasmota MSwitch_Comments 1
attr dummytotasmota MSwitch_Debug 1
attr dummytotasmota MSwitch_Delete_Delays 1
attr dummytotasmota MSwitch_Expert 1
attr dummytotasmota MSwitch_Extensions 0
attr dummytotasmota MSwitch_Help 0
attr dummytotasmota MSwitch_Ignore_Types notify allowed at watchdog doif fhem2fhem telnet FileLog readingsGroup FHEMWEB autocreate eventtypes readingsproxy svg cul
attr dummytotasmota MSwitch_Include_Devicecmds 1
attr dummytotasmota MSwitch_Include_MSwitchcmds 0
attr dummytotasmota MSwitch_Include_Webcmds 0
attr dummytotasmota MSwitch_Inforoom MSwitch
attr dummytotasmota MSwitch_Lock_Quickedit 1
attr dummytotasmota MSwitch_Mode Full
attr dummytotasmota readingList state-lampe helligkeit rgb scheme
attr dummytotasmota room 05_test
attr dummytotasmota setList state-lampe helligkeit:slider,0,10,100 rgb:colorpicker,rgb scheme:Scheme_1,Scheme_2,Scheme_3
attr dummytotasmota stateFormat state-lampe
attr dummytotasmota webCmd on:off:scheme:helligkeit:rgb FF0000:rgb 00FF00:rgb 0000FF:rgb F7F7F7

setstate dummytotasmota off
setstate dummytotasmota 2019-10-08 10:56:43 .Device_Affected FreeCmd-AbsCmd1,FreeCmd-AbsCmd2,MSwitch_Self-AbsCmd1
setstate dummytotasmota 2019-10-08 11:03:16 .Device_Affected_Details FreeCmd-AbsCmd1#[NF]cmd#[NF]cmd#[NF]set#[sp]Stehlampe#[sp]on#[NF]set#[sp]Stehlampe#[sp]off#[NF]delay1#[NF]delay1#[NF]00#[dp]00#[dp]00#[NF]00#[dp]00#[dp]00#[NF][$EVTFULL]#[sp]eq#[sp]"$SELF#[dp]state#[dp]on"#[NF][$EVTFULL]#[sp]eq#[sp]"$SELF#[dp]state#[dp]off"#[NF]0#[NF]0#[NF]1#[NF]0#[NF]schaltet#[sp]die#[sp]stehlampe#[sp]an#[sp]und#[sp]aus#[sp]wenn#[sp]mswitch#[sp]an#[sp]oder#[sp]aus#[NF]1#[NF]1#[NF]1#[ND]FreeCmd-AbsCmd2#[NF]cmd#[NF]cmd#[NF]set#[sp]Stehlampe#[sp]helligkeit#[sp][$SELF#[dp]helligkeit]#[NF]#[NF]delay1#[NF]delay1#[NF]00#[dp]00#[dp]00#[NF]00#[dp]00#[dp]00#[NF][$EVTPART1]#[sp]eq#[sp]"$SELF"#[sp]AND#[sp][$EVTPART2]#[sp]eq#[sp]"helligkeit"#[NF]#[NF]0#[NF]0#[NF]1#[NF]0#[NF]schaltet#[sp]die#[sp]helligkeit#[sp]der#[sp]stehlampe#[sp]wenn#[sp]in#[sp]mswitch#[sp]geaendert#[NF]0#[NF]0#[NF]1#[ND]MSwitch_Self-AbsCmd1#[NF]state-lampe#[NF]state-lampe#[NF]on#[NF]off#[NF]delay1#[NF]delay1#[NF]00#[dp]00#[dp]00#[NF]00#[dp]00#[dp]00#[NF][$EVENT]#[sp]eq#[sp]"Stehlampe#[dp]result-power#[dp]ON"#[NF][$EVENT]#[sp]eq#[sp]"Stehlampe#[dp]result-power#[dp]OFF"#[NF]0#[NF]0#[NF]1#[NF]0#[NF]uebernimmt#[sp]den#[sp]state#[sp]power-result#[sp]der#[sp]lampe#[sp]und#[sp]setzt#[sp]mswitch#[sp]reading#[sp]state-lampe#[ko]#[sp]dieses#[sp]wird#[sp]fuer#[sp]stateformat#[sp]genutzt.#[sp]wird#[sp]aktiv#[sp]bei#[sp]event#[sp]mit#[sp]power-result#[sp]der#[sp]lampe#[NF]0#[NF]0#[NF]3
setstate dummytotasmota 2019-10-08 11:50:44 .Device_Events dummytotasmota:EVENT:Stehlampe:state:dimmertest 44#[tr]dummytotasmota:EVTPART2:result-power#[tr]dummytotasmota:state:on#[tr]dummytotasmota:state-lampe:off#[tr]dummytotasmota:last_exec_cmd:set dummytotasmota state-lampe on#[tr]dummytotasmota:last_event:Stehlampe:state:dimmertest 44#[tr]dummytotasmota:state:off#[tr].*#[tr]dummytotasmota:EVENT:Stehlampe:result-power:ON#[tr]dummytotasmota:EVTPART3:dimmertest 21#[tr]Stehlampe:result-power:ON#[tr]Stehlampe:helligkeit:70#[tr]dummytotasmota:EVTPART3:OFF#[tr]dummytotasmota:EVTPART2:state#[tr]dummytotasmota:EVENT:Stehlampe:state:dimmertest 21#[tr]dummytotasmota:last_event:Stehlampe:state:dimmertest 21#[tr]dummytotasmota:last_exec_cmd:  #[tr]Stehlampe:state:on#[tr]dummytotasmota:EVTFULL:Stehlampe:result-power:OFF#[tr]dummytotasmota:state-lampe:on#[tr]dummytotasmota:EVTFULL:Stehlampe:result-power:ON#[tr]dummytotasmota:last_activation_by:event#[tr]Stehlampe:state:dimmertest 44#[tr]dummytotasmota:EVENT:Stehlampe:result-power:OFF#[tr]dummytotasmota:last_event:Stehlampe:result-power:ON#[tr]dummytotasmota:EVTPART1:Stehlampe#[tr]dummytotasmota:helligkeit:70#[tr]Stehlampe:state:dimmertest 21#[tr]Stehlampe:result-power:OFF#[tr]no_trigger#[tr]dummytotasmota:EVTPART3:dimmertest 44#[tr]dummytotasmota:EVTFULL:Stehlampe:state:dimmertest 21#[tr]dummytotasmota:last_exec_cmd:set dummytotasmota state-lampe off#[tr]dummytotasmota:last_cmd:1#[tr]Stehlampe:state:off#[tr]dummytotasmota:last_event:Stehlampe:result-power:OFF#[tr]dummytotasmota:EVTFULL:Stehlampe:state:dimmertest 44#[tr]dummytotasmota:EVTPART3:ON#[tr]dummytotasmota:rgb:BF5EF7
setstate dummytotasmota 2019-10-07 14:57:14 .First_init done
setstate dummytotasmota 2019-10-08 10:23:06 .Trigger_Whitelist NAME=Stehlampe,dummytotasmota
setstate dummytotasmota 2019-10-08 10:45:05 .Trigger_cmd_off .*
setstate dummytotasmota 2019-10-08 10:45:05 .Trigger_cmd_on .*
setstate dummytotasmota 2019-10-08 10:23:06 .Trigger_condition
setstate dummytotasmota 2019-10-08 10:45:05 .Trigger_off dummytotasmota:state:off
setstate dummytotasmota 2019-10-08 10:45:05 .Trigger_on dummytotasmota:state:on
setstate dummytotasmota 2019-10-08 10:23:06 .Trigger_time
setstate dummytotasmota 2019-10-07 14:57:14 .V_Check V2.00
setstate dummytotasmota 2019-10-08 11:50:44 EVENT dummytotasmota:last_activation_by:event
setstate dummytotasmota 2019-10-08 11:50:44 EVTFULL dummytotasmota:last_activation_by:event
setstate dummytotasmota 2019-10-08 11:50:44 EVTPART1 dummytotasmota
setstate dummytotasmota 2019-10-08 11:50:44 EVTPART2 last_activation_by
setstate dummytotasmota 2019-10-08 11:50:44 EVTPART3 event
setstate dummytotasmota 2019-10-08 10:23:06 Trigger_device all_events
setstate dummytotasmota 2019-10-08 10:45:05 Trigger_log on
setstate dummytotasmota 2019-10-08 11:49:34 helligkeit 70
setstate dummytotasmota 2019-10-08 11:50:44 last_activation_by event
setstate dummytotasmota 2019-10-08 11:50:44 last_cmd 1
setstate dummytotasmota 2019-10-08 11:50:44 last_event dummytotasmota:last_activation_by:event
setstate dummytotasmota 2019-10-08 11:50:44 last_exec_cmd   
setstate dummytotasmota 2019-10-08 11:03:56 rgb BF5EF7
setstate dummytotasmota 2019-10-08 09:11:35 scheme Scheme_1
setstate dummytotasmota 2019-10-08 11:49:27 state off
setstate dummytotasmota 2019-10-08 11:29:18 state-lampe off