Open-source VSCP IoT/M2M automation framework supports Arduino, Raspberry Pi

VSCP (Very Simple Control Protocol) is an open-source IoT framework that works on development boards like Arduino or Raspberry Pi, and lets you control IoT home automation tasks. The framework is highly scalable, has a very low footprint, and as such is specially designed for resource-limited devices.

VSCP is an open-source standard protocol for m2m, IoT and other remote control and measurement applications. It enables simple, low-cost devices to be networked together with high-end computers and/or to work as an autonomous system, whatever the communication media is.

Open Source VSCP IoT Framework

The VSCP Protocol has two levels: Level 1 and Level 2. The protocol was primarily used in CAN networks (that is Level 1 for tiny microcontrollers) because CAN is cheap and reliable with high efficiency. However, VSCP can be used for faster transport layers such as TCP/IP, so here comes Level 2 which achieves better performance.

We have already seen Souliss, an open-source IoT framework for home automation. If you wonder why another protocol was developed, then the maker says,

VCSP is designed to be used where other solutions are too expensive to implement. This can typically be in code overhead, where most other protocols use more resources (flash/ram) on a micro-controller than the actual “application” adding a lot of cost to the project. VSCP can work with typically low-cost dumb nodes like the Microchip MCP250xx series, to a 1K-2K flash microcontroller module up to a full implementation with all features in about 5K flash.

VSCP Software Components

  • The VSCP daemon is like a hub. It can connect to other VSCP servers and hardware nodes forming larger systems. This can be used on PC’s running Windows or Linux and development boards like Raspberry Pi, Beaglebone Black, Carambola, etc.
  • The VSCP firmware is the code that you can find in the hardware nodes, usually MCU-based like Arduino boards communicating with the daemon over CAN, RS-232, Ethernet, TCP/IP, MQTT, 6LowPan, etc…
  • The VSCP helper library is a collection of library tools for VSCP program developers. This includes the helper functionality that is needed by a programmer to interface Level I drivers (previously called CANAL drivers) and functionality to interface a local or remote VSCP daemon (Level II) over TCP/IP and a lot of other things.
  • The VSCP Works is a diagnostic toolbox for VSCP developers that can be used to discover nodes, configure nodes, update firmware of nodes, etc…
VSCP Works Screenshot
VSCP Works Screenshot

Hardware Modules

If you are interested in developing a VSCP hardware module, all the firmware code and samples are available in the GitHub repository. However, the main reference code for hardware developers is provided by the Kelvin and Paris hardware modules.

Kelvin NTC10KA
Kelvin NTC10KA module

Kelvin NTC10KA module is used to measure temperature and this measurement is then reported to other CAN4VSCP modules or servers. The module fully adopts the CAN4VSCP specification.

Paris Relay Module
Paris Relay Module

Paris is a relay module that connects a CAN4VSCP bus and can be used to control up to seven external relays. Even this module has fully adopted the CAN4VSCP specification and these VSCP4CAN modules have a communication speed of 125 kbps.

How does VSCP protocol work?

The protocol is an event-based system. To understand this, let us think of a typical application of a water tank with a level sensor and a water pump. Basically, all the intelligence/ decision making is given to the nodes. Talking more about the example, with VSCP, the level sensor is made to send information after a predefined time interval. This means the water pump starts filling the tank at a lower level and stops at a certain higher level.

Now, if you are wondering what if the sensors are damaged due to some reason and stop working. Don’t worry, it can be designed in such a way that the pump goes into a safe state == pump off, indicating there is some problem in the self-contained system.

But the transport mechanism is unknown to the application that brings uncertainty about the event’s arrival. For this, it is very important to get a confirmation back whenever the event arrives. So, the node that originates an event should know as little as possible about how the event it sends out will be used, making the system very flexible.

How to get started with VSCP?

You can download the source code for VSCP & friends from the official website of Very Simple Control Protocol, while the firmware code is available on GitHub. To get started using the framework, there are examples on an NXP FRDM-K64F or a PC simulation node.

For the Arduino library of VSCP software framework for Level 1 devices, you can connect an LED that shows the node state. An example showing the basic integration of the VSCP Arduino library uses CAN-BUS Shield from Seeed-Studio or CAN-BUS Shield from Sparkfun.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

3 Replies to “Open-source VSCP IoT/M2M automation framework supports Arduino, Raspberry Pi”

    1. I don’t think it competes with Mosquitto directly. It seems to support multiple communication standards, including MQTT, to transport the messages. It should support lower end hardware since a TCP/IP stack is not required, although it can be used.

      You may be asking about a performance comparison when using MQTT. But this, I just don’t know.

    2. @Jay,

      Mosquitto is an MQTT Message Broker; software that runs on a physical device like a server. VSCP is an event-driven communications framework designed to support physical devices, like sensors, buttons or relays for example. There is really no way to “compare” VSCP and Mosquitto.

      The two special things about VCPS are that it is mesh connected, and that it is event-driven. When an event occurs at a VSCP node a message containing the class and type of the event is sent to all the other nodes in the network. When a local node receives a message from a remote node that an event has occured the local node will take action, if allowed. All nodes have the same “dictionary” of event classes and types, so they all speak the same “language”.

      VSCP runs on the Application Layer (OSI Layer-7). VSCP can ride on MQTT, but can also be carried on RS-232, CAN-Bus, Ethernet, TCP/IP, etc., depending on the “Level” of VCSP, if implemented. Different VSCP Levels are designed to work best with certain protocols or devices that carry VSCP.

      Off hand I don’t really see much advantage to running VSCP on MQTT, unless you need to run MQTT for some other reason anyway.

      If I remember correctly VSCP was a “thing” around 2010-2015 or so, but I don’t think it really took off. There is/was a company called Grodans Paradis AB in Sweden that was closely tied to VSCP, but it seems like they are dormant now (their E-Commerce site is shuttered).

      With the IoT of today there may be renewed interest in VSCP, especially if anyone needs an event-driven mesh communications framework. After all, VSCP is open-source.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC