{"id":1501,"date":"2016-02-07T15:11:05","date_gmt":"2016-02-07T15:11:05","guid":{"rendered":"http:\/\/grodansparadis.com\/wordpress\/?p=1501"},"modified":"2016-02-07T15:14:34","modified_gmt":"2016-02-07T15:14:34","slug":"vscp-a-lot-of-classes-m2m-ot","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=1501","title":{"rendered":"#VSCP &#8211; a lot of classes #m2m #oT"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/02\/Screenshot-from-2016-02-07-153309.png\" rel=\"attachment wp-att-1504\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1504\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=1504\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/02\/Screenshot-from-2016-02-07-153309.png?fit=726%2C931&amp;ssl=1\" data-orig-size=\"726,931\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot from 2016-02-07 15:33:09\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/02\/Screenshot-from-2016-02-07-153309.png?fit=580%2C744&amp;ssl=1\" class=\"alignnone wp-image-1504\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/02\/Screenshot-from-2016-02-07-153309.png?resize=288%2C369\" alt=\"Screenshot from 2016-02-07 15:33:09\" width=\"288\" height=\"369\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/02\/Screenshot-from-2016-02-07-153309.png?w=726&amp;ssl=1 726w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2016\/02\/Screenshot-from-2016-02-07-153309.png?resize=234%2C300&amp;ssl=1 234w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/a><\/p>\n<p>When one first look at <a href=\"http:\/\/www.vscp.org\">VSCP<\/a> one see &#8220;millions of classes&#8221; each having &#8220;millions of types&#8221;. It&#8217;s easy to be overwhelmed at first<\/p>\n<p><strong>Which class\/type should I use for my needs?<\/strong><\/p>\n<p>Well lock at <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, Type=5, TurnOn<\/a> as an example. If you use this class a receiving end device will expect three data bytes<\/p>\n<ul>\n<li><strong>Byte 0<\/strong> &#8211; User defined.<\/li>\n<li><strong>Byte 1<\/strong> &#8211; Zone.<\/li>\n<li><strong>Byte 2<\/strong> &#8211; Subzone.<\/li>\n<\/ul>\n<p>And that&#8217;s the way most people\u00a0 use it. They instruct\u00a0 the &#8220;things&#8221; defined in a<em> zone:subzone<\/em> to TurnOn themseves.\u00a0 If the &#8220;things&#8221; are well behaved they will reply with <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.information#type_3_0x03_on\">CLASS1.INFORMATION, Type=3, On<\/a> events as a confirmation.\u00a0 But that confirmation is just being well behaved. If you don&#8217;t want it you can skip it.<\/p>\n<p><strong>BUT&#8230;<\/strong><\/p>\n<p>and his is the big BUT, you can use any event you like for anything you like. If you want to use <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.measurement#type_6_0x06_temperature\">CLASS1.MEASUREMENT, Type=6, Temperature<\/a> to turn things on, well use it. It&#8217;s up to you what meaning you give to a class\/type pair. But what&#8217;s not up to you is the format of the data for a class\/type pair. So if you decide to use <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.measurement#type_6_0x06_temperature\">CLASS1.MEASUREMENT, Type=6, Temperature<\/a> to turn your things on you must adopt to the specified data format.<\/p>\n<p>So for your needs you look up a class\/type pair that do the job and use them.\u00a0 There are obvious choices of course. Most will use\u00a0 the CLASS1.MEASUREMENT class for measurements for example, but how you use it IS really your choice.<\/p>\n<p><strong>But if I can&#8217;t find a class\/type pair that fits my needs?<\/strong><\/p>\n<p>Sometimes it happens that you don&#8217;t find a class\/type pair that does the job you need to do.\u00a0 Most often this is a discovery that would benefit others if this class\/type pair was added to the specification. So ask on the <a href=\"https:\/\/groups.google.com\/forum\/#!forum\/vscp\">VSCP list<\/a> for it to be added. If it&#8217;s not a duplicate it will be added.<\/p>\n<p>In other cases you may need your own events that are local to your network.\u00a0 In that case you can specify any event and any format for these events in <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.local\">CLASS1.LOCAL<\/a> and in <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.laboratory\">CLASS1.LABORATORY<\/a>.\u00a0 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 &#8211; no problem.<\/p>\n<p>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\u00a0 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\u00a0 just use it.\u00a0 Nothing is wrong. Trust yourself.<\/p>\n<p>Make the world smarter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When one first look at VSCP one see &#8220;millions of classes&#8221; each having &#8220;millions of types&#8221;. It&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-1501","post","type-post","status-publish","format-standard","hentry","category-vscp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-od","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1501"}],"version-history":[{"count":3,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1501\/revisions"}],"predecessor-version":[{"id":1508,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1501\/revisions\/1508"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}