Homebridge und HM-LC-RGBW-WM und pct Fehler

Begonnen von uwirt, 09 April 2024, 09:53:02

Vorheriges Thema - Nächstes Thema

uwirt

Guten Tag

Ich habe folgendes HomeMatic device in FHEM definiert:
define HM_LED_LSR HMCCUDEV PEQ1603498
attr HM_LED_LSR IODev CCU3
attr HM_LED_LSR ccureadingfilter (COLOR|PROGRAM|LEVEL)
attr HM_LED_LSR ccureadingname 2.COLOR:+color;;3.PROGRAM:+prog
attr HM_LED_LSR ccuscaleval LEVEL:0:1:0:100
attr HM_LED_LSR cmdIcon on:general_an off:general_aus
attr HM_LED_LSR eventMap /datapoint 3.PROGRAM :prog/datapoint 2.COLOR :color/
attr HM_LED_LSR room HomeMatic,Homekit
attr HM_LED_LSR statevals on:100,off:0
attr HM_LED_LSR substexcl control
attr HM_LED_LSR substitute LEVEL!#0-0:off,#1-100:on
attr HM_LED_LSR webCmd control:color:prog:on:off
attr HM_LED_LSR widgetOverride control:slider,0,1,100 prog:0,1,2,3,4,5,6 color:colorpicker,HUE,0,1,100
#   DEF        PEQ1603498
#   FUUID      660d03f1-f33f-521d-75b5-3cfbc6c4a47fd835
#   IODev      CCU3
#   NAME       HM_LED_LSR
#   NR         240
#   STATE      off
#   TYPE       HMCCUDEV
#   ccuaddr    PEQ1603498
#   ccudevstate active
#   ccuif      BidCos-RF
#   ccuname    LED LSR
#   ccurolectrl DIMMER
#   ccurolestate DIMMER
#   ccusubtype HM-LC-RGBW-WM
#   ccutype    HM-LC-RGBW-WM
#   eventCount 1
#   firmware   1.0
#   readonly   no
#   Helper:
#     DBLOG:
#       state:
#         logdb:
#           TIME       1712648451.1772
#           VALUE      off
#   READINGS:
#     2024-04-09 09:40:51   1.LEVEL         off
#     2024-04-09 09:40:51   2.COLOR         133
#     2024-04-09 09:40:51   3.PROGRAM       5
#     2024-04-09 09:40:14   IODev           CCU3
#     2024-04-09 09:27:06   L-HM_LED_LSR-   1
#     2024-04-09 09:40:51   activity        alive
#     2024-04-09 09:40:51   battery         ok
#     2024-04-09 09:40:51   color           133
#     2024-04-09 09:40:51   control         0
#     2024-04-09 09:40:51   devstate        ok
#     2024-04-09 09:40:51   hmstate         off
#     2024-04-09 09:40:51   level           off
#     2024-04-09 09:40:51   pct             off
#     2024-04-09 09:40:51   prog            5
#     2024-04-09 09:40:51   rssidevice      1
#     2024-04-09 09:40:51   rssipeer        194
#     2024-04-09 09:40:51   sign            off
#     2024-04-09 09:40:51   state           off
#   hmccu:
#     channels   4
#     detect     0
#     devspec    PEQ1603498
#     forcedev   0
#     nodefaults 1
#     role       0:MAINTENANCE,1:DIMMER,2:RGBW_COLOR,3:RGBW_AUTOMATIC
#     setDefaults 0
#     cmdlist:
#       get       
#       set        on:noArg pct down on-till level up stop:noArg on-for-timer toggle:noArg off:noArg color brightness
#     control:
#       chn        1
#       dpt        LEVEL
#     dp:
#       0.AES_KEY:
#         VALUES:
#           NVAL       0
#           SVAL       off
#           VAL        0
#       0.CONFIG_PENDING:
#         VALUES:
#           NVAL       0
#           SVAL       false
#           VAL        0
#       0.DEVICE_IN_BOOTLOADER:
#         VALUES:
#           NVAL       0
#           SVAL       false
#           VAL        0
#       0.DUTYCYCLE:
#         VALUES:
#           NVAL       0
#           SVAL       false
#           VAL        0
#       0.LOWBAT:
#         VALUES:
#           NVAL       0
#           SVAL       ok
#           VAL        0
#       0.RSSI_DEVICE:
#         VALUES:
#           NVAL       1
#           SVAL       1
#           VAL        1
#       0.RSSI_PEER:
#         VALUES:
#           NVAL       194
#           SVAL       194
#           VAL        194
#       0.STICKY_UNREACH:
#         VALUES:
#           NVAL       0
#           SVAL       false
#           VAL        0
#       0.UNREACH:
#         VALUES:
#           NVAL       0
#           SVAL       alive
#           VAL        0
#       0.UPDATE_PENDING:
#         VALUES:
#           NVAL       0
#           SVAL       false
#           VAL        0
#       1.DIRECTION:
#         VALUES:
#           NVAL       0
#           SVAL       stop
#           VAL        0
#       1.INHIBIT:
#         VALUES:
#           NVAL       0
#           SVAL       unlocked
#           VAL        0
#       1.LEVEL:
#         VALUES:
#           NVAL       0
#           SVAL       off
#           VAL        0.000000
#       1.WORKING:
#         VALUES:
#           NVAL       0
#           SVAL       false
#           VAL        0
#       2.COLOR:
#         VALUES:
#           NVAL       133
#           SVAL       133
#           VAL        133
#       2.INHIBIT:
#         VALUES:
#           NVAL       0
#           SVAL       unlocked
#           VAL        0
#       3.ACT_BRIGHTNESS:
#         VALUES:
#           NVAL       0
#           SVAL       0
#           VAL        0
#       3.ACT_MAX_BOARDER:
#         VALUES:
#           NVAL       0
#           SVAL       0
#           VAL        0
#       3.ACT_MIN_BOARDER:
#         VALUES:
#           NVAL       0
#           SVAL       0
#           VAL        0
#       3.INHIBIT:
#         VALUES:
#           NVAL       0
#           SVAL       unlocked
#           VAL        0
#       3.ON_TIME:
#         VALUES:
#           NVAL       0
#           SVAL       0
#           VAL        0.000000
#       3.PROGRAM:
#         VALUES:
#           NVAL       5
#           SVAL       5
#           VAL        5
#       3.RAMP_TIME:
#         VALUES:
#           NVAL       0.500000
#           SVAL       0
#           VAL        0.500000
#     roleChannels:
#       DIMMER     1,1
#       MAINTENANCE 0,0
#       RGBW_AUTOMATIC 3,3
#       RGBW_COLOR 2,2
#     roleCmds:
#       get:
#       set:
#         brightness:
#           channel    2
#           ps         VALUES
#           role       RGBW_COLOR
#           rpc        0
#           subcount   1
#           syntax     V:ACT_BRIGHTNESS:?brightness
#           usage      brightness brightness
#           subcmd:
#             000:
#               args       
#               dpt        ACT_BRIGHTNESS
#               fnc       
#               max        255
#               min        0
#               parname    brightness
#               partype    2
#               ps         VALUES
#               scn        000
#               type       INTEGER
#               unit       
#         color:
#           channel    2
#           ps         VALUES
#           role       RGBW_COLOR
#           rpc        0
#           subcount   2
#           syntax     V:COLOR:?color V:ACT_HSV_COLOR_VALUE:?hsvColor
#           usage      color color hsvColor
#           subcmd:
#             000:
#               args       
#               dpt        COLOR
#               fnc       
#               max        255
#               min        0
#               parname    color
#               partype    2
#               ps         VALUES
#               scn        000
#               type       INTEGER
#               unit       
#             001:
#               args       
#               dpt        ACT_HSV_COLOR_VALUE
#               fnc       
#               max        255
#               min        0
#               parname    hsvColor
#               partype    2
#               ps         VALUES
#               scn        001
#               type       INTEGER
#               unit       
#         down:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   1
#           syntax     V:LEVEL:?delta=-10
#           usage      down [delta]
#           subcmd:
#             000:
#               args       -10
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    delta
#               partype    2
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       100%
#         level:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   1
#           syntax     V:LEVEL:?level
#           usage      level level
#           subcmd:
#             000:
#               args       
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    level
#               partype    2
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       100%
#         off:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   1
#           syntax     V:LEVEL:0
#           usage      off
#           subcmd:
#             000:
#               args       0
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    LEVEL
#               partype    3
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       100%
#         on:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   1
#           syntax     V:LEVEL:100
#           usage      on
#           subcmd:
#             000:
#               args       100
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    LEVEL
#               partype    3
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       100%
#         on-for-timer:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   2
#           syntax     V:ON_TIME:?duration V:LEVEL:100
#           usage      on-for-timer duration
#           subcmd:
#             000:
#               args       
#               dpt        ON_TIME
#               fnc       
#               max        85825945.600000
#               min        0.000000
#               parname    duration
#               partype    2
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       s
#             001:
#               args       100
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    LEVEL
#               partype    3
#               ps         VALUES
#               scn        001
#               type       FLOAT
#               unit       100%
#         on-till:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   2
#           syntax     V:ON_TIME:?time V:LEVEL:100
#           usage      on-till time
#           subcmd:
#             000:
#               args       
#               dpt        ON_TIME
#               fnc       
#               max        85825945.600000
#               min        0.000000
#               parname    time
#               partype    2
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       s
#             001:
#               args       100
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    LEVEL
#               partype    3
#               ps         VALUES
#               scn        001
#               type       FLOAT
#               unit       100%
#         pct:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   3
#           syntax     3:V:LEVEL:?level 1:V:ON_TIME:?time=0.0 2:V:RAMP_TIME:?ramp=0.5
#           usage      pct level [time] [ramp]
#           subcmd:
#             000:
#               args       
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    level
#               partype    2
#               ps         VALUES
#               scn        003
#               type       FLOAT
#               unit       100%
#             001:
#               args       0.0
#               dpt        ON_TIME
#               fnc       
#               max        85825945.600000
#               min        0.000000
#               parname    time
#               partype    2
#               ps         VALUES
#               scn        001
#               type       FLOAT
#               unit       s
#             002:
#               args       0.5
#               dpt        RAMP_TIME
#               fnc       
#               max        85825945.600000
#               min        0.000000
#               parname    ramp
#               partype    2
#               ps         VALUES
#               scn        002
#               type       FLOAT
#               unit       s
#         stop:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   1
#           syntax     V:RAMP_STOP:1
#           usage      stop
#           subcmd:
#             000:
#               args       1
#               dpt        RAMP_STOP
#               fnc       
#               max        1
#               min        0
#               parname    RAMP_STOP
#               partype    3
#               ps         VALUES
#               scn        000
#               type       ACTION
#               unit       
#         toggle:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   1
#           syntax     V:LEVEL:0,100
#           usage      toggle
#           subcmd:
#             000:
#               args       0,100
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    LEVEL
#               partype    3
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       100%
#         up:
#           channel    1
#           ps         VALUES
#           role       DIMMER
#           rpc        0
#           subcount   1
#           syntax     V:LEVEL:?delta=+10
#           usage      up [delta]
#           subcmd:
#             000:
#               args       +10
#               dpt        LEVEL
#               fnc       
#               max        1.000000
#               min        0.000000
#               parname    delta
#               partype    2
#               ps         VALUES
#               scn        000
#               type       FLOAT
#               unit       100%
#     state:
#       chn        1
#       dpt        LEVEL
#
setstate HM_LED_LSR off
setstate HM_LED_LSR 2024-04-09 09:40:51 1.LEVEL off
setstate HM_LED_LSR 2024-04-09 09:40:51 2.COLOR 133
setstate HM_LED_LSR 2024-04-09 09:40:51 3.PROGRAM 5
setstate HM_LED_LSR 2024-04-09 09:40:14 IODev CCU3
setstate HM_LED_LSR 2024-04-09 09:27:06 L-HM_LED_LSR- 1
setstate HM_LED_LSR 2024-04-09 09:40:51 activity alive
setstate HM_LED_LSR 2024-04-09 09:40:51 battery ok
setstate HM_LED_LSR 2024-04-09 09:40:51 color 133
setstate HM_LED_LSR 2024-04-09 09:40:51 control 0
setstate HM_LED_LSR 2024-04-09 09:40:51 devstate ok
setstate HM_LED_LSR 2024-04-09 09:40:51 hmstate off
setstate HM_LED_LSR 2024-04-09 09:40:51 level off
setstate HM_LED_LSR 2024-04-09 09:40:51 pct off
setstate HM_LED_LSR 2024-04-09 09:40:51 prog 5
setstate HM_LED_LSR 2024-04-09 09:40:51 rssidevice 1
setstate HM_LED_LSR 2024-04-09 09:40:51 rssipeer 194
setstate HM_LED_LSR 2024-04-09 09:40:51 sign off
setstate HM_LED_LSR 2024-04-09 09:40:51 state off


Das Device wird in der Homebridge erkannt (FHEM-Plugin) nur leider bekomme ich einen Fehler:
[FHEM] HM_LED_LSR-pct not a number: off
Offenbar erwartet Homebridge einen numerischen Wert aber FHEM liefert für pct nur on oder off.

Die Frage ist nun wie kann ich pct so umbenennen dass es den Wert für den Dimmer bekommt. Ich habe schon mit dem Attributen "homebridgeMapping" etwas versucht aber bisher ohne Erfolg.
Ich wäre froh um Unterstützung.
FHEM / Ubuntu / fitlet2
HomeMatic: CCU3|HmIP-STHD|HmIP-PCBS|HmIP-PCBS2|HmIP-PCBS-BAT|HM-WDC7000|HM-WDS100-C6-O|HM-WDS40|HM-LC-Sw1-FM|HM-LC-RGBW-WM|HM-ES-PMSw1-Pl|HM-ES-TX-WM
NAS: DS218+|DS209j|DS216+II|DS412+
Devices: Panasonic Webcams|Withings|Gardena Smart|Tuya