This document is an “how to” describing how it is possible to control Barionet Relays using InformaCast broadcast notifications

Preparation

  • Barionet 400 or 1000 running at least firmware V2.17

  • InformaCast server

The integration has been tested and proven to work with InformaCast Advanced 12.17.1 and 12.22.2

The communication protocol that governs the interaction between Barionet and InformaCast is SNMP.

Barionet can send SNMP traps to Informacast to act as a Triggering Source for notifications, thus can be an activation device

OR

Barionet can receive SNMP SET commands from InformaCast when a notification broadcast is sent, this is the focus of this article, despite the procedure to configure traps is very similar.

Configure your Barionet

Connect to your Barionet web configuration interface from a browser and locate the SNMP tab, you must fill at least the “Primary Server” field for the SNMP daemon to run, other fields are also present:

  • Primary Server: is the ICast server IP

  • Secondary Server: if you have a redundant system this is the backup server

  • Repeat (affects only traps): if you want traps to be sent repeatedly by specifying an interval (SNMP Traps are sent by contact closures connected to the digital inputs) - by default is 0, which means no repetition is active

  • Community name: is the password you need to set on Barionet AND on Informacast to be able to SET the relays from Informacast when sending a notification

  • Traps: you can activate the traps for individual contact closures. Every time a contact closure is closed it will send automatically a trap to Informacast (traps are not required if the purpose is only to SET relays from InformaCast

Barionet configuration to enable SNMP

Configure InformaCast

InformaCast “sees” Barionet’s relays as M2M Output Ports, while traps are Input Ports.

The following procedure refers to InformaCast Advanced 12.22.2

  1. Configure an M2M contact closure device under Event Sources -> M2M Contact Closures

  2. Create a new M2M device and fill in the details (Name, description, IP Address of the Barionet, SNMP Community Name, this last one MUST match what you wrote on the Barionet side)

  3. Click on SAVE. The Input and Output ports become configurable

  4. Add an OUTPUT PORT. Here you can specify which port you want to trigger when sending a notification, by providing the right OID and state change value.
    https://support.singlewire.com/s/article/M2M-Plugin-OID-Reference - At this link you can find the OIDs for the 4 relays. IMPORTANT: there is an error on the document related to the OID field type, this has to be INTEGER and not unsigned integer as reported in the doc
    NOTE: you will have to create a state for switching the relay ON (value 1) or OFF (value 0)

  5. Click SAVE. Add another Output Port to specify another Relay state or to configure another relay of the Barionet

  6. The new Output Port(s) created will be additional endpoints that can be added to a recipient group. on the platform locate Recipient and follow the procedure to create your a with one or more relays according to the number of Output ports configured

  7. Once done, try to send a notification. SEND MESSAGES -> select as endpoint (recipient group) the group you created and SEND. The relays will activate or deactivate accordingly

Troubleshooting

If the Barionet is not sending or receiving SNMP packets check the following:

  • In case the Output ports are not activating relays check that the “Field Type” of the output port is set to “INTEGER

  • Check that the network configuration on Barionet is applied correctly especially: IP Address, Subnet and Gateway properties. If i.e. the subnet or the gateway are not configured correctly the Barionet will not be able to reach the InformaCast server - If you are not sure how to configure these fields check with your network administrator

  • Use a Packet Capture software to check the flow of packets is actually happening between Barionet and the InformaCast server. (i.e. Wireshark, see below example, note the filter used)

  • If Wireshark or similar cannot be used on the network you can also install tcpdump on the Barionet and use that via shell to verify packets arriving and leaving the device.

    • To install tcpdump on Barionet:

      1. Access via ssh in the device from a command prompt or terminal application (use the same password used to access via web interface)

        ssh root@<YOUR_BARIONET_IP>
        CODE
      2. Update the repository of the packages available

        opkg update
        CODE
      3. Install tcpdump

        opkg install tcpdump
        CODE
      4. Run tcpdump, in this case filter only snmp traffic

        tcpdump -i eth0.2 -v 'port 161'
        CODE

        The output will look like this (if the SNMP packets are received)

When a Relay activates on a Barionet its corresponding led will light up and a “click” sound is heard.