Modul für WLAN Radios mit Frontier Silicon Chipsatz (SilverCrest/Medion/Hama...)

Begonnen von mumpitzstuff, 07 November 2017, 00:21:27

Vorheriges Thema - Nächstes Thema

esk

Hi,

früher kommt man im tablet-ui und data-list="presetList_1-5" die Sender auswählen... Leider ist die select box auch nach Anpassung auf ".presets"  leer.

<div class="cell"
      data-type="select"
      data-device="DIR3110"
      data-list=".presets"
      data-delimiter=","
      data-set="preset">
</div>


fhem> list -r  DIR3110
define DIR3110 SIRD 192.168.178.31 1234 60
attr DIR3110 room Küche
attr DIR3110 ttsLanguage de
attr DIR3110 ttsVolume 40
attr DIR3110 verbose 5

setstate DIR3110 on
setstate DIR3110 2018-03-20 19:56:07 .inputs 0:internetradio,1:spotify,2:dmr,3:musikabspieler,4:dab,5:fm,6:auxiliaryinput
setstate DIR3110 2018-03-20 08:09:59 .internetradiopresets 0:SWR3,1:NDR2(HH),2:rbbradioeins,3:Radio7FM90.0Ulm,4:MDRSPUTNIK,5:KlassikRadio
setstate DIR3110 2018-03-14 06:51:24 .numNav 5
setstate DIR3110 2018-03-20 20:11:08 .presets 0:SWR3,1:NDR2(HH),2:rbbradioeins,3:Radio7FM90.0Ulm,4:MDRSPUTNIK,5:KlassikRadio
setstate DIR3110 2018-01-09 07:12:05 .volumeSteps 32
setstate DIR3110 2018-03-03 09:18:55 currentAlbum
setstate DIR3110 2018-03-03 09:18:54 currentArtist
setstate DIR3110 2018-03-20 09:48:19 currentTitle SWR3
setstate DIR3110 2018-03-20 09:48:20 duration 0
setstate DIR3110 2018-01-10 10:01:04 errorStr
setstate DIR3110 2018-01-05 14:06:42 friendlyName DIR3100/3110 0022612ae8f4
setstate DIR3110 2018-03-20 09:48:21 graphicUri http://hama.wifiradiofrontier.com/setupapp/setup1/logo/logo-530.png
setstate DIR3110 2018-03-20 20:11:11 infoText Careless whisper / George Michael
setstate DIR3110 2018-03-20 09:48:21 input internetradio
setstate DIR3110 2018-03-20 09:48:23 mute off
setstate DIR3110 2018-03-20 09:48:22 playStatus playing
setstate DIR3110 2018-03-20 20:11:12 position 25:00
setstate DIR3110 2018-03-20 20:11:08 power on
setstate DIR3110 2018-03-20 20:11:08 presence present
setstate DIR3110 2018-03-20 19:46:04 preset SWR3
setstate DIR3110 2018-03-20 09:48:22 repeat off
setstate DIR3110 2018-03-20 09:48:23 shuffle off
setstate DIR3110 2018-03-20 20:11:08 state on
setstate DIR3110 2018-01-05 14:06:42 version ir-mmi-FS2026-0500-0067_V2.11.13c.EX68399-3A6
setstate DIR3110 2018-03-20 19:48:08 volume 31
setstate DIR3110 2018-03-20 19:48:08 volumeStraight 10


Jemand ne Idee ?
Danke

esk

mumpitzstuff

Stört sich das Ding vielleicht an irgend einem Zeichen? Was passiert wenn du .inputs verwendest? Aber selbst wenn etwas angezeigt werden würde, dann müsstest du die Zahl und den Doppelpunkt weg filtern. Spaßeshalber kannst du dir ein Userreading anlegen und da mal so eine Liste aufnehmen und gucken was passiert.

mumpitzstuff

Ich habe mal eine Testversion mit den Events gebaut. Testet es bitte mal und gebt mir Rückmeldung. Folgende Dinge sind zu beachten:

