{"id":631,"date":"2014-06-19T22:00:00","date_gmt":"2014-06-19T19:00:00","guid":{"rendered":"http:\/\/blog.iridi.com\/en\/2014\/06\/19\/control-smart-homes-from-any-part-of-the-world\/"},"modified":"2018-07-18T13:20:38","modified_gmt":"2018-07-18T10:20:38","slug":"control-smart-homes-from-any-part-of-the-world","status":"publish","type":"post","link":"https:\/\/blog.iridi.com\/en\/control-smart-homes-from-any-part-of-the-world\/","title":{"rendered":"Control Smart Homes from Any Part of the World!"},"content":{"rendered":"<p>iRidium software package enables control of smart homes from any mobile devices, smart phones and tablets based on iOS, Android, Windows and OS X. Smart phones and tablets, as a rule, travel with their owners, no matter where they go to work in the office or to rest abroad. And owners of smart homes want to know what is going on in their houses when they are away. And here we come across a reasonable question,<\/p>\n<h3 align=\"center\">How to realize remote control of Smart Home?<\/h3>\n<p>iRidium offers <b>2 ways of remote control:<\/b><\/p>\n<p><img class=\"alignright\" style=\"border: 1px solid #B2B2B2;\" src=\"https:\/\/iridiummobile.net\/upload\/medialibrary\/9c0\/9c0f902060af3cefd8e5ffbe40397d2c.jpg\" width=\"320px\" \/><\/p>\n<ol>\n<li>If the automation system, you work with, uses \u0422\u0421\u0420\/IP as a transport protocol, you can connect remote clients without extra work. All you have to do is to set up a router and make a rule for switching between the local and the external connection interfaces.<\/li>\n<li>Other automation systems receive commands via UDP or even RS232. This way of transmitting data is less reliable. It\u2019s not protected, and loss of data is possible. That\u2019s why iRidium offers to use iRidium Gate, software gateway, that is launched on the automation project and supports reliable stable connection with the external world and give some useful capabilities.<\/li>\n<\/ol>\n<p>In both cases (direct connection and via iRidium Gate) control panels that are in the Internet connect to the system using its external address and \u0422\u0421\u0420\/IP connection. When a control panel is in the same IP-net with the controlled equipment, it uses the local IP address.<\/p>\n<p>To realize switching between the local and the external connection interfaces, iRidium offers a simple and easily- scalable method. This method includes creating buttons to switch connection modes with the equipment. It doesn\u2019t take long to make them, and they may look, the way your customer wants it.<\/p>\n<h3 align=\"center\">How to set switching between local and external interfaces?<\/h3>\n<p>We\u2019ll show how to set up switching between the local and external interfaces using as an example KNX IP BAOS router.<\/p>\n<p>Let\u2019s start with basics: iRidium has a special script function responsible for changes in connection settings \u2013 <b>SetParameters<\/b>. It is set in the Script Editor, but no knowledge of programming is required for this. It is set this way:<\/p>\n<p><img class=\"alignleft\" src=\"https:\/\/iridiummobile.net\/upload\/medialibrary\/6f9\/6f976f851a5c7a8a1f9c78894f7dae76.jpg\" \/> 1. Open Java <b>Script Editor<\/b> in iRidium GUI Editor. iRidium has a built-in programming language, based on Java Script.<\/p>\n<p><img class=\"alignleft\" src=\"https:\/\/iridiummobile.net\/upload\/medialibrary\/578\/5787b7d7d1964f090e8e6bc74fdfbaa8.jpg\" \/><\/p>\n<p>2. Open sample module with the SetParameters function:<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Press Add Script from File and download a <a href=\"https:\/\/s3.amazonaws.com\/iRidiumWiki2.0\/Driver_KNX_BAOS\/KnxSetParameters.js\" target=\"_blank\" rel=\"nofollow noopener\">ready script for KNP IP BAOS<\/a>.<\/p>\n<p>You can find <b>scripts for other automation systems<\/b> in <a href=\"http:\/\/wiki2.iridiummobile.net\/index.php\/Main_Page\" target=\"_blank\" rel=\"nofollow noopener\">iRidium Wiki<\/a>.<\/p>\n<p>3. Setup the <b>Set Parameters<\/b> function (it can be copied as many times as required):<\/p>\n<p><center><img class=\"aligncenter\" src=\"https:\/\/iridiummobile.net\/upload\/medialibrary\/246\/246a987a948eadb3fee35ae926caad9c.jpg\" \/><\/center>&nbsp;<\/p>\n<p>A project must have at least 2 functions SetParameters: one \u2013 to call local connection settings, the other \u2013 to call external connection settings. It\u2019s impotant for each function to have a unique name (Internal, External, \u2026). A ready function looks like this:<\/p>\n<hr \/>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt;\"><span lang=\"EN-US\" style=\"font-size: 10pt; font-family: 'Courier New';\">function<\/span> <span lang=\"EN-US\" style=\"font-size: 10pt; font-family: 'Courier New';\">External<\/span><span style=\"font-size: 10pt; font-family: 'Courier New';\">()<\/span><span lang=\"EN-US\" style=\"font-size: 10pt; font-family: 'Courier New';\">\u00a0\u00a0<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt;\"><span style=\"font-size: 10pt; font-family: 'Courier New';\">{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt;\"><span lang=\"EN-US\" style=\"font-size: 10pt; font-family: 'Courier New';\">\u00a0IR.GetDevice(&#8220;<b><span style=\"color: #e36c0a;\">KNX BAOS 771\/772<\/span><\/b>&#8220;).SetParameters({Host: &#8220;<b><span style=\"color: red;\">215.215.10.10<\/span><\/b>&#8220;, Port: &#8220;<b><span style=\"color: #0070c0;\">12004<\/span><\/b>&#8220;, UpdateTime: &#8220;<b><span style=\"color: #00b050;\">0<\/span><\/b>&#8220;});<\/span><\/p>\n<p><span style=\"font-size: 10pt; line-height: 115%; font-family: 'Courier New';\">}<\/span><\/p>\n<hr \/>\n<ul>\n<li>IR.GetDevice \u2013 name of BAOS router in the project (any name is possible);<\/li>\n<li>Host \u2013 IP-address (local or external) for connection to KNX IP BAOS;<\/li>\n<li>Port \u2013 \u0422\u0421\u0420 port (local or external) for connection to KNX IP BAOS;<\/li>\n<li>UpdateTime \u2013 specific BAOS parameter, it\u2019s different for different drivers.<\/li>\n<\/ul>\n<p>A ready function is called with a button of a graphical interface by means of a command <b>Script Call<\/b>. To do that a command has to be added to the Press or Release event of the button. Go to Object Properties &gt; Programming &gt; Press Event and add Script Call to the button. Remember to choose the name of the function that is called by pressing a button:<\/p>\n<p><center><img class=\"aligncenter\" src=\"https:\/\/iridiummobile.net\/upload\/medialibrary\/e62\/e62ae471add81788e482ac184c3fc80e.jpg\" \/><\/center>&nbsp;<\/p>\n<p>It\u2019s done! Now the project has a page with buttons, by pressing which the connection mode to the KNX bus changes: from the Internet to the local net.<\/p>\n<p>Now let\u2019s prepare the net equipment for transmitting data from the Internet to KNX router. To do that set <a href=\"http:\/\/wiki2.iridiummobile.net\/Setting_up_Port_Forwarding_Service\" target=\"_blank\" rel=\"nofollow noopener\">Port Forwarding Service<\/a> on the router with Internet access.<\/p>\n<h3 align=\"center\">ATTENTION: Security!<\/h3>\n<p><img class=\"alignleft\" src=\"https:\/\/iridiummobile.net\/upload\/medialibrary\/365\/36550456ea4502162b03098321f3bc53.jpg\" width=\"320px\" \/><\/p>\n<p>iRidium technical support is repeatedly asked the following question, \u201cHow to secure the customer? As most automation systems, including KNX, don\u2019t support protected connection\u201d.<\/p>\n<p>And, in fact, automation equipment can be easily accessed and tempered with due to its open ports. Thus, an unauthorized user may have access to all systems of smart home or building. So, when setting remote control of Smart home remember the simple and reliable way of connection protection \u2013 VPN technology. A system administrator can easily set it, and your customer will never come across a security issue. And as a pleasant bonus, VPN is supported by iOS, as well as Android.<\/p>\n<p>You can download a ready project with settings for KNX IP BAOS <a href=\"https:\/\/s3.amazonaws.com\/iRidiumWiki2.0\/Driver_KNX\/KNX_Internal-External.irpz\" target=\"_blank\" rel=\"nofollow noopener\">HERE<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>iRidium software package enables control of smart homes from any mobile devices, smart phones and tablets based on iOS, Android, Windows and OS X. Smart<\/p>\n","protected":false},"author":2,"featured_media":930,"comment_status":"open","ping_status":"open","sticky":false,"template":"template-centered.php","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/posts\/631"}],"collection":[{"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/comments?post=631"}],"version-history":[{"count":3,"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/posts\/631\/revisions"}],"predecessor-version":[{"id":1178,"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/posts\/631\/revisions\/1178"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/media\/930"}],"wp:attachment":[{"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/media?parent=631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/categories?post=631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iridi.com\/en\/wp-json\/wp\/v2\/tags?post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}