{"id":12,"date":"2015-06-20T23:20:25","date_gmt":"2015-06-20T23:20:25","guid":{"rendered":"http:\/\/www.spants.com\/blog\/?p=12"},"modified":"2015-07-05T09:57:55","modified_gmt":"2015-07-05T09:57:55","slug":"iotbox-an-internet-of-things-thingy-first-steps","status":"publish","type":"post","link":"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/","title":{"rendered":"IoTBox. First steps&#8230;"},"content":{"rendered":"<p><b>&#8220;I want one! &#8211; actually can I have 30?&#8221;<\/b><\/p>\n<p>I took my idea to a few people &#8211; the inventors of NodeRed and a couple of members of the team and they thought that the idea was sound &#8211; produce a simple IoTBox that we can use in demonstrations to show how connected devices can make use of our products. I was then asked &#8220;Can we have 30 ready in a few weeks?&#8221;. I had better work fast!.<\/p>\n<p><!--more-->I needed a good code base to work from. Something that allowed me to use a web browser to setup the device and included the functionality (<a href=\"http:\/\/www.esp8266.com\/viewtopic.php?f=6&amp;t=376\" target=\"_blank\">HTTPD<\/a>, <a href=\"https:\/\/github.com\/tuanpmt\/esp_mqtt\" target=\"_blank\">MQTT<\/a>, Temperature) I needed. After a while I found <a href=\"http:\/\/www.harizanov.com\/\" target=\"_blank\">Martin&#8217;s Corner on the Web<\/a>\u00a0and his 3 relay board. I managed to use most of the code and strip out the bits that I didn&#8217;t need to use as the core of IoTBox.<\/p>\n<p>The next issue was how to finish the firmware in time. I had been a fan of <a href=\"http:\/\/tech.scargill.net\/\" target=\"_blank\">Peter Scargill&#8217;s technical blog<\/a>\u00a0and found that\u00a0<a href=\"http:\/\/richard.burtons.org\/\" target=\"_blank\">Richard Burton<\/a>\u00a0had written a great bootloader and OTA mechanism. He helped me tremendously in getting it all to work.<\/p>\n<p>So with the basics in place, I could start coding the firmware. I managed to get an <a href=\"http:\/\/www.esp8266.com\/viewtopic.php?t=820\" target=\"_blank\">IDE working<\/a>\u00a0and managed to acquire a basic understanding of Github\/BitBucket. This has been very useful and well worth the effort.<\/p>\n<p>I then built a couple of test systems on breadboard to see\u00a0how it\u00a0would work.<\/p>\n<figure id=\"attachment_49\" aria-describedby=\"caption-attachment-49\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.53.44-e1435500832997.jpg\"><img loading=\"lazy\" class=\"wp-image-49 size-medium\" src=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.53.44-e1435500832997-300x169.jpg?resize=300%2C169\" alt=\"2015-06-28 14.53.44\" width=\"300\" height=\"169\" srcset=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.53.44-e1435500832997.jpg?resize=300%2C169 300w, https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.53.44-e1435500832997.jpg?w=988 988w\" sizes=\"(max-width: 300px) 100vw, 300px\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-49\" class=\"wp-caption-text\">an IoTBox on a breadboard<\/figcaption><\/figure>\n<p>Then began a search for a box. This was one of the hardest areas for the project. I wanted to make the IoTBox look attractive but all of the boxes had issues.<\/p>\n<figure id=\"attachment_19\" aria-describedby=\"caption-attachment-19\" style=\"width: 255px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"wp-image-19 size-medium\" src=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-05-07-16.06.54-e1435500797265-255x300.jpg?resize=255%2C300\" alt=\"2015-05-07 16.06.54\" width=\"255\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-05-07-16.06.54-e1435500797265.jpg?resize=255%2C300 255w, https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-05-07-16.06.54-e1435500797265.jpg?w=552 552w\" sizes=\"(max-width: 255px) 100vw, 255px\" data-recalc-dims=\"1\" \/><figcaption id=\"caption-attachment-19\" class=\"wp-caption-text\">An early prototype. Battery and USB powered<\/figcaption><\/figure>\n<p style=\"text-align: left;\">Originally I wanted it to be totally wireless with a built in battery or LiPo rechargeable but this made the cases bulky. Eventually I found a case (by luck) from RS Components that allowed me to mount the ESP 8266 on its board easily. Due to the way it was mounted, It allowed me to put the LED on the of the adapter which solved another issue = I didn&#8217;t want things sticking out of the unit if possible.<\/p>\n<p style=\"text-align: left;\">The reason I choose the case should be apparent from the following pictures.<\/p>\n<figure id=\"attachment_43\" aria-describedby=\"caption-attachment-43\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-24-16.23.14-e1435500534573.jpg\"><img loading=\"lazy\" class=\"wp-image-43 size-medium\" src=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-24-16.23.14-e1435500521133-300x300.jpg?resize=300%2C300\" alt=\"2015-06-24 16.23.14\" width=\"300\" height=\"300\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-43\" class=\"wp-caption-text\">Showing display LED<\/figcaption><\/figure>\n<figure id=\"attachment_42\" aria-describedby=\"caption-attachment-42\" style=\"width: 238px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-24-16.23.05-e1435500436538.jpg\"><img loading=\"lazy\" class=\"wp-image-42 size-medium\" src=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-24-16.23.05-e1435500436538-238x300.jpg?resize=238%2C300\" alt=\"2015-06-24 16.23.05\" width=\"238\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-24-16.23.05-e1435500436538.jpg?resize=238%2C300 238w, https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-24-16.23.05-e1435500436538.jpg?w=576 576w\" sizes=\"(max-width: 238px) 100vw, 238px\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-42\" class=\"wp-caption-text\">The board slides in &#8211; an exact fit!<\/figcaption><\/figure>\n<figure id=\"attachment_38\" aria-describedby=\"caption-attachment-38\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.38.24-e1435500670537.jpg\"><img loading=\"lazy\" class=\"wp-image-38 size-medium\" src=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.38.24-e1435500670537-300x225.jpg?resize=300%2C225\" alt=\"2015-06-28 14.38.24\" width=\"300\" height=\"225\" srcset=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.38.24-e1435500670537.jpg?resize=300%2C225 300w, https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.38.24-e1435500670537.jpg?w=1024 1024w, https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/06\/2015-06-28-14.38.24-e1435500670537.jpg?w=948 948w\" sizes=\"(max-width: 300px) 100vw, 300px\" data-recalc-dims=\"1\" \/><\/a><figcaption id=\"caption-attachment-38\" class=\"wp-caption-text\">The final version<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Next &#8230;. The parts list.<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-12\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-12\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Reddit (Opens in new window)<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to email this to a friend (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>&#8220;I want one! &#8211; actually can I have 30?&#8221; I took my idea to a few people &#8211; the inventors of NodeRed and a couple of members of the team and they thought that the idea was sound &#8211; produce a simple IoTBox that we can use in demonstrations to show how connected devices can &hellip; <a href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">IoTBox. First steps&#8230;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-12\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-12\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Reddit (Opens in new window)<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-an-internet-of-things-thingy-first-steps\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to email this to a friend (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4,2,6,7],"tags":[9],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6n7xT-c","_links":{"self":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts\/12"}],"collection":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":10,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":69,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions\/69"}],"wp:attachment":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}