tag:blogger.com,1999:blog-22529736627989523482024-02-19T19:18:00.621+02:00JubitoJ@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-2252973662798952348.post-24633649244315219772017-06-14T19:45:00.000+03:002017-06-14T19:55:58.978+03:00Dynamic DNS update support for No-IP<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
My personal choice of a Dynamic DNS service is No-IP.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.noip.com/" target="_blank"><img alt="https://www.noip.com/" border="0" data-original-height="126" data-original-width="350" height="115" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNTtYRZivxBU9aFZBkrlRFAT-V3-a-QG-PgMDGNXIa1xdvq3YyMc1olK6vDnjyGggQAHXJkDxD4YWHZS1TG9SlzfNuIkydSfwKv-gACNLWBbjPEnKurGVS7PPip4MvLbEuJnt93d88KTc/s320/no-ip_3_logo_white.jpg" width="320" /></a></div>
</div>
<div style="text-align: justify;">
<blockquote class="tr_bq">
No-IP was one
of DynDNS’s biggest competitors in the free dynamic DNS market, and now
that DynDNS is gone they’re in a good position to snatch the crown for
themselves. In fact, the two services are only one year apart in age
(DynDNS launched 1998, No-IP launched 1999).
<br />
For a free account,
you’ll get three subdomains on a single domain choice, but these
subdomains will never expire as long as you confirm activity every 30
days. You also get port forwarding and URL forwarding, which can be
useful depending on your use case. [ <a href="http://www.makeuseof.com/tag/5-best-dynamic-dns-providers-can-lookup-free-today/" target="_blank">source</a> ]</blockquote>
</div>
<div style="text-align: justify;">
The story started when I received a new router from my ISP that didn't
support No-IP. At that particular moment I decided to create a simple implementation of No-IP API
into Jubito.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Now Jubito has a <a href="https://github.com/jambelnet/janet-framework/wiki/Built-in-functions" target="_blank">built-in function</a> (<span style="font-family: "courier new" , "courier" , monospace;">%publicip%</span>) that return the public IP address and a <a href="https://github.com/jambelnet/janet-framework/wiki/judo-API" target="_blank">judo API</a> that provides an update method for our hostname.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Let's proceed on how to configure your No-IP hostname.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In the settings menu, you will find a <span style="font-family: "courier new" , "courier" , monospace;">Dynamic DNS</span> section. Click <span style="font-family: "courier new" , "courier" , monospace;">Setup</span>, fill your hostname, username, password and save.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhveXf5eNRMV3lyWx4tTMLZqM3BFyoA8Wn8WqCYLu3StefbN8blbPbifkcJASk9mo7a3mnIKvNGp_YN5n2Meuwk1bUHDZoRwTvAiSuIuGbsbTxS_XaVlWhdu4LfhcrTKBzhuL0BRNiKP00/s1600/setup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="369" data-original-width="520" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhveXf5eNRMV3lyWx4tTMLZqM3BFyoA8Wn8WqCYLu3StefbN8blbPbifkcJASk9mo7a3mnIKvNGp_YN5n2Meuwk1bUHDZoRwTvAiSuIuGbsbTxS_XaVlWhdu4LfhcrTKBzhuL0BRNiKP00/s400/setup.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Next step is to create a new launcher that call the API for update. Expand Instructions menu and click on Add New Launcher. Give a name and type the action as follows:</div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">judo noip update</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWQAPAVheLxhfQry-CAJQTahhpTnSC1K9EJqT4dYK1lbXsaWJBAsU2FgllidjNhm9nobGkPWERUJuE7CfL9KyX1-TlzWzvWz_H7I9QaGlrER_QnTA1Pd5AGWERnBeRfLlyskYe5Ri_tko/s1600/launcher.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="518" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWQAPAVheLxhfQry-CAJQTahhpTnSC1K9EJqT4dYK1lbXsaWJBAsU2FgllidjNhm9nobGkPWERUJuE7CfL9KyX1-TlzWzvWz_H7I9QaGlrER_QnTA1Pd5AGWERnBeRfLlyskYe5Ri_tko/s400/launcher.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
We are now ready to create a schedule that updates the service in a given interval. Add new schedule and follow the screenshot, where interval sets the time of check (300000ms is 5 minutes) and action is the call we did in the previous step (launcher).</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV9N7PmFuAmo-L70ZYL-4w1RosQzo6Cp6DTEfrcdAXU84oEZWX2CenRvvya9sTRyW4n_qCJ0YyW0SjYHL3nzWwU7Cmo0LtHLzgaf8uUSlSd5oyac1AhsnF4vToYpbnt9t4I6CS8JQ9zm8/s1600/schedule.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="501" data-original-width="514" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV9N7PmFuAmo-L70ZYL-4w1RosQzo6Cp6DTEfrcdAXU84oEZWX2CenRvvya9sTRyW4n_qCJ0YyW0SjYHL3nzWwU7Cmo0LtHLzgaf8uUSlSd5oyac1AhsnF4vToYpbnt9t4I6CS8JQ9zm8/s400/schedule.png" width="400" /></a></div>
<br />
That was it. You are router independent!</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-43862400543125470442017-02-10T12:37:00.000+02:002018-11-14T14:24:17.076+02:00Dropbox alternative for ARM Linux and Jubito integration<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Once upon a time, when <a href="http://jubitoblog.blogspot.gr/2015/01/testing-jubito-in-multiple-environments.html" target="_blank">a netbook (Dell mini 9) with Ubuntu</a> was my Jubito server, I used dropbox to sync my important files, such as camera video recordings of my <a href="http://jubitoblog.blogspot.gr/2013/02/dvr-system-using-ip-camera.html" target="_blank">security system</a>. Then I migrated to a Banana Pi and currently to Banana Pro. Both derivatives of Raspberry Pi. Unfortunately dropbox has no support or plans for ARM Linux variants. A quick solution was to use <a href="https://owncloud.org/" target="_blank">ownCloud</a>. All went well till ownCloud client stopped syncing for a number of reasons (incompatible updates/upgrades,etc).</div>
<br />
<div style="text-align: justify;">
I've made an effort to find out a solution that suits me and finally <a href="http://rclone.org/" target="_blank">rclone</a> came up.</div>
<div style="text-align: justify;">
Rclone is a command line program that sync files and directories to and from, and it comes with support of various storage systems (google drive, dropbox, Microsoft One Drive and more). My desirable choice is dropbox, so, I started getting my hands wet.</div>
<div style="text-align: justify;">
I read of course that I would just have to perform the sync operation manually when I wanted things up to date but it didn't bother me in first place. I'll explain the reason afterwards.</div>
<br />
<u>Let's proceed to step by step process</u>.<br />
<br />
<div style="text-align: justify;">
<a href="http://rclone.org/downloads/" target="_blank">Download rclone</a> to your home directory, unzip it and move forward to next paragraph, or go through command line.</div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">cd</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget -c http://downloads.rclone.org/rclone-v1.35-linux-arm.zip</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">unzip rclone-v1.35-linux-arm.zip</span><br />
<u>Rename the directory for sake of simplicity</u><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo mv /home/<user>/rclone-v1.35-linux-arm /home/<user>/rclone</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd rclone</span><br />
<u>Change file access permissions</u> <br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod 755 /home/<user>/rclone/rclone</span><br />
<br />
<div style="text-align: justify;">
Follow <a href="http://rclone.org/dropbox/" target="_blank">installation and configuration instructions</a>. The guide use a generic name for the remote target, called remote. As I chose dropbox installation, I will call it dropbox instead.</div>
<br />
<div style="text-align: justify;">
After installation finishes try to synchronize your source with the destination. In this case the destination directory will be called jubito. Open a terminal and type:
</div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">./rclone sync /home/<user>/<source> dropbox:jubito</span> <br />
<br />
<div style="text-align: justify;">
Time for Jubito integration. I will present three cases. Making a scheduled job, sync on-demand and trigger on event. Before we proceed we have to create invocation to rclone. We need a launcher that point to the action above.</div>
<br />
<div style="text-align: justify;">
Go to <i>Settings->Instructions->Add New Launcher</i>. On popup give as name "<span style="font-family: "courier new" , "courier" , monospace;">sync</span>" and action like this:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">./'/home/<span style="font-family: "courier new" , "courier" , monospace;">%user%</span>/rclone/rclone' '/home/</span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">%user%</span></span>/<source><br /> dropbox:jubito'</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_kprcxgQOP8KbDWVqTgPnjnXhBfJymE37WHAuBb1vDU6rHU_vEF2kK_ygLrkTQaHpnhjT-gNfFRycbuastoQOlaKfR4Xheg8_UpD3nVtJouRHNXNgElHjfrgN0UipRaASmCqhYU7BM90/s1600/Screenshot+from+2017-02-18+07%253A23%253A16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_kprcxgQOP8KbDWVqTgPnjnXhBfJymE37WHAuBb1vDU6rHU_vEF2kK_ygLrkTQaHpnhjT-gNfFRycbuastoQOlaKfR4Xheg8_UpD3nVtJouRHNXNgElHjfrgN0UipRaASmCqhYU7BM90/s400/Screenshot+from+2017-02-18+07%253A23%253A16.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
where <span style="font-family: "courier new" , "courier" , monospace;"><source></span> your current installation (in my case <span style="font-family: "courier new" , "courier" , monospace;">/home/john/bin</span>), and press save. Dot slash (./) is a native implementation similar to <a href="http://www.computerhope.com/jargon/d/dotslash.htm" target="_blank">Linux and Unix</a> to execute a compiled program and <span style="font-family: "courier new" , "courier" , monospace;">%user%</span> is a built-in function that gets the logged in username (alternatively, hard-coded your user). The result, if any, can be consumed by another Instruction Set. Learn more on (incomplete) <a href="http://jubitoblog.blogspot.gr/2013/02/instruction-set-anatomy.html" target="_blank">Instruction Set anatomy</a>.<br />
This will create a pointer to the command inside <span style="font-family: "courier new" , "courier" , monospace;">AppConfig.xml</span> which could be used at any case (scheduled, on-demand, etc).<br />
<br />
Calling the method from CLI:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmUNihgiELP1OMaopjDXqTJwY2UY8TGecNzYZLI1VRSpRmTJs0vX6zwXY14r3TZbfBk8zM7cYXzDfn58Pajhir5g4YcsP4jzMe_Gsj5g3O3H_w0K9OnSdUJ2vpvID_62bTXdLpMc61q3o/s1600/rclone.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmUNihgiELP1OMaopjDXqTJwY2UY8TGecNzYZLI1VRSpRmTJs0vX6zwXY14r3TZbfBk8zM7cYXzDfn58Pajhir5g4YcsP4jzMe_Gsj5g3O3H_w0K9OnSdUJ2vpvID_62bTXdLpMc61q3o/s400/rclone.png" width="400" /></a></div>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3cSEpYRVawArCWOvs2FRW-5TLMRtarhjUjVedLnrUETkENcMH763TW2gBYVK0XYczOQ9L9cQDI_QuI_3GNXKoxGeZTYh-KzqBoAos_FNMJW0IZ2oa7qo0r1KooIkg7zr4sI1cc1KFTRc/s1600/Screenshot+from+2017-02-18+07%253A14%253A24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3cSEpYRVawArCWOvs2FRW-5TLMRtarhjUjVedLnrUETkENcMH763TW2gBYVK0XYczOQ9L9cQDI_QuI_3GNXKoxGeZTYh-KzqBoAos_FNMJW0IZ2oa7qo0r1KooIkg7zr4sI1cc1KFTRc/s400/Screenshot+from+2017-02-18+07%253A14%253A24.png" width="400" /></a></div>
<div style="text-align: center;">
Physical location</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGUGo38BKf7ouLQQVnsdx5HwiLE8SPVks70OYsa1rRWosHFdVpKxAzEr-Gh_o9ei0xW1pozAxM0XpdboBliu7uvdO6m8stCyZY9BErBf4Lpw0kBPV-8BWrTaVTQ0_f5qCDxyPyocxwPZs/s1600/dropjub.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGUGo38BKf7ouLQQVnsdx5HwiLE8SPVks70OYsa1rRWosHFdVpKxAzEr-Gh_o9ei0xW1pozAxM0XpdboBliu7uvdO6m8stCyZY9BErBf4Lpw0kBPV-8BWrTaVTQ0_f5qCDxyPyocxwPZs/s400/dropjub.png" width="400" /></a></div>
<div style="text-align: center;">
Dropbox location</div>
<br />
<b>1) Scheduled</b><br />
<div style="text-align: justify;">
Go to <i>Settings->Scheduler->Add New</i>. Enter a name, select daily routine, time (e.g. 00:00) and finally sync action. This will create a schedule that runs daily at midnight and triggers the dropbox sync.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjomXt9w5Sn4IZBC1TyddmrgSvCzsZ8jRVIAmSNfELT89xtuoH7ozIjToGf_tNH1aahd-sTvqBdEDsPBy3YXbtwRg1Jfi7698EccYsRCzrGMu8uD1xt4uVedPiPJpdop5ww-BgFimP5Plo/s1600/syncschedule.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjomXt9w5Sn4IZBC1TyddmrgSvCzsZ8jRVIAmSNfELT89xtuoH7ozIjToGf_tNH1aahd-sTvqBdEDsPBy3YXbtwRg1Jfi7698EccYsRCzrGMu8uD1xt4uVedPiPJpdop5ww-BgFimP5Plo/s400/syncschedule.png" width="400" /></a></div>
</div>
<br />
<b>2) On-demand</b><br />
<div style="text-align: justify;">
From <i>Settings->Instructions->Add New Instruction Set</i>. Name it "<span style="font-family: "courier new" , "courier" , monospace;">dosync</span>" or whatever you like, select from action list the sync command we created before and press add. It will generate a <span style="font-family: "courier new" , "courier" , monospace;">*sync</span> pointer to the sync launcher. You can put some additional text if you wish. Expand <i>Add to Dashboard</i> and put some info (category, header) to populate a button to the dashboard list.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaVXGqzl6p_9hGCaJJbK1-hmVMMLKcLKBQv1ZrheW2zToB2ecqL5zSzKosUf-aLcv-VFhpSm0mAM3sRKjyzRPTIs1Z-1h_yqSFO0XGquaT0ALOe9hrK0aOngH2fSqilGLlLC7FhsIwVPg/s1600/sync.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="393" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaVXGqzl6p_9hGCaJJbK1-hmVMMLKcLKBQv1ZrheW2zToB2ecqL5zSzKosUf-aLcv-VFhpSm0mAM3sRKjyzRPTIs1Z-1h_yqSFO0XGquaT0ALOe9hrK0aOngH2fSqilGLlLC7FhsIwVPg/s400/sync.png" width="400" /></a></div>
</div>
<br />
Now you'll be able from menu list to press and run the sync method...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJ3QHWsJcef4TmBEADhyWTzr_z4_VyI6PrVISjAxbCfj2cVqw2G9bi5PCLu7qftbMRtFUaV3EFGF_7qsPdsUGR_qD6NZHrfCJOlV-mkcDh9i6lg7k3V-CZDlxMK1aR8xGp1msoBkfHx0/s1600/sync1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVJ3QHWsJcef4TmBEADhyWTzr_z4_VyI6PrVISjAxbCfj2cVqw2G9bi5PCLu7qftbMRtFUaV3EFGF_7qsPdsUGR_qD6NZHrfCJOlV-mkcDh9i6lg7k3V-CZDlxMK1aR8xGp1msoBkfHx0/s400/sync1.png" width="400" /></a></div>
<br />
<b>3) Attach to other Instruction Set</b><br />
<div style="text-align: justify;">
First let's make an example based on <a href="http://jubitoblog.blogspot.gr/2013/02/dvr-system-using-ip-camera.html" target="_blank">DVR system by using an IP camera</a> example. Scenario describe operations when security breach is detected (record a video and send email alerts). To extend it with dropbox synchronization, we're going to use the sync as the third action in the sequence. So, once again add the <span style="font-family: "courier new" , "courier" , monospace;">sync</span> launcher.</div>
<!-- HTML generated using hilite.me -->
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"ip-cam"</span><span style="color: navy; font-weight: bold;">></span>{ evalBool("%whereami%" == "absent"); rec sendmemail sync; ; }<span style="color: navy; font-weight: bold;"></InstructionSet></span>
</pre>
</div>
<br />
<div style="text-align: justify;">
If you want to use the UI and already have the <span style="font-family: "courier new" , "courier" , monospace;">ip-cam</span> Instruction Set, please delete it and re-create it since there is no edit mode. Else, edit <span style="font-family: "courier new" , "courier" , monospace;">AppConfig.xml</span> and change it with the line above. </div>
<br />
<div style="text-align: justify;">
However, you can create a new <span style="font-family: "courier new" , "courier" , monospace;">ip-cam</span> with the same condition that calls only sync method like that:</div>
<!-- HTML generated using hilite.me -->
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"ip-cam"</span><span style="color: navy; font-weight: bold;">></span>{ evalBool("%whereami%" == "absent"); sync; ; }<span style="color: navy; font-weight: bold;"></InstructionSet></span>
</pre>
</div>
<br />
Instructions with the same name, run in order.</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-32487665328404226052017-02-03T19:59:00.000+02:002017-02-06T10:01:09.956+02:00Upgraded Android client with location-based check-in/check-out process<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<i>Check-in/check-out</i> refers to built-in functions (<span style="font-family: "courier new" , "courier" , monospace;">%checkin%</span>, <span style="font-family: "courier new" , "courier" , monospace;">%checkout%)</span> and used to change the user status from present to absent (this also could be translated as locked/unlocked or arm/disarm flag to some) and vice versa. It also raises oncheckin/oncheckout events as described in <span style="font-family: "courier new" , "courier" , monospace;">AppConfig.xml</span>. You can bypass defaults by using custom events (e.g. mycheckin/mycheckout).</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Some things in technology are meant to be deprecated, but yet, it's our responsibility to follow and make upgrades, new versions and provide new features.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I’m always looking for the best approach to perform <i>check-in/check-out</i> operations when I arrive or leave home. Jubito has the <i>check-in/check-out</i> functionality that allows us to perform a sequence of tasks depending on the event. For instance, on check-in we can <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-radio-remote-control-rf.html" target="_blank">turn on an assistive light</a>, disable the <a href="http://jubitoblog.blogspot.gr/2013/02/dvr-system-using-ip-camera.html" target="_blank">camera</a> and <a href="http://jubitoblog.blogspot.gr/2014/07/arduino-pir-motion-sensor.html" target="_blank">motion detection</a>, <a href="http://jubitoblog.blogspot.gr/2014/11/set-up-gmail-notifier.html" target="_blank">checking email</a>, etc, and inverse actions on check-out.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In the early days, I used bluetooth scan as a means to check-in when my cellphone was in range, and check-out, when it was unreachable. Drawbacks such as limitation of bluetooth range, auto-disable to save battery when phone was idle etc, didn't make it the most preferable choice.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Then I <a href="http://jubitoblog.blogspot.gr/2014/07/jubito-android-client-app-v11-nightly.html" target="_blank">introduced</a> the Jubito client Android app that had the capability to track my device's location, checking if I was within radius of 500m of the point I’ve set as home and do the appropriate actions as described earlier, more elegant and with more precision.</div>
<div style="text-align: justify;">
Far from perfect also. For instance, the app had to run in foreground, but besides that, Google changed the API and service eventually stop working.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The <a href="http://jubitoblog.blogspot.gr/2015/03/wi-fi-access-control-using-ping.html" target="_blank">ping methodology</a> came along, which share the same concept as the bluetooth, with some drawbacks too. Of course, it's very valuable in other kind of scenarios, but still, not good for my <i>check-in/check-out</i> expectations.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Lately, I found some time to study the new API and decide to modernize and upgrade the app. Along with its old functionality, now can run as a service in background, even if the phone is locked. <u>By far the most convenient way</u>, especially when we don't want to be distracted by manual input on phone and be spared the extra effort.<br />
It is a very nice feel, returning home, and this would be ready welcomes you by your preferences! Trust me on that!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Usage is straightforward. First you need to enable location from android settings. If not, and you have auto <i>check-in/check-out</i> checked, you will be prompted to. To take effect you need to kill the app from task manager and re-open it.</div>
<div style="text-align: justify;">
Next, from Jubito app settings, select your location by pressing the button "<i>Get Location</i>". On apply, selected address will be set as your home point.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoBKyaQ_R4YcVaEJ6EKByV97K6pZ33Gr_fuD4MDefYq5PMnTK6DllvQVEbcxwegqpJ6Ssmc5z0BS5MMNG-hW3veLi3lxryDVAd1JNNEkozB8HUyzEBGdLLejbz7BGYCcip6ISVaxKIHRA/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="355" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoBKyaQ_R4YcVaEJ6EKByV97K6pZ33Gr_fuD4MDefYq5PMnTK6DllvQVEbcxwegqpJ6Ssmc5z0BS5MMNG-hW3veLi3lxryDVAd1JNNEkozB8HUyzEBGdLLejbz7BGYCcip6ISVaxKIHRA/s400/Untitled.png" width="400" /></a></div>
<br />
Location services allow app to obtain periodic updates of the device's
geographical location, and fire an application-specified event (<i>check-in/check-out</i>) when the device enters the proximity of a given geographical location. In our case, within 500m radius of the home location.</div>
<br />
Before I close, let's recap what features app brings besides serving Jubito UI.<br />
<ul style="text-align: left;">
<li>Speech Recognition & Synthesizer. It allows to <a href="http://jubitoblog.blogspot.gr/2014/07/jubito-android-app-with-voice-control.html" target="_blank">execute Instruction Sets with speech dictation</a> and speak the result if any.</li>
<li>Location & Geocoder. Reverse geocoding is the process of transforming a (latitude, longitude) coordinate into a (partial) address. That allows the app to get location data (lat/long) and reverse it to an address in order to be user friendly. By pressing the "<i>Get Location</i>" button you can set your home location automatically.</li>
</ul>
<br />
Closing this post with the setup of my preferences.<br />
<span style="font-family: "courier new" , "courier" , monospace;">oncheckin</span>, <span style="font-family: "courier new" , "courier" , monospace;">oncheckout </span>events:<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><event</span> <span style="color: red;">id=</span><span style="color: blue;">"oncheckin"</span><span style="color: navy; font-weight: bold;">></span>%unmute%; *socket-d-on; salute; judo schedule enable mailcheck<span style="color: navy; font-weight: bold;"></event></span>
<span style="color: navy; font-weight: bold;"><event</span> <span style="color: red;">id=</span><span style="color: blue;">"oncheckout"</span><span style="color: navy; font-weight: bold;">></span>init; judo sleep 30000; goodbye; lights_off; judo schedule disable mailcheck; %mute%<span style="color: navy; font-weight: bold;"></event></span>
</pre>
</div>
<br />
Let's take a deeper look on implementation.<br />
<div style="text-align: justify;">
<span style="font-size: x-small;"><i>All steps can be made from the UI, but in this particular article I'd like to go behind the scenes for robust understanding.</i></span></div>
<br />
<u><b>Check-in Steps</b></u><br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">%unmute%</span> & <span style="font-family: "courier new" , "courier" , monospace;">%mute%</span> are also built-in functions that disable/enable the speech synthesis. <span style="font-family: "courier new" , "courier" , monospace;">*socket-d-on</span> is a pointer to the <i>InstructionSet</i> that <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-radio-remote-control-rf.html" target="_blank">turn on an assistive light</a>. In my case the living room right. You can also evaluate the <a href="http://jubitoblog.blogspot.gr/2014/07/arduino-light-sensing.html" target="_blank">light conditions</a> before proceeding.</div>
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"*socket-d-on"</span><span style="color: navy; font-weight: bold;">></span>judo serial send 000000000101010100010001<span style="color: navy; font-weight: bold;"></InstructionSet></span>
<span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"socket-d-on"</span> <span style="color: red;">descr=</span><span style="color: blue;">"Turns on living room light"</span> <span style="color: red;">shortdescr=</span><span style="color: blue;">"Living room light on"</span> <span style="color: red;">header=</span><span style="color: blue;">"Socket D on"</span> <span style="color: red;">categ=</span><span style="color: blue;">"Automation"</span><span style="color: navy; font-weight: bold;">></span>*socket-d-on<span style="color: navy; font-weight: bold;"></InstructionSet></span>
</pre>
</div>
<br />
Salute is what it says and implements like this...
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"salute"</span><span style="color: navy; font-weight: bold;">></span>Good %salute% %user%.<span style="color: navy; font-weight: bold;"></InstructionSet></span>
</pre>
</div>
<br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">%salute%</span> function returns the part of day e.g. morning, afternoon. <span style="font-family: "courier new" , "courier" , monospace;">%user%</span> returns the logged user. So, the above will return "<i>Good afternoon john</i>" and vocalized by speech-synthesis.</div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">judo schedule enable mailcheck</span>, enable the gmail check that is <a href="http://jubitoblog.blogspot.gr/2014/11/set-up-gmail-notifier.html" target="_blank">scheduled</a> to check every 5 minutes.</div>
<br />
<u><b>Check-out Steps</b></u><br />
<span style="font-family: "courier new" , "courier" , monospace;">init</span> command, just speak Initiate sequence.
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"init"</span><span style="color: navy; font-weight: bold;">></span>Initiate sequence<span style="color: navy; font-weight: bold;"></InstructionSet></span>
</pre>
</div>
<br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">judo sleep 30000</span>, is a 30 seconds sleep timer, to allow me leave the place without triggering anything.</div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">goodbye</span> command, again a simple goodbye verbal message.
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"goodbye"</span><span style="color: navy; font-weight: bold;">></span>Good bye %user%.<span style="color: navy; font-weight: bold;"></InstructionSet></span>
</pre>
</div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">lights_off</span> command, turn off any assistive light.
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"*socket-a-off"</span><span style="color: navy; font-weight: bold;">></span>judo serial send 000000000100010101011111<span style="color: navy; font-weight: bold;"></InstructionSet></span>
<span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"*socket-b-off"</span><span style="color: navy; font-weight: bold;">></span>judo serial send 000000000101000101010100<span style="color: navy; font-weight: bold;"></InstructionSet></span>
<span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"*socket-c-off"</span><span style="color: navy; font-weight: bold;">></span>judo serial send 000000000101010001010100<span style="color: navy; font-weight: bold;"></InstructionSet></span>
<span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"*socket-d-off"</span><span style="color: navy; font-weight: bold;">></span>judo serial send 000000000101010100010100<span style="color: navy; font-weight: bold;"></InstructionSet></span>
<span style="color: navy; font-weight: bold;"><InstructionSet</span> <span style="color: red;">id=</span><span style="color: blue;">"lights_off"</span> <span style="color: red;">descr=</span><span style="color: blue;">"Turns off the bedroom and living room lights"</span> <span style="color: red;">shortdescr=</span><span style="color: blue;">"Bedroom and living room lights off"</span> <span style="color: red;">header=</span><span style="color: blue;">"Lights off"</span> <span style="color: red;">categ=</span><span style="color: blue;">"Automation"</span><span style="color: navy; font-weight: bold;">></span>*socket-a-off *socket-b-off *socket-c-off *socket-d-off<span style="color: navy; font-weight: bold;"></InstructionSet></span>
</pre>
</div>
<br />
An old showcase <a href="https://www.youtube.com/watch?v=MExAfvvTOUk" target="_blank">video</a>.<br />
<br />
<div style="text-align: justify;">
Finally, the last two are self-described. <span style="font-family: "courier new" , "courier" , monospace;">judo schedule disable mailcheck; %mute%</span>, disable mail check and speech-synthesis.</div>
<br />
<div style="text-align: justify;">
Binaries (<span style="font-family: "courier new" , "courier" , monospace;">000000000100010101011111</span>) in above example, control appliances and explained in this <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-radio-remote-control-rf.html" target="_blank">how-to</a>.</div>
<br />
A basic <a href="https://github.com/jambelnet/janet-framework/wiki" target="_blank">Wiki</a> for judo API and built-in functions.<br />
<br />
In action...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiygWR-UAVpVNNBxQhLE1pFuL6r6dqdG2qIQo5aSTegFrPhGqHZWi6uNHHiQwA-FDof4GHUC8I7Vn_SNyAO8cEcwz3VOTtpeOhxiWDibTSpqJ_1c0dZgZtYA-9zPW7QwFEe5zq0JcBTZqk/s1600/Screenshot_20170130-182212.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiygWR-UAVpVNNBxQhLE1pFuL6r6dqdG2qIQo5aSTegFrPhGqHZWi6uNHHiQwA-FDof4GHUC8I7Vn_SNyAO8cEcwz3VOTtpeOhxiWDibTSpqJ_1c0dZgZtYA-9zPW7QwFEe5zq0JcBTZqk/s640/Screenshot_20170130-182212.png" width="360" /></a></div>
<div style="text-align: justify;">
<br />
I plan to make more enhancements in future versions. For example, change the radius, add zones on specific ranges and do different tasks (at 10m open garage door), etc.
</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-54635441795092927282016-08-18T10:44:00.002+03:002017-02-09T16:24:26.135+02:00Consuming RESTful data, create widgets and more<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
A common way to offer server-generated data to browsers, so that it can be used in client-side JavaScript is by formatting the data as JSON, and making it accessible through its own URL. A web server that respects itself, even a lightweight like Jubito, should conformed with these standards.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Until now, the core of Jubito was loading data from the server using a HTTP GET request over <a href="https://api.jquery.com/jquery.get/" target="_blank">jQuery.get()</a>. The return type was a simple html. In fact, still used and applied when mode is set to html (i.e. <span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">http://localhost:8080/www/?cmd=<commands>&mode=html</span></span>). By default is text, or by setting mode to text. In case of html, the only element presented is the '<br />'. The main "disadvantage" is that there is no object to handle and each command need its own call, or a manipulation of the result in case of multiple commands (e.g. splitting the breaks '<br />').<br />
<br />
In this post, I'm going to present native APIs for consuming data from the <a href="https://github.com/jambelnet/janet-framework" target="_blank">framework</a> and the web. That way we'll be able to customize Jubito by creating widgets and UIs.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Before we begin, let's do some REST style examples from the browser in order to understand the
behavior. URI has a typical structure and addressed like this:</div>
<code>
<span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;">http://<host>:<port>/www/?cmd=<sequence of commands as parameters delimited by ampersand>&<mode=json></span></span><span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;"><b> </b></span></span></code><br />
<code><span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;"><b>e.g.</b>: http://localhost:8080/www/?cmd=judo%20serial%20state%&%judo%20server%20state&%whereami%&%whoami%&mode=json</span></span>
</code>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyT3xdEy7EcZb5PRTTg0YqCLQ3aiqrjMERjx9fgumJuBi7w1rzNnYsBedcaPzv5KZLNduCuspj9BUX-q4M0T4Sf6W1pPzHaHnFW_n0sa7wA-5UNmZvnJhXj1NtcNn8PPt8WPkpcUBp4E/s1600/json_response.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyT3xdEy7EcZb5PRTTg0YqCLQ3aiqrjMERjx9fgumJuBi7w1rzNnYsBedcaPzv5KZLNduCuspj9BUX-q4M0T4Sf6W1pPzHaHnFW_n0sa7wA-5UNmZvnJhXj1NtcNn8PPt8WPkpcUBp4E/s400/json_response.png" width="400" /></a></div>
<br />
<u>Explaining the functionality of each command</u>:<br />
<span style="font-family: "courier new" , "courier" , monospace;">judo serial state</span> is an API call that returns the state/status of the serial port.<br />
<span style="font-family: "courier new" , "courier" , monospace;">judo server state</span> is an API call that returns the state/status of the web server.<br />
<span style="font-family: "courier new" , "courier" , monospace;">%whereami%</span> is a built-in function that returns the user status.<br />
<span style="font-family: "courier new" , "courier" , monospace;">%whoami%</span> is a built-in function that returns the user login.<br />
<br />
<u>Parameters in API respond</u>:<br />
1. Pair name - A simplified name of the requested command<br />
2. Key - Represents the requested command<br />
3. Value - Result of the requested command <br />
<br />
For more information about built-in functions and API please visit <span style="color: red;"><a href="https://github.com/jambelnet/janet-framework/wiki/" target="_blank"><u><b>Wiki</b></u></a></span><br />
<br />
<div style="text-align: justify;">
Next step is to create a <a href="http://api.jquery.com/jquery.ajax/" target="_blank">jQuery.ajax()</a> request and see how to consume the response data. It provides a simple process of fetching and parsing JSON data through Ajax. An ideal and straightforward way to achieve our goal for tailor made widgets and UIs.</div>
<br />
Sample HTML:
<!-- HTML generated using hilite.me --><br />
<div style="background: #111111; border-width: 0.1em 0.1em 0.1em 0.4em; border: solid gray; overflow: auto; padding: 0.2em 0.2em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="background-color: #0f140f; color: #ff0007; font-style: italic; font-weight: bold;"><!DOCTYPE html></span>
<span style="color: #fb660a; font-weight: bold;"><html></span>
<span style="color: #fb660a; font-weight: bold;"><head></span>
<span style="color: #fb660a; font-weight: bold;"><meta</span> <span style="color: #ff0086; font-weight: bold;">charset=</span><span style="color: #0086d2;">"utf-8"</span> <span style="color: #fb660a; font-weight: bold;">/></span>
<span style="color: #fb660a; font-weight: bold;"><title></title></span>
<span style="color: #fb660a; font-weight: bold;"><script </span><span style="color: #ff0086; font-weight: bold;">type=</span><span style="color: #0086d2;">"text/javascript"</span> <span style="color: #ff0086; font-weight: bold;">src=</span><span style="color: #0086d2;">"https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"</span><span style="color: #fb660a; font-weight: bold;">></script></span>
<span style="color: #fb660a; font-weight: bold;"></head></span>
<span style="color: #fb660a; font-weight: bold;"><body></span>
<span style="color: #fb660a; font-weight: bold;"><script </span><span style="color: #ff0086; font-weight: bold;">type=</span><span style="color: #0086d2;">"text/javascript"</span><span style="color: #fb660a; font-weight: bold;">></span>
<span style="color: white;">$(document).ready(</span><span style="color: #fb660a; font-weight: bold;">function</span><span style="color: white;">() {</span>
<span style="color: white;">getData();</span>
<span style="color: white;">});</span>
<span style="color: white;">setTimeout</span> <span style="color: white;">(</span><span style="color: #fb660a; font-weight: bold;">function</span> <span style="color: white;">()</span> <span style="color: white;">{</span>
<span style="color: white;">$(</span><span style="color: #0086d2;">"#data"</span><span style="color: white;">).empty();</span>
<span style="color: white;">getData();</span>
<span style="color: white;">},</span> <span style="color: #0086f7; font-weight: bold;">10000</span><span style="color: white;">);</span>
<span style="color: #fb660a; font-weight: bold;">function</span> <span style="color: white;">getData</span> <span style="color: white;">()</span> <span style="color: white;">{</span>
<span style="color: white;">$.ajax({</span>
<span style="color: white;">type:</span> <span style="color: #0086d2;">'GET'</span><span style="color: white;">,</span>
<span style="color: white;">contentType:</span> <span style="color: #0086d2;">'application/json; charset=utf-8'</span><span style="color: white;">,</span>
<span style="color: white;">dataType:</span> <span style="color: #0086d2;">"json"</span><span style="color: white;">,</span>
<span style="background-color: #0f140f; color: #008800; font-style: italic;">// requested built-in functions: %whereami% %whoami% %todayconditions% %todaylow% %todayhigh% %about%</span>
<span style="background-color: #0f140f; color: #008800; font-style: italic;">// request on judo API: judo server state</span>
<span style="background-color: #0f140f; color: #008800; font-style: italic;">// wiki https://github.com/jambelnet/janet-framework/wiki</span>
<span style="background-color: #0f140f; color: #008800; font-style: italic;">// uri form: <host>:<port>/www/?cmd=<sequence of commands as parameters>&<mode=json></span>
<span style="color: white;">url:</span> <span style="color: #0086d2;">"http://localhost:8080/www/?cmd=%whereami%&%whoami%&%todayconditions%&%todaylow%&%todayhigh%&judo%20server%20state&%about%&mode=json"</span><span style="color: white;">,</span>
<span style="color: white;">}).done(</span><span style="color: #fb660a; font-weight: bold;">function</span> <span style="color: white;">(data)</span> <span style="color: white;">{</span>
<span style="color: #fb660a; font-weight: bold;">var</span> <span style="color: white;">template</span> <span style="color: white;">=</span> <span style="color: #0086d2;">'Status: '</span> <span style="color: white;">+</span> <span style="color: white;">data.whereami.Value</span> <span style="color: white;">+</span> <span style="color: #0086d2;">'<br/>User: '</span> <span style="color: white;">+</span> <span style="color: white;">data.whoami.Value</span> <span style="color: white;">+</span> <span style="color: #0086d2;">'<br />'</span><span style="color: white;">;</span>
<span style="color: white;">template</span> <span style="color: white;">+=</span> <span style="color: #0086d2;">'Conditions: '</span> <span style="color: white;">+</span> <span style="color: white;">data.todayconditions.Value</span> <span style="color: white;">+</span> <span style="color: #0086d2;">'<br />'</span><span style="color: white;">;</span>
<span style="color: white;">template</span> <span style="color: white;">+=</span> <span style="color: #0086d2;">'Low: '</span> <span style="color: white;">+</span> <span style="color: white;">data.todaylow.Value</span> <span style="color: white;">+</span> <span style="color: #0086d2;">'C&deg;<br />'</span><span style="color: white;">;</span>
<span style="color: white;">template</span> <span style="color: white;">+=</span> <span style="color: #0086d2;">'High: '</span> <span style="color: white;">+</span> <span style="color: white;">data.todayhigh.Value</span> <span style="color: white;">+</span> <span style="color: #0086d2;">'C&deg;<br />'</span><span style="color: white;">;</span>
<span style="color: white;">template</span> <span style="color: white;">+=</span> <span style="color: #0086d2;">'Server status: '</span> <span style="color: white;">+</span> <span style="color: white;">data.judo_server_state.Value</span> <span style="color: white;">+</span> <span style="color: #0086d2;">'<br />'</span><span style="color: white;">;</span>
<span style="color: white;">template</span> <span style="color: white;">+=</span> <span style="color: #0086d2;">'About: '</span> <span style="color: white;">+</span> <span style="color: white;">data.about.Value</span> <span style="color: white;">+</span> <span style="color: #0086d2;">'<br />'</span><span style="color: white;">;</span>
<span style="color: white;">$(</span><span style="color: #0086d2;">"#data"</span><span style="color: white;">).append(template);</span>
<span style="color: white;">}).fail(</span><span style="color: #fb660a; font-weight: bold;">function</span><span style="color: white;">()</span> <span style="color: white;">{</span>
<span style="color: white;">alert(</span> <span style="color: #0086d2;">"Oops!"</span> <span style="color: white;">);</span>
<span style="color: white;">});</span>
<span style="color: white;">}</span>
<span style="color: #fb660a; font-weight: bold;"></script></span>
<span style="color: #fb660a; font-weight: bold;"><pre</span> <span style="color: #ff0086; font-weight: bold;">id=</span><span style="color: #0086d2;">"data"</span><span style="color: #fb660a; font-weight: bold;">></pre></span>
<span style="color: #fb660a; font-weight: bold;"></body></span>
<span style="color: #fb660a; font-weight: bold;"></html></span>
</pre>
</div>
<a href="http://hilite.me/" target="_blank">http://hilite.me/</a><br />
<br />
<div style="text-align: justify;">
The sample above will serve a simple page with data displayed and refreshed every 10 seconds:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS1e9svwHVx_NSJ_R3oStRzU1FOFrMuD0E4kiGLS4EBsO_GoO5LaseKqmt1xqMAIQHkBQrqhpIXWiWfGYpefJr-4lAwmjntDZTgWWIwUjMCApD3XBWq9-hTse1xEV2p17gvagHQtkwSGo/s1600/consumer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS1e9svwHVx_NSJ_R3oStRzU1FOFrMuD0E4kiGLS4EBsO_GoO5LaseKqmt1xqMAIQHkBQrqhpIXWiWfGYpefJr-4lAwmjntDZTgWWIwUjMCApD3XBWq9-hTse1xEV2p17gvagHQtkwSGo/s400/consumer.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
Another powerful feature which you may find interesting, is the HTTP GET request supported by the API. It provides raw data from any endpoint.<br />
<span style="font-family: "courier new" , "courier" , monospace;">judo http get <endpoint></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJsvsuCl9hLIyOpUHpCPslpVNH9gUuMG8mtLPW8Od4wLsU1wGQpgGmO5L72-RLP3gG5dAD64-1EzI4p7EfVD-dhd6Dri2MDCaMPY3QLDIlxL5NcS2VakG9UemtZYDsPA7b7N0PpluSXXA/s1600/http_get.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJsvsuCl9hLIyOpUHpCPslpVNH9gUuMG8mtLPW8Od4wLsU1wGQpgGmO5L72-RLP3gG5dAD64-1EzI4p7EfVD-dhd6Dri2MDCaMPY3QLDIlxL5NcS2VakG9UemtZYDsPA7b7N0PpluSXXA/s400/http_get.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
An example of its use can be found <a href="http://jubitoblog.blogspot.gr/2015/05/inexpensive-z-wave-gateway-using-banana.html" target="_blank"><b>here</b></a> on how to send and read data from RaZberry Z-Wave controller.<br />
<br />
So, to recap, there is a lot of new things to expect, but till then, you should probably start honing your skills and finally create your own UI or a widget to the existing.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7JmRQ8D3LOxB7LC5sRC4n7TcXRM-73XCXc06l4EaIxX0taMmEhBbJN3nloIUYj_2MxyGhuBF8lT1apS9H3Xarz5K9GvCTe-ZbDVO-yyAOayzrcO_gxVSELUEHaOG6zPQmecBnTs2ThX0/s1600/dashboard-main.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7JmRQ8D3LOxB7LC5sRC4n7TcXRM-73XCXc06l4EaIxX0taMmEhBbJN3nloIUYj_2MxyGhuBF8lT1apS9H3Xarz5K9GvCTe-ZbDVO-yyAOayzrcO_gxVSELUEHaOG6zPQmecBnTs2ThX0/s640/dashboard-main.png" width="360" /></a></div>
<br />
<div style="text-align: justify;">
I tried to describe this post as much as possible less technical, in order to be understood by beginners.</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com1tag:blogger.com,1999:blog-2252973662798952348.post-46227225370176960832016-06-17T21:26:00.000+03:002017-05-01T13:23:38.050+03:00Open Weather Map API support<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Recently, Yahoo change its API and forcing everyone to use <i>OAuth 1.0</i> in order to access its data. You may experience empty weather info to Jubito's front-end, as well null responses from relational <a href="https://github.com/jambelnet/janet-framework/wiki/Built-in-functions" target="_blank">functions, such %todayconditions%</a>, etc.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I decide to implement the new functionality with <a href="http://openweathermap.org/api">openweathermap.org</a> API as the weather data source, which I found it more simple and clear.<br />
<br />
So, let's see what you have to do.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
1) Register and get your <a href="http://openweathermap.org/appid" target="_blank">API key</a></div>
<div style="text-align: justify;">
2) Expand Settings and go to Weather->Setup</div>
<div style="text-align: justify;">
3) Paste the URL you get including your APPID as a parameter, i.e.:<br />
http://api.openweathermap.org/data/2.5/forecast/city?id=524901&units=metric&APPID={APIKEY}<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQFUTst0hXtLJPSA71CfB3RqFiJg2HYVQ5PPNHhIJOs_8Ogg6sQuS9oPn5cjTLIWnEN4_OQ00bID3BHabgDQkhw31yTXnyjyWcvWe9ez6i7EmU9ZrFIw178bVHcwNLFTVeV-s7PykwtBw/s1600/weather1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="173" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQFUTst0hXtLJPSA71CfB3RqFiJg2HYVQ5PPNHhIJOs_8Ogg6sQuS9oPn5cjTLIWnEN4_OQ00bID3BHabgDQkhw31yTXnyjyWcvWe9ez6i7EmU9ZrFIw178bVHcwNLFTVeV-s7PykwtBw/s400/weather1.png" width="400" /></a></div>
<br /></div>
<div style="text-align: justify;">
You're all set. Now you can use some of the old functions, plus, the new ones for humidity and pressure. Find all the function set in <a href="https://github.com/jambelnet/janet-framework/wiki" target="_blank">GitHub wiki</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Now your dashboard should look like this:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEineOoBKdMoXtBwsF5MqkIqw2m_N9MV6G-uOxigjZEhJ0tZfTFQ6AFT7yalCbKjCHvzJ9Bj8yrNt6l_1byz3NSGm4uIPkFpDFlyJaEqS07Y2OKNvlgBN2fmrmsdhFQCFrOqa5m2IsTYzcA/s1600/weather.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEineOoBKdMoXtBwsF5MqkIqw2m_N9MV6G-uOxigjZEhJ0tZfTFQ6AFT7yalCbKjCHvzJ9Bj8yrNt6l_1byz3NSGm4uIPkFpDFlyJaEqS07Y2OKNvlgBN2fmrmsdhFQCFrOqa5m2IsTYzcA/s640/weather.png" width="360" /></a></div>
<br /></div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-67254556520910358282016-01-05T23:25:00.000+02:002016-01-05T23:25:23.392+02:00Special thanks to Hackaday members! [ Part II ]<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM1R88q24qFsyKEbkL7UOE64A5GNHgTbyDhMN1ajh_L_md4HN0FQcN7MxH9jxunsjgIOnMkmA_KxYB9xYVfc-UOqHPUHmIBIy0GqHhDa1Yll5yPGzFOBEhAwUbRGFr7ImMzAZnaP5avQs/s1600/7840791440633462013.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM1R88q24qFsyKEbkL7UOE64A5GNHgTbyDhMN1ajh_L_md4HN0FQcN7MxH9jxunsjgIOnMkmA_KxYB9xYVfc-UOqHPUHmIBIy0GqHhDa1Yll5yPGzFOBEhAwUbRGFr7ImMzAZnaP5avQs/s1600/7840791440633462013.png" /></a></div>
<div style="text-align: justify;">
Indeed Hackaday. Jubito is and always will be, AWESOME!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In 2014 I was <a href="http://jubitoblog.blogspot.gr/2014/10/special-thanks-to-hackaday-members.html" target="_blank">grateful</a> to the hackaday members. Once more, I want to pay my respects to all of you out there who support Jubito.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
It is the best gift I could get for 2016 and, as the note indicates, I'll wear it with pride!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
<span style="color: #b45f06;"><span style="font-size: large;"><b>Happy new year!</b></span></span></div>
<br />
<div style="text-align: center;">
<a href="https://hackaday.io/list/7401-2015-hackaday-prize-quarterfinalists" target="_blank">The Hackaday Prize: Quarterfinalists</a></div>
<div style="text-align: center;">
<a href="https://hackaday.io/submissions/prize2015/list" target="_blank">2015 Official Hackaday Prize Entries</a></div>
<div style="text-align: center;">
<a href="https://hackaday.io/project/412-home-automation-hub-using-pis-arduino-and-more" target="_blank">Project page</a>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWhUQycGETMUP4rjGS2SpXniEOphNrPefaWe7H5RnECZHgz9UhQuwvSvNynrI6nEH3Dks2FaDNLkorsp9-RUJg5IKjSlsmBE6vAELq9mQSCDCTFivnObOCzj7JMt-FNs1Ly_V2uZ7YPfA/s1600/IMG_20160105_213724.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWhUQycGETMUP4rjGS2SpXniEOphNrPefaWe7H5RnECZHgz9UhQuwvSvNynrI6nEH3Dks2FaDNLkorsp9-RUJg5IKjSlsmBE6vAELq9mQSCDCTFivnObOCzj7JMt-FNs1Ly_V2uZ7YPfA/s400/IMG_20160105_213724.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0UmfkUPqvE8uFMjdXeZ3ZBnEICLHd7NO-FGYcfpDFNOUPNJfB7wD3qLy0JPz_7IIgJIdoyxO_72nB1JsVv-LOMuzBX74gOFKfTcivinEAy-fwZUVesc6m85jAGeC69nXUYyGbSgZ36Lw/s1600/IMG_20160105_215518.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0UmfkUPqvE8uFMjdXeZ3ZBnEICLHd7NO-FGYcfpDFNOUPNJfB7wD3qLy0JPz_7IIgJIdoyxO_72nB1JsVv-LOMuzBX74gOFKfTcivinEAy-fwZUVesc6m85jAGeC69nXUYyGbSgZ36Lw/s400/IMG_20160105_215518.jpg" width="400" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-31183850433613081352015-06-03T13:12:00.000+03:002017-05-01T13:24:14.388+03:00JubitOS-Z: Operating System for the Internet of Things<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
JubitOS-Z is a free Operating System (OS) for the Internet of Things
(IoT). A single image that convert your Banana Pi or BPi-R1 to a
inexpensive home automation hub.</div>
<br />
<div style="text-align: justify;">
The combined power of <a href="http://razberry.z-wave.me/" target="_blank">RaZberry</a> and
Jubito brings together the most cutting edge technologies
like Z-Wave and Arduino. Regardless of whether you are a beginner, an experienced maker or a professional this
software will let you transform your house into a self-regulating
mechanism at an extremely low budget. No additional hub is required.</div>
<br />
<div style="text-align: justify;">
Furthermore you can install <a href="http://kodi.tv/" target="_blank">Kodi</a>, <a href="https://owncloud.org/" target="_blank">ownCloud</a>, and much more for enhanced
home center experience. Unlike any other proprietary product, it is
designed with open technologies. Now, privacy is in your hands. No registration, no dependency on cloud-based services.</div>
<br />
<span style="font-size: large;"><a href="http://www.ebay.com/itm/Home-Automation-IoT-Linux-Operating-System-for-Banana-Pi-BPi-R1-8GB-SD-Card-/231581552976?" style="text-decoration: none;" target="_blank"><b><span style="color: red;">Help JubitOS-Z to evolve</span></b></a></span>.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgFEGq9_5keou9U-ajIhElpsL4da0fSSouF2cK0U4Pm1IFsT8Dyw06qTsbEKBoDddNFE66s30o79PXoMtWL6yBhP6Ip50iRjcBjkcthNrIaZwFA6L8VhAU-T5XR64disqqps5QOcv_5rg/s1600/jubitos-z.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgFEGq9_5keou9U-ajIhElpsL4da0fSSouF2cK0U4Pm1IFsT8Dyw06qTsbEKBoDddNFE66s30o79PXoMtWL6yBhP6Ip50iRjcBjkcthNrIaZwFA6L8VhAU-T5XR64disqqps5QOcv_5rg/s640/jubitos-z.png" width="424" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKwocmmA9bGAUllIzuI45-UXngVvFNqWYGZcXzI5QNhGFTSYoU6Vc7UJnJpHTWg_RqyTnZsX2sCpGy9qZmHFhO3UpBPiQwM4N8893wgbw_Be7-V4EZ_3AsHqLyDbFCXE84xSV8xSJemD4/s1600/jubitos.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKwocmmA9bGAUllIzuI45-UXngVvFNqWYGZcXzI5QNhGFTSYoU6Vc7UJnJpHTWg_RqyTnZsX2sCpGy9qZmHFhO3UpBPiQwM4N8893wgbw_Be7-V4EZ_3AsHqLyDbFCXE84xSV8xSJemD4/s400/jubitos.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGMWcJ7DIYEuCgTZe2bTyXlcZwfrla99GdpZTpHSeMC5nJGOmJBiQUZMM_gYOwbnJNcpX2O-3PC_l7TtaAw0O-QdW-XOwYTvHZbaXxEY_s28d2J2Ze1e4nAjJGJKGZH5R_8_5O2uISfpo/s1600/jubitos-bpi_r1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGMWcJ7DIYEuCgTZe2bTyXlcZwfrla99GdpZTpHSeMC5nJGOmJBiQUZMM_gYOwbnJNcpX2O-3PC_l7TtaAw0O-QdW-XOwYTvHZbaXxEY_s28d2J2Ze1e4nAjJGJKGZH5R_8_5O2uISfpo/s400/jubitos-bpi_r1.jpg" width="400" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-18508075612108308122015-05-19T09:42:00.000+03:002017-05-01T13:24:38.255+03:00Inexpensive Z-Wave gateway using a Banana Pro and a RaZberry daughter card<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Lately Jubito grows its family by contributions of individuals and vendors and I thank them in public each time I make a reference. More details in social networks e.g.: <a href="https://www.facebook.com/pages/Jubito/412404438847626" target="_blank">facebook</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Every piece of hardware I received has an interesting aspect that opens a new challenge to the Jubito ecosystem. For example, Z-Wave integration. An interesting technology, but still, a little bit expensive.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
While I'm studying the <a href="http://razberry.z-wave.me/docs/zwayDev.pdf" target="_blank">Z-Way JSON API</a> that allows to execute commands on server side using HTTP GET/POST requests, I'd like to share some early developments for those who want to learn the basics and for the adventurous. In this post I will deal with the <a href="http://razberry.z-wave.me/" target="_blank">RaZberry</a> module by <a href="http://www.z-wave.me/" target="_blank">Z-Wave.me</a> on a <a href="http://www.lemaker.org/" target="_blank">Banana Pro</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Since I currently owned only one device (<a href="http://www.fibaro.com/en/the-fibaro-system/wall-plug" target="_blank">Fibaro wall plug</a>) I will focus on SwitchBinary Command Class (0x25/37). The Switch Binary Command Class is used to control all actuators with simple binary (on/off) switching functions, primarily electrical switches.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Those who have experience with the module will probably have a complete understanding of what I'm talking about.</div>
<br />
But let's take a look at some methods. The command to execute is taken from the URL. All functions are executed in form:<br />
<span style="font-family: "courier new" , "courier" , monospace;">http://YOURIP:8083/<URL></span> <br />
<br />
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/controller.AddNodeToNetwork(1) - Start inclusion [<span style="color: blue;"><b>1</b></span>].</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/controller.AddNodeToNetwork(0) - Stop inclusion</code><code><code></code>.</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/controller.RemoveNodeFromNetwork(1) - Start exclusion </code><code><code>[<b><span style="color: blue;">1</span></b>]</code>.</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/controller.RemoveNodeFromNetwork(0) - Stop exclusion</code><code>.</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/devices[n].SendNoOperation - Refresh device list.</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/devices[n].instances[0].SwitchBinary.Set(value) - Binary values accept 0-99 for switching off and 255 for switch on.</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/devices[n].instances[0].SwitchBinary.data.level.value - Get the state of the device (true->on, false->off).</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/devices[n].instances[0].Meter.data[s].val.value - </code><code>Measures the amount of electrical energy in kWh that was consumed.</code></li>
</ul>
<ul style="text-align: left;">
<li><code>
http://localhost:8083/ZWaveAPI/Run/devices[n].data.givenName.value='<A new name>' - Rename a device [<span style="color: blue;"><b>2</b></span>].
</code></li>
</ul>
<br />
<div style="text-align: justify;">
[<span style="color: blue;"><b>1</b></span>] You can include devices by pressing the 'Inclusion' button. This turns the controller into an inclusion mode that allows including a device. A led on the controller indicates this status. The inclusion of a device is typically confirmed with a triple press of a button of this particular device. However, please refer to the manual of this particular device for details how to include them into a Z-Wave network. The inclusion mode will time out after about 20 seconds or is aborted by pressing the 'Inclusion' button again.</div>
<div style="text-align: justify;">
The same applies for the 'Exclusion'.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5aRjFXyTHgIVNdlsl7YfIxAqNAdA4ErasQkOnB0p1_SktpjLnf_KhUPP7sz269yFFDYuB3F4e-sdSsuN_nh4_lEaGi7F57bHsLdMyDQHb506zVJE1WYSdZjMVIg5UIuIzL9uh21oEXpw/s1600/IMG_20150518_120559.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5aRjFXyTHgIVNdlsl7YfIxAqNAdA4ErasQkOnB0p1_SktpjLnf_KhUPP7sz269yFFDYuB3F4e-sdSsuN_nh4_lEaGi7F57bHsLdMyDQHb506zVJE1WYSdZjMVIg5UIuIzL9uh21oEXpw/s400/IMG_20150518_120559.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgph8x08EEtWFyGkF2nNr6HB5wSGhFSObtv8LN36Exd80wD3U62tzVZ80xFVM21djG0GTXdC2EzjAnRaGiS6G11I59KN0F97vhcW7gMEavpl3Vhe9iwW4uRZbfIYu98iPg7rvfQG0-hd9Q/s1600/zway-include-exclude.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgph8x08EEtWFyGkF2nNr6HB5wSGhFSObtv8LN36Exd80wD3U62tzVZ80xFVM21djG0GTXdC2EzjAnRaGiS6G11I59KN0F97vhcW7gMEavpl3Vhe9iwW4uRZbfIYu98iPg7rvfQG0-hd9Q/s400/zway-include-exclude.png" width="400" /></a></div>
<br />
[<span style="color: blue;"><b>2</b></span>] Rename a device:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdsditPsq2FLa0Z3UAe443tPmMulGj1SrGwVqoliIQfZL0MA8ryv9vXiiOBTWbd0n3Ouj0CbOviz0sxZfrEbuuc71IOlKVnaWismtB5GTy6Rwjqns8ubRqttQ7Ih6x_RQ7NG8xDKE-qp0/s1600/zway-rename-device.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="71" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdsditPsq2FLa0Z3UAe443tPmMulGj1SrGwVqoliIQfZL0MA8ryv9vXiiOBTWbd0n3Ouj0CbOviz0sxZfrEbuuc71IOlKVnaWismtB5GTy6Rwjqns8ubRqttQ7Ih6x_RQ7NG8xDKE-qp0/s400/zway-rename-device.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje55nQA6XmJWriHLOp7CaFYq79YYSu4Njzox4wxtxItVvXS9-xr04EqC82orKZchv6ALBZUj197958VKRt6tjs5fSgks85zsV3Qe645CubNen4nTEkN7lkkbgcywBdR7pROBz3xu4V6Xc/s1600/2015-05-20-141553_1920x1080_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje55nQA6XmJWriHLOp7CaFYq79YYSu4Njzox4wxtxItVvXS9-xr04EqC82orKZchv6ALBZUj197958VKRt6tjs5fSgks85zsV3Qe645CubNen4nTEkN7lkkbgcywBdR7pROBz3xu4V6Xc/s400/2015-05-20-141553_1920x1080_scrot.png" width="400" /></a></div>
<br />
Use <span style="font-family: "courier new" , "courier" , monospace;"><lock></lock></span> tags when you want to bypass parser and pass a URI with blank spaces as one argument.<br />
<br />
<div style="text-align: justify;">
To create an HTTP GET method as an Instruction Set for alternative use, you can move to <span style="font-family: "courier new" , "courier" , monospace;">Instructions->Add New Launcher</span> and put your getter there. This will allow you to invoke a Z-Wave function into another Instruction Set. You can search in this blog for common actions, but I will come back later with analytical article (<span style="color: red;">*</span>).</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR-hY4tKlx2yDOZ-q-PaeEGvRlj5849zWZi_n73_Dc6jxECFw3a-Dyw-9GPUMtfNIXQRNK1g41k4QDft20XgUfl78TWpr6F81AL99Om7-wyPdjzaeG93FQ5fkabxuRVBLyf1b0XlAQru4/s1600/http_getter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR-hY4tKlx2yDOZ-q-PaeEGvRlj5849zWZi_n73_Dc6jxECFw3a-Dyw-9GPUMtfNIXQRNK1g41k4QDft20XgUfl78TWpr6F81AL99Om7-wyPdjzaeG93FQ5fkabxuRVBLyf1b0XlAQru4/s400/http_getter.png" width="400" /></a></div>
<br />
You can review the whole object in real time to reveal all the available functions but I won't deepen on the data model -yet [ <span style="font-family: "courier new" , "courier" , monospace;">http://localhost:8083/ZWaveAPI/Data</span> ]:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd3yVdjU-WN8w8STPkCSFZ-4POaQUlEKDbl3LrLpETzLZKFsUg35xL9Prz0TzC9rxbwi3cwmEvjalK-S-2Ef1PbI68OaYiXqH-ij9nNQX9DVo8Q-KOQ2JTNsSA7-MylYEFC9Oe2Lg68o0/s1600/zway-data.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd3yVdjU-WN8w8STPkCSFZ-4POaQUlEKDbl3LrLpETzLZKFsUg35xL9Prz0TzC9rxbwi3cwmEvjalK-S-2Ef1PbI68OaYiXqH-ij9nNQX9DVo8Q-KOQ2JTNsSA7-MylYEFC9Oe2Lg68o0/s400/zway-data.png" width="400" /></a></div>
<br />
To have a human readable tree view, copy and paste the JSON object to an editor, such <a href="http://www.jsoneditoronline.org/" target="_blank">www.jsoneditoronline.org</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtzaSegnyqEyliWampjokQs0xJGyeYJSb1PdRQkcaCaOaqDM353Z4emZmW9nI3PgLxqGazStkRWQkK1SQy0okCoS3KZXKXpo-e0medYOlMF7xBWKl93ywIEpyYo3SdgeuvOfdZAqOdG7Q/s1600/zwaydata-wellformed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtzaSegnyqEyliWampjokQs0xJGyeYJSb1PdRQkcaCaOaqDM353Z4emZmW9nI3PgLxqGazStkRWQkK1SQy0okCoS3KZXKXpo-e0medYOlMF7xBWKl93ywIEpyYo3SdgeuvOfdZAqOdG7Q/s400/zwaydata-wellformed.png" width="400" /></a></div>
<br />
List of available devices [ <span style="font-family: "courier new" , "courier" , monospace;">http://localhost:8083/ZWaveAPI/Run/devices</span> ]:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiobUrnjT-VYz4qCs3wZOhBjNoV1IxivoCBeDvDmbp1A6He-3_sMItakp7ynaRekkVGIfPEcdXq8le4wHYAubJpwgVEIA6H-EBfc09xTcdb9A85XLaRhyphenhyphenee0FYQ_n_q8DrdqBqRbweCRxE/s1600/zway-devices.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiobUrnjT-VYz4qCs3wZOhBjNoV1IxivoCBeDvDmbp1A6He-3_sMItakp7ynaRekkVGIfPEcdXq8le4wHYAubJpwgVEIA6H-EBfc09xTcdb9A85XLaRhyphenhyphenee0FYQ_n_q8DrdqBqRbweCRxE/s400/zway-devices.png" width="400" /></a></div>
<br />
Let's stand here and see some examples on Jubito's side.<br />
Jubito has a native API for <span style="font-family: "courier new" , "courier" , monospace;">HTTP GET</span> method i.e.: <span style="font-family: "courier new" , "courier" , monospace;">judo http get <Request-URI></span>.<br />
<br />
Try any of the above operations from the terminal.<br />
<u><b>Examples</b></u>:<br />
<ul style="text-align: left;">
<li><code>judo http get http://localhost:8083/ZWaveAPI/Run/devices[n].data.givenName.value - Gets device name.</code></li>
</ul>
<ul style="text-align: left;">
<li><code>judo http get http://localhost:8083/ZWaveAPI/Run/devices[n].instances[0].commandClass[37].Set(255) - This will switch on the plug. It is equivalent to http://localhost:8083/ZWaveAPI/Run/devices[n].instances[0].SwitchBinary.Set(255) or .Set(0) to switch off.</code></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc-DEnAfVZpn4HbMmUmfdrHV5KdPr7monQg_3IBhyphenhyphens6aXhFJqF53yBABzygYqOJFH2mxXgy203tS3CsgwM8rxm5eV3UwE2LlwdReNXZ7dRyajcbhXk2sXaYu2M1Q4-eFTZdxt-69oyGW0/s1600/zway-jubito-term.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc-DEnAfVZpn4HbMmUmfdrHV5KdPr7monQg_3IBhyphenhyphens6aXhFJqF53yBABzygYqOJFH2mxXgy203tS3CsgwM8rxm5eV3UwE2LlwdReNXZ7dRyajcbhXk2sXaYu2M1Q4-eFTZdxt-69oyGW0/s400/zway-jubito-term.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
That was a quick introduction to the Z-Way API. Before you get confused, Jubito comes with a simple interface that implements the basics like, inclusion, exclusion and list of available devices with their actions (on/off), including some additional information.</div>
<div style="text-align: justify;">
While is still beta, I won't add a link on the menu button yet, but you can navigate to z-index.html:</div>
<span style="font-family: "courier new" , "courier" , monospace;">http://<host>:<port>/www/z-index.html</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNErSLEDsrgq4Wh9qTeivhKJZpKgflUbMhinU2Gn6Q-ztgzK0RKc_eL6flUEOfu-LSFiNYcCryJv-sKk40tmCyWHxBRhAGBqEuMR4ZcPrxo9UlqWlSU7LMzRDkk3Gv6cqKkxJXs2OrR7w/s1600/2015-05-18-134549_1920x1080_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNErSLEDsrgq4Wh9qTeivhKJZpKgflUbMhinU2Gn6Q-ztgzK0RKc_eL6flUEOfu-LSFiNYcCryJv-sKk40tmCyWHxBRhAGBqEuMR4ZcPrxo9UlqWlSU7LMzRDkk3Gv6cqKkxJXs2OrR7w/s400/2015-05-18-134549_1920x1080_scrot.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Please make sure you have the latest version [0.2.8.299]:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcaWBVpEI2iqJQp83Ps-22peWHXdop9o3lYXww2da3xkdrvasEZts205IYsdDTcu0xGS1wKEH67gyr2cspCNph38qeVUhtJZsKsap8trnC-5xUfZC1TeluMnaG7n_u0eH9u_ebjXpXemI/s1600/ver299.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcaWBVpEI2iqJQp83Ps-22peWHXdop9o3lYXww2da3xkdrvasEZts205IYsdDTcu0xGS1wKEH67gyr2cspCNph38qeVUhtJZsKsap8trnC-5xUfZC1TeluMnaG7n_u0eH9u_ebjXpXemI/s400/ver299.png" width="400" /></a></div>
<br />
(<span style="color: red;">*</span>) Let's consider this post as the first part of a Z-Wave session. In future articles I will present ways, on how to use a specific function, on a custom Instruction Set, and how these can interact and expand functionality and logic by other mechanisms, including evaluations and schedules.</div>
<br />
<center>
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/RFl26bZnV1I" width="480"></iframe>
</center>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com1tag:blogger.com,1999:blog-2252973662798952348.post-68397653287238735422015-04-20T16:04:00.001+03:002015-06-19T16:39:44.791+03:00Lemaker challenge<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
One more honor for Jubito!<br />
Jubito passed the <a href="http://www.lemaker.org/thread-13317-1-1.html" target="_blank">maker challenge for a Banana Pro</a> by presenting <a href="http://jubitoblog.blogspot.gr/2015/02/jubitos-for-banana-pi.html" target="_blank">JubitOS</a>.<br />
<br />
Winning items:<br />
<ul style="text-align: left;">
<li>Banana Pro</li>
<li>7 inch Banana Pro Touch LCD With HDMI VGA AV Screen Touch Display Module For Banana Pro 1024x600</li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Dqp0cceK2zwDtPfm1yV4jBE6M8cNyl3-JWWzaPANApJe9M4n1Q_7VJc3yCIFEzKTyVGl8p-oB_kPrIN7oktdDz5nUObAxXpX5-DkAHAGumurXtXtoJKIQclmA2Fwrv-XS9AVzyXk-O0/s1600/banana-pro-application.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Dqp0cceK2zwDtPfm1yV4jBE6M8cNyl3-JWWzaPANApJe9M4n1Q_7VJc3yCIFEzKTyVGl8p-oB_kPrIN7oktdDz5nUObAxXpX5-DkAHAGumurXtXtoJKIQclmA2Fwrv-XS9AVzyXk-O0/s1600/banana-pro-application.png" width="400" /></a></div>
<br />
Thanks once more for your support.<br />
<br />
<span style="color: red;"><b><u>Update</u></b></span>: Items received. Thank you <a href="http://www.lemaker.org/" target="_blank">LeMaker</a>!<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR8bp3ZETSYYy_pW1Yw5o2Do5Q3wUGFnpT3lOyQPKbQi5nbqchshEWRzjGPzc6Liqd3WhOoT0nH7KW9FN_RoH7zQRuLf1fTKXvBMIrvduY50BSSgsi_qUJfSQRNWI_AjbWC2TGPDaN55g/s1600/IMG_20150504_184600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR8bp3ZETSYYy_pW1Yw5o2Do5Q3wUGFnpT3lOyQPKbQi5nbqchshEWRzjGPzc6Liqd3WhOoT0nH7KW9FN_RoH7zQRuLf1fTKXvBMIrvduY50BSSgsi_qUJfSQRNWI_AjbWC2TGPDaN55g/s400/IMG_20150504_184600.jpg" width="400" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com5tag:blogger.com,1999:blog-2252973662798952348.post-59217007597977034582015-03-18T17:59:00.001+02:002017-05-01T13:26:33.401+03:00Wi-Fi access control using ping methodology<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhza8E4e5StMVrdG_kk_fJnIdW_fn5iI-SdJKEqeP5-UtzlkFgUsPCg6sFBLUIzGsRJGbRamsiDHzUxOVfgxVRxBgiVBnkW-eShWj4J6EkcBUBF-mX4g1lwEShyphenhyphenXTQbGpG_SHisHMU4CSA/s1600/cancelrfid.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhza8E4e5StMVrdG_kk_fJnIdW_fn5iI-SdJKEqeP5-UtzlkFgUsPCg6sFBLUIzGsRJGbRamsiDHzUxOVfgxVRxBgiVBnkW-eShWj4J6EkcBUBF-mX4g1lwEShyphenhyphenXTQbGpG_SHisHMU4CSA/s1600/cancelrfid.png" /></a></div>
The other day I was returning home with both my hands occupied. While I was standing at the door I realized that I spent some time before I passed the card to the reader, unlocked and got inside. It was frustrating and clear that the <a href="http://jubitoblog.blogspot.gr/2014/07/arduino-rfid-access-control.html" target="_blank">RFID access control</a> wasn't an efficient way for that task and had to be replaced with a smarter solution.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I started researching the internet for a long range RFID system that would allow me to check-in till I unlocked the door and therefore "sense" my presence and perform predefined actions like, change my status to present, <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-radio-remote-control-rf.html" target="_blank">turn on assistive light</a>, bypass <a href="http://jubitoblog.blogspot.gr/2013/02/dvr-system-using-ip-camera.html" target="_blank">security camera</a>, enable some schedules, etc. Unfortunately I realized that such systems are a little bit expensive for my taste.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Then I started to imagine a different radio approach. In the past I was using methods like <a href="http://jubitoblog.blogspot.gr/2014/07/jubito-android-client-app-v11-nightly.html" target="_blank">geo location</a> or bluetooth discovery but that also had drawbacks, i.e. GPS and data should be enabled, Jubito app as well, range limitations and so on. The obvious way was to use the WiFi network. The acknowledgement would be made with a continuous scan of my cellphone's IP address combined with the evaluation of my status. The ping method I had suppressed and undocumented took its place at last.</div>
<br />
So let us continue and explore how it is done:<br />
<br />
<u>Step 1</u>: Create a pinger. Go to <i>Control Panel->Add New Launcher</i> and type:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">judo ping [host]</span>, in my case <span style="font-family: "courier new" , "courier" , monospace;">judo ping 192.168.1.95</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaQpYbfc6U2OLfBRsyTVUxaFur0wjWaqor9y3n_HURAyh_3UJLLgTrRVl1JRWw5ICKfJbGPwE4RciLdCz2-d8phwqDwX7GJ4hMtCPOK-wJBrluNMPrwUHAbR2zV-7nKMrknvxfwiaZPFg/s1600/Screenshot_2015-03-18-15-11-27.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaQpYbfc6U2OLfBRsyTVUxaFur0wjWaqor9y3n_HURAyh_3UJLLgTrRVl1JRWw5ICKfJbGPwE4RciLdCz2-d8phwqDwX7GJ4hMtCPOK-wJBrluNMPrwUHAbR2zV-7nKMrknvxfwiaZPFg/s400/Screenshot_2015-03-18-15-11-27.png" width="395" /></a></div>
<br />
<div style="text-align: justify;">
<span style="color: red;"><u><b>Note</b></u></span>: (Fixed) <i><strike>If ping always returns one state, it's because, in order to to send ICMP packets from linux you need root privileges. So if you determine that kind of behavior, try run jubito-server as root</strike>.</i></div>
<br />
You can do an optional debugging from the terminal.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWrEww1Wd-tp7_V8OQ1s_0bCycwh-UJ0hjd4h-9Uw524hVp2dKLAB0Cioj9Qxd3eQAnrksQoFZ2iH2b8KZmO6C1bPqe1KpJKKrpYiSHusf4_CQhhiAve5yFZN6SxzwVXFbXIONjCyVZR0/s1600/Screenshot_2015-03-18-15-22-34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWrEww1Wd-tp7_V8OQ1s_0bCycwh-UJ0hjd4h-9Uw524hVp2dKLAB0Cioj9Qxd3eQAnrksQoFZ2iH2b8KZmO6C1bPqe1KpJKKrpYiSHusf4_CQhhiAve5yFZN6SxzwVXFbXIONjCyVZR0/s640/Screenshot_2015-03-18-15-22-34.png" width="372" /></a></div>
<br />
<div style="text-align: justify;">
<u>Step 2</u>: Evaluation of ping result and user status. <i>Control Panel->Add New Evaluator</i> and type:</div>
<br />
<code>{ evalBool("*pinger"=="True" && "%whereami%"=="absent"); check_me_in ; ; } { evalBool("*pinger"=="False" && "%whereami%"=="present"); check_me_out ; ; }</code><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC11qZW5zbL7H0gxccZcdGxXb_dx4edz3FSrurGjHorCqUQluRojaiCUNFkAkKihJuXFxQXjbRS0EBE52-m8iHOcTIWxGb2hJGKRkIk8QERM-_RESv-Yxd6X8ml3pO6CO59cblltwl0ME/s1600/Screenshot_2015-03-18-15-13-57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC11qZW5zbL7H0gxccZcdGxXb_dx4edz3FSrurGjHorCqUQluRojaiCUNFkAkKihJuXFxQXjbRS0EBE52-m8iHOcTIWxGb2hJGKRkIk8QERM-_RESv-Yxd6X8ml3pO6CO59cblltwl0ME/s640/Screenshot_2015-03-18-15-13-57.png" width="372" /></a></div>
<br />
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">check_me_in</span>, <span style="font-family: "courier new" , "courier" , monospace;">check_me_out</span> Instruction Sets explained <a href="http://jubitoblog.blogspot.gr/2014/07/arduino-rfid-access-control.html" target="_blank">here</a>.</div>
<div style="text-align: justify;">
Find out more on <a href="http://jubitoblog.blogspot.gr/2013/02/evaluation.html" target="_blank">evaluation</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<u>Step 3</u>: Create a schedule that calls the evaluation every two and a half seconds (2500ms). Use with caution and experiment to find what it suits you. If you experience any problems with that time span, try to increase it.<br />
Once again <i>Control Panel->Scheduler->Add New</i>.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBIn4qvJQlBwQjUbbt9sgBK1AOJmSC2rc5IXEhxOcoa7c4dlCApO-sSXCKzQDdqbk3QxysPrTGPOGXenKQVjL5ADcTCeGI2Fe8wiV9E-zZ4-vdFdEsbYFjENvYYx-9hRI-3XRGFfKOzhQ/s1600/Screenshot_2015-03-23-11-06-23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBIn4qvJQlBwQjUbbt9sgBK1AOJmSC2rc5IXEhxOcoa7c4dlCApO-sSXCKzQDdqbk3QxysPrTGPOGXenKQVjL5ADcTCeGI2Fe8wiV9E-zZ4-vdFdEsbYFjENvYYx-9hRI-3XRGFfKOzhQ/s640/Screenshot_2015-03-23-11-06-23.png" width="372" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div style="text-align: justify;">
That was it. Disable/Enable your WiFi to test.</div>
<div style="text-align: justify;">
So far it's the most convenient way of all I've tried before. Sometimes the simplest and most effective approach is what is required.<br />
<br />
<span style="color: red;"><u><b>Update</b></u></span>: While I spent some time with the ping check-in/check-out methodology, I realize that it's not a trustworthy solution to ping phones, due to its limitations, like, battery saving, etc, unless you set WiFi sleep policy to "Never". On the other hand, devices like routers or computers, which their always connected, behaves well.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Bottom line, use cases may vary. You can perform individual tasks based on specific IP's. For example, check if a router responds to ping, else send an email alert and <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-radio-remote-control-rf.html" target="_blank">turn off and on its power</a> to reset.</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-80082428901554814792015-03-16T17:43:00.000+02:002017-05-01T13:27:06.268+03:00More effective dashboard with real time data<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
In order to achieve a fully dynamic front end, I started working on a widget factory. The combination of two different Instruction Sets will give us the ability to view additional real time info within a dashboard item in a bubble form.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I will proceed by doing a simple example using framework <a href="https://github.com/jambelnet/janet-framework/wiki/Built-in-functions" target="_blank">functions</a> (<span style="font-family: "courier new" , "courier" , monospace;">%greader%</span> or <span style="font-family: "courier new" , "courier" , monospace;">%gmailreader%</span> and <span style="font-family: "courier new" , "courier" , monospace;">%gcount%</span> or <span style="font-family: "courier new" , "courier" , monospace;">%gmailcount%</span>). The first will return the headers of the message(s) and the other one will be the counter.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Go to <i>Control Panel->Add New Launcher</i> and follow the screenshots...</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYCdJJZQhvH4PVRgHznKpkuKtHzEQHQm2lmNc2QakqKlGdODlOfFVtWBJr9WN4Za7XSoJbRXyeKQZVV041K_4WyK7pa8i4-Ump2T_dXm-2GPLS25C2iD312GHHOAQJgIU3V4ARN9_xmEU/s1600/Screenshot_2015-03-16-12-46-51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYCdJJZQhvH4PVRgHznKpkuKtHzEQHQm2lmNc2QakqKlGdODlOfFVtWBJr9WN4Za7XSoJbRXyeKQZVV041K_4WyK7pa8i4-Ump2T_dXm-2GPLS25C2iD312GHHOAQJgIU3V4ARN9_xmEU/s400/Screenshot_2015-03-16-12-46-51.png" width="395" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDD6JkgoTm2SGvDW7Vf72NihSaCdg8KO_1fuupriq-pjThaxfawOmJWnTJ-Mm4ZYcnp0fSHBUORUum_y_dJT8GEt2MexpqAB_WXSXe_3aO_uaOPWQIkjIsVQ_2jw5NAurzHrHwFhm_TaI/s1600/Screenshot_2015-03-16-11-43-16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDD6JkgoTm2SGvDW7Vf72NihSaCdg8KO_1fuupriq-pjThaxfawOmJWnTJ-Mm4ZYcnp0fSHBUORUum_y_dJT8GEt2MexpqAB_WXSXe_3aO_uaOPWQIkjIsVQ_2jw5NAurzHrHwFhm_TaI/s400/Screenshot_2015-03-16-11-43-16.png" width="395" /></a></div>
<br />
<div style="text-align: justify;">
Now we'll create a new dashboard item that includes both of the above.</div>
<div style="text-align: justify;">
Navigate to <i>Control Panel->Add New Instruction Set</i></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMhAj5A2kh6kKxxAy3xWzSOdjxke3eGOjO9d9leMtKehUFyA09IDXJ1NwAgjgJNvAdwxO29vB8SMztsePFIHifZ0zKbH9WmPvV3HgElJ6MMwtOlE3yYupjLgPfrCxh9FCGFUMT65UHHJk/s1600/Screenshot_2015-03-16-11-42-48.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMhAj5A2kh6kKxxAy3xWzSOdjxke3eGOjO9d9leMtKehUFyA09IDXJ1NwAgjgJNvAdwxO29vB8SMztsePFIHifZ0zKbH9WmPvV3HgElJ6MMwtOlE3yYupjLgPfrCxh9FCGFUMT65UHHJk/s640/Screenshot_2015-03-16-11-42-48.png" width="372" /></a></div>
<br />
<div style="text-align: justify;">
Scroll down to <i>Add to Dashboard</i> and fill Category, Header, Thumbnail (optional) and Reference field.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig8uEhjnYXlvgK6xe33AWZzBk_hGOnCfHoDY0i6uYLwXnp1hLCZr5xMcDGIMAgzALK9IXB6mmMQhH6MD5APPqnYJmKqVrdXKsDxMFveVLTsyMlCBkkY_o2UnaNvY3S3iFdeD6HG5za9bc/s1600/Screenshot_2015-03-16-11-44-17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig8uEhjnYXlvgK6xe33AWZzBk_hGOnCfHoDY0i6uYLwXnp1hLCZr5xMcDGIMAgzALK9IXB6mmMQhH6MD5APPqnYJmKqVrdXKsDxMFveVLTsyMlCBkkY_o2UnaNvY3S3iFdeD6HG5za9bc/s640/Screenshot_2015-03-16-11-44-17.png" width="372" /></a></div>
<br />
<div style="text-align: justify;">
Save it and return to the Dashboard. You should be able to see something like that...</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhO3k4bfgLl5K5MK-JF10TiQCrKjo9Xt4Y2hUt7ADalr3mXj8siSQ5Ku66EMTXqV5fdzaVwqtX3oY8vVKRaMsSNNs6jGKfzn_M4yftV6mXKcnY7vYRxIXSdZTCvVUX95Klpn_WQx5MiHQ/s1600/Screenshot_2015-03-18-11-17-21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhO3k4bfgLl5K5MK-JF10TiQCrKjo9Xt4Y2hUt7ADalr3mXj8siSQ5Ku66EMTXqV5fdzaVwqtX3oY8vVKRaMsSNNs6jGKfzn_M4yftV6mXKcnY7vYRxIXSdZTCvVUX95Klpn_WQx5MiHQ/s640/Screenshot_2015-03-18-11-17-21.png" width="360" /></a></div>
<br />
<div style="text-align: justify;">
When you click Gmail Check you will get the response of gmail launcher.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQZbzzyL7XB5KYvLgiDZQ-gn3RHVb8-6Ad8aeSo_bzn5RN99VHv6q179lMj_9PaqHT9m3rRbzotdMbuMQxoO_UsfzKfqN4OymCKk0HDWbBLe14vCnb8x1famNGqvwKLr5szAa8XdNoo6Y/s1600/Screenshot_2015-03-16-15-21-42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQZbzzyL7XB5KYvLgiDZQ-gn3RHVb8-6Ad8aeSo_bzn5RN99VHv6q179lMj_9PaqHT9m3rRbzotdMbuMQxoO_UsfzKfqN4OymCKk0HDWbBLe14vCnb8x1famNGqvwKLr5szAa8XdNoo6Y/s640/Screenshot_2015-03-16-15-21-42.png" width="483" /></a></div>
</div>
<br />
<div style="text-align: justify;">
For older Instruction Sets, edit the <span style="font-family: "courier new" , "courier" , monospace;">AppConfig.xml</span> and add a reference attribute (ref) that points to the Instruction Set ID you want to call. For this example, gmailwidget.
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2YIAlb2UJKl4h_gb4uuPWDywMigACs8HnO0JsogMHMLSrggUJHkoeKtBsTjfG7TtHToIZwxlFbyXchKYAdSedbZ3vQI5O9Cft1tqYdnTHbW0SgVzqk1Y07BJkHKI0jg36AOrsxljzrcA/s1600/gmailxml.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="31" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2YIAlb2UJKl4h_gb4uuPWDywMigACs8HnO0JsogMHMLSrggUJHkoeKtBsTjfG7TtHToIZwxlFbyXchKYAdSedbZ3vQI5O9Cft1tqYdnTHbW0SgVzqk1Y07BJkHKI0jg36AOrsxljzrcA/s1600/gmailxml.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
You may notice temperature and humidity values as well in the screenshots. It has the same logic but first you should take a look at <a href="http://jubitoblog.blogspot.gr/search/label/arduino" target="_blank">arduino tutorials</a>.
</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-76543910438590522332015-03-05T11:37:00.002+02:002017-05-01T13:27:34.657+03:00Extracting data from JSON and XML<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Web API connector is released and supports both JSON and XML response parsing. This feature opens up the possibility of connecting to a huge range of potential APIs and therefore reducing the cost for additional equipment. For example, if you want to create some tasks based on weather conditions, you can achieve that without a weather station, but by gathering information from the cloud.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In addition to this <a href="http://jubitoblog.blogspot.gr/2014/11/web-of-things-and-whats-new-on-upcoming.html" target="_blank">post</a> let's do some JSON examples from <a href="https://developer.yahoo.com/weather/" target="_blank">Yahoo Weather API</a>. I will also use the <a href="http://codebeautify.org/online-json-editor" target="_blank">Code Beautify</a> online code editor for a good human-readable representation of the response.</div>
<br />
<div style="text-align: justify;">
<u>Step 1</u>: Copy and Paste the endpoint URI from yahoo developer website and paste it to the editor.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglZ8rxAAvxKgeOzsZf2-cP-leZts4aVE-bReP2wKcGIOLzmBZm-RmmbjHlAw7xloKBsq6G_EnxZ1OFuS3yVxqf_MYgDjbkhQvHhpSkRVAXVAdIuxla93eyhobugQTqKF_Nuk8w_C1Ux0Y/s1600/yahoo-copy-endpoint.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglZ8rxAAvxKgeOzsZf2-cP-leZts4aVE-bReP2wKcGIOLzmBZm-RmmbjHlAw7xloKBsq6G_EnxZ1OFuS3yVxqf_MYgDjbkhQvHhpSkRVAXVAdIuxla93eyhobugQTqKF_Nuk8w_C1Ux0Y/s1600/yahoo-copy-endpoint.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV4QX6dzPxKLVN3LkgmWSq7i38h8TSMWaHMmvh8niOnDVtFosfxVzREQDSft2deIQFrn7Kcoc6F2P0HPmS0Npk4Rf98uvZ2ORjG1y41FLUvb4gqkUVkpQnC9UDM3fzptKb_HQJJPxjQjU/s1600/editor2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV4QX6dzPxKLVN3LkgmWSq7i38h8TSMWaHMmvh8niOnDVtFosfxVzREQDSft2deIQFrn7Kcoc6F2P0HPmS0Npk4Rf98uvZ2ORjG1y41FLUvb4gqkUVkpQnC9UDM3fzptKb_HQJJPxjQjU/s1600/editor2.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
<u>Step 2</u>: Go to <i>Control Panel->Instructions->Add New Web Service</i>. Address the node you want to retrieve and fill the form items (Name, Endpoint, Node Path). Notice that if the response have a tree structure, you should point the position index of your target in Node Path as seen below. By default will get the first element [index: 0].</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimqASJ7LsCfPRuujkhDC4RaH2Uc3te9_ppU_skYKfB7_HKeivtv9zQiaWe4WRwguBw5XlcmT48YHMbxqCJXZkZ-xsZ0xvbc5tLNMwiAHfLtL-7G8cgqSKpNcVScUs3L1hiw3q1c6ornm8/s1600/json.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimqASJ7LsCfPRuujkhDC4RaH2Uc3te9_ppU_skYKfB7_HKeivtv9zQiaWe4WRwguBw5XlcmT48YHMbxqCJXZkZ-xsZ0xvbc5tLNMwiAHfLtL-7G8cgqSKpNcVScUs3L1hiw3q1c6ornm8/s1600/json.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
By default some editors starts the tree viewer with root/array and then with the absolute tree structure. So, at the "Node Path" field of Jubito, ignore the above of starting path.</div>
<br />
<div style="text-align: justify;">
<u>Step 3</u>: Go to terminal tab and debug the new Instruction Set. If you get the value then everything went well.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIRrLsXfu8MRsJ9789KXvwSwL-_1ZVmmoRHq7V0q1ytplz62V1NKbw7XhQAxerituSCNWWaLWDI7v59f7EHjWkKZLRWJetZKU4Q84lSXqrWydmlQxKFK-46wW1bvrjCeD0P_HRuISZth4/s1600/json1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIRrLsXfu8MRsJ9789KXvwSwL-_1ZVmmoRHq7V0q1ytplz62V1NKbw7XhQAxerituSCNWWaLWDI7v59f7EHjWkKZLRWJetZKU4Q84lSXqrWydmlQxKFK-46wW1bvrjCeD0P_HRuISZth4/s1600/json1.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
<u>Step 4</u>: Now, let's make an interface and a scenario. Again from <i>Control Panel->Instructions->Add New Instruction Set</i>. Unfold the <i>Add Action(s)</i> and <i>Add to Dashboard</i> and follow the screenshot.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7V8rTYJCslJty4uN6eYBmfj_Bs0mk46GAQD_0v86k2_A9u7CH0Y4t77mhZ_lXMswcDs8UGYqrJFwbf7lXDcdRVBvgcpJWzEbY1mryAi1852P9AkLZMe8lscgSMAy4q3LtaNlOF3gQoyE/s1600/calltojson.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7V8rTYJCslJty4uN6eYBmfj_Bs0mk46GAQD_0v86k2_A9u7CH0Y4t77mhZ_lXMswcDs8UGYqrJFwbf7lXDcdRVBvgcpJWzEbY1mryAi1852P9AkLZMe8lscgSMAy4q3LtaNlOF3gQoyE/s400/calltojson.png" width="312" /></a></div>
<br />
Save and return. Now you're able to make a call from the Dashboard screen.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXRyLhbwud28tT-WRHOIk8Y4d39rQwy5ezSwXGv_OAkZGA3TKzxzbCE_mfQoWgoGkEO7BJNGXkXrFEIEiZ-Qfg_HByWPB1Mqonhd49qaHIa6kZhs2TRBvRMHGsbeJotn1DrXvdVCc_vHk/s1600/calltoservice.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXRyLhbwud28tT-WRHOIk8Y4d39rQwy5ezSwXGv_OAkZGA3TKzxzbCE_mfQoWgoGkEO7BJNGXkXrFEIEiZ-Qfg_HByWPB1Mqonhd49qaHIa6kZhs2TRBvRMHGsbeJotn1DrXvdVCc_vHk/s400/calltoservice.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
<u>Step 5</u>: Some other things you can do, is to make a schedule to evaluate the weather and send an email notification when a specified weather acknowledgement applies. Let's take a look to the Evaluator. Once again <i>Control Panel->Instructions->Add New Evaluator</i>. Select the <i>yahoo-test</i> Instruction Set and add some additional text if you wish. As I always remind, the asterisk in front of the Instruction Set is the reflector of a value.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYg3ffBvXcEh-venFq1m05BCayT84Fn1sMez4sHkcr-qW-RXWGeWUJGXz2coHAdtYxt09mMj_J6GABmjMrOYDq_wx5xW6YL2dPiPV1M7pZj0OIei77nlIK7sgbvh0WOplUzYRRIAkDQ7M/s1600/sendmailonsnow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYg3ffBvXcEh-venFq1m05BCayT84Fn1sMez4sHkcr-qW-RXWGeWUJGXz2coHAdtYxt09mMj_J6GABmjMrOYDq_wx5xW6YL2dPiPV1M7pZj0OIei77nlIK7sgbvh0WOplUzYRRIAkDQ7M/s1600/sendmailonsnow.png" width="392" /></a></div>
<br />
<div style="text-align: justify;">
'<i>Then</i>' condition corresponds to another Instruction Set that is responsible to send mail. You can search this blog with '<i>send mail</i>' keyword to see how to make one.</div>
<br />
<div style="text-align: justify;">
<u>Step 6</u>: Finally there all set to create the Schedule. Go to <i>Control Panel->Scheduler->Add New</i>. Type a name, repeat, interval at your choice (3600000ms is one hour) and select the Evaluator's Instruction Set.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMeV92X2uxr23M2t0XgA9RdgSk7GKUGl6Ay7rgDykif4RDfB92WktJf1ofXwyIFQVTjf-JZ2Zzze5QWUVBRi9SxDzcLHAVDjt_gAPlSXrP4_oE4ZUyZKcaQlzbKTR6gknE-1L4vjaOuPY/s1600/snoschedule.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMeV92X2uxr23M2t0XgA9RdgSk7GKUGl6Ay7rgDykif4RDfB92WktJf1ofXwyIFQVTjf-JZ2Zzze5QWUVBRi9SxDzcLHAVDjt_gAPlSXrP4_oE4ZUyZKcaQlzbKTR6gknE-1L4vjaOuPY/s1600/snoschedule.png" width="327" /></a></div>
<br />
This schedule will run every hour and evaluate the condition.<br />
<br />
<div style="text-align: justify;">
All of the above steps are described as a proof of concept. The use-cases may vary depending your needs.</div>
<br />
<div style="text-align: justify;">
The same logic applies also to XML. You can be advised by this <a href="http://jubitoblog.blogspot.gr/2014/11/web-of-things-and-whats-new-on-upcoming.html" target="_blank">post</a>. If you find any difficulties or discover a bug, please do not hesitate to drop me a <a href="http://www.jubito.org/contact.html" target="_blank">message</a>.<br />
<br />
Changes applied to jaNET Framework 0.2.6.555+. To check version go to terminal tab and type <span style="font-family: "courier new" , "courier" , monospace;">%about%</span>.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsVtTfr24SAkb3Rx-0GSArCSw2fXT_HASuLiyRiEwu1vanNGB7UFOWO53k1tbwRKGsBeIHqH4o79lBfvCw68Flwygq0lg9lu7sL8qZNvo_obVVXaqyDBfwsIA1XIH48MKKVELtMTcVaUY/s1600/about.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsVtTfr24SAkb3Rx-0GSArCSw2fXT_HASuLiyRiEwu1vanNGB7UFOWO53k1tbwRKGsBeIHqH4o79lBfvCw68Flwygq0lg9lu7sL8qZNvo_obVVXaqyDBfwsIA1XIH48MKKVELtMTcVaUY/s400/about.png" width="400" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-36957826460143623582015-02-09T21:22:00.000+02:002017-05-01T13:28:38.041+03:00JubitOS for Banana Pi<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
JubitOS (Jubito Operating System) is a Lubuntu based distribution for <a href="http://forum.lemaker.org/article-42-1.html" target="_blank">Banana Pi</a> and is available for <a href="https://drive.google.com/file/d/0B9my9vuzyH5XdzdLQmZ3T3dlNTA/view?usp=sharing" target="_blank"><b>download</b></a>. It is an out of the box compilation and it contains all the ingredients for a home automation server/hub. A native system that comes with all the dependencies required, plus some extra features that could be useful, like <a href="http://www.cstr.ed.ac.uk/projects/festival/" target="_blank">festival speech synthesis system</a> and cmu_us_slt_arctic female voice package. The image is approximately 3.7GB, so, a 4GB SD card and higher is recommended. </div>
<br />
<u><b>Release Notes</b></u><br />
JubitOS for Banana Pi (Linux kernel 3.4.103; 2015-02-09)<br />
Default username: jubito (<span style="color: red;"><u>Caution</u></span>: The user have administrative privileges)<br />
Default password: jubitopi<br />
<ul style="text-align: left;">
<li>jubito </li>
<li>mono-complete</li>
<li>festival</li>
<li>cmu_us_slt_arctic-0.95-release </li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNeEK9cs2Em_LTr7mj-d8_glBA_K8iJbEUHQ8tw8RXeiEgOi7boCmLrxvFHSOK7BrSw7eSsjg58KeaWkoN5uXEluCIjJZzJry7WhPHQZyvh4L4rAN2qsYftTMa6Mr2QPoVEyhAMAEoWFo/s400/powered-jubitos.png" width="400" /></div>
<br />
<div style="text-align: justify;">
Check this <a href="http://jubitoblog.blogspot.gr/2015/02/setting-up-banana-pilubuntu-running-and.html" target="_blank">post</a> for installation and extra tweaks.<br />
To update Jubito to the latest version, <a href="http://sourceforge.net/projects/jubito/files/linux/bin/jubito-server.tar.gz/download" target="_blank">download</a> and replace extracted files to <span style="font-family: "courier new" , "courier" , monospace;">/usr/share/jubito</span>. You can keep your configuration files AppConfig.xml, .htaccess, .scheduler, etc.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3csPCzkcvkH07exgU_lyre6epWz87Mbez8d8LHV-eb5fLAAOa2I_Gs94cdOrJNkN5Ey-bZv6e9F4asWhAUZ1-Uvkv21qA4oWmFuWuaAMxdGCKdtWYAYhzWCdd3W9ho_i2kAATU2_roJs/s1600/2015-02-10-010713_1280x1024_scrot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3csPCzkcvkH07exgU_lyre6epWz87Mbez8d8LHV-eb5fLAAOa2I_Gs94cdOrJNkN5Ey-bZv6e9F4asWhAUZ1-Uvkv21qA4oWmFuWuaAMxdGCKdtWYAYhzWCdd3W9ho_i2kAATU2_roJs/s1600/2015-02-10-010713_1280x1024_scrot.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/QOyq_PjL4fA/0.jpg" frameborder="0" height="315" src="https://www.youtube.com/embed/QOyq_PjL4fA?feature=player_embedded" width="420"></iframe></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-91552621285965552132015-02-02T11:08:00.004+02:002017-05-01T12:36:15.249+03:00Setting up Banana Pi/Lubuntu, running and tweaking<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKm2mn8dQUIAXFu9t7_sYmBeABiH-Epq4Csx10fx_nt5JBy8c3eFkFyBhw3ZgNTyNRG_0MOh5j-1QZN2r-qRAbJvCa-zR75MyvbQ6IL-kDBvR6xqV_1Skefo4dN_o8Ez7k8ZW5-QN0wrI/s1600/LeMaker+logo_small.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="60" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKm2mn8dQUIAXFu9t7_sYmBeABiH-Epq4Csx10fx_nt5JBy8c3eFkFyBhw3ZgNTyNRG_0MOh5j-1QZN2r-qRAbJvCa-zR75MyvbQ6IL-kDBvR6xqV_1Skefo4dN_o8Ez7k8ZW5-QN0wrI/s1600/LeMaker+logo_small.png" width="200" /></a>In this post I will describe some things I did to the Banana Pi/Lubuntu in order to match my requirements for a smooth operational Jubito server, as well, fixes on some issues I've been faced.</div>
<div style="text-align: justify;">
<br />
I'll bypass the <a href="http://forum.lemaker.org/article-31-1.html" target="_blank">installation process</a> on SD card because it's pretty easy.</div>
<br />
<span style="color: #134f5c;"><u><b>Step 1</b></u></span>:<br />
<div style="text-align: justify;">
Resize and expand the partition.<br />
I'm using a 16GB SD card so when I flash the image, which is approximately 3.7GB I end up with an unmanaged partition. To make it available I did the steps that follow...</div>
<div style="text-align: justify;">
<i>(<span style="color: red;">*</span>) <span style="font-size: x-small;">Do this only right after flashing the image on the SD-Card, so if anything goes wrong you do not lose any data.</span></i></div>
<br />
<code>sudo fdisk /dev/mmcblk0</code>
<br />
<ul style="text-align: left;">
<li>Press ‘p’ to print the partition table</li>
<li>Press 'd' to delete a partition</li>
<li>Enter '2' to choose the second partition</li>
<li>Press 'n' to create a new partition</li>
<li>Enter 'p' to select primary as partition type</li>
<li>Partition number: enter to accept 2 as default partition number</li>
<li>First sector: enter to accept default</li>
<li>Last sector: enter to accept default</li>
<li>Press 'w' to write the new partition table</li>
</ul>
<div style="text-align: left;">
Reboot to force the kernel to recognize the new partition table.<br />
<br />
<code>sudo reboot</code><br />
<br />
<div style="text-align: justify;">
After the system has come back up you still have to resize the partition.</div>
<br />
<code>sudo resize2fs /dev/mmcblk0p2</code><br />
<br />
[ Source: <a href="http://gleenders.blogspot.gr/2014/08/banana-pi-resizing-sd-card-root.html" target="_blank">http://gleenders.blogspot.gr/2014/08/banana-pi-resizing-sd-card-root.html</a> ]<br />
<br />
<span style="color: #134f5c;"><u><b>Step 2</b></u></span>:<br />
<div style="text-align: justify;">
Use <code>sudo apt-get update && sudo apt-get upgrade</code> or <i>Menu->System Tools->Software Updater</i> to download the latest patches and updates that fix issues, like Firefox crash. </div>
<br />
<span style="color: #134f5c;"><u><b>Step 3</b></u></span>:<br />
Change the default username (<span style="color: blue;"><i>I</i></span>), password (<span style="color: blue;"><i>II</i></span>), hostname (<span style="color: blue;"><i>III</i></span>) [ Source: <a href="http://banoffeepiserver.com/" target="_blank">http://banoffeepiserver.com</a> with minor changes ]<br />
<div style="text-align: justify;">
<br />
(<span style="color: blue;"><i>I</i></span>) Many Linux images have a default username and password. The default username and password for the Raspbian image are 'pi' and 'bananapi' (in many of the Banana Pi Linux distributions, the default username is bananapi). It's best to change these login details so that no one else can log into your Pi. <br />
<br />
You need to configure your Pi to boot to a command line - the following procedure won't work if you're logged into a desktop session. Once you've booted to a command line, you need to change the shell session to the root user. This is necessary because you can't modify a user account while you're logged in as that user.</div>
<br />
<code>exec sudo -s</code><br />
<br />
<div style="text-align: justify;">
Now all commands are executed as the root user. Change to a different directory than /home/bananapi:</div>
<br />
<code>cd /</code><br />
<br />
<div style="text-align: justify;">
Use the usermod command to change username of the default account.</div>
<br />
<code>usermod -l <newname> -d /home/<newname> -m <oldname></code><br />
<br />
<div style="text-align: justify;">
When you reboot, you'll need to log in using the new username. Optionally you can change the group name.</div>
<br />
<code>groupmod -n <newgroup> <oldgroup></code><br />
<br />
<div style="text-align: justify;">
Instructions above may damage or cause dis-behaviors. For your convenience, I suggest you to make same actions or create a new user from a controlled environment. That can be easily managed from User Settings under <i>Menu->System Tools->Users and Groups</i>.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFHmI-nmNqH9bSnJH7q10WUFlqUZthQQDYjLRpmIxoDktz2JGNvkyKjE8K3DH88E33n635oKmyvxrmt_hLGMaJWNPu_jtTt6AbpSFeKH8b0m5iP5iMYHDuVqln8iEj68UWTsjoLp3odhI/s1600/usersettings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFHmI-nmNqH9bSnJH7q10WUFlqUZthQQDYjLRpmIxoDktz2JGNvkyKjE8K3DH88E33n635oKmyvxrmt_hLGMaJWNPu_jtTt6AbpSFeKH8b0m5iP5iMYHDuVqln8iEj68UWTsjoLp3odhI/s1600/usersettings.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
(<span style="color: blue;"><i>II</i></span>) One of the most important things to change is the password. Using the
default password is a monumental security risk. The default password
for most Banana Pi Linux distributions is simply bananapi. Change it
using the passwd command:</div>
<br />
<code>passwd<br />
Changing password for john.<br />
(current) UNIX password:<br />
Enter new UNIX password:<br />
Retype new UNIX password:</code><br />
<br />
<div style="text-align: justify;">
You will be prompted to enter your current password, followed by your new password twice.</div>
<br />
<div style="text-align: justify;">
(<span style="color: blue;"><i>III</i></span>) The hostname is the name of your server as it appears on your local
network. You may need to change the hostname if you have more than one
Banana Pi on your network. You'll need to change it in two places:</div>
<br />
<code>/etc/hostname<br />
/etc/hosts</code><br />
<br />
<div style="text-align: justify;">
The hostname is set in /etc/hostname. This file only contains the
hostname. Open it as root, and change the name. I've change it from
'lemaker' to 'jubito'.</div>
<div style="text-align: justify;">
In /etc/hosts, there's a list of IP addresses and their host names. This file contains a table mapping IP addresses to host names. Open it
with this command:</div>
<br />
<code>sudo leafpad /etc/hosts</code><br />
<br />
<div style="text-align: justify;">
Look for an entry with IP address 127.0.1.1 lemaker, and change the host name as required.<br />
Reboot your Banana Pi, and you should see that its host name has changed.</div>
<br />
<span style="color: #134f5c;"><u><b>Step 4</b></u></span>:<br />
<div style="text-align: justify;">
I've tried the Banana Pi in various monitors and I noticed that screen resolution doesn't fit automatically. I decided to set it up manually, by disabling the EDID auto-detection. To do so, edit the uEnv.txt file located in a small partition and mounted in Desktop and remove the EDID like this:</div>
<br />
<code>disp.screen0_output_mode=EDID:1280x720p50</code><br />
to <br />
<code>disp.screen0_output_mode=1280x1024p60</code> (example for a non wide 15" monitor)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8iN_45pAopLW44DgM-WXCylgis6p2rSjm1PEN1ZYyO7HBRuogGTwOMarzI889gc2iqaKEDd1heDCYpMfk-Nv0AiTsmacleLzUzrptPVM3gwFDvir6Y23K7Pv552Law_CJjmOAgAXclIA/s1600/uenv.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8iN_45pAopLW44DgM-WXCylgis6p2rSjm1PEN1ZYyO7HBRuogGTwOMarzI889gc2iqaKEDd1heDCYpMfk-Nv0AiTsmacleLzUzrptPVM3gwFDvir6Y23K7Pv552Law_CJjmOAgAXclIA/s1600/uenv.png" width="400" /></a></div>
<br />
<span style="color: #134f5c;"><u><b>Step 5</b></u></span>:<br />
<div style="text-align: justify;">
Auto login feature is necessary, if you're using Banana Pi as a standalone server with no peripherals (monitor, keyboard, mouse). When its rebooted or reset we need to restore Jubito and x11vnc server (described at Step 6) at startup without user interference. I tried the "<i>Don't ask for password on login</i>" from <i>System Tools->Users and Groups->User Settings</i> without luck. The workaround came with a lightdm hack.</div>
<br />
<div style="text-align: justify;">
Edit or create a file -if not exists <span style="font-family: "courier new" , "courier" , monospace;">/etc/lightdm/lightdm.conf</span> and add the following content:</div>
<br />
<code>[SeatDefaults]<br />autologin-user=<YOUR USER><br />autologin-user-timeout=0<br />user-session=ubuntu<br />greeter-session=unity-greeter</code><br />
<br />
<span style="color: #134f5c;"><u><b>Step 6</b></u></span>:<br />
<div style="text-align: justify;">
Remote desktop using the lightweight x11vnc server.</div>
<br />
<u>Install</u><br />
<code>sudo apt-get install x11vnc</code><br />
<u><br />Set password protection</u><br />
<code>mkdir ~/.x11vnc</code><br />
<code>x11vnc -storepasswd <YOUR PASSWORD> ~/.x11vnc/passwd</code><br />
<br />
<div style="text-align: justify;">
Create a shell script in any directory, for example in <span style="font-family: "courier new" , "courier" , monospace;">/home/<YOUR USER></span> and call it start-vnc.sh. This will used as x11vnc launcher.</div>
<div style="text-align: justify;">
Run leafpad <code>leafpad ~/start-vnc.sh </code>and paste the code below.</div>
<br />
<code>#!/bin/sh<br />x11vnc -forever -display :0 -rfbauth ~/.x11vnc/passwd</code><br />
<br />
Now save and close the file.<br />
<br />
<div style="text-align: justify;">
Finally add it to <i>LXSession configuration</i> under <i>Autostart</i> tab.</div>
<div style="text-align: justify;">
Go to <i>Menu->Preferences->Default applications for LXSession</i> and add the line below...</div>
<br />
<code>lxterminal -e bash /home/<YOUR USER>/start-vnc.sh</code><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXs89wKLqJGeadyyro7u-BjSMh0EyNkNeutJZB5pjxq7OXmrfd97sC-Yt0onnIj8_ggF5qHrIS_9dYvNd-p-pNK9hJafWbGZlF6l0ZM3u18EKgM87TTql3z-4rEoiXWwjlI8B8H0V7hGc/s1600/autostart.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXs89wKLqJGeadyyro7u-BjSMh0EyNkNeutJZB5pjxq7OXmrfd97sC-Yt0onnIj8_ggF5qHrIS_9dYvNd-p-pNK9hJafWbGZlF6l0ZM3u18EKgM87TTql3z-4rEoiXWwjlI8B8H0V7hGc/s1600/autostart.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
or do the same by edit the local <code>~/.config/lxsession/<profile>/autostart</code>
file.</div>
<div style="text-align: justify;">
At next reboot the x11vnc server will be run.</div>
<br />
<span style="color: #134f5c;"><u><b>Step 7</b></u></span>:<br />
<div style="text-align: justify;">
Since there’s currently no build of the Dropbox sync client that runs on ARM devices and at this time I don't want to spend my time seeking for a solution, I'm going to use the ownCloud alternative for syncing <a href="http://jubitoblog.blogspot.gr/2013/02/dvr-system-using-ip-camera.html" target="_blank">security breach videos</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Create an account to <a href="http://blaucloud.de/" target="_blank">blaucloud.de</a> and get the free plan that gives 2GB of space and then install the ownCloud client:</div>
<br />
<code>sudo apt-get install owncloud-client</code><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibs73rwTRPkqhL7awXHCOMebsCdJM8aPIRYtbzOEIPlg2928CEJZCGaR_poWTbVSwsk_g8NxvLLJKjbS0u_GRd3-StS6HE_Fvs9CIn1gNqRytCbspCi5Iz1N1CZxveRunor2sNgy9nFIk/s1600/ownclous-setup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibs73rwTRPkqhL7awXHCOMebsCdJM8aPIRYtbzOEIPlg2928CEJZCGaR_poWTbVSwsk_g8NxvLLJKjbS0u_GRd3-StS6HE_Fvs9CIn1gNqRytCbspCi5Iz1N1CZxveRunor2sNgy9nFIk/s1600/ownclous-setup.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Open the program and set your preferences. It's very easy.</div>
<div style="text-align: justify;">
<br />
I chose this service, because it does its job well. I get set up my own independent cloud-space instance on basis of ownCloud within a few minutes. They are also providing an <a href="https://play.google.com/store/apps/details?id=de.blaucloud.android" target="_blank">android app</a> that makes it more comprehensive solution, much like Dropbox.</div>
<div style="text-align: justify;">
<br />
<span style="color: #134f5c;"><u><b>Step 8</b></u></span>:<br />
With most Linux distributions special configuration for USB devices like Arduino are mostly needed, to workaround or fix common issues, when run as a normal non-root user.<br />
<br />
First thing is to apply udev rules. To proceed you need to know vendor ID and device ID. Open a terminal and type <span style="font-family: "courier new" , "courier" , monospace;">lsusb</span> to locate your Arduino and keep values in mind (i.e. 2341:0001).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji96JJR7XU0oRWqOGxCvCudP2RdR5xuGJZLycSQbGriL1mJLKmy2x6fsJ18iV4BF3nCvd5bJN0nnyDdvGjTMbpCfBv7iozs347D5czab-JHhpNiH1z_pTiUlR25nvkAQUFuw3-CyV6JHE/s1600/lsusb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji96JJR7XU0oRWqOGxCvCudP2RdR5xuGJZLycSQbGriL1mJLKmy2x6fsJ18iV4BF3nCvd5bJN0nnyDdvGjTMbpCfBv7iozs347D5czab-JHhpNiH1z_pTiUlR25nvkAQUFuw3-CyV6JHE/s400/lsusb.png" width="400" /></a></div>
<br />
Now create a file <span style="font-family: "courier new" , "courier" , monospace;">/etc/udev/rules.d/99-arduino.rules</span> and paste the lines below where idProduct and idVendor values from the previous step:<br />
<br />
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">SUBSYSTEMS=="usb", ATTRS{idProduct}=="2341", ATTRS{idVendor}=="0001", SYMLINK+="ttyACM%n", MODE="0666", GROUP="dialout"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">SUBSYSTEMS=="tty", ATTRS{idProduct}=="2341", ATTRS{idVendor}=="0001", SYMLINK+="ttyACM%n", MODE="0666", GROUP="dialout"</span><br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYs9dl-2hbrclxUSD2gfWjQJGJCjUaXCu_LPtnPAPxV4309-I6sgg46LXAp_sOZYGQV3uuagvkq6rsF9bu1mbzcL-2r6sV5a_28nfhNUPqUuoRsboT55xI0Y-A29kjUfpnIdLotRPq-FQ/s1600/udevrules.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="62" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYs9dl-2hbrclxUSD2gfWjQJGJCjUaXCu_LPtnPAPxV4309-I6sgg46LXAp_sOZYGQV3uuagvkq6rsF9bu1mbzcL-2r6sV5a_28nfhNUPqUuoRsboT55xI0Y-A29kjUfpnIdLotRPq-FQ/s400/udevrules.png" width="400" /></a></div>
<br />
Next you'll need to reload udev's rules so that they are properly
applied. You can restart your machine, or run a command like the
following:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo reload udev</span><br />
<br />
If the command above fails, try instead running:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo udevadm control --reload-rules</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo udevadm trigger</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPXWm4toPUsvkT47cgddO3FKmHTBb31cEQQhYpWfZugfW2NLwpHr9rrxnMauL06TGck5CyB0mxRiu-1xpYhxrD95p1UbiSqbiW07_awLNzhP2FoVtqTl8k7HJ26ceUK6Hvx_IgDfT3Zow/s1600/control.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPXWm4toPUsvkT47cgddO3FKmHTBb31cEQQhYpWfZugfW2NLwpHr9rrxnMauL06TGck5CyB0mxRiu-1xpYhxrD95p1UbiSqbiW07_awLNzhP2FoVtqTl8k7HJ26ceUK6Hvx_IgDfT3Zow/s400/control.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib7zfLfvgZC08KN5R7ohjY3ShtFD4W9Y1wIMDjUr8o_-zko6GdHDeWd1u7nVX1v7F4Qe-uBQ23g1touicQJIy6Efh3rVNB6Xv1LCuTFPe-nWuLq99e5xh2d30FMhJsRPrfDjB060r3h7g/s1600/trigger.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib7zfLfvgZC08KN5R7ohjY3ShtFD4W9Y1wIMDjUr8o_-zko6GdHDeWd1u7nVX1v7F4Qe-uBQ23g1touicQJIy6Efh3rVNB6Xv1LCuTFPe-nWuLq99e5xh2d30FMhJsRPrfDjB060r3h7g/s400/trigger.png" width="400" /></a></div>
<br />
You can also add yourself to the dialout group (which requires re-login to enable) with... <br />
<br />
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">sudo usermod -a -G dialout $USER</span></div>
<br />
In addition, change the owner of the port.<br />
<br />
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">sudo chown <user>:<group> <file></span></div>
<div style="text-align: left;">
e.g.: <span style="font-family: "courier new" , "courier" , monospace;">sudo chown john:john /dev/ttyACM0</span></div>
<br />
Another effective way that worked for me in the past was to change the access permissions.<br />
<br />
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod a+rw /dev/ttyACM0</span>
</div>
<br />
<div style="text-align: justify;">
To take effect in each reboot, you have to edit <span style="font-family: "courier new" , "courier" , monospace;">/etc/rc.local</span> and add the line that works for you (except dialout). Don't forget to follow by exit 0.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG6avKxy2pU0o_plM3POXipBBoKQlcFFGXFr5G4kUK5Hk0xz7jkAJ56-MQLzJvDfk6T0BXJ3gM1RuESo50FM1eVS2zLqpyp71lunnq9imCfvWliL9K5_3Tvjd8zTuNNjGxHBaC_-ENjYA/s1600/rights.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG6avKxy2pU0o_plM3POXipBBoKQlcFFGXFr5G4kUK5Hk0xz7jkAJ56-MQLzJvDfk6T0BXJ3gM1RuESo50FM1eVS2zLqpyp71lunnq9imCfvWliL9K5_3Tvjd8zTuNNjGxHBaC_-ENjYA/s400/rights.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>
<br />
<div style="text-align: justify;">
I document all the steps I've tried. Probably, not all of them are needed. Try it with your own configuration to ensure what suits you.<br />
That's all for now. I hope to find some of these useful for your setup.<br />
<i><span style="font-size: x-small;">More close to a JubitOS image (?)</span></i></div>
</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-10427332219878449482015-01-28T11:38:00.002+02:002015-04-04T08:12:09.089+03:00Testing Jubito in multiple environments<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Since the latest version of Jubito, based on jaNET Framework 0.2.5 [ rev. <a href="https://code.google.com/p/project-janet/source/detail?r=550" target="_blank">r550</a> ], was released, I spent some time, by doing tests in multiple environments. I focused on single board computers, such as Raspberry Pi and Banana Pi, both with Rasbian and Lubuntu flavors. To my surprise, the installation and migration was flawless! Actually, it was expected, but I didn't have the chance to give a try till I bought them.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
So, the evolution came with a new Jubito Home Server, passing from my old netbook Dell mini 9, to a Raspberry Pi and finally to a Banana Pi.<br />
<br />
<span class="" id="result_box" lang="en">L<span class="hps">et's</span> take a <span class="hps">look at some</span> pictures <span class="hps">from various</span> <span class="hps">tests</span></span>.</div>
<br />
<u><b>Dell mini 9 (Ubuntu)</b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhre_GZdZ-txfYy66T0W9ndtkEBQnhhE4ZGx37zwta81fZzaeSMBsrm239MqYFCuJoLnOlTtncTlhSyrzQKpOBRyqFMPKsyUXU4TKGir7byrDX1Teg-8JHnqT91EQ1oJnxEehCMjm6M81A/s1600/20042013602.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhre_GZdZ-txfYy66T0W9ndtkEBQnhhE4ZGx37zwta81fZzaeSMBsrm239MqYFCuJoLnOlTtncTlhSyrzQKpOBRyqFMPKsyUXU4TKGir7byrDX1Teg-8JHnqT91EQ1oJnxEehCMjm6M81A/s1600/20042013602.jpg" height="348" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiZlBscSih3Ia4SqEbJeb4ku4Ahchr_pzwWKcv4b6ezXk8YPPEaybfthTNjqpT4HJUkRwyqNPHZCJoYP80PaOD1ldHsyCxLpcwWrXeQp8XEn6K_sUWjvDtCoZCnDZPLvODCCboNqsWwUQ/s1600/01052013609.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiZlBscSih3Ia4SqEbJeb4ku4Ahchr_pzwWKcv4b6ezXk8YPPEaybfthTNjqpT4HJUkRwyqNPHZCJoYP80PaOD1ldHsyCxLpcwWrXeQp8XEn6K_sUWjvDtCoZCnDZPLvODCCboNqsWwUQ/s1600/01052013609.jpg" height="205" width="400" /></a>
</div>
<div style="text-align: center;">
<i>Hosted on upper kitchen cabinets</i>
</div>
<br />
<u><b>Asus eee (Linux Lite)</b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho4LSfWgAR5GwwqV6AtcggxW94gwsw1ouUa_Qc7VsBCaCW0L9k5F_1EpNtkEinD3dS6fCR8QIZKVwYBdbISNykVsL8GxqXc2Q4Br8vavwAXKtPcBxUQVwhgqORnqBxlYyUT8qZT-trRdA/s1600/IMG_20141201_173258.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho4LSfWgAR5GwwqV6AtcggxW94gwsw1ouUa_Qc7VsBCaCW0L9k5F_1EpNtkEinD3dS6fCR8QIZKVwYBdbISNykVsL8GxqXc2Q4Br8vavwAXKtPcBxUQVwhgqORnqBxlYyUT8qZT-trRdA/s1600/IMG_20141201_173258.jpg" height="340" width="400" /></a></div>
<br />
<u><b>Mac (OS X Yosemite)</b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPLBdJh8Ja2yV4iuLVG2OPH2W0fjSjGMOvMzkgWuo_WXXgXnscFyp5nhnZAU1xA0KWDljbdsWgbAatmEh6zxCi7AKUvWVvz5xOqy9eXJ6zehXJNpP-z3wZ7IoQP755HxDAolRUASotG5g/s1600/mac.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPLBdJh8Ja2yV4iuLVG2OPH2W0fjSjGMOvMzkgWuo_WXXgXnscFyp5nhnZAU1xA0KWDljbdsWgbAatmEh6zxCi7AKUvWVvz5xOqy9eXJ6zehXJNpP-z3wZ7IoQP755HxDAolRUASotG5g/s1600/mac.png" height="250" width="400" /></a></div>
<br />
<u><b>Raspberry Pi (Raspbian)</b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwZyfCoo1ut7qVok1Mr0b6LRANhbb0XetOLB00Mt0sysCtwpIW9h7AKcjZDGSLd5E5tkiuY9jKKU9oxaYEc7mvARmB6_v9ujYfQnnEiiBWhKjg5f0BUZQXUd7Bk-1a7Q6OwCftXreuRcI/s1600/IMG_20141214_081709.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwZyfCoo1ut7qVok1Mr0b6LRANhbb0XetOLB00Mt0sysCtwpIW9h7AKcjZDGSLd5E5tkiuY9jKKU9oxaYEc7mvARmB6_v9ujYfQnnEiiBWhKjg5f0BUZQXUd7Bk-1a7Q6OwCftXreuRcI/s1600/IMG_20141214_081709.jpg" height="400" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE4i5DdlqzGKsJmPoYp0qWUoLWC7B2ysmm5b3nDH1TxrEWN17hqbfmbmY3xw6Q8qFfIDsa6HMwmZ1aKJeFEk7jNFsc2Qdi6mLIWp3yU2dbbGHevPBTHNaYNew1FCTKc4szFs4uTWDBSu0/s1600/IMG_20141214_090445.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE4i5DdlqzGKsJmPoYp0qWUoLWC7B2ysmm5b3nDH1TxrEWN17hqbfmbmY3xw6Q8qFfIDsa6HMwmZ1aKJeFEk7jNFsc2Qdi6mLIWp3yU2dbbGHevPBTHNaYNew1FCTKc4szFs4uTWDBSu0/s1600/IMG_20141214_090445.jpg" height="400" width="371" /></a></div>
<br />
<u><b>Banana Pi (Lubuntu)</b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH58PQ1jte6BuhCzhM2LlABZUDl8Ex2XCDv262h-SAtb0aHgTuSrZnx9gPIVCY5C7vl6oXD7pBEZgulxOnf8KoaeI9tWkv1EMdWZWAgJDF9G9Z3iw-9bLlSBp1XDRw3Yyllcs_DpoWtWI/s1600/IMG_20150114_202855.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH58PQ1jte6BuhCzhM2LlABZUDl8Ex2XCDv262h-SAtb0aHgTuSrZnx9gPIVCY5C7vl6oXD7pBEZgulxOnf8KoaeI9tWkv1EMdWZWAgJDF9G9Z3iw-9bLlSBp1XDRw3Yyllcs_DpoWtWI/s1600/IMG_20150114_202855.jpg" height="300" width="400" /></a></div>
<br />
<u><b>Migration process...</b></u><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ4Go_Ynh1OoQMxR25OAw4VDfQL9aO_J7KuVZSna9ppCNHcc_ZrifuedNkf60xmPC2yhv_kWU_wHrCEJFMMx5xXMb8iK2aIMobekJUhsSUNDUdOBVMhLYGl4tQ6QJnIcLhDWxDWMHc-Is/s1600/IMG_20150117_164231.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ4Go_Ynh1OoQMxR25OAw4VDfQL9aO_J7KuVZSna9ppCNHcc_ZrifuedNkf60xmPC2yhv_kWU_wHrCEJFMMx5xXMb8iK2aIMobekJUhsSUNDUdOBVMhLYGl4tQ6QJnIcLhDWxDWMHc-Is/s1600/IMG_20150117_164231.jpg" height="400" width="360" /> </a></div>
<br />
<u><b>Banana Pi + Arduino Uno + Various modules</b></u><br />
Stress tests, power consumption tests (<span style="color: red;">*</span>), cpu and memory load tests.<br />
(<span style="color: red;">*</span>) <i>Arduino needs external supply 9V. If not, then with some open tabs on Firefox or other load Banana turns off</i>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipNROiJJfqPOUF5cx0m6gSvvmYtcyqegXJkqpcc6BajGdtIwuoCuPfgyL_i6eUPeluxiurBM7K-y0s3XcXfhi6JrYy7Q6DuuHu5v1mNtEXCRTjMaaizSGFjqveZ8dzTNtAe5TkSqvdlow/s1600/IMG_20150122_204954.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipNROiJJfqPOUF5cx0m6gSvvmYtcyqegXJkqpcc6BajGdtIwuoCuPfgyL_i6eUPeluxiurBM7K-y0s3XcXfhi6JrYy7Q6DuuHu5v1mNtEXCRTjMaaizSGFjqveZ8dzTNtAe5TkSqvdlow/s1600/IMG_20150122_204954.jpg" height="400" width="388" /></a></div>
<br />
<u><b>The outcome!</b></u><br />
<div style="text-align: justify;">
Playing with Banana Pi for three weeks, I believe is a good deal and I recommend it.<br />
Current compilation is consisted with the Banana Pi as my Jubito Home Server and the Arduino, plus various sensor modules for environment control.</div>
<div style="text-align: justify;">
Now, it's time to become invisible and be placed in its natural location, the upper kitchen cabinets.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_yN8qicuu8MBherB5np71wP1f_7Y4emRbCDHr-MqUC1MU6PemUga5FtRq70JU1LgDft9PjEZuDZk9yZObggkzd0k5x0PP-lbjKSVOF0w9mUcxmvniby2_wHk8d9Oe8O1QS7Pho8FG-lY/s1600/jubito-pi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_yN8qicuu8MBherB5np71wP1f_7Y4emRbCDHr-MqUC1MU6PemUga5FtRq70JU1LgDft9PjEZuDZk9yZObggkzd0k5x0PP-lbjKSVOF0w9mUcxmvniby2_wHk8d9Oe8O1QS7Pho8FG-lY/s1600/jubito-pi.png" height="266" width="400" /></a></div>
<br />
<div style="text-align: justify;">
The release of the updated version comes with Mac OS X support, including TTS. In most cases, you probably have noticed that I used the command-line interface, because it's more straightforward to me and also it runs natively, with no extra dependencies that wouldn’t already be available on each platform. [ <a href="http://www.jubito.org/download.html" target="_blank"><b>Download page</b></a> ]<br />
<br />
What's next?<br />
Hopefully to find the time for myself to build and provide
Raspbian and Lubuntu images with Jubito Server installed and ready to
run out of the box [<span style="color: red;"><b>Update</b></span>: <a href="http://jubitoblog.blogspot.gr/2015/02/jubitos-for-banana-pi.html" target="_blank">http://jubitoblog.blogspot.gr/2015/02/jubitos-for-banana-pi.html</a>].<br />
<br />
There's more to come but in time.</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-51283098286297840732015-01-24T07:14:00.000+02:002017-05-01T13:31:23.864+03:002014/15 Internet of Things Awards<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Jubito had been nominated in "<i>Technical Enabler: Application Enablement</i>" category for the 4th Annual IoT Awards hosted by <a href="http://postscapes.com/">Postscapes.com</a>.<br />
<blockquote class="tr_bq">
<i><b><u>Technical Enabler: Application Enablement</u></b></i><br />
Well-designed technology may be indistinguishable from magic, but that belies all the hard work and creativity that went on under the hood. The Technical Enabler awards acknowledge the elements that make it easier for everyone, from garage hobbyists to tech giants, to develop new products and services for the Internet of Things.</blockquote>
It gets the first place in "<i>People's Choice Winner</i>" category. So, there is not much to say...<br />
<br />
<span style="font-size: large;">Thank you!</span><br />
<br />
<a href="http://postscapes.com/internet-of-things-award/2014/iot-application-enabler.html" target="_blank">See Technical Enabler: Application Enablement winners</a> </div>
<div style="text-align: justify;">
<a href="http://postscapes.com/internet-of-things-award/2014/winners" target="_blank">See all winners</a></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4l-YoSL8Vq4EQunjvG6-nOuQv66jjjWfRubq6ahyGQnrvncIEDVi5MUFF-nXSTm4WzeIJjN-qTvPhuWdAlrKNa1UB5rDkuFD9Y0hOhX4OmNe-nSXacIehF09-xROenRJFl8K1AUtl_u0/s1600/Screenshot+from+2015-01-24+06:39:50.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4l-YoSL8Vq4EQunjvG6-nOuQv66jjjWfRubq6ahyGQnrvncIEDVi5MUFF-nXSTm4WzeIJjN-qTvPhuWdAlrKNa1UB5rDkuFD9Y0hOhX4OmNe-nSXacIehF09-xROenRJFl8K1AUtl_u0/s400/Screenshot+from+2015-01-24+06:39:50.png" width="400" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-46758536462569559062014-12-30T14:12:00.000+02:002017-05-01T12:41:04.454+03:00Leaving 2014...<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
As a token of my appreciation, you'll be entered into a drawing for a jReCo (Jubito Remote Control) once you...</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<ul>
<li>Like Jubito on social networks (<a href="https://www.facebook.com/pages/Jubito/412404438847626" target="_blank">facebook</a>, <a href="https://twitter.com/jubito_" target="_blank">twitter</a>, <a href="https://plus.google.com/104236522569919279756/posts" target="_blank">google+</a>, <a href="https://www.facebook.com/pages/Project-jaNET/115581091842605" target="_blank">facebook jaNET Framework</a>)</li>
<li>Post a comment</li>
<li>Spread it through your website/blog and publish the link to any of the above</li>
</ul>
</div>
<br />
<div style="text-align: justify;">
What you'll get is an <a href="http://arduino.cc/en/Main/arduinoBoardNano" target="_blank">Arduino Nano</a>, <a href="http://img.dxcdn.com/productimages/sku_220194_2.jpg" target="_blank">RF Receiver + Transmitter modules</a>, soldered, with full support and software implementation as seen in this <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-radio-remote-control-rf.html" target="_blank">tutorial</a>.<br />
<br />
I select this project because it was my first flirt with Arduino and because everybody, or almost everybody start with controlling lights, which is a good starting point for home automation.<br />
<br />
So, from back then, with a little bit of research, I ended up from this...</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhmmBNOMyOJVp4OG4XHg2mK7K2DS3mWdMqAXhFH6ioL4g5XzoFEnHceAuh_VVdAydWGjcxo1HzOS462D2eQ8G0FU4PNq9XbJyCTUymOHD2Zg4QhfDQdZWFYqgdZ8924JpHAAUYXGUtc8c/s1600/26022011071.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhmmBNOMyOJVp4OG4XHg2mK7K2DS3mWdMqAXhFH6ioL4g5XzoFEnHceAuh_VVdAydWGjcxo1HzOS462D2eQ8G0FU4PNq9XbJyCTUymOHD2Zg4QhfDQdZWFYqgdZ8924JpHAAUYXGUtc8c/s1600/26022011071.jpg" width="400" /></a></div>
<br />
to that...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJgckc1_SP3EUQQK7L-WWAktvCSy61w_-AWjpHPgBXkDBdfPxQ1DWyu88gonCU08FPZH29uIhUVBYA7h23Xc2RymlWpjMWx8V1SvsmpUIHsfyEzm4tbPyteWA663OkbV1KomimQsgfEJE/s1600/02122011381.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJgckc1_SP3EUQQK7L-WWAktvCSy61w_-AWjpHPgBXkDBdfPxQ1DWyu88gonCU08FPZH29uIhUVBYA7h23Xc2RymlWpjMWx8V1SvsmpUIHsfyEzm4tbPyteWA663OkbV1KomimQsgfEJE/s1600/02122011381.jpg" width="400" /></a></div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmqKb-j133JMqA6SnH7vO7auPJckN-MowzIiKp90obBIZQxpgUQCZnLUpEHN-CFb_C-rghI418H6LYg408kEM5HpH4QTs-ur1wNutuhGiOjrrB0mHXUAbNplkBsTR8Y92EI2CKatvRP84/s1600/jReCo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmqKb-j133JMqA6SnH7vO7auPJckN-MowzIiKp90obBIZQxpgUQCZnLUpEHN-CFb_C-rghI418H6LYg408kEM5HpH4QTs-ur1wNutuhGiOjrrB0mHXUAbNplkBsTR8Y92EI2CKatvRP84/s1600/jReCo.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgswi3fSH2O4Hyda4HVWag53Be8mICpWVBTHH4fK4tK5kgggM_zjpT5vQPIB8a0HJbJtSNeMy64U5TNuaivPojgAs2SYbi44V7V59pZBmdvhhzL40hRlg4MprOnkbS_37N-4iC_QZJXIjk/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgswi3fSH2O4Hyda4HVWag53Be8mICpWVBTHH4fK4tK5kgggM_zjpT5vQPIB8a0HJbJtSNeMy64U5TNuaivPojgAs2SYbi44V7V59pZBmdvhhzL40hRlg4MprOnkbS_37N-4iC_QZJXIjk/s1600/Untitled.png" width="400" /></a></div>
<br />
I hope to find it as amusing as I, and give you a boost of encouragement to start developing your own "things". <br />
<br />
This "contest" will close at January 30th and the winner will be announced in this post and at the social networks.</div>
<br />
I wish you a creative 2015, good luck! </div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-90748022875230812242014-12-13T09:14:00.000+02:002017-05-01T13:07:01.975+03:004th Annual Internet of Things Awards<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<span style="font-size: small;"><b><span style="color: red;"><u>UPDATE</u></span></b>: Jubito is been selected! <a href="http://postscapes.com/internet-of-things-award/2014/iot-application-enabler.html" target="_blank"><b>Vote for it</b></a>!</span>
<br />
<br />
<a href="http://www.postscapes.com/" target="_blank">Postscapes</a> 4th Annual Internet of Things Awards - 2014/15. A showcase of the year’s best #IoT products and companies.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE4oHc8Vyh7M8__9HsCdwwtQdtd_-N8zh7aTVlJKNonAuBBeSz45_BzglgUnubgby5PSIJrLJQ4Sb5pldGlRO_LfAsoUBv_r2J_ixrxBNTBoLS1KeAts6ZLs0b63m_zU3cln_c49yYkqM/s1600/Screenshot+from+2014-12-13+09:00:22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE4oHc8Vyh7M8__9HsCdwwtQdtd_-N8zh7aTVlJKNonAuBBeSz45_BzglgUnubgby5PSIJrLJQ4Sb5pldGlRO_LfAsoUBv_r2J_ixrxBNTBoLS1KeAts6ZLs0b63m_zU3cln_c49yYkqM/s1600/Screenshot+from+2014-12-13+09:00:22.png" width="400" /></a></div>
<br />
Everyone is invited to vote for their favorite IoT Award winners.<br />
<br />
<b><a href="http://postscapes.com/internet-of-things-award/2014/" target="_blank">Nominate</a></b> Jubito :)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTxV9OnagrhBrQZUCma_uA3ckvMGEi2JE9n2ioE86Juc7SZdO8tgyJ7KrKLbPFDdd09U9ZJYXLT4f0daNupTYz4dIC3rNwUL7nq1xOl8cP82AGqTNy_bQmyls7Y7oSoB8MCNf_f8BNz5c/s1600/jubito-hope-s.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTxV9OnagrhBrQZUCma_uA3ckvMGEi2JE9n2ioE86Juc7SZdO8tgyJ7KrKLbPFDdd09U9ZJYXLT4f0daNupTYz4dIC3rNwUL7nq1xOl8cP82AGqTNy_bQmyls7Y7oSoB8MCNf_f8BNz5c/s400/jubito-hope-s.png" width="400" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-80700279243760655782014-12-08T16:27:00.000+02:002015-03-17T17:58:36.805+02:00The power of reflection<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
In this <a href="http://jubitoblog.blogspot.gr/2014/11/set-up-gmail-notifier.html" target="_blank">post</a> we've explained a scenario that consisted by a number (3) of alternative responses. Someone might consider, what if I want to use the response or some other action, like evaluation, to another activity? Should I make duplicates or a number of responses for each one of them? The answer is no. This can be solved by creating the response or some action as a launcher. A launcher creates two instances. One that holds the action and the other the reflection. The reflection is indicated by asterisk symbol.</div>
<br />
<div style="text-align: justify;">
For example, if I create a new launcher '<span style="font-family: "Courier New",Courier,monospace;">demo_launcher</span>' that holds '<span style="font-family: "Courier New",Courier,monospace;">Hello %user%</span>' as action, then the system will create:</div>
<br />
1. <span style="color: orange;">*demo_launcher</span>: Hello <span style="font-family: "Courier New",Courier,monospace;">%user%</span><br />
2. <span style="color: purple;">demo_launcher</span>: <span style="color: orange;">*demo_launcher</span><br />
<br />
When '<span style="font-family: "Courier New",Courier,monospace;">demo_launcher</span>' is called the response will look like this...<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">Hello john</span> <i>(where john the system login. Check <a href="http://jubitoblog.blogspot.gr/2013/02/built-in-functions-and-api.html" target="_blank">Built-in functions and API</a> for more info)</i><br />
<br />
<div style="text-align: justify;">
Now, from a different Instruction Set that returns for example the user status, <span style="font-family: "Courier New",Courier,monospace;">*demo_launcher</span> can be invoked like this..
</div>
<br />
<span style="color: purple;">get_user_stat</span>: <span style="color: orange;">*demo_launcher</span>. Your status is set to <span style="font-family: "Courier New",Courier,monospace;">%whereami%</span>.<br />
<br />
which will return...
<br />
<span style="font-family: "Courier New",Courier,monospace;">Hello john, your status is set to present.</span><br />
<br />
I think it's a very straightforward methodology and will become a standard in the future versions.<br />
<br />
<strike><span style="color: red;"><b><u>Screenshots are from the development version which is not yet available. However the functionality remains</u></b></span></strike>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdCJFRWP2Ma1e_yUkshHn5I5ofkN9KiCuVITadU7wXZHnHzJXaYh7AwpiNQvX9DcIBK2KFBMEeM87Q3IkPdQiAq8AWoL4tXQabxy0wvnA8KxOf9o8BP5sWaERr5WxViEHhj3LjbmfY5bA/s1600/part-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdCJFRWP2Ma1e_yUkshHn5I5ofkN9KiCuVITadU7wXZHnHzJXaYh7AwpiNQvX9DcIBK2KFBMEeM87Q3IkPdQiAq8AWoL4tXQabxy0wvnA8KxOf9o8BP5sWaERr5WxViEHhj3LjbmfY5bA/s1600/part-1.png" height="228" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsOBT6qkW2FHV5oH332enjB5GGLiWGGD8qxYhLUUVhdZnEkCMVanvX7czs6045I8y_kH0cpn906JcunMZ4ZQyksBfZmPynAn-1JFrUfD5RkzTyo6fbYl28IrdPK2gHGEvvD9lo69ryNY8/s1600/part-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsOBT6qkW2FHV5oH332enjB5GGLiWGGD8qxYhLUUVhdZnEkCMVanvX7czs6045I8y_kH0cpn906JcunMZ4ZQyksBfZmPynAn-1JFrUfD5RkzTyo6fbYl28IrdPK2gHGEvvD9lo69ryNY8/s1600/part-2.png" height="311" width="400" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNSVs_wSIcxudeTtGG0EMaZK-pvV4CoIFzq-wavSlBxCUGpVlAW-AmtA5hjOmWt1Nsy7kc2BiF0cH7yClOfWlyt4SY67QJNMMoDBnp-4HIQZXV6wYpsuhbBRwRjVhmPtP1sMYpOQW8Y4c/s1600/part-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNSVs_wSIcxudeTtGG0EMaZK-pvV4CoIFzq-wavSlBxCUGpVlAW-AmtA5hjOmWt1Nsy7kc2BiF0cH7yClOfWlyt4SY67QJNMMoDBnp-4HIQZXV6wYpsuhbBRwRjVhmPtP1sMYpOQW8Y4c/s1600/part-3.png" height="345" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAKiUaQl47StyEKyd0-tFePntp_5nsmd-zl5EaABx74Sta346H60PQ9_BmRpvOaHg1CMoDLPZpyPHFoKtwTAlDKel5rcaZfk2KoelBKtjlHivjxn_1V8QcuB9_nLTX5XmvDsBlrPiHfFM/s1600/part-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAKiUaQl47StyEKyd0-tFePntp_5nsmd-zl5EaABx74Sta346H60PQ9_BmRpvOaHg1CMoDLPZpyPHFoKtwTAlDKel5rcaZfk2KoelBKtjlHivjxn_1V8QcuB9_nLTX5XmvDsBlrPiHfFM/s1600/part-4.png" height="308" width="400" /></a></div>
<br />
Of course these actions can be applied to any system object, such the evaluator.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJl6Gyu-OsE5bfwrISFqWD3vUY47mQ8d-5yGsbrtGeSWDAVok2cW5gANG9DxAQDYrRfWcS8-y8LTeYLGm9PvqZCsQdi76swAco1xSepNuwDWEeBvPx01yCpxrEoXIi2g-CiukhaI8w0cA/s1600/part-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJl6Gyu-OsE5bfwrISFqWD3vUY47mQ8d-5yGsbrtGeSWDAVok2cW5gANG9DxAQDYrRfWcS8-y8LTeYLGm9PvqZCsQdi76swAco1xSepNuwDWEeBvPx01yCpxrEoXIi2g-CiukhaI8w0cA/s1600/part-5.png" height="370" width="400" /></a> </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtsR4qVyQxtrsoOrfpGORGepHp1jfVX9eWddQCYPxTa8oge-mYu1RJf9d9LU5EImfZROuGZQUW4If32xK5RtWbDcx2YrFW1UL99NicSQ4GYSGXoyBCpb8ePOljU7cpdi7U42bxQupzIVA/s1600/part-6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtsR4qVyQxtrsoOrfpGORGepHp1jfVX9eWddQCYPxTa8oge-mYu1RJf9d9LU5EImfZROuGZQUW4If32xK5RtWbDcx2YrFW1UL99NicSQ4GYSGXoyBCpb8ePOljU7cpdi7U42bxQupzIVA/s1600/part-6.png" height="316" width="400" /></a></div>
<br />
Chain reaction behind the scenes.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinixCCO6v50CUiOCc_qMq143KUFbtIkgn4k4zHV8M02gM3uWUD0gREBAPTDgNuMbBWVXw1gkWPJ_bfbv-mbmJ_UmLuDTzCvjBTbGRcKNs0wG09byLadX1oMZMOeiWkw2Hh8d4xFh4LXvY/s1600/part-7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinixCCO6v50CUiOCc_qMq143KUFbtIkgn4k4zHV8M02gM3uWUD0gREBAPTDgNuMbBWVXw1gkWPJ_bfbv-mbmJ_UmLuDTzCvjBTbGRcKNs0wG09byLadX1oMZMOeiWkw2Hh8d4xFh4LXvY/s1600/part-7.png" height="45" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Launchers are extremely versatile. You can combine anything that supported from the framework in a single action.<br /><u>So, the verdict is that if you want a complex Instruction Set it is wise first to create launcher components and then mixed in a single one</u>.<br />
<br />
You can review a complex <a href="http://sourceforge.net/projects/project-janet/files/Essentials/AppConfig.xml/download"><span style="font-family: "Courier New",Courier,monospace;">AppConfig.xml</span></a> configuration file.
</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-50430392159306669482014-12-02T14:14:00.000+02:002017-05-20T07:40:41.962+03:00Jubito at MobiHealth 2014<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Jubito was proudly presented at the <a href="http://mobihealth.name/2014/media/uploads/mobihealth_final_program.pdf" target="_blank">4th International Conference on Wireless Mobile Communication and Healthcare</a> by Kostas Giokas, Senior Researcher, Leader of the Applied Informatics in mHealth (AiM)
research team, of the Biomedical Engineering Laboratory, Institute of
Communications and Computer Systems, National Technical University of
Athens.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVuNIpq1h84Jr21oNDRYw9Ca1PJezQm1WuqgIenvwgAzLI8JkfNtkR6dGn6-bO5gwEuyHvY2K0xxLW4TEgNlEqGeDvUq2rqXRgRZ-QpRMgrcwwY7NO1iCRZQ1ZbQOD_dM2Erb7JKDjhUQ/s1600/koogoo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVuNIpq1h84Jr21oNDRYw9Ca1PJezQm1WuqgIenvwgAzLI8JkfNtkR6dGn6-bO5gwEuyHvY2K0xxLW4TEgNlEqGeDvUq2rqXRgRZ-QpRMgrcwwY7NO1iCRZQ1ZbQOD_dM2Erb7JKDjhUQ/s1600/koogoo.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
JUBITO: <a href="http://ieeexplore.ieee.org/document/7015933/" target="_blank"><b>An interoperable platform for wellness</b></a>, was presented at the 4th International Conference on Wireless Mobile Communication and Healthcare, MobiHealth, on the 4th of Novermber, held in Athens, Greece.</div>
<br />
<iframe allowfullscreen="" frameborder="0" height="400" msallowfullscreen="" src="https://app.box.com/embed_widget/s/gxvlsy2yigy0btlnpxaf?theme=blue" webkitallowfullscreen="" width="100%"></iframe><br />
<br />
<a href="http://www.biomed.ntua.gr/" target="_blank">http://www.biomed.ntua.gr</a><br />
<a href="http://www.ntua.gr/" target="_blank">http://www.ntua.gr</a><br />
<a href="http://www.iccs.gr/" target="_blank">http://www.iccs.gr</a></div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-8896358171107046802014-11-30T20:43:00.000+02:002017-05-01T13:07:53.309+03:00Set up a Gmail notifier<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
After setting up your gmail account, here's the post to show you how to use the <span style="font-family: "courier new" , "courier" , monospace;">%gmailcount%</span> function to create a gmail notifier.</div>
<br />
Go to <i>Control Panel/Mail/Setup/Gmail</i><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFTM0FADr9A8eMtcBCbi2pTGXqQsJ8sq1uE8Dn181m3LzlWNzpdcc00hWI3VruLidn7906j9fsOKhKZmVKva_IMTIkypgCw1QHgXNr2zdcBNZmZypIyoKEbKQhA80M4NKQSpUxTBjhf98/s1600/Screenshot+from+2014-11-30+14:47:39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="165" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFTM0FADr9A8eMtcBCbi2pTGXqQsJ8sq1uE8Dn181m3LzlWNzpdcc00hWI3VruLidn7906j9fsOKhKZmVKva_IMTIkypgCw1QHgXNr2zdcBNZmZypIyoKEbKQhA80M4NKQSpUxTBjhf98/s1600/Screenshot+from+2014-11-30+14:47:39.png" width="400" /></a></div>
<br />
Type your username and your password and hit save.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio-l2omPelb4OXy6CRR2QeSHHBLZkap85r0kx0RvvqVpk-boU8HcLlWa7n8FqCuD-pgFL7x2anThBtwCuRVU4yr4M8pQmTt94s4ok2A7IP9den4xj3-dYAVqBwksd9b66D9tFQSnTKzHI/s1600/Screenshot+from+2014-11-30+15:06:24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio-l2omPelb4OXy6CRR2QeSHHBLZkap85r0kx0RvvqVpk-boU8HcLlWa7n8FqCuD-pgFL7x2anThBtwCuRVU4yr4M8pQmTt94s4ok2A7IP9den4xj3-dYAVqBwksd9b66D9tFQSnTKzHI/s400/Screenshot+from+2014-11-30+15:06:24.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Now we need to make a few scenarios. For instance when emails are more than one then respond with the number of them and so forth. But before we get into that, first we need to create the responses.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Go to Instruction Sets menu, hit <i><strike>Add New Instruction Set</strike></i> <i>Add New Launcher</i> and follow the screenshots. [ <span style="color: red;"><b>Update</b></span>: For a more efficient way to create responses please read this <a href="http://jubitoblog.blogspot.gr/2014/12/the-power-of-reflection.html" target="_blank">post</a>. ]</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf6DUVMIDR48SLQrmReyVlqSgpThHA-b5KFUIe1C79peRnRoTHtPs-bCSZ80GbrC_KYk4Grkp4wVBEMZu8KyAkIW333Zzlveb7lyN2m4BdfzJI6YmaP2IIbGVAvaNNgNcS8EuPh_cgm2k/s1600/Screenshot+from+2014-11-30+14:57:45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf6DUVMIDR48SLQrmReyVlqSgpThHA-b5KFUIe1C79peRnRoTHtPs-bCSZ80GbrC_KYk4Grkp4wVBEMZu8KyAkIW333Zzlveb7lyN2m4BdfzJI6YmaP2IIbGVAvaNNgNcS8EuPh_cgm2k/s1600/Screenshot+from+2014-11-30+14:57:45.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4XYHir05hh0V7eTmtzXUN8JrEFmKQfOKmiWfYAQQEL5Vijy2Ln7hL7kysy5ofP5InFtXoCoySAbAkS9fsEHkSgaDEHVYqAiPVu0I7HgSTzxFs51EOBsOJjyzqKRqePQaInVdv9pZjsDM/s1600/Screenshot+from+2014-11-30+15:01:26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4XYHir05hh0V7eTmtzXUN8JrEFmKQfOKmiWfYAQQEL5Vijy2Ln7hL7kysy5ofP5InFtXoCoySAbAkS9fsEHkSgaDEHVYqAiPVu0I7HgSTzxFs51EOBsOJjyzqKRqePQaInVdv9pZjsDM/s400/Screenshot+from+2014-11-30+15:01:26.png" width="331" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>No new messages.</i> </div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9IqzUOTvNiQEum4OGzLbTfNJMIkPbu3XPrzZhdiFQNSOruN1J_5xg5KMp8u8KtpEnkMOfbzahQuG3TJIQUpufZfh_MaL2lw7PAG9Oz322mOLyGOLsY9T4xwuICqGjFGtrz9f2U79aIU/s1600/Screenshot+from+2014-11-30+15:01:49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9IqzUOTvNiQEum4OGzLbTfNJMIkPbu3XPrzZhdiFQNSOruN1J_5xg5KMp8u8KtpEnkMOfbzahQuG3TJIQUpufZfh_MaL2lw7PAG9Oz322mOLyGOLsY9T4xwuICqGjFGtrz9f2U79aIU/s400/Screenshot+from+2014-11-30+15:01:49.png" width="333" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<i> You have, 1, unread message to your g-mail inbox.</i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7-gBfgIzLV1FTHA_ikANmTYeKcIV2FB5jPDGiNxOtNrmpYtGO8aZEf07xoajy9hVdSkltITfhWEWloiucuAAr-Y9Sceqon9q0UlzB_qDAq2iJzanmoS-ziP2iszkYmFHUUYf7xTQzoes/s1600/Screenshot+from+2014-11-30+15:02:11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7-gBfgIzLV1FTHA_ikANmTYeKcIV2FB5jPDGiNxOtNrmpYtGO8aZEf07xoajy9hVdSkltITfhWEWloiucuAAr-Y9Sceqon9q0UlzB_qDAq2iJzanmoS-ziP2iszkYmFHUUYf7xTQzoes/s400/Screenshot+from+2014-11-30+15:02:11.png" width="332" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>You have, %gmailcount%, unread messages to your g-mail inbox.</i> </div>
<br />
Now we have to apply the logic we're talking about in a new Instruction Set.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSL-TMrbuPDyuhznIKWSYUbOkwdPkACQfucXPlEuATcMBR9VX3j1vIZP2CMmgWkODBvAdw6_E40dnZWau97a0jmzBrFQ7gIULV93VDzdc_0J6qxUOBtHabyEax3DL_oFg5uo2zGOXfGzU/s1600/Screenshot+from+2014-11-30+15:21:25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSL-TMrbuPDyuhznIKWSYUbOkwdPkACQfucXPlEuATcMBR9VX3j1vIZP2CMmgWkODBvAdw6_E40dnZWau97a0jmzBrFQ7gIULV93VDzdc_0J6qxUOBtHabyEax3DL_oFg5uo2zGOXfGzU/s400/Screenshot+from+2014-11-30+15:21:25.png" width="332" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
In the action field copy/paste the following <a href="http://jubitoblog.blogspot.gr/2013/02/evaluation.html" target="_blank">evalBool</a> function...<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">{ evalBool(%gmailcount% <= 0); no-messages; ; } { evalBool(%gmailcount% == 1); gmail-one; ; } { evalBool(%gmailcount% > 1); gmail-count; ; }</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6xVcHpzCrtOMnYtr0KYcILAeATOYLUEDkekXIDOehLoX0y84UXcDONIDX0c-0DfJBaTq8I3zBnfMCdrGFKuUGHlGMiBqTTO_SFVV8DSEf6aRS3f8PJTqGZNMJhUtlHIWTVRjZdwi7xmk/s1600/Screenshot+from+2014-11-30+15:23:49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6xVcHpzCrtOMnYtr0KYcILAeATOYLUEDkekXIDOehLoX0y84UXcDONIDX0c-0DfJBaTq8I3zBnfMCdrGFKuUGHlGMiBqTTO_SFVV8DSEf6aRS3f8PJTqGZNMJhUtlHIWTVRjZdwi7xmk/s1600/Screenshot+from+2014-11-30+15:23:49.png" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: justify;">
One of each conditions will be evaluated and trigger the corresponding reply.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Finally we can make a daemon with the Scheduler, to perform checks every 5 minutes. From Scheduler menu hit <i>Add New</i> and type a name, select repeat in the period drop down, time in milliseconds e.g. 300000 for 5 minutes and action the Instruction Set that calls the <span style="font-family: "courier new" , "courier" , monospace;">evalBool</span> function i.e. <span style="font-family: "courier new" , "courier" , monospace;">gmail</span>. To avoid getting 'No new messages' every time, make a new Instruction Set that missing the no-messages evaluation.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_z8SNqLupr0bLqnJIvr8I_qfYkAWf3B0ZKW8shqpOCzf1WBNv11PfnKO-xPR9CVQWX8acPhyPywiNX_at4OWZAkunGoku3embSj8S6kbxLL1UoQyZsWf5QINp1Q03u4jgNBbZDGP9gqs/s1600/Screenshot+from+2014-11-30+15:49:52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_z8SNqLupr0bLqnJIvr8I_qfYkAWf3B0ZKW8shqpOCzf1WBNv11PfnKO-xPR9CVQWX8acPhyPywiNX_at4OWZAkunGoku3embSj8S6kbxLL1UoQyZsWf5QINp1Q03u4jgNBbZDGP9gqs/s400/Screenshot+from+2014-11-30+15:49:52.png" width="352" /></a></div>
</div>
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/7e6BcDt1Tkw" width="100%"></iframe>
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/SwwXT4Jb7C0" width="100%"></iframe>
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/lLv-6wCRa0o" width="100%"></iframe>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-63686624645081104882014-11-27T11:31:00.001+02:002015-02-25T19:08:57.744+02:00Web of Things and what's new on the upcoming version<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
In our days, there is a trend to talk about the Internet of Things, Machine to Machine, Web of Things, etc. However all of the above are considered an integral part of the IoT. I won't discuss any of them in detail, since there are too many articles over the internet.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
A vast amount of information, is distributed via web services. Web services are an efficient way of communication, that support interoperable machine-to-machine interaction, over a network. As a developer, I need my platform to be able to consume all these services and produce innovative use-cases.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In this post I would like to share some of the latest developments, that would be available in the next version of Jubito. I'm talking about tailor made methods for native XML and JSON deserialization from web service/web API responses.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Some first tests using Yahoo Weather API.</div>
<br />
<u><b>XML</b></u>: <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbNCTTNiyiAUcw4wYk6hG2bruHEWfAT83A2CVL51MTiTk_k5y6P_SFb9VDlSHaR5_9kC71jUuDJB2tzsI1R-YekO3uvk7cS7XzKmt3LPk68ZL0JyxlM1pVcP1x2NBDuDHO931TuNgQBY/s1600/one.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbNCTTNiyiAUcw4wYk6hG2bruHEWfAT83A2CVL51MTiTk_k5y6P_SFb9VDlSHaR5_9kC71jUuDJB2tzsI1R-YekO3uvk7cS7XzKmt3LPk68ZL0JyxlM1pVcP1x2NBDuDHO931TuNgQBY/s1600/one.png" height="201" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnwJ-4kCw-0titfslpIDf8XdxVm2UiWPF94a2KI_oXlQvXaMkhQOdS8fQYOQ1bx9XWJuPYkJ478EF2iYpEIL49gWBzWKFGeXoR0Tbl6fJuD6qSeuZH0U_ImPFeeO8w_1WRb2hhWA6gM0/s1600/two.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnwJ-4kCw-0titfslpIDf8XdxVm2UiWPF94a2KI_oXlQvXaMkhQOdS8fQYOQ1bx9XWJuPYkJ478EF2iYpEIL49gWBzWKFGeXoR0Tbl6fJuD6qSeuZH0U_ImPFeeO8w_1WRb2hhWA6gM0/s1600/two.png" height="201" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW-5YeownLm0y2ztzEgp-LJmZOkHgU_A8bjGQtKNRT6mn9RaLcxQJ8tOOz6We3YKFLhau5WKM4JzUH4ImcKnjewx_AE35DXy9ECugVqSBCWcBNpq0u3pfFN_JbEL4T75MKOWy92lBxuy0/s1600/three.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW-5YeownLm0y2ztzEgp-LJmZOkHgU_A8bjGQtKNRT6mn9RaLcxQJ8tOOz6We3YKFLhau5WKM4JzUH4ImcKnjewx_AE35DXy9ECugVqSBCWcBNpq0u3pfFN_JbEL4T75MKOWy92lBxuy0/s1600/three.png" height="201" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ild22rI36AWbtW0i28L30ebRcwrvR7KkZOWeKGKfOSZO3V3NrzZzfT14ftSnaI2q92eKU94322NJgnpfB6GhGHvQbLkifIBwM_3ozrJZ7PEptdS7vr0A5U3GCoUs06jlCqoU5H3jJXk/s1600/simple-one.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ild22rI36AWbtW0i28L30ebRcwrvR7KkZOWeKGKfOSZO3V3NrzZzfT14ftSnaI2q92eKU94322NJgnpfB6GhGHvQbLkifIBwM_3ozrJZ7PEptdS7vr0A5U3GCoUs06jlCqoU5H3jJXk/s1600/simple-one.png" height="201" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm6naQM4aoylbS3s-bdrBNx7WvaQJSd1jz8oPRJVjvunFIRQahFZ2IrLWfcodlN22BwhB8-mfEc-opoH_iGSfW4BTRAbMD7Aj8UV_OZmaOWI4jQBA9et_zqv7oendy4VEVA_kF7FrGua8/s1600/simple-two.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm6naQM4aoylbS3s-bdrBNx7WvaQJSd1jz8oPRJVjvunFIRQahFZ2IrLWfcodlN22BwhB8-mfEc-opoH_iGSfW4BTRAbMD7Aj8UV_OZmaOWI4jQBA9et_zqv7oendy4VEVA_kF7FrGua8/s1600/simple-two.png" height="201" width="400" /></a></div>
<br />
<u><b>JSON</b></u>:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRLiq35fuF-EAlsMHBnrwBP3JlZhxaosBkbYEcyvRv9LJtuBhWmMGgmwlwO8MzflgdW6YidkkypdGSdPgaxUVuXsxRD1kqktoZ1ivh_eBgUXS_J3op3E_8rGoW8Vn2J2tG6Fdmzpxiy9U/s1600/json.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRLiq35fuF-EAlsMHBnrwBP3JlZhxaosBkbYEcyvRv9LJtuBhWmMGgmwlwO8MzflgdW6YidkkypdGSdPgaxUVuXsxRD1kqktoZ1ivh_eBgUXS_J3op3E_8rGoW8Vn2J2tG6Fdmzpxiy9U/s1600/json.png" height="181" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1ZX_IrDAK0M2AaH06Zfhl6xehsvgusnCbKsm5WZ0RlHB1dg7fGUC4Os8XDz-KltVASWl9_1SQrEjtWq39XaBznyr_t96Y5_-rjPQWCsrOxYrBSITxYZGDs9pt72dAYSNOm4UAdU8Z_wk/s1600/json1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1ZX_IrDAK0M2AaH06Zfhl6xehsvgusnCbKsm5WZ0RlHB1dg7fGUC4Os8XDz-KltVASWl9_1SQrEjtWq39XaBznyr_t96Y5_-rjPQWCsrOxYrBSITxYZGDs9pt72dAYSNOm4UAdU8Z_wk/s1600/json1.png" height="200" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtraUsO3Bso9ylnmzMoytV_eG4rqsKn-LvR2Rgv8fHPP2nuEnWZDoh-AEdGcahkjWaWiaJ9u16tV1tSddGmgj3saGevHb-GU3hhNiNclzmJvMnMSlM4Ktd53-bcE0WUh_ev04ZBpeXjoI/s1600/json2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtraUsO3Bso9ylnmzMoytV_eG4rqsKn-LvR2Rgv8fHPP2nuEnWZDoh-AEdGcahkjWaWiaJ9u16tV1tSddGmgj3saGevHb-GU3hhNiNclzmJvMnMSlM4Ktd53-bcE0WUh_ev04ZBpeXjoI/s1600/json2.png" height="200" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1QshawSWWCEuFnkpgmU0XM8N_GFGylt2_qn2t6vekln1nho72qE2XgzRxn8oBSJY6lNIjveX2oouh4OWp28zrwpdqd21xKxhLue4t8rdT7tq_jpov8OEWsvsxq_2KGwO2AoQnVyHgYA4/s1600/Screenshot+from+2014-11-26+20:45:24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1QshawSWWCEuFnkpgmU0XM8N_GFGylt2_qn2t6vekln1nho72qE2XgzRxn8oBSJY6lNIjveX2oouh4OWp28zrwpdqd21xKxhLue4t8rdT7tq_jpov8OEWsvsxq_2KGwO2AoQnVyHgYA4/s1600/Screenshot+from+2014-11-26+20:45:24.png" height="237" width="400" /></a></div>
<br />
<div style="text-align: justify;">
The current release, based on 0.2.5 jaNET Framework comes with <strike>full</strike> partial support [ <span style="color: red;"><u>Still under development</u></span> ]. To check the version, go to Terminal tab and type <span style="font-family: "Courier New",Courier,monospace;">%about%</span>.</div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-22807482356450108782014-10-15T11:03:00.001+03:002015-05-24T20:36:20.280+03:00Special thanks to Hackaday members!<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc1wcbZ4aC6wWx14QzJSELu-ykIlHRDi8CgQT9Wj97apfmOGeb0ycOLqOKq8-OwiSesH1n2wIpI0-C4Xn64XYsrrgfG__okNChCg7rsK8qPqIZZf-L5-_YDR7dAzTWi-5I-qwzuTqFlXk/s1600/hackaday.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc1wcbZ4aC6wWx14QzJSELu-ykIlHRDi8CgQT9Wj97apfmOGeb0ycOLqOKq8-OwiSesH1n2wIpI0-C4Xn64XYsrrgfG__okNChCg7rsK8qPqIZZf-L5-_YDR7dAzTWi-5I-qwzuTqFlXk/s1600/hackaday.png" /></a></div>
I'm grateful to <a href="http://hackaday.io/" target="_blank">hackaday</a> members. Thanks to your <a href="http://hackaday.io/project/412-Home-automation-using-arduino%2C-android-and-jubito" target="_blank">skulls</a>, Jubito has earned its free hackaday t-shirt and sticker.</div>
<div style="text-align: justify;">
Your support gives me strength to keep going, something that I really appreciate!</div>
<br />
<br />
<br />
<div style="text-align: center;">
<b><a href="https://hackaday.io/list/2945-the-hackaday-prize-quarterfinalists" target="_blank">The Hackaday Prize: Quarterfinalists</a></b>
</div>
<div style="text-align: center;">
<b><a href="https://hackaday.io/submissions/prize2014/list" target="_blank">2014 Official Hackaday Prize Entries</a></b>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiASQeEc_e16TOXAl8dK3Ob5a3zo9EK7ndmp5p6j3hGu6QDb5owOUvWxYD3xmETYTjzGDZEGTPv_YRznb2g1-Y8BA0JFSoUC2QUIr-jrNriEulmh51gh5hMHEYUDXoBsieItcctHrtrkow/s1600/IMG_20141015_105832.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiASQeEc_e16TOXAl8dK3Ob5a3zo9EK7ndmp5p6j3hGu6QDb5owOUvWxYD3xmETYTjzGDZEGTPv_YRznb2g1-Y8BA0JFSoUC2QUIr-jrNriEulmh51gh5hMHEYUDXoBsieItcctHrtrkow/s1600/IMG_20141015_105832.jpg" width="400" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-40985120020127656662014-10-13T16:24:00.001+03:002018-07-04T10:11:55.591+03:00Jubito @ IoT360 - The Gateway to Innovation<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
I just completed my registration to the <a href="http://www.iotevents.org/iot360-the-gateway-to-innovation#meetups" target="_blank">IoT360</a>. I'll be in Rome at 27-30 October if anyone interested to meet in person. I'll be glad to see you there!<br />
<strike>I still compose the paper that I will submit and deliver to the BLUE Track sessions (<span style="color: red;">*</span>) and I'll publish it here when it's finished</strike>. A draft is uploaded, you can preview it at the bottom of this post. You can check the eai360 Jubito page <a href="http://360.eai.eu/projects/36eb1cbeb38d02e4dc5ae52f5d82629d#.V6gyxa2hqvY" target="_blank"><b>here</b></a>.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU99Mld1zBXjfACUfAESymYWw-OC5CfOZktTQMDIa4hsQUpIvZquReYHALLpiw_DDyXevXpTqBS5eyBtjX68R7pwazqZSKK2iOHeHX6so09SjWcc775OvCXXG6RZs7QstYhILEiUGpUZo/s1600/ytpYoZ92.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="142" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU99Mld1zBXjfACUfAESymYWw-OC5CfOZktTQMDIa4hsQUpIvZquReYHALLpiw_DDyXevXpTqBS5eyBtjX68R7pwazqZSKK2iOHeHX6so09SjWcc775OvCXXG6RZs7QstYhILEiUGpUZo/s400/ytpYoZ92.jpeg" width="400" /></a></div>
<br />
<u><b>About</b></u><br />
<div style="text-align: justify;">
The IOT360 is a unique event bringing a 360 degree perspective on
IoT-related projects and activities and aiming to coach involved people
on the whole path between research to innovation and all the way through
to commercialization of ideas, projects and technologies.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The
Summit is a powerful and inspirational event that brings together
industry representatives, makers, vendors, experts, developers and
others to plan, learn, network, collaborate, strategize and more
effectively tap into the immense potential of the IoT domain.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The event offers a wide set of activities among which tutorials,
presentations, panels and keynotes covering new methods to accelerate in
the market, monetize technologies & IPR and raise funds in Europe.
Structured professional networking to turn cutting edge into business
through exploitation and commercialization opportunities is a key
priority.</div>
<div style="text-align: justify;">
<blockquote>
(<span style="color: red;">*</span>)
<span style="color: #999999;">People networking to build together the internet of things.</span><br />
<span style="color: #999999;">The Blue track is the instrument to meet people, companies and organizations. This session brings together such actors to share research plans, kick-start initiatives, formulates new projects and make business.</span>
<span style="color: #999999;"><br />
Agile one to one meetings among users facilitate a coral development of the EAI internet of things community.</span></blockquote>
</div>
<a href="http://iot-360.eu/agenda/" target="_blank"><b>Agenda</b></a>.</div>
</div>
<br />
<iframe allowfullscreen="" frameborder="0" height="400" msallowfullscreen="" src="https://app.box.com/embed_widget/s/wjyy73l5nyx7rw4o6dnr?theme=blue" webkitallowfullscreen="" width="100%"></iframe></div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0tag:blogger.com,1999:blog-2252973662798952348.post-11815910585677394622014-07-29T10:57:00.002+03:002017-05-01T13:09:12.648+03:00Arduino RFID access control<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
In this tutorial I will demonstrate an RFID (Radio Frequency Identification) access control system.</div>
<br />
<u><b>What we need</b></u>:<br />
<ul style="text-align: left;">
<li>Arduino</li>
<li><a href="http://www.seeedstudio.com/depot/125khz-rfid-module-uart-p-171.html?zenid=09bfb99d14c91f240ff5e9077a3d0d0e" target="_blank">125KHz RFID module</a></li>
<li><a href="http://www.seeedstudio.com/depot/RFID-tag-combo-125khz-5-pcs-p-700.html" target="_blank">RFID Tags</a> </li>
</ul>
Once you wire the module, download the <a href="http://sourceforge.net/projects/jubito/files/resources/arduino/sketch/rfid.zip/download" target="_blank">sketch</a> and upload it to arduino.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD7JYjUIhv1BnOu4JyS46d7mtY-QVOXBxLQIUTrvyGmgUwT-qb9n14ZTtAlFFbRyrsJ8RtIAi7GmLCN9x5DmfR5qnIJdat10P8nrtHlRAKQQFwWtm2VT-Js684lVmtyCIdltW1D9JFkSI/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD7JYjUIhv1BnOu4JyS46d7mtY-QVOXBxLQIUTrvyGmgUwT-qb9n14ZTtAlFFbRyrsJ8RtIAi7GmLCN9x5DmfR5qnIJdat10P8nrtHlRAKQQFwWtm2VT-Js684lVmtyCIdltW1D9JFkSI/s400/Untitled.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSajCIQ4hF3AGDUc4KuqxUpqhUyB18AXC0AiW1BYg_pcqMXIzqCeIPrpeBpiS3H0eUaYOqu0XZ6JJck2JnYkzD8-QIg0qror8u1FYrw76zbF7X2CQPgB_ahHxpvZwU44l0G7r8P02V-vg/s1600/rfid-arduino.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSajCIQ4hF3AGDUc4KuqxUpqhUyB18AXC0AiW1BYg_pcqMXIzqCeIPrpeBpiS3H0eUaYOqu0XZ6JJck2JnYkzD8-QIg0qror8u1FYrw76zbF7X2CQPgB_ahHxpvZwU44l0G7r8P02V-vg/s400/rfid-arduino.png" width="400" /></a></div>
<br />
Alternatively use codebender
<iframe allowtransparency="true" frameborder="0" src="https://codebender.cc/embed/sketch:93360" style="height: 510px; margin: 10px 0 10px; width: 100%;"></iframe>
<br />
<div style="text-align: justify;">
Open the serial monitor and approach a token or a card to the antenna. You should receive the tag id.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheaCGdkcvX-wZ9cnmpte8OXSiZML78Qp1RvqWnYMNcub13mXukLYReKC1SRt3no2ecgr9gfhaObdoEWEE3Eg438eYSwyjq-qPxpV-urloRjxHdjvl-KTv7paTeIJ37b4AB1LHSKl5wnm0/s1600/Untitled1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheaCGdkcvX-wZ9cnmpte8OXSiZML78Qp1RvqWnYMNcub13mXukLYReKC1SRt3no2ecgr9gfhaObdoEWEE3Eg438eYSwyjq-qPxpV-urloRjxHdjvl-KTv7paTeIJ37b4AB1LHSKl5wnm0/s400/Untitled1.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Now we have readings let's handle them. It's in your discretion what to operate with those, but in this example we will make a simple check-in/check-out sequence.</div>
<br />
As always, check your <a href="http://jubitoblog.blogspot.gr/2013/02/arduino-configuration.html" target="_blank">arduino configuration</a> and then enable the serial port.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjUbLiooqXy2ECzreu97y-yOClhylt46sM2rU77ZJoAQJxVyEv55o1LqdG4fib1DXNCXmaQgUzEP7stGEa4HnfPwygKY7qMhzVSXa2e5Lb78-jh5qPA6f6E6-Rd0_EzifMAaKMkXuiUEg/s1600/serial+port.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjUbLiooqXy2ECzreu97y-yOClhylt46sM2rU77ZJoAQJxVyEv55o1LqdG4fib1DXNCXmaQgUzEP7stGEa4HnfPwygKY7qMhzVSXa2e5Lb78-jh5qPA6f6E6-Rd0_EzifMAaKMkXuiUEg/s400/serial+port.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
To achieve our goal we need to evaluate user status in order to switch from present to absent and vice versa when a tag is pointed. At Control Panel click <i>Add New Instruction Set</i>. Type <span style="font-family: "courier new" , "courier" , monospace;">rfideval</span> in the name field (handler) or one of your choice and the evaluation that follows as the action...</div>
<br />
<code>{ evalBool("%whereami%" == "present"); check_me_out; </code><code><code>check_me_in</code>; }</code><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibbkipgiMIPuql_hgUe7Hj8ADIuNMRKQGpl-XNosjAq46C5Srvef9FDcgwzLlbEUhMnGwRllRAN1mE2kSESQ7yhVO5HbnwmCMfHKEC65OL4HiAv11xJua2cZD-MQJsbdv4PAsmY1gO0Jc/s1600/rfideval.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibbkipgiMIPuql_hgUe7Hj8ADIuNMRKQGpl-XNosjAq46C5Srvef9FDcgwzLlbEUhMnGwRllRAN1mE2kSESQ7yhVO5HbnwmCMfHKEC65OL4HiAv11xJua2cZD-MQJsbdv4PAsmY1gO0Jc/s400/rfideval.png" width="332" /></a></div>
<br />
<div style="text-align: justify;">
'<span style="font-family: "courier new" , "courier" , monospace;">check_me_in</span>' and '<span style="font-family: "courier new" , "courier" , monospace;">check_me_out</span>' are Instruction Sets that corresponds to our preferred actions. For example, saluting user using <span style="font-family: "courier new" , "courier" , monospace;">%salute%</span> function, announce <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-temperature-and-humidity-using.html" target="_blank">temperature</a> even <a href="http://jubitoblog.blogspot.gr/2014/06/arduino-radio-remote-control-rf.html" target="_blank">turning on a light</a>. Also the <span style="font-family: "courier new" , "courier" , monospace;">%checkin%</span> and <span style="font-family: "courier new" , "courier" , monospace;">%checkout%</span> functions are mandatory to changing the current status.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTmflY2dRO9lTVqlQdTOMAo_gg_njgZNcuZ0zcSvB-y83TN3lp4CEG8jrJbxRpI5h1d8F6yL5auSIwz1-Eb1Z9hWoon1H1h4yCXOI1Ku0dxOz5JSVWthBjyCDGplwXm8lgx6QbrYHMhRc/s1600/checkinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTmflY2dRO9lTVqlQdTOMAo_gg_njgZNcuZ0zcSvB-y83TN3lp4CEG8jrJbxRpI5h1d8F6yL5auSIwz1-Eb1Z9hWoon1H1h4yCXOI1Ku0dxOz5JSVWthBjyCDGplwXm8lgx6QbrYHMhRc/s400/checkinout.png" width="400" /></a></div>
<br />
To see how responses will look or sounds like, go to terminal tab and type...<br />
<code> check_me_in; %whereami% <br /> check_me_out; %whereami%</code><br />
...which will execute the commands and after that get the status with <span style="font-family: "courier new" , "courier" , monospace;">%whereami%</span> function.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0j3H8grti-G6ExdEecoAnK5btqAfieAZnTZaJuNB6lKLjGLi36sXwdyBggiGCBIuIWUUv1mmk9frDTxGU4B8xaMwZ06bzYJyQFkFMK8bzNJjKc-4-BoliB8dwRN9mMaGw-_UkDeXhyl8/s1600/cin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0j3H8grti-G6ExdEecoAnK5btqAfieAZnTZaJuNB6lKLjGLi36sXwdyBggiGCBIuIWUUv1mmk9frDTxGU4B8xaMwZ06bzYJyQFkFMK8bzNJjKc-4-BoliB8dwRN9mMaGw-_UkDeXhyl8/s400/cin.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxQ-d4wM2kxjY335BYeKSoyrSkjr24FX9itEui9ztTGqvcaNWB_Dp7IHbLHYETVKBEwG2Iro0fgzIZ4lHAMqPdUJw9usuV53Pm__4AeSNsoMiVsnrxjuMkosi8Kl9pPPjyAB3DuX9Oan8/s1600/cout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxQ-d4wM2kxjY335BYeKSoyrSkjr24FX9itEui9ztTGqvcaNWB_Dp7IHbLHYETVKBEwG2Iro0fgzIZ4lHAMqPdUJw9usuV53Pm__4AeSNsoMiVsnrxjuMkosi8Kl9pPPjyAB3DuX9Oan8/s400/cout.png" width="400" /></a></div>
<br />
We can also drive the check-out sequence within an event handler for extra functionality, like a countdown timer that give as time to leave before status is changed. This action can be achieved by pointing the <span style="font-family: "courier new" , "courier" , monospace;">check_me_out</span> Instruction Set to event handler we just describe. The events will look like this...<br />
<br />
<code>judo sleep <ms>; %checkout%</code><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLIZn1EfKuF0fc-glznzEN-k_fzDsy1nIhsLL6DxvLyaaP34VkfYBP5qTPyH-5U1Y8rOds3hKHzXY6Oaf6A0ZHZ_XwV2oaLiv86qaPCJc_6pp_InFjSzLG48rFZ8uKIKWvawv9DbNQkk/s1600/checkouthandler.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTLIZn1EfKuF0fc-glznzEN-k_fzDsy1nIhsLL6DxvLyaaP34VkfYBP5qTPyH-5U1Y8rOds3hKHzXY6Oaf6A0ZHZ_XwV2oaLiv86qaPCJc_6pp_InFjSzLG48rFZ8uKIKWvawv9DbNQkk/s400/checkouthandler.png" width="400" /></a></div>
</div>
<br />
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ13o_mkM6vVV9W1SDH6b_BIFxeXoeRb3QTO7ihz1mZw4LURXvym6ounivs1rx0FdLN8e_kAccmJKRIStXF1oK72EmVvODIPHzY6yImVxJy-mR-CyfooOpDdLfGfonQYvEqbd1IY9t3iA/s1600/checkinset.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ13o_mkM6vVV9W1SDH6b_BIFxeXoeRb3QTO7ihz1mZw4LURXvym6ounivs1rx0FdLN8e_kAccmJKRIStXF1oK72EmVvODIPHzY6yImVxJy-mR-CyfooOpDdLfGfonQYvEqbd1IY9t3iA/s400/checkinset.png" width="332" /></a></div>
<br />
The <span style="font-family: "courier new" , "courier" , monospace;">check_me_out</span> Instruction Set now points to <span style="font-family: "courier new" , "courier" , monospace;">check-out-handler</span>.<br />
<br />
It would be wise to read about <a href="http://jubitoblog.blogspot.gr/2013/02/built-in-functions-and-api.html" target="_blank">functions and API</a> for extra customization. Also, it would be very handy to know how <a href="http://jubitoblog.blogspot.gr/2013/02/instruction-set-anatomy.html" target="_blank">events</a> work .It will help you to make multiple actions in a single command.<br />
<br />
As we may <a href="http://jubitoblog.blogspot.gr/2014/06/asynchronous-operations-triggered-by.html" target="_blank">already know</a>, whatever collected by the serial port triggers corresponding events if they exists. This means that if we create a new event handler with name (id) same as RFID tag then it will be triggered when found.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEintEtp_4HPFlylcTPaSAOHm_PWtKeoz8fRr4FGUCpSd3j7aMqS0SQXpgk2V4ahN9DGq7S3UOf1zhIxrBE_i0866crSVOgFVjv3TDxAubRV5ntaWfCzFs4MeX2hINdvaF7BJAqnyzK-bDg/s1600/evaltag.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEintEtp_4HPFlylcTPaSAOHm_PWtKeoz8fRr4FGUCpSd3j7aMqS0SQXpgk2V4ahN9DGq7S3UOf1zhIxrBE_i0866crSVOgFVjv3TDxAubRV5ntaWfCzFs4MeX2hINdvaF7BJAqnyzK-bDg/s400/evaltag.png" width="400" /></a></div>
<br />
<div style="text-align: justify;">
Notice the last id in the serial monitor screenshot. When specific token (with id 6600942812) is acknowledged the event will trigger the evaluator '<span style="font-family: "courier new" , "courier" , monospace;">rfideval</span>' and change our status accordingly.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9udxQ1hXZwrxDNi1WFLSpyFT3Ow4JnRJdGHFzbG9cWAoztizSM2NQoc5s_uFSuWNVnqfTprIyFxWcSCIBF5LMuo1Rkr_sEfpFICc5MprK3yqoCkOTAE2wCVHtwBt0UaSGUlg1gdUQ4uI/s1600/Nexus_5_Front_Home_View.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9udxQ1hXZwrxDNi1WFLSpyFT3Ow4JnRJdGHFzbG9cWAoztizSM2NQoc5s_uFSuWNVnqfTprIyFxWcSCIBF5LMuo1Rkr_sEfpFICc5MprK3yqoCkOTAE2wCVHtwBt0UaSGUlg1gdUQ4uI/s400/Nexus_5_Front_Home_View.png" width="236" /></a></div>
</div>
J@mBeLhttp://www.blogger.com/profile/08070875800918729353noreply@blogger.com0