Difference between revisions of "How To trigger Relays using metadata"

Line 1: Line 1:
===TRIGGER A RELAY ON STREAMING CLIENT USING METADATA===
===TRIGGER A RELAY ON STREAMING CLIENT USING METADATA===
Using Streaming Client firmware and Exstreamer devices that embeds relays (Exstreamer 110, 120, 500, 1000) it's possible to drive the relays using special METADATA strings.
The state of relays is mapped in binary form with ASCII 'A' values (65) as offset.
all relays OFF: 0000 --> ASCII 'A'
relay 1 active: 0001 --> ASCII 'A' + 1 = 'B'
relay 2 active: 0010 --> ASCII 'A' + 2 = 'C'
relay 3 active: 0100 --> ASCII 'A' + 4 = 'E'
relay 4 active: 1000 --> ASCII 'A' + 8 = 'I'
all relays ON: 1111  --> ASCII 'A' + 15 = 'P'


==Exstreamer Configuration==
==Exstreamer Configuration==


- STREAMING CLIENT firmware.
- Streaming Client firmware.
 
- Streaming Settings → 1. URL: http://<ip-instreamer>:<port>/xstream (You can change “xstream”) or http://shoutcast-server/....


- STREAMING SETTINGS → 1. URL: http://<ip-instreamer>:<port>/xstream (You can change “xstream”).
- I/O Settings Control Output 1-4: Remote.


- I/O SETTINGS → Control Output 1: Remote.


==From Instreamer==
==From Instreamer==


To send metadata to the Instreamer for inclusion with the stream, please use the E= command.  
- Instreamer firmware.
 
- Streaming Settings → SHOUTCAST/ICECAST SETTINGS → Radio Path → “/xstream”. (You can change “xstream”).
 
- Streaming Settings → STREAMING DESTINATIONS use “Internet Radio”.


In order to trigger the Relays on the device running the Streaming Client FW you have to issue the following command on the source
To send metadata to the Instreamer for inclusion with the stream use the E= command.
In order to trigger the Relays on the device running the Streaming Client FW you have to issue the following command on the source:


"E=StreamUrl='X'”
"E=StreamUrl='X'”


where 'X' is the bit mask for the Relay with offset 'A'  
where 'X' is the bit mask for the Relay with offset 'A'  
i.e. 'A' to turn off all Relays,  ‘B‘ to activate Relay 1 ...


   http://<ip-instreamer>/rc.cgi?E=StreamUrl='A';
   http://<ip-instreamer>/rc.cgi?E=StreamUrl='A';
 
  http://<ip-instreamer>/rc.cgi?E=StreamUrl='B';




===Instreamer Configuration===
==From Icecast/Shoutcast server==
It's possible to trigger the relay directly from Icecast/Shoutcast server.
On Icecast you can use Admin Panel on Update Metadata, with the command
'''';StreamUrl='P'''


- INSTREAMER firmware.
[[Image:icecast.png|500px]]


- STREAMING SETTINGS → SHOUTCAST/ICECAST SETTINGS → Radio Path → “/xstream”. (You can change “xstream”).
With WINAMP as Shoutcast source it's possible to trigger the relays using the URL field (see below).


- STREAMING SETTINGS → STREAMING DESTINATIONS use “Internet Radio”.
[[Image:winamp.png|300px]]
 
==From Icecast/Shoutcast server==

Revision as of 10:39, 26 May 2015

TRIGGER A RELAY ON STREAMING CLIENT USING METADATA

Using Streaming Client firmware and Exstreamer devices that embeds relays (Exstreamer 110, 120, 500, 1000) it's possible to drive the relays using special METADATA strings. The state of relays is mapped in binary form with ASCII 'A' values (65) as offset.

all relays OFF: 0000 --> ASCII 'A'

relay 1 active: 0001 --> ASCII 'A' + 1 = 'B'

relay 2 active: 0010 --> ASCII 'A' + 2 = 'C'

relay 3 active: 0100 --> ASCII 'A' + 4 = 'E'

relay 4 active: 1000 --> ASCII 'A' + 8 = 'I'

all relays ON: 1111 --> ASCII 'A' + 15 = 'P'


Exstreamer Configuration

- Streaming Client firmware.

- Streaming Settings → 1. URL: http://<ip-instreamer>:<port>/xstream (You can change “xstream”) or http://shoutcast-server/....

- I/O Settings → Control Output 1-4: Remote.


From Instreamer

- Instreamer firmware.

- Streaming Settings → SHOUTCAST/ICECAST SETTINGS → Radio Path → “/xstream”. (You can change “xstream”).

- Streaming Settings → STREAMING DESTINATIONS use “Internet Radio”.

To send metadata to the Instreamer for inclusion with the stream use the E= command. In order to trigger the Relays on the device running the Streaming Client FW you have to issue the following command on the source:

"E=StreamUrl='X'”

where 'X' is the bit mask for the Relay with offset 'A'

  http://<ip-instreamer>/rc.cgi?E=StreamUrl='A';


From Icecast/Shoutcast server

It's possible to trigger the relay directly from Icecast/Shoutcast server. On Icecast you can use Admin Panel on Update Metadata, with the command ';StreamUrl='P

Error creating thumbnail: File missing

With WINAMP as Shoutcast source it's possible to trigger the relays using the URL field (see below).

Error creating thumbnail: File missing