"set"-Auswahl als Liste für Select Widget

Begonnen von pataya, 25 Januar 2019, 15:19:54

Vorheriges Thema - Nächstes Thema

pataya

Moin,

für das Select-Widget möchte ich gerne die Liste eines Gerätes verwenden, die ich zur Auswahl habe, wenn ein "set Denon input <Auswahl>" in FHEMWEB ausgeführt werden soll (siehe Anhang).
Gibt es eine Möglichkeit diese Auswahl als Reading (userReadings?) zu definieren, um dieses dann für's Widget zu verwenden?

Danke im Voraus.

Gruß

setstate

Die Liste kennt das Device schon. Das muss man nicht als UserReading extra anlegen. Das macht nur Sinn, wenn man ein kürzere Liste haben will.

setreading myAVR inputList Sat,DVD,TV

Und dann unter data-list angeben:

data-list="inputList

pataya

Zitat von: setstate am 25 Januar 2019, 15:30:03
setreading myAVR inputList Sat,DVD,TV

Damit erstelle ich ja ein Reading mit eigenen Werten. Ich möchte allerdings die ausgelesenen Werte des Moduls nutzen, die mir zur Auswahl stehen.
Sprich ich bräuchte vermutlich ein Reading mit den zur Verfügung stehenden Auswahlmöglichkeiten.

setstate

Das Modul kennt die Liste, die Frage ist nur, ob es als Reading public ist, oder hidden. Das kannst nur du sagen. Einfach mal list Denon rufen.

pataya

#4
Ein list des Geräts zeigt mir kein vergleichbares Reading an:
Internals:
   CHANGED   
   Clients    :DENON_AVR_ZONE:
   DEF        10.xx.xx.xx
   DeviceName 10.xx.xx.xx:23
   FD         84
   NAME       Denon
   NR         566
   NTFY_ORDER 50-Denon
   PARTIAL   
   STATE      off
   TIMEOUT    3
   TYPE       DENON_AVR
   READINGS:
     2019-01-23 12:03:11   allZoneStereo   off
     2019-01-23 12:03:11   aspectRatio     16:9
     2019-01-10 16:15:37   audioOutHDMI    unknown
     2019-01-23 12:03:11   autoStandby     15min
     2019-01-23 12:03:11   bass            0
     2019-01-23 12:03:11   cinemaEQ        off
     2019-01-23 12:03:11   currentAlbum    -
     2019-01-23 12:03:11   currentArtist   -
     2019-01-23 12:03:11   currentBitrate  -
     2019-01-23 12:03:11   currentCover    http://10.xx.xx.xx/img/album%20art_S.png?1548241391000
     2019-01-23 12:03:11   currentMedia    -
     2019-01-23 12:03:11   currentPlaytime -
     2019-01-23 12:03:11   currentStation  -
     2019-01-23 12:03:11   currentStream   -
     2019-01-23 12:03:11   currentTitle    -
     2019-01-23 12:03:11   digitalInput    auto
     2019-01-23 12:03:11   display         dark
     2019-01-23 12:03:11   dynamicCompression off
     2019-01-23 12:03:11   dynamicEQ       on
     2019-01-23 12:03:11   dynamicVolume   off
     2019-01-18 08:03:07   eco             auto
     2019-01-23 12:03:11   input           TV
     2019-01-23 12:03:11   inputSound      ARCplaying
     2019-01-23 12:03:11   levelCenter     0
     2019-01-23 12:03:11   levelFrontLeft  0
     2019-01-23 12:03:11   levelFrontRight 0
     2019-01-23 12:03:11   levelSourroundLeft 0
     2019-01-23 12:03:11   levelSourroundRight 0
     2019-01-23 12:03:11   levelSubwoofer  0
     2019-01-23 12:03:11   loudness        on
     2019-01-23 12:03:11   lowFrequencyEffects 0
     2019-01-23 12:03:11   multEQ          reference
     2019-01-23 12:03:11   mute            off
     2019-01-23 12:03:11   playStatus      stopped
     2019-01-23 12:03:10   power           off
     2019-01-23 12:03:10   presence        present
     2019-01-23 12:03:11   resolution      auto
     2019-01-23 12:03:11   resolutionHDMI  auto
     2019-01-22 17:29:53   samplingRate    48 khz
     2019-01-23 12:03:11   setup           off
     2019-01-22 17:29:55   signal          Dolby Digital
     2019-01-23 12:03:11   sleep           off
     2019-01-23 12:03:11   sound           Dolby Surround
     2019-01-23 12:03:10   state           off
     2019-01-23 12:03:11   stateAV         off
     2019-01-22 17:29:55   surroundMode    Movie
     2019-01-23 12:03:11   toneControl     off
     2019-01-23 12:03:11   treble          0
     2019-01-23 12:03:11   tunerBand       FM
     2019-01-23 12:03:11   tunerFrequency  87.5 MHz
     2019-01-23 12:03:11   tunerMode       auto
     2019-01-23 12:03:11   tunerPreset     1
     2019-01-23 12:03:11   videoProcessingMode auto
     2019-01-23 12:03:11   videoSelect     off
     2019-01-23 12:03:11   volume          37.5
     2019-01-23 12:03:11   volumeMax       695
     2019-01-23 12:03:11   volumeStraight  -42.5
     2019-01-23 12:03:11   zone2           off
     2019-01-22 21:22:47   zoneMain        off
   helper:
     INPUT      TV
     PARTIAL   
     deviceIP   10.xx.xx.xx
     isPause    0
     isPlaying  0
     nextConnectionCheck 1548427348.99637
     playTimeCheck 0
     volume     37.5
