Onkyo Receiver STATE "on" als "Present" verwenden

Begonnen von Thoffi1978, 30 Oktober 2019, 10:03:10

Vorheriges Thema - Nächstes Thema

Thoffi1978

Hallo,
ich habe ein Onkyo Receiver und möchte gerne, wenn dieser " Power on" ist, in mein "Wohnzimmer anwesend" als present übernommen wird.
Ich bekomme dies aber nicht hin. Im STATE wir ein "opened" ausgegeben und ich weiß nicht wie ich das ändern kann.

Anbei die List vom Receiver und von Wonzimmer anwesend
List Onkyo:
Internals:
   CHANGED   
   Clients    :ONKYO_AVR_ZONE:
   DEF        192.168.2.15 2013
   DeviceName 192.168.2.15:60128
   FD         26
   FUUID      5c6a8915-f33f-7e98-e440-8bf2ebe88031fd97
   INPUT      24
   NAME       Onkyo_Receiver
   NR         376
   NTFY_ORDER 50-Onkyo_Receiver
   PARTIAL   
   PROTOCOLVERSION 2013
   SCREENLAYER 0
   STATE      opened
   TIMEOUT    3
   TYPE       ONKYO_AVR
   ZONE       1
   .attraggr:
   .attrminint:
   READINGS:
     2018-10-31 08:37:20   USB_Front       none
     2018-10-31 08:37:20   USB_Rear        disabled
     2018-12-15 16:53:06   _AEQ            01
     2019-10-20 16:06:36   _DSN            Schwarzw
     2018-11-02 23:47:32   _FXP            00
     2019-10-30 09:12:40   _ITV            000
     2018-11-21 18:52:36   _MRM            10
     2018-11-24 09:58:05   _NCP            X<?xml version="1.0" encoding="utf-8"?><popup title="Login with Amazon" align="center" type="custom" time="0" uri="resource:///popup" oauth_login="[D@s^R^zJON{U7=[IBZGLFsXB]I]V$@BI05glkd4xy@" oauth_error="0" ><label title="" align="center" total="1" uri="resource:///popup/label:0" ><line text="Please update the app in order to start using Amazon Music." align="left" uri="resource:///popup/label/line:0" order="0" /></label></popup>
     2019-10-22 17:03:49   _NDN           
     2019-10-20 16:18:36   _NFI            //
     2018-12-05 15:02:09   _NLU            00000001
     2018-10-31 12:13:08   _PCT            00
     2019-10-21 13:27:10   _PR3            01
     2019-10-21 13:27:10   _PRZ            01
     2019-10-21 13:27:10   _TU3            09190
     2019-10-21 13:27:10   _TUZ            09190
     2018-10-30 21:19:06   _UPD            00
     2019-10-29 18:02:46   audin_ch        2
     2019-10-29 18:02:46   audin_enc       Dolby D
     2019-10-29 18:02:46   audin_srate     2
     2019-10-29 18:02:46   audin_src       OPTICAL 2
     2018-11-02 23:47:35   audio-input     hdmi
     2019-10-29 18:02:46   audout_ch       2
     2019-10-29 18:02:46   audout_mode     All Ch Stereo
     2018-10-30 10:35:38   brand           ONKYO
     2019-10-07 13:50:26   center-temporary-level 2
     2019-10-22 17:03:49   channel         
     2019-10-30 09:12:32   channelList     Music_Server,Pandora,Spotify,TuneIn_Radio,Deezer,AirPlay,TIDAL,Amazon_Music,Play_Queue,Chromecast_built-in,DTS_Play-Fi,FlareConnect
     2018-10-30 21:20:14   cinema-filter   off
     2019-10-22 17:03:49   currentAlbum   
     2018-12-08 10:33:26   currentAlbumArtURI ./FHEM/lib/UPnP/sonos_empty.jpg
     2018-12-08 10:33:26   currentAlbumArtURL ?/ONKYO_AVR/cover/empty.jpg
     2019-10-22 17:03:49   currentArtist   
     2019-10-22 17:03:49   currentTitle   
     2019-10-22 17:03:49   currentTrackDuration --:--
     2019-10-22 17:03:49   currentTrackPosition --:--
     2018-10-30 10:35:38   deviceid        TX-NR676E
     2018-10-30 10:35:38   deviceyear      2017
     2019-10-17 08:30:27   dimmer-level    bright
     2019-10-29 18:02:47   firmwareversion 1111-4020-3060-0010-0000
     2019-10-22 17:03:48   hdmi-cec        on
     2019-10-30 09:12:39   input           FM
     2018-10-30 10:35:38   inputList       BD/DVD,CBL/SAT,GAME,STRM_BOX,PC,AUX,AM,FM,CD,TV,PHONO,NET,BLUETOOTH
     2019-10-30 09:12:40   listening-mode  all-ch-stereo
     2018-10-30 10:36:48   model           0
     2019-10-29 22:48:48   music-optimizer off
     2019-10-18 19:34:52   mute            off
     2018-10-30 10:35:36   network-standby off
     2019-10-07 13:50:31   networkConnection wireless
     2019-10-22 16:54:42   playStatus      paused
     2019-10-30 09:05:31   power           on
     2019-10-30 09:05:31   presence        present
     2019-10-21 13:27:10   preset          1
     2018-12-04 17:05:53   repeat          -
     2019-10-22 17:03:49   screenCurser    0
     2018-12-06 16:06:33   screenIconLeft  00
     2019-10-22 17:03:49   screenIconRight 00
     2019-10-22 17:03:49   screenItemC0000 Music Server
     2019-10-22 17:03:49   screenItemC0001 USB
     2019-10-22 17:03:49   screenItemC0002 Play Queue
     2019-10-22 17:03:49   screenItemC0003 Deezer
     2019-10-22 17:03:49   screenItemC0004 Tidal
     2019-10-22 17:03:49   screenItemC0005 AmazonMusic
     2019-10-22 17:03:49   screenItemC0006 FlareConnect
     2019-10-22 17:03:49   screenItemC0007 Chromecast built-in
     2019-10-22 17:03:49   screenItemC0008 DTS Play-Fi
     2019-10-22 17:03:49   screenItemC0009 AirPlay
     2018-12-06 16:06:33   screenItemCnt   0000
     2018-12-06 16:06:33   screenLayer     00
     2019-10-22 17:03:49   screenLayerInfo 0
     2019-10-22 17:03:49   screenListPos   0000
     2018-10-30 10:35:39   screenStatus   
     2018-12-06 16:06:33   screenTitle     
     2019-10-22 17:03:49   screenType      0
     2018-12-04 17:05:53   shuffle         -
     2018-11-05 21:19:12   sleep           off
     2018-10-31 08:37:21   speaker-layout  --
     2019-10-30 09:05:31   state           opened
     2019-10-30 09:05:31   stateAV         on
     2019-10-07 13:50:26   subwoofer-temporary-level -6
     2018-11-17 16:05:17   tone-front-bass -3
     2018-11-01 11:22:01   tone-front-treble -1
     2019-10-21 13:27:10   tunerFrequency  09190
     2018-10-30 21:19:00   vidin_cdepth    1
     2019-10-29 18:02:46   vidin_cspace    YCbCr444
     2019-10-29 18:02:46   vidin_res       1920x1080i50
     2019-10-29 18:02:46   vidin_src       HDMI 2
     2018-10-30 21:19:00   vidout_cdepth   1
     2019-10-30 09:05:31   vidout_cspace   
     2018-10-30 21:19:00   vidout_dst      MAIN
     2019-10-30 09:05:31   vidout_res     
     2019-10-29 18:02:46   volume          36
     2018-10-30 10:35:38   zones           2
   fhem:
     infix      ONKYO_AVR
   helper:
     nextConnectionCheck 1572425802.466
     receiver:
       status     ok
       device:
         brand      ONKYO
         category   AV Receiver
         destination xx
         deviceserial 0009B0ED5164
         ecosystemversion 200
         firmwareversion 1111-4020-3060-0010-0000
         friendlyname
         id         TX-NR676E
         macaddress 0009B0ED5164
         model      TX-NR676E
         modeliconurl http://192.168.2.15/icon/OAVR_120.jpg
         productid  streamsdk
         year       2017
         controllist:
           count      61
           control:
             AMP Control(RI):
               value      0
             AV Adjust:
               value      0
             Audio Scalar:
               value      0
             Auto Sound Retriever:
               value      0
             BD Control(CEC):
               value      1
             Bass:
               max        10
               min        -10
               step       1
               value      1
               zone       1
             CD Control:
               value      0
             CD Control(NewRemote):
               value      0
             CD Control(RI):
               value      0
             Center Level:
               max        12
               min        -12
               step       1
               value      1
               zone       1
             Cursor:
               value      1
             DTS:X:
               value      1
             DetailedFileInfo:
               value      1
             Dialog Enhance:
               value      0
             Digital Filter:
               value      0
             Dimmer:
               value      1
             DolbyAtmos:
               value      1
             DownSample:
               value      0
             Hi-Bit:
               value      0
             Home:
               code       HOME
               position   2
               value      0
             Info:
               value      1
             LMD Auto/Direct:
               code       AUTO
               position   2
               value      0
             LMD Direct:
               code       01
               position   1
               value      0
             LMD Game:
               code       GAME
               position   3
               value      1
             LMD Movie/TV:
               code       MOVIE
               position   1
               value      1
             LMD Music:
               code       MUSIC
               position   2
               value      1
             LMD Pure Audio:
               code       11
               position   2
               value      0
             LMD Pure Direct:
               code       11
               position   1
               value      0
             LMD Stereo:
               code       00
               position   4
               value      1
             LMD Stereo G:
               code       STEREO
               position   3
               value      0
             LMD Surround:
               code       SURR
               position   4
               value      0
             LMD THX:
               code       04
               position   4
               value      0
             Lock Range Adjust:
               value      0
             MCACC:
               value      0
             Menu:
               code       MENU
               position   1
               value      0
             Music Optimizer:
               value      1
             NJAREQ:
               value      1
             NoAudioInfo:
               value      0
             NoDABPresetFunc:
               value      0
             NoNetworkStandby:
               value      0
             NoPowerButton:
               value      0
             NoVideoInfo:
               value      0
             NoVolume:
               value      0
             P.BASS:
               value      0
             PQLS:
               value      0
             Phase Matching Bass:
               value      0
             Quick:
               code       QUICK
               position   1
               value      1
             S.BASS:
               value      0
             Setup:
               code       MENU
               position   2
               value      1
             Sub Control(CEC):
               value      0
             Subwoofer Level:
               max        12
               min        -15
               step       1
               value      1
               zone       1
             Subwoofer1 Level:
               max        12
               min        -15
               step       1
               value      0
               zone       1
             Subwoofer2 Level:
               max        12
               min        -15
               step       1
               value      0
               zone       1
             TUNER Control:
               value      1
             TUNER Freq Control:
               value      0
             TV Control(CEC):
               value      1
             Tone Direct:
               value      0
             Treble:
               max        10
               min        -10
               step       1
               value      1
               zone       1
             Upsampling:
               value      0
             Zone2 Control(CEC):
               value      0
             time_hhmmss:
               value      1
         functionlist:
           count      10
           function:
             HASH(0x50364b0)
             HASH(0x50b7140)
             HASH(0x4cb47f0)
             HASH(0x4eb2af0)
             HASH(0x4ccbb48)
             HASH(0x4fd75e0)
             HASH(0x514afc8)
             HASH(0x4ceba98)
             HASH(0x4cc9658)
             HASH(0x4f439f8)
         netservicelist:
           count      13
           netservice:
             00:
               addqueue   1
               enable     07
               name       Music Server
               sort       1
               value      1
               zone       07
             04:
               account    Email
               enable     07
               name       Pandora
               password   Password
               value      1
               zone       07
             0a:
               enable     07
               name       Spotify
               value      1
               zone       07
             0e:
               account    Username
               enable     07
               name       TuneIn Radio
               password   Password
               value      1
               zone       07
             12:
               account    Email address
               enable     07
               name       Deezer
               password   Password
               value      1
               zone       07
             18:
               enable     07
               name       AirPlay
               value      1
               zone       07
             1b:
               account    Username
               enable     07
               name       TIDAL
               password   Password
               value      1
               zone       07
             1c:
               account    Username
               enable     07
               name       Amazon Music
               password   Password
               value      1
               zone       07
             1d:
               enable     07
               name       Play Queue
               value      1
               zone       07
             40:
               enable     01
               name       Chromecast built-in
               value      1
               zone       07
             42:
               enable     01
               name       DTS Play-Fi
               value      1
               zone       07
             43:
               enable     07
               name       FlareConnect
               value      1
               zone       07
             f0:
               addqueue   1
               enable     07
               name       USB
               value      0
               zone       07
         presetlist:
           count      40
           preset:
             01:
               band       1
               freq       91.90
               name        Powers
             02:
               band       2
               freq       0
               name       N-JOY     
             03:
               band       2
               freq       0
               name       ENERGY   
             04:
               band       2
               freq       0
               name       BOB!     
             05:
               band       2
               freq       0
               name       NDR 2     
             06:
               band       0
               freq       0
               name       
             07:
               band       1
               freq       105.90
               name        delta
             08:
               band       2
               freq       0
               name       A relax   
             09:
               band       2
               freq       0
               name       sunshine 
             0a:
               band       2
               freq       0
               name       SCHLAGER 
             0b:
               band       2
               freq       0
               name       NDR Kult 
             0c:
               band       2
               freq       0
               name       NDR Info 
             0d:
               band       2
               freq       0
               name       NDR Blue 
             0e:
               band       2
               freq       0
               name       NDR 1 SH 
             0f:
               band       2
               freq       0
               name       Dlf Nova 
             10:
               band       2
               freq       0
               name       Schwarzw 
             11:
               band       0
               freq       0
               name       
             12:
               band       0
               freq       0
               name       
             13:
               band       0
               freq       0
               name       
             14:
               band       0
               freq       0
               name       
             15:
               band       0
               freq       0
               name       
             16:
               band       0
               freq       0
               name       
             17:
               band       0
               freq       0
               name       
             18:
               band       0
               freq       0
               name       
             19:
               band       0
               freq       0
               name       
             1a:
               band       0
               freq       0
               name       
             1b:
               band       0
               freq       0
               name       
             1c:
               band       0
               freq       0
               name       
             1d:
               band       0
               freq       0
               name       
             1e:
               band       0
               freq       0
               name       
             1f:
               band       0
               freq       0
               name       
             20:
               band       0
               freq       0
               name       
             21:
               band       0
               freq       0
               name       
             22:
               band       0
               freq       0
               name       
             23:
               band       0
               freq       0
               name       
             24:
               band       0
               freq       0
               name       
             25:
               band       0
               freq       0
               name       
             26:
               band       0
               freq       0
               name       
             27:
               band       0
               freq       0
               name       
             28:
               band       0
               freq       0
               name       
         selectorlist:
           count      15
           selector:
             HASH(0x4c9b120)
             HASH(0x50b8150)
             HASH(0x4d0d978)
             HASH(0x49f1640)
             HASH(0x4d0d6d8)
             HASH(0x4f55bc0)
             HASH(0x4c9e518)
             HASH(0x4cee3e0)
             HASH(0x4e83e10)
             HASH(0x4d16120)
             HASH(0x50c1b48)
             HASH(0x481c880)
             HASH(0x4c99850)
             HASH(0x50105c0)
             HASH(0x4d0d420)
         tuners:
           count      2
           tuner:
             HASH(0x4ccc040)
             HASH(0x4820fd0)
         zonelist:
           count      4
           zone:
             1:
               dst        1
               lrselect   0
               name       Main
               src        1
               value      1
               volmax     82
               volstep    1
             2:
               dst        0
               lrselect   0
               name       Zone2
               src        0
               value      1
               volmax     0
               volstep    1
             3:
               dst        0
               lrselect   0
               name       Zone3
               src        0
               value      0
               volmax     0
               volstep    0
             4:
               dst        0
               lrselect   0
               name       Zone4
               src        0
               value      0
               volmax     0
               volstep    0
       input:
         01         CBL/SAT
         02         GAME
         03         AUX
         05         PC
         10         BD/DVD
         11         STRM_BOX
         12         TV
         22         PHONO
         23         CD
         24         FM
         25         AM
         2B         NET
         2E         BLUETOOTH
         33         DAB
       input_aliases:
       input_names:
       preset:
         01         Powers
         02         N-JOY
         03         ENERGY
         04         BOB!
         05         NDR_2
         07         delta
         08         A_relax
         09         sunshine
         0a         SCHLAGER
         0b         NDR_Kult
         0c         NDR_Info
         0d         NDR_Blue
         0e         NDR_1_SH
         0f         Dlf_Nova
         10         Schwarzw