1.) Das Modul sollte auf Verbose 4 gesetzt werden, damit alle Nachrichten bezüglich der Events im Logfile auftauchen. Bitte nicht Verbose 5 verwenden, sonst kommen zu viele Meldungen.

2.) Es muss einmalig das Kommando Login verwendet werden, erst dadurch werden die Events scharf geschaltet.

Leider scheinen relativ wenig Informationen in Form von Events vom Radio gesendet zu werden, deshalb bringt es wahrscheinlich weniger als gedacht... Aber mal gucken was ihr so fest stellen könnt. Ein paar Logs würden mich natürlich ebenfalls interessieren, um zu sehen welche Events bei euch so rein kommen.

So sieht bei mir der Output aus:

2018.03.20 22:51:56 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.info.name"><value><c8_array>sunshine live</c8_array></value>
</notify>
<notify node="netremote.play.info.text"><value><c8_array></c8_array></value>
</notify>
<notify node="netremote.play.status"><value><u8>1</u8></value>
</notify>
</fsapiResponse>

2018.03.20 22:51:56 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:51:56 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:51:57 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.status"><value><u8>1</u8></value>
</notify>
</fsapiResponse>

2018.03.20 22:51:57 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:51:57 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:52:00 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.info.text"><value><c8_array>Elektronische Musik, 24 Stunden täglich, das macht das Programm von radio sunshine live unverwechselbar.</c8_array></value>
</notify>
</fsapiResponse>

2018.03.20 22:52:00 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:52:00 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:52:00 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.status"><value><u8>2</u8></value>
</notify>
</fsapiResponse>

2018.03.20 22:52:00 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:52:00 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:52:25 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_TIMEOUT</status>
</fsapiResponse>

2018.03.20 22:52:25 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:52:56 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_TIMEOUT</status>
</fsapiResponse>

2018.03.20 22:52:56 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:53:03 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.info.name"><value><c8_array>RauteMusik.FM HappyHardcore</c8_array></value>
</notify>
<notify node="netremote.play.info.text"><value><c8_array></c8_array></value>
</notify>
<notify node="netremote.play.status"><value><u8>1</u8></value>
</notify>
</fsapiResponse>

2018.03.20 22:53:03 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:53:03 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:53:04 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.status"><value><u8>1</u8></value>
</notify>
</fsapiResponse>

2018.03.20 22:53:04 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:53:04 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:53:06 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.info.text"><value><c8_array>Technical Difficulties - Robots </c8_array></value>
</notify>
</fsapiResponse>

2018.03.20 22:53:06 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:53:06 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:53:06 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_OK</status>
<notify node="netremote.play.status"><value><u8>2</u8></value>
</notify>
</fsapiResponse>

2018.03.20 22:53:06 3: WLAN_RADIO: Notifies GET_NOTIFIES successful.
2018.03.20 22:53:06 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:53:33 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_TIMEOUT</status>
</fsapiResponse>

2018.03.20 22:53:33 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:54:03 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_TIMEOUT</status>
</fsapiResponse>

2018.03.20 22:54:03 3: WLAN_RADIO: Notifies restarted
2018.03.20 22:54:33 3: WLAN_RADIO: URL http://192.168.1.102:80/fsapi/GET_NOTIFIES?pin=1234&sid=483056486 returned:
<fsapiResponse>
<status>FS_TIMEOUT</status>
</fsapiResponse>

Lichti

Also ich kann eigentlich keinen Unterschied zur vorherigen Version feststellen.
Status-Meldungen kommen m.E. auch nicht schneller als vorher.
Ist aber kein Problem, bisher war ich damit ganz Zufrieden.

Hier mein Log:


2018.03.21 13:29:44 4: DigitRadio: Notifies GET_NOTIFIES successful.
2018.03.21 13:29:44 4: DigitRadio: Notifies restarted
2018.03.21 13:29:44 4: http://192.168.178.25:80/fsapi/GET_NOTIFIES?pin=1234&sid=1146978445: HTTP response code 200
2018.03.21 13:29:44 4: DigitRadio: URL http://192.168.178.25:80/fsapi/GET_NOTIFIES?pin=1234&sid=1146978445 returned:
<fsapiResponse>
<notify node="netremote.play.info.text"><value><c8_array>ANTENNE BAYERN - Wir lieben Bayern, wir lieben die Hits</c8_array></value>
</notify>
</fsapiResponse>

