Hello and Welcome! If you have a technical question please check out our Forums. If you have an order or shipping question please refer to our Customer Support page. Please see all COVID-19 updates here and thank you for your continued support.


Member Since: October 26, 2015

Country: United States

  • So, my RPi fu is kinda weak, but the answer is yes.

    I'm not sure if the USB ports on the RPi have a direct serial out or if you have to use the serial Tx/Rx pins on the GPIO connector. I'll leave that as an exercise for you, but check out the USB to TTL Serial cable and see if it gives you the serial link you need.

    Once you have a serial line from the RPi to the PC running COSMOS, all you have to do is setup your interface like the example above to the correct port on your PC and you're off to the races.

    See the Configure the Input / Output interface section in the example.

    INTERFACE BLINKINT serial_interface.rb com5 com5 9600 NONE 1 10.0 nil LENGTH 0 8 0 1
  • What are your ideas/needs/desirements for visualization? Have you found your solution? Check out COSMOS. It can log your data and then allow you to visualize it in many ways.

  • Will this fit a Pi3?

  • Will this case fit a Pi 3?

  • The short answer is, yes. COSMOS is an excellent tool to view and control remote devices of any kind. With a little configuration, you can visualize, post-process, log, graph, or write smart scripts to automatically respond to different circumstances, like your description of responding to alarms about temperatures out of limits. This is exactly what COSMOS was written for and how we use it everyday.


    I'm not familiar with SCADA so my reply above assumes you have some kind of comm link to your devices that could talk TCPIP to COSMOS.

    The next level of customization is writing your own interface in Ruby that talks directly to your SCADA comm HW. Sorry for my ignorance on SCADA. If you have some kind of SCADA card that talks to your devices, then go look at either of tcpip_client_interface.rb or serial_interface.rb in the COSMOS installation directory and copy them into your project/COSMOS/lib folder, rename to scada_interface.rb and start hacking. The interface code in scada_interface.rb can call the device drivers to your comm card and you'd have a direct connection from COSMOS to your HW.

    Full documentation on writing your own interface can be found at COSMOS interfaces.

  • COSMOS is a generic controller interface and comes with I/O defined for different kinds of communications protocols, like serial and TCPIP.

    To talk to your RPi, you'd just need to setup the TCPIP connection and define your packets in the COSMOS config. Building the packets on the RPi and putting them out a socket is up to you.

    There is an example mentioned in the original blog post which uses direct serial to talk to an Arduino. The point of the example is to show the simplest hook-up from a target (the Arduino) to COSMOS. In that case I used serial because it's so easy with the Arduino and outputting the data only added a few lines of code in the sketch.

    In your case, all you need to do to connect to a RPi is define your COSMOS cmd_tlm_server.txt with tcpip_client_interface.rb in the INTERFACE line. Once your RPi is sending data out the socket, COSMOS will read the TCPIP stream and turn it into packets so you can see your data on the PC.

No public wish lists :(