Attributes:
   cmdIcon    muteT:rc_MUTE previous:rc_PREVIOUS next:rc_NEXT play:rc_PLAY pause:rc_PAUSE stop:rc_STOP shuffleT:rc_SHUFFLE repeatT:rc_REPEAT
   devStateIcon on:rc_GREEN@green:off off:rc_STOP:on off:rc_RED playing:rc_PLAY@green:pause paused:rc_PAUSE@green:play muted:rc_MUTE@green:muteT fast-rewind:rc_REW@green:play fast-forward:rc_FF@green:play interrupted:rc_PAUSE@yellow:play
   inputs     BD/DVD:CBL/SAT:GAME:STRM_BOX:PC:AUX:AM:FM:CD:TV:PHONO:NET:BLUETOOTH
   model      TX-NR676E
   room       Wohnzimmer
   room_map   on:present off:absent
   stateFormat power
   userattr   room_map structexclude
   webCmd     volume:muteT:input:previous:next


List Wohnzimmer anwesend:
Internals:
   .cachedHelp Unknown argument ?, choose one of active audio-input blink center-temporary-level channel channel channelDown channelUp cinema-filter dimmer-level hdmi-cec inactive input href='/fhem?detail=TV'>TV,PHONO,NET,BLUETOOTH inputDown inputUp internet-radio-preset intervals listening-mode music-optimizer mute mute muteT network-standby next off-for-timer off-till off-till-overnight off on-for-timer on-till on-till-overnight on overrideInterval pause play power preset presetDown presetUp previous reboot remoteControl remoteControl repeat repeatT showText showtextwithbutton shuffle shuffleT shutdown sleep speaker-layout statusRequest statusRequest stop subwoofer-temporary-level toggle toggle tone-front-bass tone-front-treble tunerFrequency volume volumeDown volumeUp saveStructState restoreStructState
   ATTR       room
   CHANGED   
   CHANGEDCNT 475
   DEF        room Blueray WZ_Anwesend Laptop Petra_Laptop Coolstream_WZ ELRO_BWM_innen Onkyo_Receiver
   FUUID      5c6a8912-f33f-7e98-9461-1982448b760464ad
   NAME       Wohnzimmer_anwesend
   NR         347
   NTFY_ORDER 50-Wohnzimmer_anwesend
   STATE      present
   TYPE       structure
   .asyncQueue:
   .attraggr:
   .attreocr:
     state
   .attrminint:
   .memberHash:
     Blueray    absent
     Coolstream_WZ absent
     ELRO_BWM_innen absent
     Laptop     1
     Onkyo_Receiver
     Petra_Laptop absent
     WZ_Anwesend present
   .memberList:
     Blueray
     WZ_Anwesend
     Laptop
     Petra_Laptop
     Coolstream_WZ
     ELRO_BWM_innen
     Onkyo_Receiver
   READINGS:
     2019-10-30 09   LastDevice      Coolstream_WZ
     2019-10-30 09   LastDevice_Abs  Coolstream_WZ
     2019-10-30 09   state           present
Attributes:
   clientstate_behavior relative
   clientstate_priority present absent
   event-on-change-reading state
   room       Wohnzimmer


Der Receiver ist bei der List Erstellung an.


Vielen Dank
Hoffi

Otto123

Hallo Hoffi,

ich hätte ja spontan gestagt stateFormat aber hast Du gesetzt. Aber eigentlich geht es Dir doch auch um state oder?
Egal, ich würde es in der structure lösen:
clientstate_priority present|opened absent|???

Die drei ? musst Du noch ersetzen.

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Thoffi1978

Danke für die Antwort.

Leider steht "opened" im state, sobald der Receiver Strom hat, also auch im Standby.
Ich muss irgendwie das Reading Power abgreifen, doch das gelingt mir aber nicht.

Hoffi

Otto123

Hi,

hast Du mal probiert state zu ändern? Kann sein das funktioniert aber nicht.
attr Onkyo_Receiver userReadings state {ReadingsVal($name,"power","error")}

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Thoffi1978

Hej Otto,

jetzt aktualisiert sich "state" nicht mehr.
"POWER" bleibt immer auf "off" stehen.

Das scheint leider nicht zu funktionieren.

Hoffi

Otto123

ich sehe in deinem Listing kein POWER  :-[

Sorry ich habe das Modul nicht und kann nichts probieren.
Dann musst Du das ganze irgendwie auslagern, mir gehen da auch die Ideen aus.
Mit auslagern meine ich: testweise einen Dummy anlegen, den mit einem notify setzen welches dein power Reading auswertet.
Zumindest um erstmal die Funktion zu haben.

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz