Volumio Steuerung mit HTTPMOD [gelöst]

Begonnen von pcjogi, 27 Oktober 2020, 06:52:40

Vorheriges Thema - Nächstes Thema

pcjogi

Hallo zusammen,

ich habe ein Volumio (volumio.org) auf einem Raspberry laufen. von einer fhem Instanz kann ich per HTTPMOD die Lautstärke regeln. Soweit gut, aber ich möchte auch ein Radiostream starten. Das funktioniert von der Commandozeile mit curl -i --header "Content-Type: application/json" volumio_arbeitszimmer:3000/api/v1/replaceAndPlay --data '{
  "service": "webradio",  "type": "webradio",  "title": "WDR2",
  "uri": "http://wdr-wdr2-rheinland.icecast.wdr.de/wdr/wdr2/rheinland/mp3/128/stream.mp3",
  "albumart": "https://www1.wdr.de/radio/wdr2/wdrzwei-app-logo-102~_v-gseagaleriexl.jpg"
}'


auch mit einem
{qx (curl -i --header "Content-Type: application/json" volumio_arbeitszimmer:3000/api/v1/replaceAndPlay --data '{
  "service": "webradio",  "type": "webradio",  "title": "WDR2",
  "uri": "http://wdr-wdr2-rheinland.icecast.wdr.de/wdr/wdr2/rheinland/mp3/128/stream.mp3",
  "albumart": "https://www1.wdr.de/radio/wdr2/wdrzwei-app-logo-102~_v-gseagaleriexl.jpg"
}')}


aus fhem heraus funktioniert der Radiostream.

Das muss doch auch mit HTTPMOD zu realisieren sein. Mein Versuch mit
attr ARBZ.VOLUMIO.STATUS set02Data '{   "service": "webradio",  "type": "webradio",  "title": "WDR2",   "uri": "http://wdr-wdr2-rheinland.icecast.wdr.de/wdr/wdr2/rheinland/mp3/128/stream.mp3",   "albumart": "https://www1.wdr.de/radio/wdr2/wdrzwei-app-logo-102~_v-gseagaleriexl.jpg" }'
attr ARBZ.VOLUMIO.STATUS set02Header Content-Type: application/json
attr ARBZ.VOLUMIO.STATUS set02Name playurl
attr ARBZ.VOLUMIO.STATUS set02TextArg 1
attr ARBZ.VOLUMIO.STATUS set02URL volumio_arbeitszimmer:3000/api/v1/replaceAndPlay


oder

attr ARBZ.VOLUMIO.STATUS set02Header Content-Type: application/json
attr ARBZ.VOLUMIO.STATUS set02Name playurl
attr ARBZ.VOLUMIO.STATUS set02TextArg 1
attr ARBZ.VOLUMIO.STATUS set02URL volumio_arbeitszimmer:3000/api/v1/replaceAndPlay --data '{   "service": "webradio",  "type": "webradio",  "title": "WDR2",   "uri": "http://wdr-wdr2-rheinland.icecast.wdr.de/wdr/wdr2/rheinland/mp3/128/stream.mp3",   "albumart": "https://www1.wdr.de/radio/wdr2/wdrzwei-app-logo-102~_v-gseagaleriexl.jpg" }'


waren leider nicht erfolgreich. Kann mir jemand auf die Sprünge helfen?

Danke
Zentral-Fhem , Mehrere Sub-Fhem (433Mhz und 833Mhz; Alexa-Steuerung; Heizungssteuerung; Sicherheitsfunktionen; Energiesteuerung); IoBroker zur Darstellung (alles als Container auf Proxmox), untereinander verbunden über einen MQTT Broker, insgesamt über 200 Sensoren/Aktoren.

pcjogi

Antwort selber gefunden!!

attr ARBZ.VOLUMIO.STATUS set02Data {"service": "webradio",  "type": "webradio",  "title": "WDR2","uri": "http://wdr-wdr2-rheinland.icecast.wdr.de/wdr/wdr2/rheinland/mp3/128/stream.mp3","albumart": "https://www1.wdr.de/radio/wdr2/wdrzwei-app-logo-102~_v-gseagaleriexl.jpg"}
attr ARBZ.VOLUMIO.STATUS set02Header Content-Type: application/json
attr ARBZ.VOLUMIO.STATUS set02Name playurl
attr ARBZ.VOLUMIO.STATUS set02TextArg 1
attr ARBZ.VOLUMIO.STATUS set02URL http://volumio_arbeitszimmer.local:3000/api/v1/replaceAndPlay


funktioniert!!
Zentral-Fhem , Mehrere Sub-Fhem (433Mhz und 833Mhz; Alexa-Steuerung; Heizungssteuerung; Sicherheitsfunktionen; Energiesteuerung); IoBroker zur Darstellung (alles als Container auf Proxmox), untereinander verbunden über einen MQTT Broker, insgesamt über 200 Sensoren/Aktoren.