Attributes:
   cmdIcon    muteT:rc_MUTE
   devStateIcon on:rc_GREEN:main_off main_off:rc_YELLOW:main_on off:rc_STOP:main_on absent:rc_RED:main_on muted:rc_MUTE@green:muteT playing:rc_PLAY@green:pause paused:rc_PAUSE@green:play disconnected:rc_RED
   group      Multimedia
   room       Wohnzimmer
   stateFormat stateAV
   webCmd     volume:muteT:input:surroundMode


Internals:
   CFGFN      /opt/fhem/FHEM/00_cfg_Multimedia.cfg
   CHANGED   
   CHANNELCOUNT 50
   DEF        10.xx.xx.xx 30
   INTERVAL   30
   NAME       SonyTV
   NR         559
   STATE      off
   TYPE       BRAVIA
   READINGS:
     2019-01-09 19:20:41   area            DEU
     2019-01-23 19:20:49   authCookie      00xxxxxA4Bxxxxxx29DD6xxxxB0DxxxxxAB
     2019-01-23 19:20:49   authExpires     Mi., 06 Feb. 2019 18:20:49 GMT+00:00
     2019-01-09 19:20:13   authMaxAge      1209600
     2019-01-25 06:52:52   channel         -
     2019-01-25 06:52:52   channelId       -
     2019-01-25 06:52:52   ci_durationSec  -
     2019-01-25 06:52:52   ci_startDateTime -
     2019-01-25 06:52:52   ci_tripletStr   -
     2019-01-09 19:20:41   country         XEU
     2018-04-02 16:41:01   currentMedia    -
     2019-01-25 06:52:52   currentTitle    -
     2019-01-09 19:20:41   generation      5.0.1
     2019-01-25 06:52:52   input           -
     2019-01-09 19:20:41   language        ger
     2019-01-09 19:20:41   macAddr         xxxxx
     2019-01-09 19:20:41   model           KD-65XD7505
     2019-01-08 23:06:47   mute            off
     2019-01-09 19:20:41   name            BRAVIA
     2019-01-25 06:52:52   power           off
     2019-01-23 12:03:10   presence        present
     2019-01-09 19:19:54   registrationUUID fcxxxx5bca80xxxx4b6539xxxx3a
     2018-03-06 02:57:40   requestFormat   json
     2019-01-25 06:52:52   state           off
     2019-01-25 05:43:31   uri             tv:dvbt?trip=1.1051.11100&srvName=Das Erste HD
     2019-01-09 05:50:01   volume          8
   helper:
     ADDRESS    10.x.xx.xx
     AVAILABLE  1
     HEADER     X-CERS-DEVICE-ID: fhem_remote
     lastInput 
     PORT:
       IRCC       80
       SERVICE    80
       UPNP       52323
     device:
       appPreset:
         Album:
           uri        com.sony.dtv.com.sony.dtv.osat.album.com.sonyericsson.album.MainActivity
         Bildschirm#spiegeln:
           uri        com.sony.dtv.screnmirroring.com.screnmirroring.com.StartScreenMirroringHomeActivity
         DW#for#Smart#TV:
           uri        com.sony.dtv.ceb-5226
         Digital#Concert#Hall:
           uri        com.sony.dtv.ceb-5114
         Einrichtung#der#TV-Steuerung#mit#Amazon#Alexa:
           uri        com.sony.dtv.com.sony.dtv.smarthomesettings.com.sony.dtv.smarthomesettings.activity.MainActivity
         Internet#Browser:
           uri        com.sony.dtv.com.opera.sdk.example.com.opera.sdk.example.SonyBrowserUiActivity
         Liste#aufgezeichneter#Titel:
           uri        com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.rec.ui.recorded.TitleListLauncherActivity
         Meteonews#TV:
           uri        com.sony.dtv.ceb-5216
         Musik:
           uri        com.sony.dtv.com.sony.dtv.osat.music.com.sonyericsson.music.MusicActivity
         Play#Store:
           uri        com.sony.dtv.com.android.vending.com.google.android.finsky.activities.TvMainActivity
         PlayStation#Video:
           uri        com.sony.dtv.com.sony.snei.video.hhvu.com.sony.snei.video.hhvu.MainActivity
         Programme#Guide:
           uri        com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.MainActivity
         Rakuten#TV:
           uri        com.sony.dtv.ceb-5206
         Tagesschau:
           uri        com.sony.dtv.ceb-4472
         Video:
           uri        com.sony.dtv.com.sony.dtv.osat.video.com.sonyericsson.video.browser.BrowserActivity
         uStudio:
           uri        com.sony.dtv.ceb-4386
         watchmi#Themenkanäle:
           uri        com.sony.dtv.ceb-5128
       channelPreset:
         001:
           id         001
           name       Das#Erste#HD
           uri        tv:dvbt?trip=1.1101.28400&srvName=Bayern 1
         002:
           id         002
           name       Bayern#2
           uri        tv:dvbt?trip=1.1101.28401&srvName=Bayern 2
         003:
           id         003
           name       BAYERN#3
           uri        tv:dvbt?trip=1.1101.28402&srvName=BAYERN 3
         004:
           id         004
           name       BR-KLASSIK
           uri        tv:dvbt?trip=1.1101.28403&srvName=BR-KLASSIK
         005:
           id         005
           name       B5#aktuell
           uri        tv:dvbt?trip=1.1101.28404&srvName=B5 aktuell
         006:
           id         006
           name       BAYERN#plus
           uri        tv:dvbt?trip=1.1101.28405&srvName=BAYERN plus
         007:
           id         007
           name       PULS
           uri        tv:dvbt?trip=1.1101.28406&srvName=PULS
         008:
           id         008
           name       BR#Heimat
           uri        tv:dvbt?trip=1.1101.28407&srvName=BR Heimat
         009:
           id         009
           name       B5#plus
           uri        tv:dvbt?trip=1.1101.28408&srvName=B5 plus
         010:
           id         010
           name       RTL#II#HD
           uri        tv:dvbt?trip=61441.10015.50011&srvName=RTL II HD
         
        [...]

       inputPreset:
         AV#1:
           uri        extInput:scart?port=1
         AV#2:
           uri        extInput:composite?port=1
         AVR-X2400H:
           uri        extInput:cec?type=freeuse&port=3&logicalAddr=5
         Bildschirm#spiegeln:
           uri        extInput:widi?port=1
         HDMI#1:
           uri        extInput:hdmi?port=1
         HDMI#2:
           uri        extInput:hdmi?port=2
         HDMI#3/ARC:
           uri        extInput:hdmi?port=3
         HDMI#4:
           uri        extInput:hdmi?port=4
         SHIELD:
           uri        extInput:cec?type=player&port=3&logicalAddr=4
         TV:
           uri        tv:dvbt?trip=1.1051.11100&srvName=Das Erste HD
         TV#/#DVB-T:
           uri        tv:dvbt
