Hier der gesamte Code vom Shelly in Fhem:
Internals:
CID shelly1_8CAAB561AAF7
DEF shelly1_8CAAB561AAF7
DEVICETOPIC MQTT2_shelly1_8CAAB561AAF7
FUUID 614c3048-f33f-4b78-630d-a1615d6cca9820df
IODev MQTT2
LASTInputDev MQTT2
MQTT2_MSGCNT 7458
MQTT2_TIME 2021-09-30 13:19:49
MSGCNT 7458
NAME MQTT2_shelly1_8CAAB561AAF7
NR 124
STATE off
TYPE MQTT2_DEVICE
OLDREADINGS:
READINGS:
2021-09-30 12:58:23 0_event L
2021-09-30 12:58:23 0_event_cnt 36
2021-09-29 17:03:04 IODev MQTT2
2021-09-29 19:20:54 attrTemplateVersion 20200831
2021-09-30 13:19:49 ext_switch_0 0
2021-09-29 19:20:54 fw_ver 20210909-144114/v1.11.4-DNSfix-ge6b2f6d
2021-09-29 19:20:54 id shelly1-8CAAB561AAF7
2021-09-29 19:20:54 info_actions_stats_skipped 0
2021-09-29 19:20:54 info_cfg_changed_cnt 0
2021-09-29 19:20:54 info_cloud_connected false
2021-09-29 19:20:54 info_cloud_enabled false
2021-09-29 19:20:54 info_ext_switch_0_input 0
2021-09-29 19:20:54 info_fs_free 151102
2021-09-29 19:20:54 info_fs_size 233681
2021-09-29 19:20:54 info_has_update false
2021-09-29 19:20:54 info_inputs_1_event
2021-09-29 19:20:54 info_inputs_1_event_cnt 1
2021-09-29 19:20:54 info_inputs_1_input 1
2021-09-29 19:20:54 info_mac 8CAAB561AAF7
2021-09-29 19:20:54 info_meters_1_is_valid true
2021-09-29 19:20:54 info_meters_1_power 0.00
2021-09-29 19:20:54 info_mqtt_connected true
2021-09-29 19:20:54 info_ram_free 37260
2021-09-29 19:20:54 info_ram_total 50872
2021-09-29 19:20:54 info_relays_1_has_timer false
2021-09-29 19:20:54 info_relays_1_ison false
2021-09-29 19:20:54 info_relays_1_source timer
2021-09-29 19:20:54 info_relays_1_timer_duration 0
2021-09-29 19:20:54 info_relays_1_timer_remaining 0
2021-09-29 19:20:54 info_relays_1_timer_started 0
2021-09-29 19:20:54 info_serial 3
2021-09-29 19:20:54 info_time 19:20
2021-09-29 19:20:54 info_unixtime 1632936054
2021-09-29 19:20:54 info_update_has_update false
2021-09-29 19:20:54 info_update_new_version 20210909-144114/v1.11.4-DNSfix-ge6b2f6d
2021-09-29 19:20:54 info_update_old_version 20210909-144114/v1.11.4-DNSfix-ge6b2f6d
2021-09-29 19:20:54 info_update_status idle
2021-09-29 19:20:54 info_uptime 21922
2021-09-29 19:20:54 info_wifi_sta_connected true
2021-09-29 19:20:54 info_wifi_sta_ip 192.168.1.190
2021-09-29 19:20:54 info_wifi_sta_rssi -50
2021-09-29 19:20:54 info_wifi_sta_ssid UniFi
2021-09-30 13:19:49 input0 1
2021-09-29 19:20:54 ip 192.168.1.190
2021-09-30 12:58:23 longpush_0 1
2021-09-29 19:20:54 mac 8CAAB561AAF7
2021-09-29 19:20:54 model SHSW-1
2021-09-29 19:20:54 new_fw false
2021-09-29 19:20:54 online true
2021-09-30 13:19:49 relay0 off
2021-09-30 13:19:49 state off
Attributes:
devStateIcon {my $onl = ReadingsVal($name,"online","false") eq "false" ? "rot" : ReadingsVal($name,"new_fw","false") eq "true" ? "gelb" : "gruen";
my $input = ReadingsVal($name,"input0","1") eq "1"?'fts_garage_door_100@gruen':'fts_garage_door_10@red';
my $light = ReadingsVal($name,"state","off"); my $show = '" : "http://".ReadingsVal($name,"ip","none").' "target="_blank">'; $show .= FW_makeImage("10px-kreis-".$onl).""; "
$show ".FW_makeImage($input)."
" }
event-on-change-reading .*
genericDeviceType garage
homebridgeMapping CurrentDoorState:input0,values=0:OPEN;;1:CLOSED;;2:OPENING;;3:CLOSING;;4:STOPPED
TargetDoorState:CurrentDoorState,cmds=OPEN:on;CLOSED:off
model shelly1
readingList shellies/shelly1-8CAAB561AAF7/relay/0:.* state
shellies/shelly1-8CAAB561AAF7/relay/0:.* relay0
shellies/shelly1-8CAAB561AAF7/input/0:.* input0
shellies/shelly1-8CAAB561AAF7/online:.* online
shellies/shelly1-8CAAB561AAF7/announce:.* { json2nameValue($EVENT) }
shellies/announce:.* { $EVENT =~ m,..id...shelly1-8CAAB561AAF7...mac.*, ? json2nameValue($EVENT) : return }
shelly1_8CAAB561AAF7:shellies/shelly1-8CAAB561AAF7/info:.* { json2nameValue($EVENT, 'info_', $JSONMAP) }
shelly1_8CAAB561AAF7:shellies/shelly1-8CAAB561AAF7/ext_switch/0:.* ext_switch_0
shelly1_8CAAB561AAF7:shellies/shelly1-8CAAB561AAF7/longpush/0:.* longpush_0
shelly1_8CAAB561AAF7:shellies/shelly1-8CAAB561AAF7/input_event/0:.* { json2nameValue($EVENT, '0_', $JSONMAP) }
room MQTT2_DEVICE
setList relay0:iconSwitch,on,message_socket_disabled@red,off,message_socket_enabled@green shellies/shelly1-8CAAB561AAF7/relay/0/command on
off:noArg shellies/shelly1-8CAAB561AAF7/relay/0/command off
on:noArg shellies/shelly1-8CAAB561AAF7/relay/0/command on
x_update:noArg shellies/shelly1-8CAAB561AAF7/command update_fw
x_mqttcom shellies/shelly1-8CAAB561AAF7/command $EVTPART1
webCmd relay0
Vielleicht kann es ja mal jemand gebrauchen.
Beste Grüße
Falkes