Categories
VSCP

#VSCP – a lot of classes #m2m #oT

Screenshot from 2016-02-07 15:33:09

When one first look at VSCP one see “millions of classes” each having “millions of types”. It’s easy to be overwhelmed at first

Which class/type should I use for my needs?

Well lock at CLASS1.CONTROL, Type=5, TurnOn as an example. If you use this class a receiving end device will expect three data bytes

  • Byte 0 – User defined.
  • Byte 1 – Zone.
  • Byte 2 – Subzone.

And that’s the way most people  use it. They instruct  the “things” defined in a zone:subzone to TurnOn themseves.  If the “things” are well behaved they will reply with CLASS1.INFORMATION, Type=3, On events as a confirmation.  But that confirmation is just being well behaved. If you don’t want it you can skip it.

BUT…

and his is the big BUT, you can use any event you like for anything you like. If you want to use CLASS1.MEASUREMENT, Type=6, Temperature to turn things on, well use it. It’s up to you what meaning you give to a class/type pair. But what’s not up to you is the format of the data for a class/type pair. So if you decide to use CLASS1.MEASUREMENT, Type=6, Temperature to turn your things on you must adopt to the specified data format.

So for your needs you look up a class/type pair that do the job and use them.  There are obvious choices of course. Most will use  the CLASS1.MEASUREMENT class for measurements for example, but how you use it IS really your choice.

But if I can’t find a class/type pair that fits my needs?

Sometimes it happens that you don’t find a class/type pair that does the job you need to do.  Most often this is a discovery that would benefit others if this class/type pair was added to the specification. So ask on the VSCP list for it to be added. If it’s not a duplicate it will be added.

In other cases you may need your own events that are local to your network.  In that case you can specify any event and any format for these events in CLASS1.LOCAL and in CLASS1.LABORATORY.  You have full control of format and the types in each of them but you must remember that others also have this freedom. So if you put these out on a shared network definitions will probably collide with the definition other people have added. But local use – no problem.

So to conclude. Yes there is a lot of class/type pairs available in VSCP. One for most needs and there are many use cases. But the only thing that is carved in stone for there use  is the format for each class/type pair (what the VSCP world call an event). If you find something that is useful for your needs  just use it.  Nothing is wrong. Trust yourself.

Make the world smarter.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.