Attributes:
   devStateIcon on:rc_GREEN:off off:rc_YELLOW:on absent:rc_STOP:on
   group      Multimedia
   icon       it_television
   macaddr    xxxxxx
   room       Wohnzimmer
   webCmd     volume:channelUp:channelDown


Ergänzend:
Beim Denon Modul scheint es festgelegte Eingänge zu geben, beim Bravia Modul wird die Liste ausgelesen, wobei auch die Reihenfolge der Sender nicht stimmt, bzw. Sender gar nicht vorhanden sind.
Ist es dann eher ein Wunsch für die Modulentwickler?


margu

Hallo zusammen,

ich hänge mich hier mal an (auch wenn dieser Fred schon bissi älter ist), da ich ebenfalls für FTUIs Select Widget eine Liste meiner Effekte der Nanoleafs unterbringen will, aber leider nicht dahinter komme wie ich auf die "effects" zugreifen kann die ich mit einem List auf das Nanoleaf sehe.

Wäre schön, wenn mir hier einer von euch auf die Sprünge helfen könnte.

Mit folgendem Code bekomme ich zwar den aktuell genutzte Effekt angezeigt, aber die Liste bleibt leer:
<div data-type="select"
data-device="nanoleaf_WZ"
data-list="effects"
data-set="effect">
</div>


Das List des Nanoleaf:
Internals:
   DEF        192.168.1.53 10
   FUUID      5e1199a9-f33f-db67-af3c-e9dad282e65f5f03
   INTERVAL   10
   IP         192.168.1.53
   NAME       nanoleaf_WZ
   NOTIFYDEV  global
   NR         474
   NTFY_ORDER 50-nanoleaf_WZ
   STATE      off
   TYPE       Aurora
   desired    1
   firmwareVersion 3.3.3
   manufacturer Nanoleaf
   model      NL22
   name       Nanoleaf Light Panels 52:d2:8f
   serialNo   S18122A4510
   READINGS:
     2020-04-10 11:51:41   colormode       effect
     2020-04-10 11:51:41   ct              2700
     2020-04-10 11:51:41   effect          awoken
     2020-04-03 11:43:34   effekte         
     2020-04-10 11:51:41   hue             0
     2020-04-10 11:52:03   onoff           0
     2020-04-10 11:52:03   pct             0
     2020-04-10 11:52:03   rgb             000000
     2020-04-10 11:51:41   sat             0
     2020-04-10 11:52:03   state           off
   helper:
     colormode  effect
     ct         2700
     effect     awoken
     hue        0
     last_config_timestamp 1586512606
     on         0
     pct        0
     rgb        000000
     sat        0
     update_timeout -1
     xy         
     effects:
       AlexaMusik
       AlexaMusik2
       AlexaMusik3
       AlexaMusik4
       AlexaMusik5
       AlexaMusik6
       Classic Visualizer
       Color Burst
       Colorful Zebra
       Dance
       Dancing Duo
       DancingTiles
       Duo RED EDM
       Eintracht
       EnergyDrum
       Fireworks
       Flames
       Forest
       I See Fire
       Indistinguishable From Magic
       Inner Peace
       Meteor Shower
       Northern Lights
       Paint Splatter
       Pulse Pop Beats
       Rainbow Pop
       Rainbow Wheel
       Red Black Slow
       Retro
       Rhythmic Northern Lights
       Ripple
       Romantic
       Ski Lodge Pulse
       Snakes on a Plane
       Soda
       Sound Bar
       Streaking Notes
       Sunset
       Synthwave
       TV Simulation
       Twinkling Midnight Sky
       Vibrant Sunrise
       Wide Open Rythmic MC
       awoken
       awoken2
       fernsehen
       fernsehen3
       tagsueber
       tagsueber2
Attributes:
   color-icons 2
   devStateIcon {(Aurora_devStateIcon($name),"toggle")}
   group      Lampen
   icon       audio_play
   room       9.19 Aurora Nanoleaf,1.00 Wohnzimmer
   token      KCWZuVqODu5oeerX5C54lXHJOzePuDnk
   userReadings effekte [nanoleaf_WZ:effects}
   userattr   lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
   webCmd     rgb:rgb ff0000:rgb 00ff00:rgb 0000ff:ct 490:ct 380:ct 270:ct 160:effect:on:off


Vielen Dank und schöne Osterfeiertage

Mario