Hallo und guten Abend,
ich habe einen Dimmer 2 erfolgreich per MQTT2 in FHEM eingebunden und dieser wird auch in HOME angezeigt und lässt sich schalten.
ABER:
Der Dimmer selbst ist aus - auch in FHEM wird er als aus angezeigt nur in HOME steht er ständig auf ON??
Hier ein List vom Shelly in FHEM
Code
Internals:
CID shellydimmer2-349454729012
DEF shellydimmer2-349454729012
FUUID 63cbe95f-f33f-ee2d-8c66-07ccad409645c11f
IODev myBrokerHaus
LASTInputDev myBrokerHaus
MQTT2ClientGarage_MSGCNT 35
MQTT2ClientGarage_TIME 2023-01-26 16:18:45
MSGCNT 135035
NAME MQTT2_shellydimmer2_349454729012
NR 705
STATE off
TYPE MQTT2_DEVICE
eventCount 122534
myBrokerHaus_CONN myBrokerHaus_10.0.0.105_21680
myBrokerHaus_MSGCNT 135000
myBrokerHaus_TIME 2023-01-26 16:52:39
JSONMAP:
brightness pct
READINGS:
2023-01-22 10:52:11 IODev myBrokerHaus
2023-01-22 10:52:21 actions_stats_skipped 0
2023-01-22 10:52:23 associatedWith MQTT2_MQTT2ClientGarage
2023-01-21 16:11:10 attrTemplateVersion 20220404
2023-01-21 16:11:09 brightness 1
2023-01-22 10:52:21 calib_progress 100
2023-01-22 10:52:21 calib_running 0
2023-01-22 10:52:21 calib_status 0
2023-01-22 10:52:21 calibrated true
2023-01-22 10:52:21 cfg_changed_cnt 4
2023-01-22 10:52:21 cloud_connected false
2023-01-22 10:52:21 cloud_enabled false
2023-01-22 10:52:21 debug 0
2023-01-22 10:52:23 event
2023-01-22 10:52:23 event_cnt 0
2023-01-22 10:52:21 forced_neutral false
2023-01-22 10:52:21 fs_free 118221
2023-01-22 10:52:21 fs_size 233681
2023-01-22 10:52:21 fw_ver 20221027-104444/v1.12.1-ga9117d3
2023-01-26 16:52:39 has_timer false
2023-01-22 10:52:21 has_update false
2023-01-22 10:52:21 id shellydimmer2-349454729012
2023-01-26 16:52:39 input_0 0
2023-01-26 16:52:39 input_1 0
2023-01-22 10:52:21 inputs_1_event
2023-01-22 10:52:21 inputs_1_event_cnt 0
2023-01-22 10:52:21 inputs_1_input 0
2023-01-22 10:52:21 inputs_2_event
2023-01-22 10:52:21 inputs_2_event_cnt 0
2023-01-22 10:52:21 inputs_2_input 0
2023-01-22 10:52:21 ip 10.0.0.105
2023-01-26 16:52:39 ison false
2023-01-21 16:11:09 light_0 off
2023-01-26 16:52:39 light_0_energy 53
2023-01-26 16:52:39 light_0_power 0.00
2023-01-22 10:52:21 lights_1_brightness 23
2023-01-22 10:52:21 lights_1_has_timer false
2023-01-22 10:52:21 lights_1_ison false
2023-01-22 10:52:21 lights_1_mode white
2023-01-22 10:52:21 lights_1_source mqtt
2023-01-22 10:52:21 lights_1_timer_duration 0
2023-01-22 10:52:21 lights_1_timer_remaining 0
2023-01-22 10:52:21 lights_1_timer_started 0
2023-01-22 10:52:21 lights_1_transition 0
2023-01-26 16:52:39 loaderror 0
2023-01-22 10:52:21 mac 349454729012
2023-01-22 10:52:21 meters_1_counters_1 0.000
2023-01-22 10:52:21 meters_1_counters_2 0.000
2023-01-22 10:52:21 meters_1_counters_3 0.000
2023-01-22 10:52:21 meters_1_is_valid true
2023-01-22 10:52:21 meters_1_overpower 0.00
2023-01-22 10:52:21 meters_1_power 0.00
2023-01-22 10:52:21 meters_1_timestamp 1674384741
2023-01-22 10:52:21 meters_1_total 37
2023-01-26 16:52:39 mode white
2023-01-22 10:52:21 model SHDM-2
2023-01-22 10:52:21 mqtt_connected true
2023-01-22 10:52:21 new_fw false
2023-01-22 10:52:21 online true
2023-01-26 16:52:39 overpower 0
2023-01-26 16:52:39 overtemperature 0
2023-01-26 16:52:39 pct 50
2023-01-22 10:52:21 ram_free 36560
2023-01-22 10:52:21 ram_total 49672
2023-01-22 10:52:21 serial 91
2023-01-26 16:52:39 source http
2023-01-26 16:52:39 state off
2023-01-22 10:53:10 subscriptions shellies/command shellies/shellydimmer2-349454729012/command shellies/shellydimmer2-349454729012/light/0/command shellies/shellydimmer2-349454729012/light/0/dim shellies/shellydimmer2-349454729012/light/0/set
2023-01-26 16:52:39 temperature 57.30
2023-01-21 16:11:09 temperature_f 125.08
2023-01-22 10:52:21 time 10:52
2023-01-26 16:52:39 timer_duration 0
2023-01-26 16:52:39 timer_remaining 0
2023-01-26 16:52:39 timer_started 0
2023-01-22 10:52:21 tmp_is_valid true
2023-01-22 10:52:21 tmp_tC 51.71
2023-01-22 10:52:21 tmp_tF 125.08
2023-01-26 16:52:39 transition 0
2023-01-22 10:52:21 unixtime 1674381141
2023-01-22 10:52:21 update_has_update false
2023-01-22 10:52:21 update_new_version 20221027-104444/v1.12.1-ga9117d3
2023-01-22 10:52:21 update_old_version 20221027-104444/v1.12.1-ga9117d3
2023-01-22 10:52:21 update_status idle
2023-01-22 10:52:21 uptime 72404
2023-01-22 10:52:21 wifi_sta_connected true
2023-01-22 10:52:21 wifi_sta_ip 10.0.0.105
2023-01-22 10:52:21 wifi_sta_rssi -54
2023-01-22 10:52:21 wifi_sta_ssid Dahoam
2023-01-22 10:52:21 wire_mode 1
Attributes:
devStateIcon {my $lderr = ReadingsVal($name,"loaderror","true") eq "true"?"10px-kreis-rot":"10px-kreis-gruen"; my $light = ReadingsVal($name,"ison","false") eq "true"?"on":"off"; my $cons = ReadingsVal($name,"light_0_power","unknown"); FW_makeImage($lderr)."<a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\">".FW_makeImage($light)."</a><div>Leistung: $cons</div>"}
genericDeviceType switch
group Licht
icon light_control
jsonMap brightness:pct
model shellydimmer
readingList shellies/shellydimmer2-349454729012/light/0/status:.* {json2nameValue($EVENT,'',$JSONMAP)}
shellies/shellydimmer2-349454729012/light/0:.* state
shellies/shellydimmer2-349454729012/light/0/power:.* light_0_power
shellies/shellydimmer2-349454729012/light/0/energy:.* light_0_energy
shellies/shellydimmer2-349454729012/temperature:.* temperature
shellies/shellydimmer2-349454729012/temperature_f:.* {}
shellies/shellydimmer2-349454729012/online:.* online
shellies/shellydimmer2-349454729012/overtemperature:.* overtemperature
shellies/shellydimmer2-349454729012/overload:.* overload
shellies/shellydimmer2-349454729012/loaderror:.* loaderror
shellies/announce:.* { $EVENT =~ m,..id...shellydimmer2-349454729012...mac.*, ? json2nameValue($EVENT) : return }
shellies/shellydimmer2-349454729012/announce:.* { json2nameValue($EVENT) }
shellies/shellydimmer2-349454729012/info:.* { json2nameValue($EVENT) }
shellies/shellydimmer2-349454729012/overpower:.* overpower
shellies/shellydimmer2-349454729012/input/0:.* input_0
shellies/shellydimmer2-349454729012/input/1:.* input_1
shellies/shellydimmer2-349454729012/input_event/0:.* { json2nameValue($EVENT) }
shellies/shellydimmer2-349454729012/input_event/1:.* { json2nameValue($EVENT) }
room Favoriten,Homekit,MQTT2_DEVICE,TV_Bereich
setList off:noArg shellies/shellydimmer2-349454729012/light/0/command off
on:noArg shellies/shellydimmer2-349454729012/light/0/command on
pct:slider,0,1,100 shellies/shellydimmer2-349454729012/light/0/set {"turn": "on","brightness": $EVTPART1}
dimup:noArg { my $num=int((ReadingsNum($NAME,'pct',0)+4)/10)*10+10; return qq {shellies/shellydimmer2-349454729012/light/0/set {"turn": "on", "brightness": $num}}; }
dimdown:noArg { my $num=int((ReadingsNum($NAME,'pct',0)+7)/10)*10-10; return qq {shellies/shellydimmer2-349454729012/light/0/set {"turn": "on", "brightness": $num}}; }
x_mqttcom shellies/shellydimmer2-349454729012/command $EVTPART1
webCmd pct:on:off
Alles anzeigen
Woran kann da bitte liegen?
Generic Device Type = switch
Danke für eure Hilfe Helmut