{"id":2343,"date":"2017-03-30T19:53:27","date_gmt":"2017-03-30T19:53:27","guid":{"rendered":"http:\/\/grodansparadis.com\/wordpress\/?p=2343"},"modified":"2017-11-30T19:53:59","modified_gmt":"2017-11-30T19:53:59","slug":"refrigerator-project-part-4-iot-m2m-vscp","status":"publish","type":"post","link":"https:\/\/grodansparadis.com\/wordpress\/?p=2343","title":{"rendered":"Refrigerator project Part 4 #IoT #m2m #VSCP"},"content":{"rendered":"<p>This (upper cabinet of refrigerator)<\/p>\n<p><iframe loading=\"lazy\" style=\"border: 1px solid #cccccc;\" src=\"https:\/\/thingspeak.com\/channels\/79008\/charts\/5?bgcolor=%23ffffff&amp;color=%23d62020&amp;dynamic=true&amp;results=600&amp;title=Refrigerator+Upper&amp;type=line&amp;yaxis=Degrees+Celsius\" width=\"450\" height=\"260\"><\/iframe><\/p>\n<p>and this (lower cabinet of refrigerator)<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" style=\"border: 1px solid #cccccc;\" src=\"https:\/\/thingspeak.com\/channels\/79008\/charts\/6?bgcolor=%23ffffff&amp;color=%23d62020&amp;dynamic=true&amp;results=600&amp;title=Refrigerator+Lower&amp;type=line\" width=\"450\" height=\"260\"><\/iframe><\/p>\n<p>is live data from the refrigerator project described <a href=\"http:\/\/grodansparadis.com\/wordpress\/\">here<\/a>,\u00a0 <a href=\"http:\/\/grodansparadis.com\/wordpress\/\">here<\/a> and <a href=\"http:\/\/grodansparadis.com\/wordpress\/?p=2327\">here<\/a>.<\/p>\n<p>First of all, this is quite a complex way to do this, it could have been solved in an easier way. But I wanted to test the modules <a href=\"http:\/\/www.grodansparadis.com\">Grodans Paradis AB<\/a> made and put them to work.<\/p>\n<p>Two CAN4VSCP based modules has been use for this project. The <a href=\"http:\/\/www.grodansparadis.com\/kelvinntc10k\/kelvin_ntc10ka.html\">Kelvin NTC10K module<\/a> is used to sense temperatures and the <a href=\"http:\/\/www.grodansparadis.com\/beijing\/beijing.html\">Beijing I\/O module<\/a> is\u00a0 used to turn \/on\/off the compressor.<\/p>\n<h1>Configuration<\/h1>\n<h5>Kelvin NTC10K<\/h5>\n<p><a href=\"http:\/\/www.grodansparadis.com\/kelvinntc10k\/kelvin_ntc10ka.html\">The module is fully describe here.<\/a><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2344\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2344\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?fit=1591%2C1137&amp;ssl=1\" data-orig-size=\"1591,1137\" 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 2017-03-30 18:14:37\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?fit=580%2C415&amp;ssl=1\" class=\"alignnone size-full wp-image-2344\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?resize=580%2C414\" alt=\"\" width=\"580\" height=\"414\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?w=1591&amp;ssl=1 1591w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?resize=1024%2C732&amp;ssl=1 1024w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181437.png?w=1160&amp;ssl=1 1160w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>The Kelvin NTC10K (on nickname = 5) have one thermistor connected to input one which is located in the upper cabinet of the refrigerator and the one thermistor connected to input two which is connected to a sensor that is located in the lower cabinet.\u00a0 Both has been set to send out temperature every ten seconds<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181630.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2345\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2345\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181630.png?fit=978%2C273&amp;ssl=1\" data-orig-size=\"978,273\" 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 2017-03-30 18:16:30\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181630.png?fit=580%2C162&amp;ssl=1\" class=\"alignnone size-full wp-image-2345\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181630.png?resize=580%2C162\" alt=\"\" width=\"580\" height=\"162\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181630.png?w=978&amp;ssl=1 978w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181630.png?resize=300%2C84&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-181630.png?resize=768%2C214&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>As noted also the on-board sensor send out temperature data, It sends out the data with a longer interval (0x3C = 60) which is once a minute.\u00a0 This value can be used to sense the room temperature but is always a bit high as the sensor is placed on the pcb. One can adjust this in the <a href=\"http:\/\/www.grodansparadis.com\/kelvinntc10k\/manual\/doku.php?id=registers\">sensor calibration registers<\/a><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2346\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2346\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?fit=1255%2C497&amp;ssl=1\" data-orig-size=\"1255,497\" 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 2017-03-30 18:20:20\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?fit=580%2C230&amp;ssl=1\" class=\"alignnone size-full wp-image-2346\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?resize=580%2C230\" alt=\"\" width=\"580\" height=\"230\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?w=1255&amp;ssl=1 1255w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?resize=300%2C119&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?resize=768%2C304&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?resize=1024%2C406&amp;ssl=1 1024w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-182020.png?w=1160&amp;ssl=1 1160w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>Most thermistor needs a calibration and here it can be set with a two complement number that can calibrate a temperature with an accuracy of\u00a0 two decimals.<\/p>\n<p>If you want temperatures sent to some sort of central server this is actually all you need to configure.\u00a0 The values will be sent with the set interval. The default unit is degrees Celsius but this can be changed. In our case we also need some other features enabled. This configuration we do in the control registers for each sensor<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2348\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2348\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png?fit=1035%2C439&amp;ssl=1\" data-orig-size=\"1035,439\" 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 2017-03-30 18:31:41\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png?fit=580%2C246&amp;ssl=1\" class=\"alignnone size-full wp-image-2348\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png?resize=580%2C246\" alt=\"\" width=\"580\" height=\"246\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png?w=1035&amp;ssl=1 1035w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png?resize=300%2C127&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png?resize=768%2C326&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183141.png?resize=1024%2C434&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183035.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2347\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2347\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183035.png?fit=924%2C517&amp;ssl=1\" data-orig-size=\"924,517\" 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 2017-03-30 18:30:35\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183035.png?fit=580%2C325&amp;ssl=1\" class=\"alignnone size-full wp-image-2347\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183035.png?resize=580%2C325\" alt=\"\" width=\"580\" height=\"325\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183035.png?w=924&amp;ssl=1 924w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183035.png?resize=300%2C168&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-183035.png?resize=768%2C430&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>Temperature Sensor 0 and temperature sensor 2 just send out the temperature with the set interval. They are set to 1 which means they send the temperature in degrees Celsius.<\/p>\n<p>For temperature sensor 1 more features has been enabled. It is configured with 0xB9 which is 10111001 in binary.<\/p>\n<p>As <strong>Bit 0\/Bit 1<\/strong> forms 1 the temperature will be presented in degrees Celsius as for the other sensors.<\/p>\n<p><strong>Bit 3<\/strong> is set so low alarm is enables.<\/p>\n<p><strong>Bit 4<\/strong> is set so high alarm is enabled.<\/p>\n<p><strong>Bit 5<\/strong> is set which means that<a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_6_0x06_turnoff\"> CLASS1.CONTROL, TurnOff events<\/a> and <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, TurnOn events<\/a> will be sent instead off <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.alarm#type_2_0x02_alarm_occurred\">CLASS1.ALARM,\u00a0 Alarm occurred.<\/a> So an OFF event will be sent when the temperature goes below the low alarm level and an ON event will be sent then the temperature goes above the high alarm level.<\/p>\n<p><strong>Bit 7<\/strong> is set which means alarm events will be sent continuously, not just when a limit is passed.<\/p>\n<p>For this to work we need to set the low alarm level<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202521.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2349\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2349\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202521.png?fit=837%2C143&amp;ssl=1\" data-orig-size=\"837,143\" 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 2017-03-30 20:25:21\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202521.png?fit=580%2C99&amp;ssl=1\" class=\"alignnone size-full wp-image-2349\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202521.png?resize=580%2C99\" alt=\"\" width=\"580\" height=\"99\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202521.png?w=837&amp;ssl=1 837w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202521.png?resize=300%2C51&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202521.png?resize=768%2C131&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>which is set to four degrees Celsius. And also the high alarm value<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202709.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2350\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2350\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202709.png?fit=989%2C134&amp;ssl=1\" data-orig-size=\"989,134\" 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 2017-03-30 20:27:09\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202709.png?fit=580%2C79&amp;ssl=1\" class=\"alignnone size-full wp-image-2350\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202709.png?resize=580%2C79\" alt=\"\" width=\"580\" height=\"79\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202709.png?w=989&amp;ssl=1 989w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202709.png?resize=300%2C41&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202709.png?resize=768%2C104&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>which is set to six degrees.<\/p>\n<p>The hysteresis value is set to two as default and we leave it at that.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202910.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2351\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2351\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202910.png?fit=830%2C285&amp;ssl=1\" data-orig-size=\"830,285\" 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 2017-03-30 20:29:10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202910.png?fit=580%2C199&amp;ssl=1\" class=\"alignnone size-full wp-image-2351\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202910.png?resize=580%2C199\" alt=\"\" width=\"580\" height=\"199\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202910.png?w=830&amp;ssl=1 830w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202910.png?resize=300%2C103&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-202910.png?resize=768%2C264&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>So what will happen here?<\/p>\n<p>If the temperature is below four degrees Celsius <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_6_0x06_turnoff\">CLASS1.CONTROL, TurnOff events<\/a> will be sent out every second. This will continue until the temperature is above the low alarm temperature + the hysteresis, that means at 6 degrees.\u00a0 When the temperature go over 6 degrees Celsius <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, TurnOn events<\/a> will be sent out every second until the temperature goes below the set high alarm point minus hysteresis, that means 4 degrees Celsius.<\/p>\n<p>In addition to the TurnOn\/TurnOff events the temperatures will also be sent out for us to diagram or collect in a database or do other things with.<\/p>\n<p>Before we setup the Beijing module to handle the TurnOn\/TurnOff events we need to mark out TurnOn\/TurnOff events so they can be identified to the refrigerator. We can do this with the nickname id (node id) which in this case is set to 5. But this value could be changed if a module is replaced but it can also be good not to use this id for other purposes as well.\u00a0 So instead we use the zone\/subzone. For the Kelvin NTC10K we can set a zone\/subzone for each sensor.\u00a0 And we set<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204418.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2352\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2352\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204418.png?fit=956%2C491&amp;ssl=1\" data-orig-size=\"956,491\" 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 2017-03-30 20:44:18\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204418.png?fit=580%2C298&amp;ssl=1\" class=\"alignnone size-full wp-image-2352\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204418.png?resize=580%2C298\" alt=\"\" width=\"580\" height=\"298\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204418.png?w=956&amp;ssl=1 956w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204418.png?resize=300%2C154&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204418.png?resize=768%2C394&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>the zone to hex 23 (35 decimal) and the subzone for each temperature sensor to it&#8217;s index. So temperature sensor 0 get subzone= 0, sensor 1 get subzone=1 and so on.<\/p>\n<p>There is no magic here. One can set up any number schema one likes.<\/p>\n<p>This is how a temperature event looks like for sensor 1<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2353\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2353\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?fit=1511%2C434&amp;ssl=1\" data-orig-size=\"1511,434\" 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 2017-03-30 20:48:18\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?fit=580%2C167&amp;ssl=1\" class=\"alignnone wp-image-2353\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?resize=580%2C166\" alt=\"\" width=\"580\" height=\"166\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?w=1511&amp;ssl=1 1511w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?resize=300%2C86&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?resize=768%2C221&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?resize=1024%2C294&amp;ssl=1 1024w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-204818.png?w=1160&amp;ssl=1 1160w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>And this is how a <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, TurnOn<\/a> event\u00a0 looks like<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2354\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2354\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?fit=1501%2C508&amp;ssl=1\" data-orig-size=\"1501,508\" 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 2017-03-30 20:50:00\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?fit=580%2C197&amp;ssl=1\" class=\"alignnone size-full wp-image-2354\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?resize=580%2C196\" alt=\"\" width=\"580\" height=\"196\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?w=1501&amp;ssl=1 1501w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?resize=300%2C102&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?resize=768%2C260&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?resize=1024%2C347&amp;ssl=1 1024w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-205000.png?w=1160&amp;ssl=1 1160w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<h5><\/h5>\n<h5>Beijing I\/O module<\/h5>\n<p><a href=\"http:\/\/www.grodansparadis.com\/beijing\/beijing.html\">The module is fully described here.<\/a><\/p>\n<p>The Beijing module can do many things. But as we have a relay that control the compressor of the refrigerator connected to I\/O channel we are only interested in configuration of this channel.<\/p>\n<p>The I\/O channels of the Beijing module is set as outputs by defaults<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-210719.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2355\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2355\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-210719.png?fit=947%2C676&amp;ssl=1\" data-orig-size=\"947,676\" 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 2017-03-30 21:07:19\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-210719.png?fit=580%2C414&amp;ssl=1\" class=\"alignnone size-full wp-image-2355\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-210719.png?resize=580%2C414\" alt=\"\" width=\"580\" height=\"414\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-210719.png?w=947&amp;ssl=1 947w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-210719.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-210719.png?resize=768%2C548&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>We have set bit 1 as an input here for a task we want to go through in this write-up (refrigerator door sensor).<\/p>\n<p>Note also that the nickname (node id) is set to 4.<\/p>\n<p>We also need to match the zone with the one we set for the Kelvin NTC10K (0x23) and also the subzone (0x01) for I\/O channel 0 .<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2356\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2356\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?fit=1347%2C526&amp;ssl=1\" data-orig-size=\"1347,526\" 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 2017-03-30 21:10:26\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?fit=580%2C227&amp;ssl=1\" class=\"alignnone size-full wp-image-2356\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?resize=580%2C226\" alt=\"\" width=\"580\" height=\"226\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?w=1347&amp;ssl=1 1347w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?resize=300%2C117&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?resize=768%2C300&amp;ssl=1 768w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?resize=1024%2C400&amp;ssl=1 1024w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211026.png?w=1160&amp;ssl=1 1160w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>That is all we need to configure.<\/p>\n<p>To complete the\u00a0 task we also need to program the <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=decision_matrix\">decision matrix<\/a> of the Beijing module. In this matrix we program what the Beijing should do when certain events is received by the module.<\/p>\n<p>In our case there is the two events from the Kelvin NTC 10K module we are interested in.<\/p>\n<p>If <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, TurnOn<\/a> is received we want I\/O to be turned on or stay on, that is the compressor of the refrigerator should be turned on.<\/p>\n<p>If <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_6_0x06_turnoff\">CLASS1.CONTROL, TurnOff<\/a> is received we want I\/O zero to be turned off or stay off, that is the compressor of the refrigerator should be turned off.<\/p>\n<p>The decision matrix have actions it can perform when an event matches a selection criteria. For us the SET and CLR actions is what we need.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211745.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2357\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2357\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211745.png?fit=799%2C211&amp;ssl=1\" data-orig-size=\"799,211\" 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 2017-03-30 21:17:45\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211745.png?fit=580%2C153&amp;ssl=1\" class=\"alignnone size-full wp-image-2357\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211745.png?resize=580%2C153\" alt=\"\" width=\"580\" height=\"153\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211745.png?w=799&amp;ssl=1 799w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211745.png?resize=300%2C79&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-211745.png?resize=768%2C203&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>The rest of the actions are <a href=\"http:\/\/www.grodansparadis.com\/beijing\/manual\/doku.php?id=decisionmatrix\">described here<\/a>.<\/p>\n<p>We program the decision matrix like this. One row for each action we want to be carried out<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212026.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2358\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2358\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212026.png?fit=970%2C441&amp;ssl=1\" data-orig-size=\"970,441\" 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 2017-03-30 21:20:26\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212026.png?fit=580%2C264&amp;ssl=1\" class=\"alignnone size-full wp-image-2358\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212026.png?resize=580%2C264\" alt=\"\" width=\"580\" height=\"264\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212026.png?w=970&amp;ssl=1 970w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212026.png?resize=300%2C136&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212026.png?resize=768%2C349&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>In the first row, which looks like this<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212222.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2359\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2359\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212222.png?fit=1000%2C695&amp;ssl=1\" data-orig-size=\"1000,695\" 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 2017-03-30 21:22:22\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212222.png?fit=580%2C403&amp;ssl=1\" class=\"alignnone size-full wp-image-2359\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212222.png?resize=580%2C403\" alt=\"\" width=\"580\" height=\"403\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212222.png?w=1000&amp;ssl=1 1000w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212222.png?resize=300%2C209&amp;ssl=1 300w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-212222.png?resize=768%2C534&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>we enable the row,\u00a0 don&#8217;t check the originating address as we discussed above, and the originating address is not hardcoded, the zone of the received event should match the zone of the our module (0x23) and the subzone should match that for the channel set in the action parameter (I\/O 0 = 0) or the module subzone depending on chosen action.<\/p>\n<p>the <strong>class mask<\/strong> tells which bits of the <strong>class filter<\/strong> that is of interest. Here all is of interest (0x1FF) and the class filter is set to 0x1E which is 30 and is the code for <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control\">CLASS1.CONTROL<\/a><\/p>\n<p>The type mask tells which bits of the type filter is of interest. Here all is of interest (0xFF) and the type is set to 0x05 which is the code for <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, TurnOn<\/a><\/p>\n<p>So if a <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, TurnOn event<\/a> is received with zone=0x23 and subzone=0x01 the Beijing module will carry out the chosen action. We want I\/O 0 to be turned on so the compressor is turned on and the action <em><strong>set output of I\/O channel high<\/strong> <\/em>will do that for us.\u00a0 This action expects the I\/O channel as action parameter so we set it to x00.<\/p>\n<p>So now out <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.control#type_5_0x05_turnon\">CLASS1.CONTROL, TurnON<\/a> events will turn on the compressor.\u00a0 The Beijing will confirm the I\/O change with a <a href=\"http:\/\/www.vscp.org\/docs\/vscpspec\/doku.php?id=class1.information#type_3_0x03_on\">CLASS1.INFORMATION, On event<\/a>.<\/p>\n<p>The DM row for the CLASS1.CONTROL, TurnOff is then setup in\u00a0 the same way.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-214014.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2360\" data-permalink=\"https:\/\/grodansparadis.com\/wordpress\/?attachment_id=2360\" data-orig-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-214014.png?fit=506%2C621&amp;ssl=1\" data-orig-size=\"506,621\" 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 2017-03-30 21:40:14\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-214014.png?fit=506%2C621&amp;ssl=1\" class=\"alignnone size-full wp-image-2360\" src=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-214014.png?resize=506%2C621\" alt=\"\" width=\"506\" height=\"621\" srcset=\"https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-214014.png?w=506&amp;ssl=1 506w, https:\/\/i0.wp.com\/grodansparadis.com\/wordpress\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-30-214014.png?resize=244%2C300&amp;ssl=1 244w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/a><\/p>\n<p>Thats it. We have now made a self contained unit consisting of two modules that can work autonomously.<\/p>\n<h1>The cloud<\/h1>\n<p>The\u00a0 <a href=\"http:\/\/grodansparadis.com\/wordpress\/?p=1384\">fridge project explains<\/a> how to share the generated data to the cloud.\u00a0 I will do another write-up about this later. But it&#8217;s not more to it then to program the decision matrix of the VSCP daemon to send data to the cloud.\u00a0 You have <a href=\"https:\/\/thingspeak.com\/channels\/79008\">live data for this setup here as a sample<\/a>. This data is on a CAN4VSCP bus in this house and is collected by a Raspberry Pi and is sent up to ThingsSpeak.<\/p>\n<p>VSCP have other means of displaying data and more will come in the next version.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This (upper cabinet of refrigerator) and this (lower cabinet of refrigerator) &nbsp; is live data from the refrigerator project described here,\u00a0 here and here. First of all, this is quite a complex way to do this, it could have been solved in an easier way. But I wanted to test the modules Grodans Paradis AB [&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_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},"jetpack_post_was_ever_published":false},"categories":[6,2,53],"tags":[],"class_list":["post-2343","post","type-post","status-publish","format-standard","hentry","category-can4vscp-bejing","category-can4vscp-kelvin-ntc10ka","category-howtos"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4raCZ-BN","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\/2343","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=2343"}],"version-history":[{"count":1,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2343\/revisions"}],"predecessor-version":[{"id":2361,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2343\/revisions\/2361"}],"wp:attachment":[{"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grodansparadis.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}