2018.03.21 13:29:44 4: DigitRadio: Notifies GET_NOTIFIES successful.
2018.03.21 13:29:44 4: DigitRadio: Notifies restarted
2018.03.21 13:29:53 4: http://192.168.178.153:80/fsapi/GET/netRemote.nav.numItems?pin=1234: HTTP response code 200
2018.03.21 13:29:53 4: http://192.168.178.153:80/fsapi/GET/netRemote.nav.state?pin=1234: HTTP response code 200
2018.03.21 13:29:53 4: http://192.168.178.153:80/fsapi/GET/netRemote.sys.caps.volumeSteps?pin=1234: HTTP response code 200
2018.03.21 13:29:53 4: http://192.168.178.153:80/fsapi/GET/netRemote.nav.status?pin=1234: HTTP response code 200
2018.03.21 13:29:54 4: http://192.168.178.153:80/fsapi/GET/netRemote.sys.mode?pin=1234: HTTP response code 200
2018.03.21 13:29:54 4: http://192.168.178.153:80/fsapi/LIST_GET_NEXT/netRemote.nav.presets/-1?pin=1234&maxItems=20: HTTP response code 200
2018.03.21 13:29:54 4: http://192.168.178.153:80/fsapi/GET/netRemote.sys.info.version?pin=1234: HTTP response code 200
2018.03.21 13:29:54 4: http://192.168.178.153:80/fsapi/GET/netRemote.sys.info.friendlyName?pin=1234: HTTP response code 200
2018.03.21 13:29:54 4: http://192.168.178.153:80/fsapi/GET/netRemote.sys.audio.volume?pin=1234: HTTP response code 200
2018.03.21 13:29:54 4: http://192.168.178.25:80/fsapi/GET_NOTIFIES?pin=1234&sid=1146978445: HTTP response code 200
2018.03.21 13:29:54 4: DigitRadio: URL http://192.168.178.25:80/fsapi/GET_NOTIFIES?pin=1234&sid=1146978445 returned:


Ich hoffe, du kannst damit was anfangen.

mumpitzstuff

Was für eine Zykluszeit hast du bei deinem Device eingestellt? Wenn es wie bei mir 10s sind, dann wird man kaum einen Unterschied sehen. Ich werde es aber mal bei mir mit 2-3min testen, um zu sehen ob die Events tatsächlich bis zum Reading Update durch kommen oder irgendwo hängen bleiben.


mumpitzstuff

Habe jetzt ewig gesucht und den Fehler gefunden. So ein blöder Mist. Normalerweise wird überall "netRemote" verwendet, nur ausgerechnet bei den Events kommt "netremote" mit kleinem r zurück. Dadurch wurden die Readings nicht aktualisiert.

Im Anhang befindet sich eine bereinigte Version. Könnt ihr diese bitte noch einmal prüfen? Auch hier muss wieder das Kommando Login ausgeführt werden, damit die Events aktiv werden.

Lichti


mumpitzstuff

Hier die letzte Testversion vor der Freigabe. Folgendes ist neu:

1.) Es gibt ein Attribut enableNotifications. Wenn man das auf 1 setzt, dann sind die Notifications aktiv (zu sehen mit Verbose 4). Der Default Wert ist 0.
2.) Es gibt ein Attribut updateAfterSet. Wenn man das auf 0 setzt, dann ist das automatische Update nach einem Set Kommando abgeschaltet und es finden nur noch die zyklischen Updates statt. Zum einen kann man damit besser die Notifications sehen und zum anderen kann es nützlich sein wenn jemand sehr viel Set Kommandos hintereinander auslösen möchte. Hier kann es unter Umständen wegen der Masse an Anfragen an das Radio zu Problemen kommen.
3.) Ich habe ein neues Reading frequency implementiert. Da ich leider kein UKW Radio habe, kann ich leider nicht sehen ob es geht. Es wäre schön wenn mir jemand sagen könnte ob bei einem UKW Radio die Frequenz jetzt angezeigt wird. Ob das auch bei DAB funktioniert kann ich nicht sagen...

supernova1963

Hallo mumpitzstuff,

ich habe es versucht.
zu 1.) Attribut enableNotifications ist vorhanden.
(Ich habe es mal umgeschaltet, kann aber den Unterschied bei 10 sec update nicht feststellen)
zu 2.) Attribut updateAfterSet ist vorhanden.
(... aber schwer zu testen. Ich müßte ja zunächst einen Fehler mit Befehlsfeuer erzeugen und dann testen ob der Fehler nach umschalten weiterhin auftritt.)
zu 3.) Das Reading frequency finde ich nicht.
(Wenn ich den input auf fmradio umschalte sehe ich in currentTitle kurz die Frequenz, die dann vermutlich aufgrund der RDS Funktion auf den Sendernamen umspringt.)

Mein List:
Internals:
   CHANGED   
   DEF        192.168.1.13  1234 10
   INTERVAL   10
   IP         192.168.1.13
   NAME       03_Kuechenradio
   NOTIFYDEV  global
   NR         39
   NTFY_ORDER 50-03_Kuechenradio
   PIN        1234
   STATE      on
   TYPE       SIRD
   VERSION    1.1.4
   READINGS:
     2018-03-24 05:44:25   currentTitle      SWR3 
     2018-03-24 05:05:01   duration        0
     2018-03-12 15:21:04   errorStr       
     2018-03-12 15:28:51   friendlyName    Küchenradio
     2018-03-24 05:44:28   graphicUri     
     2018-03-24 05:48:06   infoText        Rock-paper-scissors / Katzenjammer
     2018-03-24 05:44:24   input           fmradio
     2018-03-24 05:05:04   mute            off
     2018-03-24 05:44:24   playStatus      playing
     2018-03-24 05:44:25   position        0:00
     2018-03-24 05:48:04   power           on
     2018-03-24 05:48:04   presence        present
     2018-03-24 05:34:43   preset         
     2018-03-24 05:05:03   repeat          off
     2018-03-24 05:05:04   shuffle         off
     2018-03-24 05:48:04   state           on
     2018-01-31 18:01:31   version         ir-mmi-FS2026-0500-0370_V2.11.13c.EX68183-1A30
     2018-03-24 05:06:47   volume          6
     2018-03-24 05:06:47   volumeStraight  2
   helper:
     notifications 1
     sid        1915690561
     suspendUpdate 0
Attributes:
   cmdIcon    on:radio_checked@#e56524 off:radio_unchecked
   devStateIcon off:general_aus:on on:general_an@#e56524:off .*:message_attention@red
   enableNotifications 1
   group      Küchenradio
   icon       rc_PLAY
   room       91 Systeme
   webCmd     input:volumeStraight:on:off


Tolles Modul, dass mit jedem Update neue Funktionen und Highlights bietet.

Danke,

Gernot

Lichti

Bei mir das gleiche bzgl. der Notifications wie bei  supernova1963.
frequency finde ich auch nicht.

Und mit den beiden neuen Attributen auf EIN hat sich das Radio nach ca. 5 Min. aufgehängt.

Ansonsten auch nochmal vielen Dank für deine Arbeit !

mumpitzstuff

Frequency guck ich mir noch mal an und mache da vielleicht ein paar debug Ausgaben rein.

Bei 10s Update sieht man tatsächlich nicht viel, da müsste man auf 1min gehen und dann die notifications an stellen und das Update nach dem set aus. Dann kommen einige wenige readings außerhalb des Update Zyklus von 1min rein.

Hat sich dein radio oder dein fhem verabschiedet? Ich bin mir noch nicht ganz sicher ob ich bei den notifications die Option zum offen lassen der Verbindung vielleicht falsch verwende und das dann zu x offenen Verbindungen führt. Mein fhem läuft aber aktuell mit angeschalteten notifications einwandfrei.

Lichti

Das Radio selbst hat gehängt. Ging nur noch Power-off/on.

Und, wie schon gesagt, mit 10s ist das Update-Intervall für mich vollkommen ausreichend.

supernova1963

Da es scheinbar Abstürze bei beiden neuen Attribute auf 1 gibt, habe ich es doch getestet.
Lautstaerke hin- und her geschoben, Inputs gewechselt, .... Einen Absturz konnte ich nicht provozieren.
Einzige Veränderung, die ich festgestellt habe, ist, dass cuurentTitle bei fmradii erst nach ca. 1 Minute zum Sendernamen wechselt.

Gernot

Internals:
   CHANGED   
   DEF        192.168.1.13  1234 60
   INTERVAL   60
   IP         192.168.1.13
   NAME       03_Kuechenradio
   NOTIFYDEV  global
   NR         39
   NTFY_ORDER 50-03_Kuechenradio
   PIN        1234
   STATE      on
   TYPE       SIRD
   VERSION    1.1.4
   READINGS:
     2018-03-24 12:54:55   currentTitle      BERG 
     2018-03-24 12:46:04   duration        0
     2018-03-12 15:21:04   errorStr       
     2018-03-12 15:28:51   friendlyName    Küchenradio
     2018-03-24 12:54:18   graphicUri     
     2018-03-24 12:54:57   infoText          Radio Berg   *  aus  Waldbröl   auf  105,7MHz   *
     2018-03-24 12:54:10   input           fmradio
     2018-03-24 12:46:07   mute            off
     2018-03-24 12:48:51   playStatus      playing
     2018-03-24 12:54:11   position        0:00
     2018-03-24 12:55:00   power           on
     2018-03-24 12:55:00   presence        present
     2018-03-24 12:54:43   preset          105.70MHz
     2018-03-24 12:46:06   repeat          off
     2018-03-24 12:46:06   shuffle         off
     2018-03-24 12:55:00   state           on
     2018-01-31 18:01:31   version         ir-mmi-FS2026-0500-0370_V2.11.13c.EX68183-1A30
     2018-03-24 12:55:00   volume          28
     2018-03-24 12:55:00   volumeStraight  9
   helper:
     notifications 1
     sid        1915690561
     suspendUpdate 0
     CL:
       Authenticated 1
       BUF       
       LASTACCESS 1521891494
       NAME       WEB_192.168.1.120_51807
       NR         5083
       PEER       192.168.1.120
       PORT       51807
       SNAME      WEB
       SSL       
       STATE      Connected
       TEMPORARY  1
       TYPE       FHEMWEB
Attributes:
   cmdIcon    on:radio_checked@#e56524 off:radio_unchecked
   devStateIcon off:general_aus:on on:general_an@#e56524:off .*:message_attention@red
   enableNotifications 1
   group      Küchenradio
   icon       rc_PLAY
   room       91 Systeme
   updateAfterSet 1
   webCmd     input:volumeStraight:on:off

mumpitzstuff

Das mit currentTitle passiert bei mir auch manchmal bzw. bei mir kommt dann gar keinn Update mehr an dieser Stelle und ich muss ein Reload der Seite machen, um die Änderung zu sehen. Passiert das nur wenn die Notifications aktiviert sind oder auch wenn diese deaktiviert sind (in der Testversion funktioniert das deaktivieren nur wenn man das Attribut auf 0 setzt und dann ein shutdown restart macht (vorher saven nicht vergessen))?

Das Problem mit der Frequenz habe ich gefunden, das kommt im nächsten Update.

Als Nächstes würde ich erst mal vermeinlich low hanging fuits ernten und ein paar weitere Readings aufnehmen wollen:

Könnt ihr euch bitte mal die folgende Seite genau ansehen und mir für euch potenziell interessante Dinge posten die ihr euch als Reading vorstellen könntet?

https://github.com/flammy/fsapi/blob/master/FSAPI.md

Die ganzen Multiroom Geschichten würde ich gern noch etwas nach hinten schieben, da mir das mangels einem zweitem Gerät etwas zu unsicher ist. Außerdem scheint die Nachfrage dahingehend bisher nur von einem User zu kommen.