How to trigger Relays 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
- 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 Update Metadata on Admin Panel, with the command ';StreamUrl='P
That also works from the Instreamer ICE, there you have two ports for Metadata insertion, the TCP port 10000 and the serial port.
But there the "=" sign you have to replace with "%3D", e.g. ';StreamUrl%3D'P .
With WINAMP as Shoutcast source it's possible to trigger the relays using the URL field (see below).