├── Changing the Default IP Address ├── README.md └── images │ ├── image1.png │ ├── image2.png │ └── image3.png ├── Changing the IoT Gateway to a WiFi Client ├── README.md └── images │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── network │ └── wireless ├── Clearing Secure Boot Keys └── README.md ├── Getting Started With Cloud Commander ├── README.md └── images │ ├── image1.jpg │ ├── image1.png │ ├── image2.jpg │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ └── image6.png ├── Getting Started With Helix Device Cloud (HDC) ├── README.md ├── hdc │ └── HDC21forIDP31.tgz └── images │ ├── image1.png │ ├── image10.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ ├── image6.png │ ├── image7.png │ ├── image8.png │ └── image9.png ├── Getting Started With Node-Red and AWS IoT ├── README.md └── images │ ├── image1.png │ ├── image10.png │ ├── image11.png │ ├── image12.png │ ├── image13.png │ ├── image14.png │ ├── image15.png │ ├── image16.png │ ├── image17.png │ ├── image18.png │ ├── image19.png │ ├── image2.png │ ├── image20.png │ ├── image21.png │ ├── image22.png │ ├── image23.png │ ├── image24.png │ ├── image25.png │ ├── image26.png │ ├── image27.png │ ├── image28.png │ ├── image29.png │ ├── image3.png │ ├── image30.png │ ├── image31.png │ ├── image32.png │ ├── image33.png │ ├── image34.png │ ├── image35.5.png │ ├── image35.png │ ├── image36.png │ ├── image4.png │ ├── image5.png │ ├── image6.png │ ├── image7.png │ ├── image8.png │ └── image9.png ├── Getting Started With Node-Red and Arduino 101 with the Grove Shield ├── README.md └── images │ ├── image1.jpg │ ├── image2.jpg │ ├── image3.png │ └── image4.png ├── Getting Started With Node-Red and Bluemix ├── README.md └── images │ └── image1.png ├── Getting Started With Node-Red and Comet T0310 ├── README.md ├── images │ ├── image1.png │ ├── image2.png │ ├── image3.png │ └── image4.png └── src │ └── readtempfromcomet.c ├── Getting Started With Node-Red and LightBlue Bean ├── README.md └── images │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ └── image5.png ├── Getting Started With Node-Red and Microsoft Azure IoT Hub ├── README.md └── images │ ├── image1.png │ ├── image10.png │ ├── image11.png │ ├── image12.png │ ├── image13.png │ ├── image14.png │ ├── image15.png │ ├── image16.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ ├── image6.png │ ├── image7.png │ ├── image8.png │ └── image9.png ├── Getting Started With Node-Red and Nest ├── README.md └── images │ ├── image1.5.png │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ └── image5.png ├── Getting Started With Node-Red and Omega RH-USB ├── README.md └── images │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ └── image6.png ├── Getting Started With Node-Red and Philips Hue ├── README.md └── images │ ├── image1.jpeg │ ├── image2.jpeg │ ├── image3.png │ └── image4.png ├── Getting Started With Node-Red and RFID ├── README.md └── images │ ├── image1.jpeg │ ├── image2.png │ ├── image3.png │ ├── image4.png │ └── image5.png ├── Getting Started With Node-Red and TI SensorTag ├── README.md └── images │ ├── ti-blesetupscreen.png │ ├── ti-json.png │ ├── ti-noderedscreen.png │ ├── ti-sensornode.png │ ├── ti-sensortag.png │ └── ti-sensorwire.png ├── Getting Started With Node-Red and Z-Wave ├── README.md └── images │ ├── image1.jpeg │ ├── image2.jpeg │ ├── image3.png │ ├── image4.png │ ├── image5.png │ ├── image6.png │ ├── image7.png │ ├── image8.png │ └── image9.png ├── Getting Started With Remote Debug ├── README.md └── images │ ├── remote_dbg_1.png │ └── remote_dbg_2.png ├── LICENSE ├── README.md └── Updating the Intel IoT Gateway Developer Packages ├── README.md └── images ├── image1.png ├── image2.png ├── image3.png ├── image4.png ├── image5.png ├── image6.png ├── image7.png └── image8.png /Changing the Default IP Address/README.md: -------------------------------------------------------------------------------- 1 | # Changing the Default IP Address # 2 | 3 | 4 | ## Overview ## 5 | When an IoT Gateway that uses Intel® IoT Gateway Technology is first installed, it is running as an WiFi access point. This supports an easy connection from a client for web based access to Intel® IoT Gateway Developer Hub, out of the box tutorials, and later configuration. To facility easy access, the default IP address of the IoT Gateway is set to 192.168.1.1. Sometimes, this address conflicts with the network you may want to connect the IoT Gateway to via a wired connection. If this is the case, you can follow these steps to change the IP adress the IoT Gateway is using. 6 | 7 | ## Required Hardware ## 8 | - IoT Gateway that uses Intel® IoT Gateway Technology 9 | - A system running a web browser. In the case of this tutorial, we used a laptop running Windows 10 and Chrome. 10 | 11 | ## Assumptions ## 12 | - Intel® IoT Gateway Technology version 3.1 or above 13 | - Your client is connected to the IoT Gateway wirelessly an access point 14 | 15 | ## Changing the IP Address ## 16 | The administration console is web based and can be easily accessed via the Developer Hub. To access the Developer Hub, open your web browser and go the . Log in with the username and & password. Once connected, you should see something like this: 17 | 18 | ![](images/image1.png) 19 | 20 | Click on the Administration Icon. You should see a screen like this: 21 | 22 | ![](images/image2.png) 23 | 24 | Now click on the LAUNCH button under the Gear icon. This will open another browser window or tab. Log in with your root password. It will look like this: 25 | 26 | ![](images/image3.png) 27 | 28 | This is the admin console for the gateway. From here you can manage and configure many gateway settings but we'll be focusing on the network section. 29 | 30 | 1. Click on Network from the menu bar and select Interfaces 31 | 2. To the right of the 1st Network section (currently configured as LAN and br-lan), click on Edit 32 | 3. Change the IP Address from 192.168.1.1 to 10.0.0.1. 33 | 4. Click on Save & Apply 34 | 5. It will take a few moments for the new configuration to apply 35 | 36 | Note: You are changing the IP address of interface you are using to access the IoT Gateway. You will need to change your URL to the new address after Clicking on Save & Apply and you may need to disconnect and reconnect your WiFi to the gateway to obtain a new IP address. 37 | 38 | You can now connect the IoT Gateway to a wired connection that is using the 192.16.1.x network and not conflict. 39 | 40 | 41 | ## References ## 42 | - none 43 | 44 | *indicates that third-party names might be the property of others. -------------------------------------------------------------------------------- /Changing the Default IP Address/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Changing the Default IP Address/images/image1.png -------------------------------------------------------------------------------- /Changing the Default IP Address/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Changing the Default IP Address/images/image2.png -------------------------------------------------------------------------------- /Changing the Default IP Address/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Changing the Default IP Address/images/image3.png -------------------------------------------------------------------------------- /Changing the IoT Gateway to a WiFi Client/README.md: -------------------------------------------------------------------------------- 1 | # Changing the IoT Gateway to a WiFi Client # 2 | 3 | 4 | ## STOP! ## 5 | This process is a work in progress. Do not attempt unless you actively working with a customer support representative or are prepared to rebuild your IoT Gateway if something goes wrong. 6 | 7 | ## Overview ## 8 | By default, your IoT Gateway that uses Intel® IoT Gateway Technology comes pre-configured setup as a WiFi Access Point. This is so you can connect a client to it access it for initial evaluation and later configuration without connecting it to a wired network. If you want to connect the IoT Gateway to a WiFi network, you'll need to change it's network configuration from an Access Point to a client. This can be easily done via the administration portal accessed from the Intel® IoT Gateway Developer Hub. 9 | 10 | ## Required Hardware ## 11 | - IoT Gateway that uses Intel® IoT Gateway Technology 12 | - A system running a web browser. In the case of this tutorial, we used a laptop running Windows 10 and Chrome. 13 | 14 | ## Assumptions ## 15 | - Intel® IoT Gateway Technology version 3.1 or above 16 | - You have wired network connectivity to the IoT Gateway and you know it's IP address 17 | 18 | ## Warning ## 19 | It is highly recommenced you connect the IoT Gatway to a wired network and use that connection for this process. It is possible to make these changes via the wireless connection as long as you only save changes, but not apply them, until the last step; but if you make any mistakes or if it doesn't connect to your WiFi network for some reason, you may not longer be able to access the gateway. If this happens, see the Restoring factory network setting section below. 20 | 21 | ## Configuration Changes ## 22 | 23 | Ensure the IoT Gateway is plugged in to a wired network connection. If the IoT Gateway has multiple Ethernet ports, you should use the one that corresponds to eth0. You'll need to know the IP address of this wired connection. You can use one of these methods to obtain the IP address. 24 | 25 | - If your client is wirelessly connect to the gateway directly, you can obtain the IP addresses through the Developer Hub main screen where gateway information is shown on the left side. 26 | - Access a console by a directly connected monitor & keyboard or by launching Cloud Commander from the Administration tab on the Developer Hub. To do so, click on the Launch button under the folder icon. once in Cloud Commander click on the >_~ icon to open a console. Then enter: 27 | 28 | > ifconfig 29 | 30 | Look for the inet addr: within the eth0 section 31 | 32 | Once you know the IP address of the wired connection, close any instances you have to the Developer Hub, connect your client to the same network that the IoT gateway's wired connection is connected to, and reconnect to the Developer Hub by going to: 33 | http://wiredipaddressofthegateway 34 | 35 | After logging in, you should see a screen like this 36 | 37 | ![](images/image1.png) 38 | 39 | To access the IoT Gateway Admin console, click on the Administration Icon. You should see a screen like this: 40 | 41 | ![](images/image2.png) 42 | 43 | Now click on the LAUNCH button under the Gear icon. This will open another browser window or tab. Log in with your root password. It will look like this: 44 | 45 | ![](images/image3.png) 46 | 47 | This is the admin console for the gateway. From here you can manage and configure many gateway settings but we'll be focusing on the network section. 48 | 49 | 1. Click on Network from the menu bar and select Interfaces 50 | 2. To the right of the 1st Network section (currently configured as LAN and br-lan), click on Edit 51 | 3. Click on Physical Settings 52 | 4. Uncheck Bridge interface 53 | 5. Click on Save (not Save & Apply) 54 | 6. Click on Firewall Settings 55 | 7. Select wan 56 | 8. Click on Save (not Save & Apply) 57 | 9. Click on Network from the menu bar and select WiFi 58 | 10. Click on Edit 59 | 11. Click on Mode and change it from Access Point to Client 60 | 12. In the ESSID filed, enter the SSID of the WiFi network you want to connect the IoT Gateway to. 61 | 13. Click on the Wireless Security Tab 62 | 14. Set the encryption type to match the WiFi network you are connecting to 63 | 15. Set the key for the WiFi network you are connecting to 64 | 16. Click on Save & Apply 65 | 17. It will take a few moments for the new configuration to apply 66 | 67 | You can confirm you are now connected to your WiFi network by again issuing an ifconfig command on the IoT Gateway console. You should see an IP address assigned to wlan0. If not, recheck your SSID and encryption settings. 68 | 69 | Note the IP address assigned to WLAN0. 70 | 71 | Using the same administrative interface you used above, click on System and Reboot. Click on Perform reboot 72 | 73 | Now unplug the wired Ethernet connection. 74 | 75 | After the IoT Gateway reboots, reconnect to the Developer Hub via the WLAN IP address you noted above (This assumes your client is on the same network or can route to it). 76 | 77 | **Congratulations! You've successfully changed the IoT Gateway to WiFi Client mode and connected to your network.** 78 | 79 | ## Using the wired connection as well ## 80 | 81 | Connect to the Developer Hub by going to: 82 | http://wirelessipaddressofthegateway 83 | 84 | Click on the Administration icon 85 | 86 | Now click on the LAUNCH button under the Gear icon. This will open another browser window or tab. Log in with your root password. 87 | 88 | This is the admin console for the gateway. From here you can manage and configure many gateway settings but we'll be focusing on the network section. 89 | 90 | 1. Click on Network from the menu bar and select Interfaces 91 | 2. To the right of the 2nd Network section (currently configured as WAN and eth0), click on Edit 92 | 6. Click on Firewall Settings 93 | 7. Select lan 94 | 8. Click on Save & Apply 95 | 96 | If you plug a wired connection to Eth0, you sound now be able to reach the IoT Gateway via the address assigned to that connection. You can use the ifconfig command mentioned above to obtain the IP address. If you wan to set a static IP address, please refer to the next section. 97 | 98 | ## Using static IP addresses ## 99 | 100 | Connect to the Developer Hub by going to: 101 | http://wirelessipaddressofthegateway 102 | 103 | Click on the Administration icon 104 | 105 | Now click on the LAUNCH button under the Gear icon. This will open another browser window or tab. Log in with your root password. 106 | 107 | This is the admin console for the gateway. From here you can manage and configure many gateway settings but we'll be focusing on the network section. 108 | 109 | 1. Click on the Edit button for the interface you want to change to a static IP address 110 | 2. Select the Protocol drop down and change it to Static address 111 | 3. Click on Switch protocol 112 | 4. Enter the IP address and associated netmask, gateway, and DNS server 113 | 5. Click on Save & Apply 114 | * WARNING, you are changing the IP address of interface you are using to access the IoT Gateway you will need to change your URL to the new address after Clicking on Save & Apply. 115 | 116 | ## Restoring factory network settings ## 117 | These links provide the default [network](images/network) and [wireless](images/wireless) config files. If through a configuration error the gateway becomes inaccessible, you can place these files on a USB flash drive and copy them to the gateway using a directly connected monitor and keyboard. Both files need to be copied in to the /etc/config folder. Placing them there and rebooting will return the network configuration to the default settings; (with one exception. The SSID will be "IDPDK-4001" and not IDPDK-lastfourofyourmacaddress). 118 | 119 | ## References ## 120 | - none 121 | 122 | 123 | *indicates that third-party names might be the property of others. 124 | -------------------------------------------------------------------------------- /Changing the IoT Gateway to a WiFi Client/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Changing the IoT Gateway to a WiFi Client/images/image1.png -------------------------------------------------------------------------------- /Changing the IoT Gateway to a WiFi Client/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Changing the IoT Gateway to a WiFi Client/images/image2.png -------------------------------------------------------------------------------- /Changing the IoT Gateway to a WiFi Client/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Changing the IoT Gateway to a WiFi Client/images/image3.png -------------------------------------------------------------------------------- /Changing the IoT Gateway to a WiFi Client/images/network: -------------------------------------------------------------------------------- 1 | 2 | config interface 'loopback' 3 | option ifname 'lo' 4 | option proto 'static' 5 | option ipaddr '127.0.0.1' 6 | option netmask '255.0.0.0' 7 | 8 | config interface 'wan' 9 | option ifname 'eth0' 10 | option proto 'dhcp' 11 | 12 | config interface 'lan' 13 | option ifname 'wlan0' 14 | option type 'bridge' 15 | option proto 'static' 16 | option ipaddr '192.168.1.1' 17 | option netmask '255.255.255.0' 18 | 19 | config interface 'wwan' 20 | option ifname '3g-wwan' 21 | option device '/dev/ttyACM0' 22 | option ppp_redial 'demand' 23 | option defaultroute '1' 24 | option peerdns '1' 25 | option service 'umts_first' 26 | option sconnservice 'UMTS' 27 | option dialnumber '*99***1#' 28 | option proto 'none' 29 | 30 | config device 'modem_cell' 31 | option name 'modem_cell' 32 | option present 'No' 33 | 34 | config device 'sim_card' 35 | option name 'sim_card' 36 | option present 'No' 37 | 38 | -------------------------------------------------------------------------------- /Changing the IoT Gateway to a WiFi Client/images/wireless: -------------------------------------------------------------------------------- 1 | config wifi-device wlan0 2 | option type mac80211 3 | option channel 11 4 | option hwmode 11ng 5 | option path 'pci0000:00/0000:00:1c.1/0000:02:00.0' 6 | option htmode HT20 7 | option disabled 0 8 | 9 | config wifi-iface 10 | option device wlan0 11 | option network lan 12 | option mode ap 13 | option ssid IDPDK-4001 14 | option encryption psk2 15 | option key windriveridp 16 | 17 | -------------------------------------------------------------------------------- /Clearing Secure Boot Keys/README.md: -------------------------------------------------------------------------------- 1 | # Clearing Secure Boot Keys from the BIOS # 2 | 3 | 4 | ## Overview ## 5 | When an IoT Gateway that uses Intel® IoT Gateway Technology is installed, the secure boot keys in the BIOS are set to match the keys used to sign the kernel. Once this is done, images that do not match will not boot on the HW. This prevents booting an alternative image/os and gaining access to the data on the IoT Gateway. If you need to install a new image with non-default keys, you will 1st need to clear the secure boot keys from the BIOS. 6 | 7 | ## Required Hardware ## 8 | - IoT Gateway that uses Intel® IoT Gateway Technology 9 | 10 | ## Assumptions ## 11 | - Intel® IoT Gateway Technology version 3.1 or above 12 | 13 | ## Clearing the keys ## 14 | 15 | 1. Boot/reboot 16 | 2. Select boot device by pressing F12 before boot or ESC to enter BIOS (depends on HW) 17 | 3. Select Enter Setup (skip if ESC entered BIOS) 18 | 4. Select the Security Menu 19 | 5. Select Secure Boot Menu 20 | 6. Set Secure Boot to Disabled 21 | 7. Press F4 to save and exit 22 | 8. System will reboot 23 | 9. Select boot device by pressing F12 before boot 24 | 10. Select Enter Setup 25 | 11. Select the Security Menu 26 | 12. Select Secure Boot Menu 27 | 13. Set Secure Boot to Enabled 28 | a. Accept Warning - press enter for Ok 29 | 14. Set Secure Boot Mode to Custom 30 | 15. Select Key Management 31 | 16. Set Default Key Provision to Disabled 32 | 17. Select Delete All Secure Boot Variables or for each Section (5) select Delete PK, KEK, DB, DBT, and DBX 33 | a. All should say NOT INSTALLED 34 | 18. Press Esc 35 | 19. Set Secure Boot Mode to Standard 36 | 20. Ensure Secure Boot is set to Enabled 37 | 21. Press F4 to save and exit 38 | 39 | (let's double check) 40 | 41 | 1. System will reboot 42 | 2. Select boot device by pressing F12 before boot 43 | 3. Select Enter Setup 44 | 4. Select the Security Menu 45 | 5. Select Secure Boot Menu 46 | - System Mode should say Setup 47 | - Secure Boot should say Not Active 48 | - Secure Boot should say Enabled 49 | - Secure Boot Mode should say Standard 50 | 6. Press F4 to save and exit 51 | 52 | You should now be able to boot a new image 53 | 54 | ## References ## 55 | - none 56 | 57 | *indicates that third-party names might be the property of others. -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Cloud Commander # 2 | 3 | 4 | ## Overview ## 5 | Cloud Commander* is a web based file manager with console and editor. Using Cloud Commander, you can work with files, directories and programs via your browser from any computer, mobile or tablet. It's a quick and easy way to take an application you've developed locally, upload it to your gateway, and test, edit, iterate directly from the Intel® IoT Gateway Developer Hub on your IoT Gateway that uses Intel® IoT Gateway Technology. 6 | 7 | ## Required Hardware ## 8 | - IoT Gateway that uses Intel® IoT Gateway Technology 9 | - A system running a web browser. In the case of this tutorial, we used a laptop running Windows 10 and Chrome. 10 | 11 | ## Assumptions ## 12 | - Intel® IoT Gateway Technology version 3.1 or above 13 | - Cloud Commander is enabled (installed and enabled by default) 14 | - You have network connectivity to the IoT Gateway and you know it's IP address 15 | 16 | ## Access Cloud Commander ## 17 | Cloud Commander is all web based and can be easily accessed via the Developer Hub. To access the Developer Hub, open your web browser and go the . Log in with the username and & password. Once connected, you should see something like this: 18 | 19 | ![](images/image1.png) 20 | 21 | To access Cloud Commander, click on the Administration Icon. You should see a screen like this: 22 | 23 | ![](images/image2.png) 24 | 25 | Now click on the LAUNCH button under the Folder icon. This will open Cloud Commander. You should now see two sections showing the folder listing on your IoT gateway. Below the folder listings are a row of buttons (you may need to scroll down). It will look like this: 26 | 27 | ![](images/image3.png) 28 | 29 | This is Cloud Commander. From here you can navigate to any folder or file on your IoT gateway just by clicking on the folder name. Here are the primary features of Cloud Commander. You can click on these buttons or press the corresponding function key 30 | 31 | - F1 Opens a Help screen 32 | - F2 Renames a file 33 | - F3 Views a file 34 | - F4 Edits a file 35 | - F5 Copies a file. You will be prompted for the location to copy to. By default it will be whatever location you are in on the right side file / folder browser. 36 | - F6 Moves a file.You will be prompted for the location to copy to. By default it will be whatever location you are in on the right side file / folder browser. 37 | - F7 Create a new folder 38 | - F8 Delete a file (you will be prompted to confirm) 39 | - F9 Opens a menu of these options including extras such as Pack and Extract which uses Tar). You can also open this menu or a subset by right clicking on a file, folder, or blank space. 40 | - F10 Opens a settings menu for Cloud Commander 41 | - >_~ Opens a web based terminal to your IoT gateway. Very powerful way to quickly execute a command or commands directly on your IoT gateway from the web browser 42 | 43 | To copy files to/from your local system, just drag them to/from the Cloud Commander interface. You can also right click in Cloud Commander and choose Upload or right click on a file in Cloud Command and choose download. By right clicking, you'll also see Upload to Cloud or Upload From Cloud. This is just like coping to/from your local system but supports directly accessing common cloud locations such as Dropbox, Google Drive, Box, and Amazon Cloud. 44 | 45 | Let's walk though a typical scenario of using Cloud Commander. 46 | 47 | Say you've developed an python application you now want to run from your IoT gateway. Here's a quick sample. Save this to a local file on your system and name it hello-world.py 48 | 49 | ``` 50 | 51 | printx "Hello World" 52 | ``` 53 | 54 | Open up Cloud Commander, navigate to your /home/gwuser folder. 55 | Now let's copy the hello-world.py application to you IoT gateway. Simple drag it from your system to the Cloud Commander view of the /home/gwuser folder. 56 | 57 | Now that's it on your IoT gateway, let's try running it. 58 | 59 | From Cloud Commander, click on the >_~ button to open a terminal session. Enter these commands to change to your home folder and run the application 60 | 61 | > cd /home/gwuser 62 | > python hellow-world.py 63 | 64 | Opps, it looks like there's an error with our code. 65 | 66 | ![](images/image4.png) 67 | 68 | Close the terminal session by clicking the X in the top right of the window and from Cloud Commander click on the hello-world.py file and choose or click on the F4 button to edit the file. 69 | 70 | ![](images/image5.png) 71 | 72 | Ah, it looks like there's a typo. Remove the "x" after "print" and click on the X in the top right of the window to close the file and confirm that you want to save your changes. 73 | 74 | Now let's try the application again. From Cloud Commander, click on the >_~ button to open a terminal session. Enter these commands to change to your home folder and run the application 75 | 76 | > cd /home/gwuser 77 | > python hellow-world.py 78 | 79 | ![](images/image6.png) 80 | 81 | Much better. Now the application runs correctly. 82 | 83 | **Congratulations! You've successfully used Cloud Commander to upload, edit, and execute an application on the IoT Gateway.** 84 | 85 | ## Installing an RPM via Cloud Commander ## 86 | 87 | - Open Cloud Commander and Navigate to the folder you want to copy the RPM to. For example; /home/gwuser 88 | - If you have already downloaded the RPM, simply drag the file from your computer to the Cloud Commander interface 89 | - If you have not downloaded the RPM, Cloud Command and download it for you assuming you have the full URL to the RPM. Select and copy the full URL and then in Cloud Commander right-click and select Upload from Cloud. Then select Link (URL) and paste the full URL you copied in to the URL of the file field. Click on the Upload button. 90 | - To install the RPM, click on the >_~ button at bottom of the Cloud Commander window. This will open a console to the IoT Gateway. Navigate to the folder that contains the RPM. For example, if you copied it to /home/gwuser you would type the following and press enter/return: 91 | 92 | > cd /home/gwuser 93 | 94 | - Now type rpm -Uvh and the rpm name. For example: 95 | 96 | > rpm -Uvh rpmfilename.rpm 97 | 98 | - The RPM installs 99 | 100 | ## References ## 101 | - [Cloud Commander](http://cloudcmd.io) 102 | 103 | 104 | *indicates that third-party names might be the property of others. 105 | -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image1.jpg -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image2.jpg -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Cloud Commander/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Cloud Commander/images/image6.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Helix Device Cloud (HDC) # 2 | 3 | 4 | ## Overview ## 5 | Wind River® Helix™ Device Cloud is a device management platform for the Internet of Things (IoT) that helps organizations greatly reduce the complexities of building and operating large-scale device deployments. Specifically, it is the management conosle that Wind River uses to manage their Wind River Linux operating system that the Intel IoT Gateway is based on. 6 | 7 | ## Required Hardware ## 8 | - IoT Gateway that uses Intel® IoT Gateway Technology 9 | 10 | ## Assumptions ## 11 | - [Intel® IoT Gateway Technology version 3.1](https://shopiotmarketplace.com/iot/index.html#/details?pix=58) or above 12 | - An internet connection to the gateway that has the ability to talk to the HDC cloud 13 | 14 | ## Getting Access to HDC ## 15 | Prior to configuring your gateway to connect to Helix Device Cloud, it is necessary to get a trial account. You can do that by clicking the contact us link on this site: 16 | [http://www.windriver.com/products/helix/device-cloud/](http://www.windriver.com/products/helix/device-cloud/) 17 | 18 | ## Installing the HDC Agent ## 19 | Warning: You should have access to HDC prior to installing the HDC agent on the gateway because part of the installation is configuring the startup.bin file to point to your instance of HDC. 20 | 21 | When you have access, download the HDC 2.1 agent from here: 22 | [intel-iot-gateway/Getting Started With Helix Device Cloud (HDC)/hdc/](https://github.com/intel-iot-devkit/intel-iot-gateway/blob/master/Getting%20Started%20With%20Helix%20Device%20Cloud%20(HDC)/hdc/HDC21forIDP31.tgz) 23 | 24 | Connect to the Developer Hub on the IoT gateway, click on the Administration tab and Launch Cloud Commander. If you need a more in depth tutorial on how to use Cloud Commander, please refer to the that [tutorial](https://github.com/intel-iot-devkit/Intel-IoT-Gateway/tree/master/Getting Started With Cloud Commander). 25 | 26 | ![](images/image1.png) 27 | 28 | Copy the HDC 2.1 agent files to the gateway by positioning your windows so that you can drag the file on the file editor that you downloaded earlier and copy them to the IoT gateway. 29 | 30 | ![](images/image2.png) 31 | 32 | Then extract it: 33 | 34 | ![](images/image3.png) 35 | 36 | Then launch the built in command interface in cloud commander: 37 | 38 | ![](images/image4.png) 39 | 40 | Run the following commands: 41 | 42 | cd /root 43 | 44 | rpm -ihv *.rpm 45 | 46 | ![](images/image5.png) 47 | 48 | The agent is now installed, however you need to configure the startup.bin file to point you your instance of HDC. It is critical that you do this now, before you reboot so that you don’t connect to the wrong instance. 49 | 50 | Open your HDC instance and go to your profile settings: 51 | 52 | ![](images/image6.png) 53 | 54 | Download the startup.bin file from your profile page on Helix Device Cloud and save it to your local machine. 55 | Go back to the Developer Hub interface and copy over the startup.bin file into the /opt/intel/ubroker/bin/ directory, overwriting what is already there if that file is already present. 56 | 57 | ![](images/image7.png) 58 | 59 | Now reboot your gateway and log back into your HDC console. You should now see the gateway listed in HDC. 60 | 61 | ## (Optional) Resolving the MQTT service conflict ## 62 | The HDC agent service uses port 1883, which by default is used by the Intel IoT Gateway for it's Mosquitto MQTT broker. The MQTT broker is also used in the charting flow within the Developer Hub. If you would like to continue to use the Mosquitto MQTT broker or charting in the Developer Hub after you install the HDC agent, follow these instructions: 63 | 64 | Edit the /etc/mosquitto/mosquitto.conf file and change the listener to another port (1884 for example) 65 | 66 | ![](images/image8.png) 67 | 68 | ![](images/image9.png) 69 | 70 | Click ctrl + s to save the changes and esc to go back to the file explorer view. 71 | 72 | Once you have changed the listener to another port, then you need to change the node-red charting flow to use the same port. Lot into node-red from the administration tab in the Developer Hub. Change any flows that are using MQTT such as the default charting flows to use the new port. 73 | 74 | ![](images/image10.png) 75 | -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/hdc/HDC21forIDP31.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/hdc/HDC21forIDP31.tgz -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image10.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image6.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image7.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image8.png -------------------------------------------------------------------------------- /Getting Started With Helix Device Cloud (HDC)/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Helix Device Cloud (HDC)/images/image9.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Node-Red and AWS IoT # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online 6 | services in new and interesting ways. Node-RED provides a browser-based 7 | flow editor that makes it easy to wire together flows using the wide 8 | range nodes in the palette. Flows can be then deployed to the run-time in 9 | a single-click. The light-weight run-time is built on Node.js, taking 10 | full advantage of its event-driven, non-blocking model. This makes it 11 | ideal to run at the edge of the network. Amazon* Web Services (AWS IoT) is a managed cloud platform that lets connected devices easily and securely interact with cloud applications and other devices. AWS IoT can support billions of devices and trillions of messages, and can process and route those messages to AWS endpoints and to other devices reliably and securely. With AWS IoT, your applications can keep track of and communicate with all your devices, all the time, even when they aren’t connected. AWS IoT makes it easy to use AWS services like AWS Lambda, Amazon Kinesis, Amazon S3, Amazon Machine Learning, and Amazon DynamoDB to build IoT applications that gather, process, analyze and act on data generated by connected devices, without having to manage any infrastructure. 12 | 13 | ## Required Hardware ## 14 | - IoT Gateway that uses Intel® IoT Gateway Technology 15 | 16 | ## Assumptions ## 17 | - [Intel® IoT Gateway Technology version 3.1](https://shopiotmarketplace.com/iot/index.html#/details?pix=58) or above 18 | - Node.js is installed on the IoT Gateway (installed by default) 19 | - Node-RED node node-red-node-serialport is installed on the IoT Gateway (installed by default) 20 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 21 | 22 | ## Setting up AWS IoT ## 23 | Sign up for a new AWS IoT account by logging in with your existing Amazon account or creating a new one by visiting [https://aws.amazon.com/iot/]( https://aws.amazon.com/iot/) 24 | 25 | Click to start the interactive tutorial after you log in. 26 | 27 | ![](images/image1.png) 28 | 29 | Read through the first part of the tutorial that explains the different parts of the solution (Steps 1–6). When you are done with that you will be prompted to create a thing: 30 | 31 | ![](images/image2.png) 32 | 33 | Click on View Thing 34 | 35 | ![](images/image3.png) 36 | 37 | Click on Connect a device: 38 | 39 | ![](images/image4.png) 40 | 41 | Choose the NodeJS SDK and then click Generate certificate and policy 42 | 43 | ![](images/image5.png) 44 | 45 | Click to download the public key, private key and the certificate to your local computer. Place them in a directory where you can find them in a future step. These certificates are what authenticate the IoT gateway and allow it to send data to the AWS IoT cloud. They will be used later. 46 | 47 | ![](images/image6.png) 48 | 49 | Leave this tab in your browser open and in another browser tab navigate back to the Intel® IoT Gateway Developer Hub. You will need this information for AWS IoT to configure your gateway in the later steps. 50 | 51 | ![](images/image7.png) 52 | 53 | ## Setting up the Node-RED Flow ## 54 | 55 | Connect to the Developer Hub, click on the Administration tab and Launch Cloud Commander. If you need a more in depth tutorial on how to use Cloud Commander, please refer to the that [tutorial](https://github.com/intel-iot-devkit/Intel-IoT-Gateway/tree/master/Getting%20Started%20With%20Cloud%20Commander). 56 | 57 | ![](images/image8.png) 58 | 59 | Once Cloud Commander is open, scroll down to the bottom of the page and click the Console icon. 60 | 61 | ![](images/image9.png) 62 | 63 | This will bring up a console where you can copy and paste the following commands to install the AWS IoT Node-Red Node: 64 | 65 | Change to the home directory: 66 | >cd ~ 67 | 68 | Make a new directory to hold the AWS certificates: 69 | >mkdir .awscerts 70 | 71 | Go into that directory and download the public key (ensure your gateway is connected to the internet): 72 | >cd .awscerts 73 | > 74 | >wget https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem -O root-CA.crt 75 | 76 | Switch to the Node-Red working directory: 77 | 78 | >cd /usr/lib64/node_modules/node-red/node_modules 79 | 80 | Download the packages that are required to make the node work: 81 | >npm install node-red-contrib-aws-iot-hub 82 | 83 | Once this is done, your screen should look like the following: 84 | 85 | ![](images/image10.png) 86 | 87 | Now restart Node-Red by issuing the following commands: 88 | 89 | >systemctl stop node-red-experience 90 | 91 | >systemctl start node-red-experience 92 | 93 | Alternatively you can start and stop the service from the packages tab. It will take a few seconds to start. 94 | 95 | Hit escape to exit the command view and go back to the file explorer view. Open the folder that you created earlier /root/.awscerts. Position your windows so that you can drag those three files on the file editor that you downloaded earlier from AWS IoT and copy them to the IoT gateway. 96 | 97 | ![](images/image11.png) 98 | 99 | Once the files are copied, you need to rename them to match the format needed by the AWS IoT Node Red node. The node expects the files to be named as follows: 100 | 101 | /root/.awscerts/ 102 | |--YourUniqueClientIdentifier-private.pem.key 103 | |--YourUniqueClientIdentifier-certificate.pem.crt 104 | |--root-CA.crt (downloaded earlier) 105 | 106 | Where YourUniqueClientIdentifier is the AWS thing name what you put when creating your thing. You can refer to the other tab that you have open. For example: If Intel_IoT_Gateway was the name of your AWS IoT Thing you created, then your folder would look like this: 107 | 108 | ![](images/image12.png) 109 | 110 | You can ignore the *-public.pem.key file. 111 | 112 | # Connecting a Sensor ## 113 | 114 | If not already connected, the RH-USB sensor to the IoT gateway. You should see the gauge go live on the IoT Developer Hub dashboard. 115 | 116 | ![](images/image13.png) 117 | 118 | Click back on the Administration tab in the Intel IoT Developer Hub. Click on the Node Red icon under quick tools to open the visual programming interface: 119 | 120 | ![](images/image14.png) 121 | 122 | In Node Red, you should now see the aws-mqtt node that you installed earlier. Drag the aws node from the Output section next to the default flow. 123 | 124 | ![](images/image15.png) 125 | 126 | Connect the ‘F to C’ node to the ‘aws-mqtt’ node. This will take the temperature from the RH-USB sensor and send it to the AWS Cloud. 127 | 128 | ![](images/image16.png) 129 | 130 | Now double click the 'aws-mqtt' node to configure it. Click the pencil to add a new IoT Device: 131 | 132 | ![](images/image17.png) 133 | 134 | Fill out the settings based on the information in your AWS IoT browser tab that you left open earlier. Pay special attention to the Client ID, Region and AWS Certs path. Click Add. 135 | 136 | ![](images/image18.png) 137 | 138 | Now create an MQTT Topic that you will send your sensor information to. Something like /sensor/temp. Click OK to save the aws-iot output node. 139 | 140 | ![](images/image19.png) 141 | 142 | Optionally, you can also create an input node with the same Device and Topic settings and send the information to Debug. This will subscribe to the same topic that is being published to, and when there is a message posted, it will grab it and send it to the debug tab. This is a great way to see that your message is making the round trip to the cloud and back successfully. Obviously that subscription could also be the basis for a command and control use case, where a message that is posted to the cloud could be retrieved by the gateway and the information could be acted upon. Make sure the topic is the same as the publishing node in this case. It will subscribe to all messages sent to that topic. 143 | 144 | ![](images/image20.png) 145 | 146 | Click the Deploy button in the right corner to save the changes to the flow. 147 | 148 | ![](images/image21.png) 149 | 150 | ![](images/image22.png) 151 | 152 | **Congratulations! You are now successfully transmitting sensor data to/from the AWS IoT Cloud** 153 | 154 | ## Creating AWS Rule ## 155 | - Back on the AWS IoT Console, click the ‘thing’ that you created: 156 | 157 | ![](images/image24.png) 158 | 159 | - Click on Create a rule 160 | 161 | ![](images/image25.png) 162 | 163 | - Fill out the rule as follows 164 | 165 | ![](images/image26.png) 166 | 167 | - If you would like to send all of the information you get sent to this ‘thing’, you can select all attributes and all topics as shown below 168 | 169 | ![](images/image27.png) 170 | 171 | - Choose to store the data in a file in S3 172 | 173 | ![](images/image28.png) 174 | 175 | - Click to create a new bucket if you do not already have one 176 | 177 | ![](images/image29.png) 178 | 179 | ![](images/image30.png) 180 | 181 | - Name the bucket with a unique name and choose it from the list. Put the name of the file that will be stored in S3 as the Key 182 | 183 | ![](images/image31.png) 184 | 185 | - Create a new role 186 | 187 | ![](images/image32.png) 188 | 189 | ![](images/image33.png) 190 | 191 | - Click Allow to create a new role 192 | 193 | ![](images/image34.png) 194 | 195 | ![](images/image35.png) 196 | 197 | - Click on Add action to create the Rule 198 | 199 | ![](images/image35.5.png) 200 | 201 | ![](images/image36.png) 202 | 203 | ## Verifying Rule ## 204 | - Click to go to your AWS S3 console at [https://aws.amazon.com/s3/](https://aws.amazon.com/s3/) 205 | 206 | - Open the bucket that you created and the file name that you put as the ‘Key’. Verify that the latest temperature is in that file. 207 | 208 | 209 | ## References ## 210 | - [AWS IoT](https://aws.amazon.com/iot/) 211 | - [Node-RED](http://nodered.org/) 212 | 213 | *indicates that third-party names might be the property of others. -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image10.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image11.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image12.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image13.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image14.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image15.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image16.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image17.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image18.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image19.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image20.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image21.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image22.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image23.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image24.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image25.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image26.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image27.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image28.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image29.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image30.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image31.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image32.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image33.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image34.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image35.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image35.5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image35.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image36.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image6.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image7.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image8.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and AWS IoT/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and AWS IoT/images/image9.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Arduino 101 with the Grove Shield/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Node-RED and Arduino 101 with the Grove Shield # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online 6 | services in new and interesting ways. Node-RED provides a browser-based 7 | flow editor that makes it easy to wire together flows using the wide 8 | range nodes in the palette. Flows can be then deployed to the run-time in 9 | a single-click. The light-weight run-time is built on Node.js, taking 10 | full advantage of its event-driven, non-blocking model. This makes it 11 | ideal to run at the edge of the network. Arduino 101 is the ideal successor of the UNO, updated with the latest technologies including the Intel(R) Curie(TM) processor. It recognizes gestures and features a six-axis accelerometer and gyroscope. Grove is a modulated, ready-to-use tool set. Much like Lego, it takes a building block approach to assembling electronics. Compared with the traditional, complicated learning method of using a breadboard and various electronic components to assemble a project, Grove simplifies and condenses the learning process significantly. The Grove system consists of a base shield and various modules with standardized connectors. The base shield allows for easy connection of any microprocessor input or output from the Grove modules, and every Grove module addresses a single function, such as a simple button or a more complex heart rate sensor. Each one comes with clear documentation and demo code to help you get started quickly. 12 | 13 | ## Required Hardware ## 14 | - IoT Gateway that uses Intel® IoT Gateway Technology 15 | - Arduino* 101 16 | - Grove* Shield kit 17 | 18 | ![](images/image1.jpg) 19 | ![](images/image2.jpg) 20 | 21 | ## Assumptions ## 22 | - Intel® IoT Gateway Technology version 3.1 or above 23 | - Node.js is installed on the IoT Gateway (installed by default) 24 | - Node-RED node node-red-node-serialport is installed on the IoT Gateway (installed by default) 25 | - Node-Red-Node_Arduino node is installed on the IoT Gateway 26 | - You can install this package by clicking on Packages and then Add Packages from the Intel® IoT Gateway Developer Hub 27 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 28 | 29 | ## Preparing and connecting the Arduion 101 with Grove Shield ## 30 | - These steps need to be done from a 2nd system, not the IoT gateway. In this case, we've running Windows. 31 | - Install the latest version of Arduino IDE from http://arduino.com 32 | - Plug in the Arduino 101 and set the IDE to the correct port and board type 33 | - Load the StandardFirmata sketch from File/Examples/Firmata 34 | - As of 1/4/16 (IDE version 1.6.7), the example StandardFirmata sketch would not compile for the Arduino 101 due to missing board reference in the board.h file. This issue may be fixed by now but if not, an updated board.h file can be found [here](https://github.com/firmata/arduino/blob/master/Boards.h). Copy this file to C:\Program Files (x86)\Arduino\libraries\Firmata 35 | - Upload the Example 36 | - As of 1/4/16, the IDE will time out trying to communicate with the Arduino 101 during upload. To workaround this issue, just press the reset button between the USB and Power ports on the Arduino 101 right after you start the upload process. 37 | - The sketch should compile and upload. You may see some warnings about SET_PIN_MODE. These are known issues and can be ignored for this example. 38 | - Unplug the Arduino 101 and install the Grove Shield. 39 | - For this example, we'll be using 6 of the sensors from the Grove Shield kit. Please connect them as follows: 40 | - LED to D2 41 | - Push Button to D3 42 | - Touch Sensor to D6 43 | - Temp Sensor to A0 44 | - Light Sensor to A1 45 | - Rotary Sensor to A2 46 | 47 | ## Connecting the Arduino 101 ## 48 | Plug the Arduino 101 in to power 49 | Plug the Arduino 101 in to a USB port on your IoT Gateway. On 50 | the console of the IoT gateway you should see a message saying what serial 51 | device was created for the USB interface (it is likely /dev/ttyACM0). 52 | Please make a note of what device was created. 53 | 54 | ## Using Node-RED ## 55 | The Node-RED browser interface can be reached via 56 | . When it first comes up it will look 57 | something like this. 58 | 59 | ![](images/image3.png) 60 | 61 | Node-RED supports exporting and importing of flows (into source json). 62 | Below is an export an several example flows we created. If you hightlight and copy this and then import it in to Node-RED, the same nodes and configuration we created manually will automatically appear on the selected Sheet. Import and Export can be found in the Node-RED menu by clicking on the 3 horizontal lines to the right of the Deploy button. 63 | 64 | Example flow 65 | 66 | ``` 67 | 68 | [{"id":"baabe7c7.455418","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"15","cleansession":true,"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""},{"id":"32658631.cd9a7a","type":"arduino-board","z":"20d54c58.df2ab4","device":"/dev/ttyACM0"},{"id":"fa2205e3.05ddf8","type":"arduino in","z":"20d54c58.df2ab4","name":"Rotary Sensor","pin":"2","state":"ANALOG","arduino":"32658631.cd9a7a","x":100,"y":356,"wires":[["92255d0.f6ddaa"]]},{"id":"647e1222.9b81ec","type":"arduino out","z":"20d54c58.df2ab4","name":"LED","pin":"2","state":"OUTPUT","arduino":"32658631.cd9a7a","x":314,"y":77,"wires":[]},{"id":"b001dba5.4ffe28","type":"inject","z":"20d54c58.df2ab4","name":"On","topic":"","payload":"1","payloadType":"string","repeat":"","crontab":"","once":false,"x":120,"y":36,"wires":[["647e1222.9b81ec"]]},{"id":"213f0e7.fdec0f2","type":"inject","z":"20d54c58.df2ab4","name":"Off","topic":"","payload":"0","payloadType":"string","repeat":"","crontab":"","once":false,"x":120,"y":115,"wires":[["647e1222.9b81ec"]]},{"id":"46963aa5.b969c4","type":"arduino in","z":"20d54c58.df2ab4","name":"Push Button","pin":"3","state":"INPUT","arduino":"32658631.cd9a7a","x":99,"y":213,"wires":[["59066592.a6f99c"]]},{"id":"59066592.a6f99c","type":"debug","z":"20d54c58.df2ab4","name":"","active":false,"console":"false","complete":"false","x":307,"y":214,"wires":[]},{"id":"f7ffe9f7.080018","type":"arduino in","z":"20d54c58.df2ab4","name":"Temp Sensor","pin":"0","state":"ANALOG","arduino":"32658631.cd9a7a","x":96,"y":459,"wires":[["7d6d35a2.8292cc"]]},{"id":"620f1f9a.9df0e","type":"debug","z":"20d54c58.df2ab4","name":"","active":false,"console":"false","complete":"false","x":602,"y":433,"wires":[]},{"id":"80ac1a25.7f53e8","type":"arduino in","z":"20d54c58.df2ab4","name":"Touch Sensor","pin":"6","state":"INPUT","arduino":"32658631.cd9a7a","x":111,"y":281,"wires":[["6ce29b01.931d64"]]},{"id":"6ce29b01.931d64","type":"debug","z":"20d54c58.df2ab4","name":"","active":true,"console":"false","complete":"false","x":319,"y":282,"wires":[]},{"id":"b8823228.477dd","type":"arduino in","z":"20d54c58.df2ab4","name":"Light Sensor","pin":"1","state":"ANALOG","arduino":"32658631.cd9a7a","x":95,"y":622,"wires":[["64bf7eab.9b408"]]},{"id":"f1d069d8.0e2f98","type":"debug","z":"20d54c58.df2ab4","name":"","active":false,"console":"false","complete":"false","x":487,"y":622,"wires":[]},{"id":"92255d0.f6ddaa","type":"debug","z":"20d54c58.df2ab4","name":"","active":false,"console":"false","complete":"false","x":334,"y":357,"wires":[]},{"id":"7d6d35a2.8292cc","type":"delay","z":"20d54c58.df2ab4","name":"Slow to 1 second","pauseType":"rate","timeout":"1","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":294,"y":504,"wires":[["b5594fda.4aa6b"]]},{"id":"b5594fda.4aa6b","type":"function","z":"20d54c58.df2ab4","name":"Grove Temp in C","func":"// Convert Grove Temperature to Celsius\n// Based on http://www.seeedstudio.com/wiki/Grove_-_Temperature_Sensor\n\nvar a = parseInt(msg.payload);\nvar t = 1/(Math.log((1023-a)/a)/3975+1/298.15)-273.15;\n\nmsg.payload = t.toFixed(2);\n\nreturn msg;","outputs":1,"noerr":0,"x":532,"y":537,"wires":[["620f1f9a.9df0e","b5f6512e.4a09b"]]},{"id":"64bf7eab.9b408","type":"delay","z":"20d54c58.df2ab4","name":"Slow to 1 second","pauseType":"rate","timeout":"1","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":285,"y":652,"wires":[["f1d069d8.0e2f98","14099a6d.ebf666"]]},{"id":"b5f6512e.4a09b","type":"chart tag","z":"20d54c58.df2ab4","title":"Temperature","chartType":"gauge","dataSource":"Grove","units":"°C","min":"0","max":"100","targetLow":"","targetHigh":"","priority":"1","sourcePriority":"1","ttl":"5","points":"50","x":710,"y":485,"wires":[["8f6b7352.70949"]]},{"id":"8f6b7352.70949","type":"mqtt out","z":"20d54c58.df2ab4","name":"Chart","topic":"/sensors","qos":"","retain":"","broker":"baabe7c7.455418","x":874,"y":504,"wires":[]},{"id":"14099a6d.ebf666","type":"chart tag","z":"20d54c58.df2ab4","title":"Light","chartType":"gauge","dataSource":"Grove","units":"°C","min":"0","max":"100","targetLow":"","targetHigh":"","priority":"1","sourcePriority":"1","ttl":"5","points":"50","x":620,"y":689,"wires":[["3953e7c2.c6ac18"]]},{"id":"3953e7c2.c6ac18","type":"mqtt out","z":"20d54c58.df2ab4","name":"Chart","topic":"/sensors","qos":"","retain":"","broker":"baabe7c7.455418","x":784,"y":708,"wires":[]}] 69 | ``` 70 | 71 | Once imported, it should look something like this. 72 | 73 | ![](images/image4.png) 74 | 75 | - Before you Deploy it, double-click on any of the Arduino nodes, click on the pen icon, and ensure the Port is set to the port you noted when you plugged the Arduino 101 in to the IoT Gateway. Click on Update and Ok. 76 | - Click on the Deploy button; top right. 77 | - Ensure the “debug” node is turned on. The box extending to the right of the debug should be solid/filled in green. 78 | - After a moment, you should see a green indicator and the word connected appear under each Arduino node. 79 | - Try turning on the debug node for the Temp sensor by click on the green bock to the right of each debug node. You should see the temperature reading appear in the debug tab every second. 80 | - Try turning on the debug node for the Light sensor by click on the green bock to the right of each debug node. You should see the light reading appear in the debug tab every second. 81 | - Ensure the debug nodes are turned on for the Push Button, Touch, and Rotary Sensor flows by click on the green bock to the right of each debug node. 82 | - Try pressing the push button, touch sensor, and or turning the rotary sensor and see the values appear in the debug tab. 83 | - Now view the Intel® IoT Gateway Developer Hub via a web browser. You should see a new sensors and graphs for the Grove Temperature sensor and Grove Light Sensor. 84 | 85 | **Congratulations! You are successfully communicating via to multiple sensors on the Grove Shield attached to an Arduino 101.** 86 | 87 | ## References ## 88 | - [Arduino 101](https://www.arduino.cc/en/Main/ArduinoBoard101) 89 | - [Grove Shield Kit for Arduino](http://www.seeedstudio.com/depot/Grove-Starter-Kit-for-Arduino-p-1855.html) 90 | - [Node-red-node-Arduino](http://nodered.org/docs/hardware/arduino.html) 91 | - [Node-RED](http://nodered.org/) 92 | 93 | *indicates that third-party names might be the property of other 94 | 95 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image1.jpg -------------------------------------------------------------------------------- /Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image2.jpg -------------------------------------------------------------------------------- /Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Arduino 101 with the Grove Shield/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Bluemix/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Node-RED and Bluemix # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide range nodes in the palette. Flows can be then deployed to the runtime in a single-click. The light-weight runtime is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. IBM* Bluemix is a cloud platform as a service (PaaS) developed by IBM. It supports several programming languages and services as well as integrated DevOps to build, run, deploy and manage applications on the cloud. Bluemix is based on Cloud Foundry open technology and runs on SoftLayer infrastructure. 6 | 7 | This document describes the steps to set up a Bluemix cloud connection to an Intel IoT gateway. 8 | 9 | Note: this solution based on the existing [solution](https://developer.ibm.com/recipes/tutorials/connect-an-intel-iot-gateway-to-iot-foundation) published by IBM: . 10 | 11 | ## IMPORTANT NOTES ## 12 | - The Bluemix-solution currently does not support proxy (run behind firewall). All steps below must be executed on a gateway not behind firewall. 13 | 14 | ## Required Hardware ## 15 | - IoT Gateway that uses Intel® IoT Gateway Technology 16 | 17 | ## Assumptions ## 18 | - Intel® IoT Gateway Technology version 3.1 or above 19 | - Node.js is installed on the IoT Gateway (installed by default) 20 | - The Bluemix package is installed on the IoT Gateway 21 | - You can install this package by clicking on Packages and then Add Packages from the Intel® IoT Gateway Developer Hub 22 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 23 | 24 | 25 | ## Testing the bluemix script ## 26 | - Note: Currently, this example has only been tested with direct internet connections. Ensure your IoT gateway is connected directly to the internet. No proxy support. 27 | - Open a terminal session to the IoT Gateway either by a directly connected monitor or by establishing a SSH session to the IP address of the IoT gateway 28 | - Change to the /home/gwuser/bluemix-solution folder 29 | 30 | > cd /home/gwuser/bluemix-solution 31 | 32 | - Run the ibm-iot-quickstart app. This python app reports the CPU utilization as a MQTT topic to the MQTT broker 33 | 34 | > python ibm-iot-quickstart.py 35 | 36 | - You should see output like this 37 | 38 | ``` 39 | 40 | No config file found, connecting to the Quickstart service 41 | MAC address: 000bab8b0a86 42 | 0.0 43 | message published 44 | 87.7922077922 45 | message published 46 | 88.3376849434 47 | message published 48 | ``` 49 | 50 | - Press Ctrl+C to terminate the app 51 | 52 | ## Run node-RED example flow ## 53 | The Node-RED browser interface can be reached via 54 | . When it first comes up it will look 55 | something like this. 56 | 57 | ![](images/image1.png) 58 | 59 | - The sample Bluemix package you installed from the IoT Gateway Developer Hub includes a sample Node-RED flow for communicating to Bluemix. To import this flow, click on the 3 horizontal lines to the right of the 60 | Deploy button and select Import, Library, and Bluemix. 61 | 62 | - Position the imported flow on your active Sheet and click to finish the import process. 63 | 64 | - Click on the Deploy button, top right, and Confirm deploy if needed. 65 | - Ensure the “debug” node is turned on. The box extending to the right of the node should be solid/filled in green. 66 | - Switch the column on the right from the Info tab to the debug tab. 67 | - Click on the blue box to the left of the 'Run once' injector node to start the Bluemix flow. 68 | 69 | Note: No errors in the debug tab indicates that the flow is running. There will be no other output in Node-RED. 70 | 71 | ## Data Visualization ## 72 | Here's how you can see the data that is being sent from the IoT Gateway to the Bluemix cloud 73 | 74 | - Go to [https://quickstart.internetofthings.ibmcloud.com](https://quickstart.internetofthings.ibmcloud.com) with a web browser 75 | - Enter the MAC address of your IoT Gateway's internet connection 76 | - Click 'Go' 77 | - The page will display the chart of the IoT gateway CPU utilization over time. 78 | 79 | **Congratulations! You are now successfully transmitting sensor data to/from the Bluemix cloud.** 80 | 81 | *indicates that third-party names might be the property of others. 82 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and Bluemix/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Bluemix/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Comet T0310/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and Comet T0310 # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online 6 | services in new and interesting ways. Node-RED provides a browser-based 7 | flow editor that makes it easy to wire together flows using the wide 8 | range nodes in the palette. Flows can be then deployed to the run-time in 9 | a single-click. The light-weight run-time is built on Node.js, taking 10 | full advantage of its event-driven, non-blocking model. This makes it 11 | ideal to run at the edge of the network. The Comet* T0310 is an Ambient temperature transmitter for outdoor & indoor use. The temperature transmitter is built in a durable watertight case. Degrees Celsius and Fahrenheit are user selectable. 12 | 13 | ## Required Hardware ## 14 | - IoT Gateway that uses Intel® IoT Gateway Technology 15 | - Comet T0310 sensor 16 | 17 | ![](images/image1.png) 18 | 19 | ## Assumptions ## 20 | - Intel® IoT Gateway Technology version 3.1 or above 21 | - Node.js is installed on the IoT Gateway (installed by default) 22 | - Node-RED node node-red-node-serialport is installed on the IoT Gateway (installed by default) 23 | - Modbus libraries, libmodbus and libmodbus-dev, are installed on the Intel IoT Gateway 24 | - You can install this package by clicking on Packages and then Add Packages from the Intel® IoT Gateway Developer Hub 25 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 26 | 27 | ## Connecting the Comet T0310 Sensor ## 28 | - Plug the Comet T0310 sensor in to a serial port on the IoT Gateway. 29 | - Plug the Comet T0310 sensor in to power. 30 | 31 | ## Disabling the Serial Getty ## 32 | By default, the Linux operating system on the IoT Gateway redirects console output to the serial port. This needs to be disabled so the serial port can be used for the sensor. 33 | 34 | From the console, log in and enter these commands: 35 | - systemctl disable serial-getty@ttyS0 36 | - systemctl stop serial-getty@ttyS0 37 | 38 | ## Installing sample code to read temperature ## 39 | Below is the source code for reading from the Comet sensor [readtempfromcomet.c](src/readtempfromcomet.c): 40 | 41 | ``` 42 | 43 | /* 44 | * Copyright (c) 2015 Intel Corporation. 45 | * 46 | * Permission is hereby granted, free of charge, to any person obtaining 47 | * a copy of this software and associated documentation files (the 48 | * "Software"), to deal in the Software without restriction, including 49 | * without limitation the rights to use, copy, modify, merge, publish, 50 | * distribute, sublicense, and/or sell copies of the Software, and to 51 | * permit persons to whom the Software is furnished to do so, subject to 52 | * the following conditions: 53 | * 54 | * The above copyright notice and this permission notice shall be 55 | * included in all copies or substantial portions of the Software. 56 | * 57 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 58 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 59 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 60 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 61 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 62 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 63 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 64 | */ 65 | 66 | 67 | #include 68 | #include 69 | 70 | #include 71 | 72 | int main() 73 | { 74 | 75 | modbus_t *mb; 76 | uint16_t tab_reg[32]; 77 | int rc; 78 | 79 | mb = modbus_new_rtu("/dev/ttyS0", 9600, 'N', 8, 1); 80 | if (mb == NULL) { 81 | fprintf(stderr, "Unable to create the libmodbus context\n"); 82 | return -1; 83 | } 84 | 85 | //modbus_set_debug(mb, TRUE); 86 | 87 | rc = modbus_set_slave(mb, 1); 88 | if (rc != 0) { 89 | fprintf(stderr, "set slave failed: %s\n", modbus_strerror(errno)); 90 | modbus_free(mb); 91 | return -1; 92 | } 93 | 94 | modbus_rtu_set_serial_mode(mb, MODBUS_RTU_RS232); 95 | rc = modbus_connect(mb); 96 | if (rc != 0) { 97 | fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); 98 | modbus_free(mb); 99 | return -1; 100 | } 101 | 102 | rc = modbus_read_registers(mb, 0x030, 1, tab_reg); 103 | if (rc == -1) { 104 | fprintf(stderr, "write failed: %d %s\n", errno, modbus_strerror(errno)); 105 | modbus_free(mb); 106 | return -1; 107 | } 108 | printf("%d\n", tab_reg[0]); 109 | 110 | modbus_close(mb); 111 | modbus_free(mb); 112 | 113 | return 0; 114 | } 115 | ``` 116 | 117 | Copy the source file [readtempfromcomet.c](src/readtempfromcomet.c) from this GitHub repo to the /home/gwuser folder on the IoT Gateway. 118 | The code assumes the sensor is plugged in to serial port1 (/dev/ttyS0). If not, edit the source and change line 13 accordingly. 119 | To compile, enter: 120 | >gcc readtempfromcomet.c –o readtempfromcomet –lmodbus 121 | 122 | To test the complied code, execute as follows: 123 | >./readtempfromcomet 124 | 125 | 126 | You should get back a 3 digit number, like 733. That's the current temperature in Fahrenheit without the decimal point. 127 | 128 | 129 | ## Using Node-RED ## 130 | The Node-RED browser interface can be reached via 131 | . When it first comes up it will look 132 | something like this. 133 | 134 | ![](images/image2.png) 135 | 136 | Let’s create a Node-RED flow to get the temperature reading from the Comet T3010 sensor. 137 | 138 | Drag the following nodes from the left bar on to Sheet 1 139 | 140 | - inject 141 | - exec 142 | - function 143 | - chart tag 144 | - debug 145 | - mqtt 146 | 147 | Now, configure the nodes 148 | 149 | - Double click on the exec node and set the fields as follows: 150 | - Command = /home/gwuser/readtempfromcomet 151 | - Name = Get temp 152 | - Click on Ok 153 | - Double click on the function node and paste in this code: 154 | 155 | msg.payload = msg.payload * .10; 156 | return msg; 157 | 158 | - Set the Name to Convert to dec 159 | - Click on Ok 160 | - Double click on the chart node and set the fields as follows: 161 | - Title = Comet Temp 162 | - Type = Line 163 | - Series = Temperature 164 | - Units = blank 165 | - Range = 70 to 80 166 | - Target = 72 to 76 167 | - Points = 50 168 | - Source = Local Comet Sensor 169 | - Click on Ok 170 | -Double click on the mqtt node and set the fields as follows: 171 | - Server = localhost:1883 (this should be selectable in the drop down) 172 | - Topic = /sensors 173 | - Click on Ok 174 | 175 | Now we need to wire the nodes together 176 | 177 | - Now wire the inject node to the Get temp node by clicking and dragging between the small box on the right of the inject node to the small box on the left of the Get temp node. 178 | - Repeat the process connecting 179 | - Get temp to Convert to dec 180 | - Convert to dec to Comet Temp and debug 181 | - Comet Temp to mqtt 182 | 183 | It should look like this: 184 | 185 | ![](images/image3.png) 186 | 187 | 188 | - Click on the Deploy button; top right. 189 | - Ensure the “debug” node is turned on. The box extending to the right of the debug should be solid/filled in green. 190 | - Switch the column on the right from the Info tab to the debug tab. 191 | - Click on the solid/filled in light blue box on the left side of the inject node. 192 | - You should see the current temperature in Fahrenheit returned in the debug tab. It should look like this: 193 | 194 | [](images/image4.png) 195 | 196 | - In addition, the temperature data should now show up on the IoT Gateway Developer Hub. 197 | 198 | **Congratulations! You are successfully communicating via ModBus over Serial to the Comet T0310 Temperature Sensor.** 199 | 200 | ## Example flow ## 201 | Node-RED supports exporting and importing of flows (into source json). 202 | Here is an export of the above two flows we created. If you import this, 203 | the same nodes and configuration we created manually will automatically 204 | appear on the selected Sheet. Import and Export can be found in the 205 | Node-RED menu by clicking on the 3 horizontal lines to the right of the 206 | Deploy button. 207 | 208 | [{"id":"586f4212.a790bc","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"677876fb.988788","type":"exec","z":"32116d32.cdee92","command":"/home/gwuser/readtempfromcomet","addpay":true,"append":"","useSpawn":"","name":"Get temp","x":305.6666259765625,"y":293.6666564941406,"wires":[["cc6fcc16.33903"],[],[]]},{"id":"5de42238.a21bdc","type":"inject","z":"32116d32.cdee92","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"x":145.6666259765625,"y":200.66665649414062,"wires":[["677876fb.988788"]]},{"id":"cc6fcc16.33903","type":"function","z":"32116d32.cdee92","name":"Convert to dec","func":"msg.payload = msg.payload * .10;\nreturn msg;","outputs":1,"noerr":0,"x":489.6666259765625,"y":190.66665649414062,"wires":[["4b862853.b479d8","cd034d62.32fcb"]]},{"id":"4b862853.b479d8","type":"chart tag","z":"32116d32.cdee92","title":"Comet Temp","chartType":"line","dataSource":"local","series":"Temperature","units":"","min":"70","max":"80","targetLow":"72","targetHigh":"76","points":50,"x":712.6666259765625,"y":143.66665649414062,"wires":[["4fd2ad2b.b02d54"]]},{"id":"4fd2ad2b.b02d54","type":"mqtt out","z":"32116d32.cdee92","name":"","topic":"/sensors","qos":"","retain":"","broker":"586f4212.a790bc","x":905.6666259765625,"y":208.66665649414062,"wires":[]},{"id":"cd034d62.32fcb","type":"debug","z":"32116d32.cdee92","name":"","active":false,"console":"false","complete":"false","x":704.6666259765625,"y":291.6666564941406,"wires":[]}] 209 | 210 | 211 | ## References ## 212 | - [Comet T0310 Temperature Sensor](http://www.cometsystem.com/products/t0310-temperature-transmitter-with-rs232-output/reg-T0310) 213 | - [Node-red-node-serialport](http://flows.nodered.org/node/node-red-node-serialport) 214 | - [Node-RED](http://nodered.org/) 215 | 216 | *indicates that third-party names might be the property of others. 217 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and Comet T0310/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Comet T0310/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Comet T0310/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Comet T0310/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Comet T0310/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Comet T0310/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Comet T0310/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Comet T0310/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Comet T0310/src/readtempfromcomet.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Intel Corporation. 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining 5 | * a copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sublicense, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be 13 | * included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | int main() 31 | { 32 | 33 | modbus_t *mb; 34 | uint16_t tab_reg[32]; 35 | int rc; 36 | 37 | mb = modbus_new_rtu("/dev/ttyS0", 9600, 'N', 8, 1); 38 | if (mb == NULL) { 39 | fprintf(stderr, "Unable to create the libmodbus context\n"); 40 | return -1; 41 | } 42 | 43 | //modbus_set_debug(mb, TRUE); 44 | 45 | rc = modbus_set_slave(mb, 1); 46 | if (rc != 0) { 47 | fprintf(stderr, "set slave failed: %s\n", modbus_strerror(errno)); 48 | modbus_free(mb); 49 | return -1; 50 | } 51 | 52 | modbus_rtu_set_serial_mode(mb, MODBUS_RTU_RS232); 53 | rc = modbus_connect(mb); 54 | if (rc != 0) { 55 | fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); 56 | modbus_free(mb); 57 | return -1; 58 | } 59 | 60 | rc = modbus_read_registers(mb, 0x030, 1, tab_reg); 61 | if (rc == -1) { 62 | fprintf(stderr, "write failed: %d %s\n", errno, modbus_strerror(errno)); 63 | modbus_free(mb); 64 | return -1; 65 | } 66 | printf("%d\n", tab_reg[0]); 67 | 68 | modbus_close(mb); 69 | modbus_free(mb); 70 | 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and LightBlue Bean/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and LightBlue* Bean # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide range nodes in the palette. Flows can be then deployed to the run-time in a single-click. The light-weight run-time is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. The LightBlue* Bean is a low energy Bluetooth Arduino microcontroller. Using Bluetooth 4.0, it is programmed wirelessly, runs on a coin cell battery, and comes with Temperature and 3-axis accelerometer sensors onboard, multi-color LED, and 6 digital I/O pins, 2 analog pins. 6 | 7 | ## Required Hardware ## 8 | - IoT Gateway that uses Intel® IoT Gateway Technology 9 | - LightBlue Bean 10 | 11 | ![](images/image1.png) 12 | 13 | ## Assumptions ## 14 | - Intel® IoT Gateway Technology version 3.1 or above 15 | - Node.js is installed on the IoT Gateway (installed by default) 16 | - Node-RED node node-red-contrib-bean is installed on the Intel IoT Gateway 17 | - You can install this package by clicking on Packages and then Add Packages from the Intel® IoT Gateway Developer Hub 18 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 19 | 20 | ## Enabling Bluetooth Low Energy (BLE) on the IoT Gateway ## 21 | By default, Bluetooth is enabled but Bluetooth Low Energy (BLE) is not. 22 | This is easy to turn off via the IoT Gateway administrative web 23 | console. You can access the console via . 24 | 25 | - Log in using your root username and password 26 | - Click on the Administration icon and then the Lunch button under LuCI to launch the IoT gateway administration console. 27 | - Log in using your root username and password. 28 | - Select Network from the menu and choose Bluetooth 29 | - If it says “Disabled” next to Bluetooth Status, click on the Disabled button 30 | - It should look like this when setup correctly 31 | 32 | ![](images/image2.png) 33 | 34 | ## Bluetooth Test ## 35 | Before we start, let’s make sure the IoT Gateway can discover the LightBlue Bean device. Ensure a battery is installed in the Bean and type the following on the IoT Gateway console prompt: 36 | 37 | >hcitool lescan 38 | 39 | It should respond with something like this: 40 | 41 | >LE Scan … 42 | > 43 | >B4:99:4C:1E:C0:C0 Bean 44 | 45 | 46 | It may also show other Bluetooth devices in range 47 | Press Ctrl-C to stop the scanning tool. If it doesn’t show your Bean, try removing the battery from your Bean, reinserting it, and trying the hcitool again. 48 | 49 | ## Using Node-RED ## 50 | The Node-RED browser interface can be reached via 51 | . When it first comes up it will look 52 | something like this. 53 | 54 | ![](images/image3.png) 55 | 56 | Let’s create a Node-RED flow to get the current temperature from the 57 | Bean. 58 | 59 | Drag the following nodes from the left bar on to Sheet 1 60 | 61 | - inject 62 | - Bean temperature 63 | - Debug 64 | 65 | Now, configure the nodes: 66 | 67 | - Double click on the temperature node and click on the pen icon to add a Bean. Set the name to Bean. Leave the UUID blank (if you have more than 1 Bean, you can set this to the MAC address of the Bean you want to talk to. For this example, we’ll assume there is only one in range. Leave the other fields as default. For example: 68 | 69 | ![](images/image4.png) 70 | 71 | - Click on Add and then OK 72 | - Now wire the inject node to the Bean node by clicking and dragging between the small box on the right of the inject node to the small box on the left of the Bean node. 73 | - Repeat the wire process connecting the Bean node to the debug node 74 | - It should look like this: 75 | 76 | ![](images/image5.png) 77 | 78 | - Click on the Deploy button, top right, and Confirm deploy. 79 | - Ensure the “debug” node is turned on. The box extending to the right of the node should be solid/filled in green. 80 | - Switch the column on the right from the Info tab to the debug tab. 81 | - Click on the solid/filled in light blue box on the left side of the inject node. 82 | - The text under the bean node should say connected and the current temperature should appear in the debug tab. 83 | 84 | **Congratulations! You are successfully communicating via BlueTooth low energy to a LightBlue Bean device.** 85 | 86 | You can use the same process to read the accelerometer, turn on the LED, change the color of the LED, and more. 87 | 88 | For more details on possible Node-RED flows with the LightBlue Bean, please visit the sample projects page on the [LightBlue Bean website](http://legacy.punchthrough.com/bean/node-red-example-projects/). 89 | 90 | ## Example flow ## 91 | Node-RED supports exporting and importing of flows (into source json). 92 | Here is an export of the above two flows we created. If you import this, 93 | the same nodes and configuration we created manually will automatically 94 | appear on the selected Sheet. Import and Export can be found in the 95 | Node-RED menu by clicking on the 3 horizontal lines to the right of the 96 | Deploy button. 97 | 98 | [{"id":"d717de8d.28e82","type":"bean","name":"Bean","uuid":"","connectiontype":"timeout","connectiontimeout":"60"},{"id":"580e0319.a7f1fc","type":"bean temp","name":"","bean":"d717de8d.28e82","x":390,"y":231,"z":"4cb39d5b.b34c64","wires":[["b1895c9e.4e76a"]]},{"id":"b1895c9e.4e76a","type":"debug","name":"","active":true,"console":"false","complete":"payload","x":626,"y":231,"z":"4cb39d5b.b34c64","wires":[]},{"id":"e6b9cc13.19463","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":160,"y":231,"z":"4cb39d5b.b34c64","wires":[["580e0319.a7f1fc"]]}] 99 | 100 | ## References ## 101 | - [LightBlue Bean](http://legacy.punchthrough.com/bean/) 102 | - [LightBlue Bean with Node-Red](http://legacy.punchthrough.com/bean/node-red/) 103 | - [Node-RED](http://nodered.org/) 104 | 105 | *indicates that third-party names might be the property of others. 106 | 107 | 108 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and LightBlue Bean/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and LightBlue Bean/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and LightBlue Bean/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and LightBlue Bean/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and LightBlue Bean/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and LightBlue Bean/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and LightBlue Bean/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and LightBlue Bean/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and LightBlue Bean/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and LightBlue Bean/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-Red and Microsoft Azure IoT Hub # ## Overview ## Microsoft Azure IoT Hub allows you to connect, monitor, and manage millions of IoT assets. Azure is in an important service for many IoT partners and the Intel IoT Gateway integrates seamlessly with it. This tutorial will show you how to configure your gateway to send data to Microsoft Azure IoT Hub without having to write any code. ## Required Hardware ## - IoT Gateway that uses Intel® IoT Gateway Technology - A system running a web browser. In the case of this tutorial, we used a laptop running Windows 10 and Chrome. 2 | ## Required Steps to Complete Before This Tutorial ## 3 | - Your gateway should be running the latest Developer Packages as directed by [this](https://github.com/intel-iot-devkit/Intel-IoT-Gateway/tree/master/Updating%20the%20Intel%20IoT%20Gateway%20Developer%20Packages) tutorial. 4 | - You must have an Azure account. You can get your free Azure account from Microsoft by following the instructions on at this [link](https://azure.microsoft.com/en-us/free/). 5 | - Follow the instructions at this [link](https://github.com/Azure/azure-iot-sdks/blob/master/doc/setup_iothub.md) to create the IoT Hub in your Azure account. Tip: You should create your IoT Hub instance in the Free Tier if this is just a trial account. 6 | - This Tutorial uses the Device Explorer sample executable from the Azure SDK to prevent you from having to program to create a Device in your IoT Hub. It can be downloaded and installed from this [link](https://github.com/Azure/azure-iot-sdks/releases). Scroll down to the Downloads section and download and install **SetupDeviceExplorer.msi** on Windows. 7 | ![](images/image1.png) ## Access The Developer Hub ## To access the Developer Hub, open your web browser and go the . Log in with the username and & password. Once connected, you should see something like this: ![](images/image2.png) ## Install the Azure SDK and the Node-Red Node on the Gateway ## Once connected to the Developer Hub, click on the Administration tab and Launch Cloud Commander. If you need a more in depth tutorial on how to use Cloud Commander, please refer to the that [tutorial](https://github.com/intel-iot-devkit/Intel-IoT-Gateway/tree/master/Getting%20Started%20With%20Cloud%20Commander). ![](images/image3.png) Once Cloud Commander is open, scroll down to the bottom of the page and click the Console icon. ![](images/image4.png) This will bring up a console where you can copy and paste the following commands to download the Azure SDK and install the Azure Node-Red Node: Change to the home directory: >cd ~/ 8 | 9 | Get a copy of the Azure SDK on the gateway: 10 | >git clone https://github.com/Azure/azure-iot-sdks 11 | 12 | Copy the Node-Red node from the SDK to the Node-Red directory on the gateway: 13 | >cp -r azure-iot-sdks/node/device/node-red /usr/lib/node_modules/node-red/node_modules/azure-iot 14 | 15 | Switch to the Node-Red working directory: 16 | >cd /usr/lib/node_modules/node-red/node_modules/azure-iot 17 | 18 | Download the packages that are required to make the node work: 19 | >npm install 20 | 21 | Once this is done, your screen should look like the following: 22 | ![](images/image5.png) 23 | 24 | Now restart Node-Red by issuing the following commands: 25 | 26 | >systemctl stop node-red-experience 27 | 28 | >systemctl start node-red-experience 29 | 30 | Alternatively you can start and stop the service from the packages tab. It will take a few seconds to start. 31 | 32 | ## Create a Device in Azure ## 33 | 34 | Next, bring up the Device Explorer you downloaded and installed in the required steps earlier in this tutorial. This will allow you to create Devices in Azure without having to write code. It will also give you an easy way to visualize the data as we send it to Azure to ensure it is getting there. 35 | 36 | The first step requires you to get your connection string from the Azure portal to allow the Device Explorer to connect to your Azure IoT Hub instance. This connections string should come from steps 5 and 6 of this [tutorial](https://github.com/Azure/azure-iot-sdks/blob/master/doc/setup_iothub.md) that you followed in the required steps section of this tutorial. This is not to be confused with the device specific connection string we use later in this tutorial. 37 | 38 | Once you have this string copied, paste it into the Device Explorer application running on a Windows machine. Click Update to connect to that IoT Hub instance. There is no need to fill out the Protocol Gateway HostName. 39 | 40 | ![](images/image6.png) 41 | 42 | Next, Click the Management tab to create a new IoT Hub Device. Create a new device and call it IntelIoTGateway. 43 | 44 | ![](images/image7.png) 45 | 46 | After you click Create, you should receive a message that the device has been created. Click Done. 47 | 48 | Now click the Data tab in the Device Explorer, ensure that your newly created Device ID is selected and click Monitor. 49 | 50 | ![](images/image8.png) 51 | 52 | This will continue to monitor the device in the cloud as we complete the rest of the tutorial. 53 | 54 | ## Connect a Sensor to the Azure IoT Hub through the Intel IoT Gateway ## 55 | 56 | Switch back to the Intel IoT Gateway Developer Hub interface running at the IP Address if your gateway. Now launch Node-Red from the Administration Tab: 57 | 58 | ![](images/image9.png) 59 | 60 | Authenticate if necessary and scroll down to the bottom left of the page of the list of Node-Red nodes that are available. You should now see a node for Azure: 61 | 62 | ![](images/image10.png) 63 | 64 | Drag this node above the default temp/humidity flow and connect it to the top output of the RH-USB node as indicated by this picture: 65 | 66 | ![](images/image11.png) 67 | 68 | Switch back to the Device Explorer for Azure IoT Hub and copy the connection string from the device you created. This is not to be confused with the connection string that we used earlier to connect the Device Explorer to Azure. One is Device specific and one is not. We need the one from the device during this step. 69 | 70 | ![](images/image12.png) 71 | 72 | Open the Azure Node in Node-Red and paste the connection string into the Connection String textbox. 73 | 74 | ![](images/image13.png) 75 | 76 | Click OK and then click Deploy in Node-Red to save the changes. 77 | 78 | ![](images/image14.png) 79 | 80 | You should see that in Node-Red that the Azure node changes from Disconnected eventually to Sent Message. 81 | 82 | ![](images/image15.png) 83 | 84 | You can now switch to the Device Explorer Monitor tab and see that there are now messages flowing to your device in the Azure IoT Hub. 85 | 86 | ![](images/image16.png) 87 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image10.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image11.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image12.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image13.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image14.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image15.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image16.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image6.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image7.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image8.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Microsoft Azure IoT Hub/images/image9.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Nest/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and Nest* # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide 6 | range nodes in the palette. Flows can be then deployed to the run-time in a single-click. The light-weight run-time is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. Turn it up, turn it down. The Nest* Learning Thermostat remembers what temperatures you like, creates a custom schedule for your home, and turns itself down when you’re away. Once its learned your schedule, Nest can save 20% on your heating and cooling bills. And if you want remote control, just use your smart phone, tablet or computer. Nest System Match optimizes controls for your heating and cooling system, while the Nest Leaf guides you to energy-efficient temperatures. With Energy History and Energy Report, you can see how much energy you’ve used and get tips to help you save more. 7 | 8 | ## Required Hardware ## 9 | - IoT Gateway that uses Intel® IoT Gateway Technology 10 | - Nest Thermostat and optionally Nest Protect 11 | 12 | ![](images/image1.png) 13 | ![](images/image1.5.png) 14 | 15 | ## Assumptions ## 16 | - Intel® IoT Gateway Technology version 3.1 or above 17 | - Node.js is installed on the IoT Gateway (installed by default) 18 | - Node-RED node node-red-contrib-nest is installed on the IoT Gateway 19 | - You can install this package by clicking on Packages and then Add Packages from the Intel® IoT Gateway Developer Hub 20 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 21 | - Nest products (Thermostat(s) and or Protect(s) are installed, functioning, and are connected to a Nest cloud account) 22 | 23 | ## Nest Developer Account Setup ## 24 | You will need a Nest Developer Program account account to query your the Nest cloud for your Nest data. 25 | 26 | Create a [Nest developer portal](https:/developer.nest.com/) account and log in. 27 | 28 | Click on "Create a Cloud Product" 29 | 30 | - Give your product a unique name 31 | - Enter a description 32 | - Set the Categories to Home Automation and Building for example 33 | - Set the users to Individual 34 | - The Support URL is a required field but not needed for this example. Set it to something appropriate for you 35 | - Leave the Redirect URI blank to enable the PIN CODE authentication process 36 | - Check the boxes in the Permissions section for Thermostat, Away, and Smoke_CO Alarm (if you have a Nest Protect). 37 | - Within each area, enter a brief description of the permission. This text shows up when you authenticate an application to the service. This doesn't matter for the tutorial. 38 | - Optionally, within each area, change to read/write if you want to be able to change settings from within Node-RED (not part of this tutorial) 39 | - Click on Create Product 40 | - Your new Product will now be listed. Click on it to see the details 41 | - Keep the web page open as you'll need the Product ID, Product Secret, Authorization URL, and Access Token URL information later. 42 | 43 | ## Using Node-RED ## 44 | The Node-RED browser interface can be reached via 45 | . When it first comes up it will look 46 | something like this. 47 | 48 | ![](images/image2.png) 49 | 50 | Let’s create a Node-RED flow to get the readings from the Nest product(s). 51 | 52 | Drag the following nodes from the left bar on to Sheet 1 53 | 54 | - inject 55 | - nest request 56 | - function 57 | - debug 58 | - mqtt 59 | 60 | Now, configure the nodes: 61 | 62 | **nest request node** 63 | 64 | - Double click on the nest request node. 65 | - Click on the pen icon to add a new account. 66 | - Cut and paste the Product ID from the Nest Developer web page you left open above in to the Client ID field 67 | - Cut and paste the Product Secret from the Nest Developer web page to the Client Secret field 68 | - Click on the Authorize button. A web page will launch and show you the Nest Product information you created in the Nest Developer web site. Click on Accept. 69 | - Type the Pincode displayed in to the Pincode filed back in Node-RED node. 70 | - Click on the Generate Token button. A token will be crated and the field will be automatically filled in. 71 | - Click on Add 72 | - Ensure the Type is set to Thermostat(s) 73 | - Set the Name field to "Nest Temp" 74 | - Click on Ok 75 | 76 | **function node** 77 | 78 | - Double click on the function node 79 | - Set the name to temp only 80 | - Copy and Paste this code in to the function body. This function will get just the temperature value from the first thermostat that comes back in the set of data retrieved from the Nest cloud. 81 | - Note: If you have a 2nd Nest, you can change the output value in the function to 2. The temperature of the 1st thermostat reported by the Nest cloud will go to output 1 and the temperature of the 2nd thermostat will go to output 2 82 | 83 | ``` 84 | 85 | //var obj = JSON.parse(msg.payload); 86 | var obj = msg.payload; 87 | var messages = []; 88 | 89 | // .ambient_temperature_f 90 | for(var key in obj) 91 | { 92 | if (obj.hasOwnProperty(key)) 93 | { 94 | messages.push({payload: obj[key].ambient_temperature_f}); 95 | } 96 | } 97 | 98 | return messages; 99 | ``` 100 | 101 | - Now wire the inject node to the Nest Temp node by clicking and dragging between the small box on the right of the inject In node to the small box on the left of the Nest Temp node. 102 | - Repeat the process for to wire the Nest Temp node to the temp only function node and again to wire the temp only node to the debug node. 103 | - Note: If you have a 2nd thermostat, you can add a 2nd debug node and wire it to the 2nd output on the function node) 104 | 105 | - It should look like this: 106 | 107 | ![](images/image3.png) 108 | 109 | - Click on the Deploy button, top right, and Confirm deploy. 110 | - Ensure the “debug” node is turned on. The box extending to the right of the node should be solid/filled in green. 111 | - Switch the column on the right from the Info tab to the debug tab. 112 | - Click on the blue box to the left of the inject node. 113 | - The current temperature should appear as part of the payload message should appear as part of the payload message in the debug tab. 114 | 115 | **Congratulations! You are successfully communicating via IP/Cloud to the Nest Thermostat.** 116 | 117 | 118 | Now let's get visualize the Nest thermostat data to the Intel IoT Developer Hub. 119 | 120 | - Add a chart node and a mqtt node to the sheet 121 | - Double click on the chart node and set the values as follows 122 | - Title = Nest Temperature 123 | - Type = Gauge 124 | - Priority = 3 (placement of chart group across Dev Hub) 125 | - Units = °F 126 | - Range = 60 to 80 127 | - Target = (blank) 128 | - Points = 50 129 | - Source = Nest Cloud 130 | - TTL = 10 131 | - Source Priority = 1 (placement of chart within chart group) 132 | - Click on Ok 133 | - Double click on the mqtt node and set the values as follows 134 | - Server = localhost:1833 (should already be selectable in the drop down) 135 | - Topic = /sensors 136 | - Click on Ok 137 | 138 | Now wire the output of the temp only function to the Nest Temperature chart node and the Net Temperate Chart node to the /sensors mqtt node. 139 | It should look like this. 140 | 141 | ![](images/image4.png) 142 | 143 | - Click on the Deploy button, top right. 144 | - Now view the Intel® IoT Gateway Developer Hub via a web browser. You should see a new sensor and graph called Nest Temperature. 145 | 146 | **Congratulations! You are successfully displaying sensor data from your Nest on the IoT Gateway.** 147 | 148 | ## Example flow ## 149 | Node-RED supports exporting and importing of flows (into source json). Here is an export of the above two flows we created. If you import this, the same nodes and configuration we created manually will automatically 150 | appear on the selected Sheet. Import and Export can be found in the Node-RED menu by clicking on the 3 horizontal lines to the right of the Deploy button. 151 | 152 | [{"id":"baabe7c7.455418","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"15","cleansession":true,"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""},{"id":"8b99208b.7466e","type":"nest request","z":"69a52aa4.965ad4","account":"","devicetype":"thermostats","deviceid":"","streaming":"false","name":"Nest Temp","x":259,"y":538,"wires":[["a6bbb09c.59445"]]},{"id":"615eaec.f9ea15","type":"debug","z":"69a52aa4.965ad4","name":"","active":true,"console":"false","complete":"payload","x":615,"y":555,"wires":[]},{"id":"816e2d27.7e91d","type":"inject","z":"69a52aa4.965ad4","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":true,"x":118,"y":495,"wires":[["8b99208b.7466e"]]},{"id":"a6bbb09c.59445","type":"function","z":"69a52aa4.965ad4","name":"temp only","func":"//var obj = JSON.parse(msg.payload);\nvar obj = msg.payload;\nvar messages = [];\n\n// .ambient_temperature_f\nfor(var key in obj)\n{\nif (obj.hasOwnProperty(key))\n{\nmessages.push({payload: obj[key].ambient_temperature_f});\n}\n}\n\nreturn messages;","outputs":"2","noerr":0,"x":422,"y":575,"wires":[["615eaec.f9ea15","bcd1e393.432e2"],[]]},{"id":"7768cbc.f889734","type":"mqtt out","z":"69a52aa4.965ad4","name":"","topic":"/sensors","qos":"","retain":"","broker":"baabe7c7.455418","x":803,"y":562,"wires":[]},{"id":"bcd1e393.432e2","type":"chart tag","z":"69a52aa4.965ad4","title":"Nest Temperature","chartType":"gauge","dataSource":"Nest Cloud","units":"°F","min":"60","max":"80","targetLow":"68","targetHigh":"72","priority":"2","sourcePriority":"1","ttl":"5","points":50,"x":621,"y":500,"wires":[["7768cbc.f889734"]]}] 153 | 154 | ## References ## 155 | - [Nest Thermostat](https://nest.com/) 156 | - [Nest Developer Portal](https://developer.nest.com/) 157 | - [node-red-contrib-nest](https://github.com/hjespers/node-red-contrib-nest) 158 | - [Node-RED](http://nodered.org/) 159 | 160 | *indicates that third-party names might be the property of others. 161 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and Nest/images/image1.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Nest/images/image1.5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Nest/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Nest/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Nest/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Nest/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Nest/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Nest/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Nest/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Nest/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Nest/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Nest/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Omega RH-USB/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and Omega* RH-USB # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide range nodes in the palette. Flows can be then deployed to the run-time in a single-click. The light-weight run-time is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. The Omega* RH-USB relative humidity/temperature sensor provides a standard USB output that directly feeds 6 | relative humidity and temperature directly into the IoT gateway. The compact design is ideal for wall or duct mounting. Each unit is factory calibrated to provide excellent sensitivity, fast response, and stability. The unit features a simple installation with a direct USB 7 | connection. The design features a 316 SS NEMA 4 (IP66) housing. A mounting kit is also available that allows for wall or duct mounting. 8 | 9 | ## Required Hardware ## 10 | - IoT Gateway that uses Intel® IoT Gateway Technology 11 | - Omega RH-USB Sensor 12 | 13 | ![](images/image1.png) 14 | 15 | ## Assumptions ## 16 | - Intel® IoT Gateway Technology version 3.1 or above 17 | - Node.js is installed on the IoT Gateway (installed by default) 18 | - Node-RED node node-red-node-serialport is installed on the IoT Gateway (installed by default) 19 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 20 | 21 | ## Connecting the RH-USB Sensor ## 22 | Plug the RH-USB sensor in to a USB port on your IoT Gateway. On the console of the IoT gateway, you should see a message saying what serial 23 | device was created for the USB interface. It is likely /dev/ttyUSB0. 24 | Please make a note of what device was created. 25 | 26 | ## Using Node-RED ## 27 | The Node-RED browser interface can be reached via 28 | . When it first comes up it will look 29 | something like this. 30 | 31 | ![](images/image2.png) 32 | 33 | Let’s create a Node-RED flow to get the temperature reading from the RH-USB sensor. 34 | 35 | Drag the following nodes from the left bar on to Sheet 1 36 | 37 | - Serial input 38 | - Serial output 39 | - function 40 | - debug 41 | 42 | Now, configure the nodes: 43 | 44 | - Double click on the serial input node. Click on the pen icon to add a new serial port. In the Serial Port field, enter the device you noted above when you plugged the RH_USB sesnor in to the IoT Gateway. Likely /dev/ttyUSB0. Set the Baud Rate to 9600. Leave the other fields as default. For example: 45 | 46 | ![](images/image3.png) 47 | 48 | - Click on OK/Update 49 | - Set the name to “RH-USB In” and click Ok. 50 | - Double click on the serial output node. Select the serial port you created in the steps above. Set the name to “RH-USB Out” and click on Ok. 51 | - Double click on the inject node. Set the Payload to string. Set the string to “F” (put the character F in the string field without quotes). Set the name to “Send F” and click on Ok. 52 | - Double click on the function node. Set the name to “Add Carriage return” and paste to following text in to the function body: 53 | 54 | ``` 55 | 56 | msg.payload = msg.payload+"\r"; 57 | return msg; 58 | ``` 59 | 60 | - Click on Ok. 61 | - Now wire the RH-USB In node to the Debug node by clicking and dragging between the small box on the right of the RH-USB In to the small box on the left of the Debug node. It should look like this: 62 | 63 | ![](images/image4.png) 64 | 65 | - Now wire the Send F inject node to the Add Carriage return function node and the Add Carriage return function node to the RH-USB Out serial node. It should look like this: 66 | 67 | ![](images/image5.png) 68 | 69 | - Click on the Deploy button; top right. 70 | - Ensure the “debug” node is turned on. The box extending to the right of the debug should be solid/filled in green. 71 | - Switch the column on the right from the Info tab to the debug tab. 72 | - Click on the solid/filled in light blue box on the left side of the “Send F” inject node. 73 | - You should see the current temperature i Fahrenheit returned in the debug tab. It should look like this: 74 | 75 | ![](images/image6.png) 76 | 77 | - In addition to sending an F to request temperature in Fahrenheit, you can also send the following commands. Try experimenting changing what you end in the Inject node to request different sensor readings. 78 | 79 | - C - Temperature in Deg C. 80 | - F - Temperature in Deg F. 81 | - H - Relative Humidity 82 | - ENQ - Model number and firmware version 83 | - PA - Relative Humidity and Temperature in Deg F. 84 | 85 | **Congratulations! You are successfully communicating via Serial to the Omega Relative Humidity USB Probe with Temperature Sensor.** 86 | 87 | Example flow 88 | ============ 89 | 90 | Node-RED supports exporting and importing of flows (into source json). 91 | Here is an export of the above two flows we created. If you import this, 92 | the same nodes and configuration we created manually will automatically 93 | appear on the selected Sheet. Import and Export can be found in the 94 | Node-RED menu by clicking on the 3 horizontal lines to the right of the 95 | Deploy button. 96 | 97 | [{"id":"f4321530.0bcde8","type":"serial-port","z":"9d03f5b9.62fc08","serialport":"/dev/ttyUSB0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"7f80e374.807f1c","type":"serial in","z":"9d03f5b9.62fc08","name":"Sensor Input","serial":"f4321530.0bcde8","x":253,"y":229,"wires":[["bc8f30ff.4370d"]]},{"id":"bc8f30ff.4370d","type":"debug","z":"9d03f5b9.62fc08","name":"","active":true,"console":"false","complete":"true","x":489,"y":246,"wires":[]},{"id":"62a0948b.9d5f6c","type":"serial out","z":"9d03f5b9.62fc08","name":"Sensor Output","serial":"f4321530.0bcde8","x":613,"y":317,"wires":[]},{"id":"54a038a6.ab5fc8","type":"inject","z":"9d03f5b9.62fc08","name":"Send F","topic":"","payload":"F","payloadType":"string","repeat":"","crontab":"","once":false,"x":192,"y":324,"wires":[["e664133d.199bf"]]},{"id":"e664133d.199bf","type":"function","z":"9d03f5b9.62fc08","name":"Add Carriage Return","func":"msg.payload = msg.payload+\"\\r\"; \nreturn msg;","outputs":1,"noerr":0,"x":387,"y":325,"wires":[["62a0948b.9d5f6c"]]}] 98 | 99 | 100 | ## References ## 101 | - [Omega RH-USB](http://www.omega.com/pptst/RH-USB.html) 102 | - [Omega RH-USB Command Reference](ftp://ftp.omega.com/public/DASGroup/products/RH-USB/RH_USB%20Command%20Reference.pdf) 103 | - [Node-red-node-serialport](http://flows.nodered.org/node/node-red-node-serialport) 104 | - [Node-RED](http://nodered.org/) 105 | 106 | *indicates that third-party names might be the property of others. 107 | 108 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and Omega RH-USB/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Omega RH-USB/images/image1.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Omega RH-USB/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Omega RH-USB/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Omega RH-USB/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Omega RH-USB/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Omega RH-USB/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Omega RH-USB/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Omega RH-USB/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Omega RH-USB/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Omega RH-USB/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Omega RH-USB/images/image6.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Philips Hue/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and Philips* Hue # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide range nodes in the palette. Flows can be then deployed to the run-time in a single-click. The light-weight run-time is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. Hue is Personal Wireless Lighting System from Philips*. It is designed for home use and a minimum implementation includes a bridge (IP-ZigBee) and at least one LED. Most of Hue LED based lights support multi-color but pure white bulbs are available as well. 6 | 7 | ## Required Hardware ## 8 | - IoT Gateway that uses Intel® IoT Gateway Technology 9 | - Philips Hue Bridge (version 2.0 was used in this example) 10 | - Philips Hue bulb or light (Philips Hue Go was used in this example) 11 | 12 | ![](images/image1.jpeg) 13 | ![](images/image2.jpeg) 14 | 15 | ## Assumptions ## 16 | - Intel® IoT Gateway Technology version 3.1 or above 17 | - Node.js is installed on the IoT Gateway (installed by default) 18 | - Node-RED node node-red-contrib-hue is installed on the IoT Gateway 19 | - You can install this package by clicking on Packages and then Add Packages from the Intel® IoT Gateway Developer Hub 20 | - Node-Red is installed on the IoT Gateway and is running (installed by default) 21 | - The Philips Hue bridge has been setup and at least one light has been added 22 | 23 | ## Important Notes ## 24 | - Hue does not support connectivity through a proxy. The IoT gateway must be on the same network as the Hue Bridge and the Hue Bridge must be on a network with direct internet access. 25 | - As of Jan 5 2016, the Hue node will fail to start if it can not discover a Hue Bridge on the same network; causing Node-RED to stop. 26 | 27 | ## Using Node-RED ## 28 | The Node-RED browser interface can be reached via 29 | . When it first comes up it will look 30 | something like this. 31 | 32 | ![](images/image3.png) 33 | 34 | Let’s create a Node-RED flow to turn on a Hue light and set the color. 35 | 36 | Drag the following nodes from the left bar on to Sheet 1 37 | 38 | - Inject (2 instances) 39 | - function (2 instances) 40 | - Hue Set (1 instance) 41 | 42 | Now, configure the nodes: 43 | 44 | - Double click on the Hue Set node. It may automatically ask you to press the button on your Hue bridge to connect Node-RED to your bridge. If not, click on the Server field and this should happen. Once it connects, you should be able to pick the Hue light you want to control via the Device drop down. In this example, we choose “Hue Go 1”. Set the name to “Hue Go” and click on Ok. 45 | - Double click on the function node. Set the name to “Red” and insert the following syntax: 46 | 47 | ``` 48 | 49 | msg.payload = { 50 | "on" : [true], 51 | "transitiontime" : [5], 52 | "bri" : [100], 53 | "rgb":[255,0,0] 54 | } 55 | 56 | return msg; 57 | ``` 58 | 59 | - Click on Ok 60 | 61 | - Double click on the other function node. Set the name to “Gree” and 62 | insert the following syntax: 63 | 64 | ``` 65 | 66 | msg.payload = { 67 | "on" : [true], 68 | "transitiontime" : [5], 69 | "bri" : [100], 70 | "rgb":[0,255,0] 71 | } 72 | 73 | return msg; 74 | ``` 75 | 76 | - Click on Ok 77 | - Now wire 1 of the inject nodes to the Red function node by clicking and dragging between the small box on the right of the inject node to the small box on the left of the Red function node. 78 | - Repeat the wire process connecting the other inject node to the Green function node 79 | - Lastly, wire both Red and Green function nodes to the Hue Set node that we named Hue Go. It should look like this: 80 | 81 | ![](images/image4.png) 82 | 83 | - Click on the Deploy button, top right, and Confirm deploy. 84 | - Click on the solid/filled in light blue box on the left side of the “timestamp” inject node that’s connected to the Red function node 85 | - The Hue Go light should come on and turn Red 86 | - Click on the solid/filled in light blue box on the left side of the “timestamp” inject node that’s connected to the Green function node 87 | - The Hue Go light should come on and turn Green 88 | 89 | **Congratulations! You are successfully communicating via IP to the Philips Hue Bridge, which is then communicating via ZigBee to the Philips Hue light.** 90 | 91 | You can repeat this process to create 92 | other colors, setting the rgb value in the function node to any color combination you want. 93 | You can also use the Hue Pull node, along with a Debug node, to read the current setting/value of a Hue device. 94 | 95 | ## Example flow ## 96 | Node-RED supports exporting and importing of flows (into source json). 97 | Here is an export of the above two flows we created. If you import this, 98 | the same nodes and configuration we created manually will automatically 99 | appear on the selected Sheet. Import and Export can be found in the 100 | Node-RED menu by clicking on the 3 horizontal lines to the right of the 101 | Deploy button. 102 | 103 | [{"id":"e2ca30d6.1d35d","type":"Hue Set","deviceid":"1","serverid":"001788fffe210097","name":"Hue Go","x":585,"y":151,"z":"3685261d.c97ada","wires":[[],[]]},{"id":"bdcb7d46.42348","type":"function","name":"Red","func":"msg.payload={\n\t\t\t\"on\":[true],\n\t\t\t\"transitiontime\":[5],\n\t\t\t\"bri\":[100],\n\t\t\t\"rgb\":[255,0,0]\n\t\t}\nreturn msg;","outputs":1,"noerr":0,"x":352,"y":116,"z":"3685261d.c97ada","wires":[["e2ca30d6.1d35d"]]},{"id":"4d9edd42.b26124","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":150,"y":102,"z":"3685261d.c97ada","wires":[["bdcb7d46.42348"]]},{"id":"ba3eeda6.45c11","type":"function","name":"Green","func":"msg.payload={\n\t\t\t\"on\":[true],\n\t\t\t\"transitiontime\":[5],\n\t\t\t\"bri\":[100],\n\t\t\t\"rgb\":[0,255,0]\n\t\t}\nreturn msg;","outputs":1,"noerr":0,"x":349,"y":181,"z":"3685261d.c97ada","wires":[["e2ca30d6.1d35d"]]},{"id":"37faeb17.c80514","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":156,"y":199,"z":"3685261d.c97ada","wires":[["ba3eeda6.45c11"]]}] 104 | 105 | ## References ## 106 | - [Philips Hue](http://www2.meethue.com/en-us/) 107 | - [Node-red-contrib-hue](https://www.npmjs.com/package/node-red-contrib-hue) 108 | - [Node-RED](http://nodered.org/) 109 | 110 | *indicates that third-party names might be the property of others. 111 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and Philips Hue/images/image1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Philips Hue/images/image1.jpeg -------------------------------------------------------------------------------- /Getting Started With Node-Red and Philips Hue/images/image2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Philips Hue/images/image2.jpeg -------------------------------------------------------------------------------- /Getting Started With Node-Red and Philips Hue/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Philips Hue/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Philips Hue/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Philips Hue/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and RFID/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and RFID # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide 6 | range nodes in the palette. Flows can be then deployed to the runtime in a single-click. The light-weight runtime is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. The SparkFun* RFID Starter Kit, 7 | an all-in-one kit that offer everything you need to create a RFID project. The kit includes a USB RFID Reader, ID-12LA RFID module, and two 125kHz RFID cards. 8 | 9 | ## Required Hardware ## 10 | - IoT Gateway that uses Intel® IoT Gateway Technology 11 | - SparkFun RFID Starter Kit 12 | - USB Mini-B Cable 13 | 14 | ![](images/image1.jpeg) 15 | 16 | ## Assumptions ## 17 | - Intel® IoT Gateway Technology version 3.1 or above 18 | - Node.js is installed on the IoT Gateway (installed by default) 19 | - Node-RED node node-red-node-serialport is installed on the IoT Gateway (installed by default) 20 | - Node-D is installed on the IoT Gateway and is running (installed by default) 21 | 22 | ## Connecting the RFID Reader ## 23 | Plug the RFID reader in to the board. Plug the small end of the USB cable in to the board. Plug the other end of the USB cable in to a USB port on your IoT Gateway. On the console of the IoT gateway, you should see a message saying what serial device was created for the USB 24 | interface. It is likely /dev/ttyUSB0. Please make a note of what device was created. 25 | 26 | ## Using Node-RED ## 27 | The Node-RED browser interface can be reached via 28 | . When it first comes up it will look 29 | something like this. 30 | 31 | ![](images/image2.png) 32 | 33 | Let’s create a Node-RED flow to get the badge readings from the RFID reader. 34 | 35 | Drag the following nodes from the left bar on to Sheet 1 36 | 37 | - Serial input 38 | - debug 39 | 40 | Now, configure the nodes: 41 | 42 | - Double click on the serial node. Click on the pen icon to add a new serial port. In the Serial Port field, enter the device you noted above when you plugged the RFID reader in to the IoT Gateway. Likely /dev/ttyUSB0. Set the Baud Rate to 9600. Leave the other fields as default. For example: 43 | 44 | ![](images/image3.png) 45 | 46 | - Click on OK/Update 47 | - Set the name to “RFID In”. For example: 48 | 49 | ![](images/image4.png) 50 | 51 | - Click OK 52 | - Now wire the RFID In node to the Debug node by clicking and dragging between the small box on the right of the RFID In node to the small box on the left of the Debug node. It should look like this: 53 | 54 | ![](images/image5.png) 55 | 56 | - Click on the Deploy button, top right, and Confirm deploy. 57 | - Ensure the “debug” node is turned on. The box extending to the right of the node should be solid/filled in green. 58 | - Switch the column on the right from the Info tab to the debug tab. 59 | - Scan one of your badges. 60 | - The badge ID should appear as part of the payload message in the debug tab. 61 | - Scan your other badge. 62 | - The badge ID should appear as part of the payload message in the debug tab. 63 | 64 | **Congratulations! You are successfully communicating via Serial to a RFID reader device.** 65 | 66 | ## Example flow ## 67 | Node-ED supports exporting and importing of flows (into source json). 68 | Here is an export of the above two flows we created. If you import this, 69 | the same nodes and configuration we created manually will automatically 70 | appear on the selected Sheet. Import and Export can be found in the 71 | Node-RED menu by clicking on the 3 horizontal lines to the right of the 72 | Deploy button. 73 | 74 | [{"id":"7bc6f0f3.84391","type":"serial-port","serialport":"/dev/ttyUSB0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"b8d1dd75.472e2","type":"serial in","name":"RFID In","serial":"7bc6f0f3.84391","x":154,"y":376,"z":"d8bf240b.2740d8","wires":[["b9130dd8.46ecf"]]},{"id":"b9130dd8.46ecf","type":"debug","name":"","active":true,"console":"false","complete":"false","x":380,"y":374,"z":"d8bf240b.2740d8","wires":[]}] 75 | 76 | ## References ## 77 | - [SparkFun RFID Starter Kit](https://www.sparkfun.com/products/13198) 78 | - [Node-red-node-serialport](http://flows.nodered.org/node/node-red-node-serialport) 79 | - [Node-RED](http://nodered.org/) 80 | 81 | *indicates that third-party names might be the property of others. 82 | 83 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and RFID/images/image1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and RFID/images/image1.jpeg -------------------------------------------------------------------------------- /Getting Started With Node-Red and RFID/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and RFID/images/image2.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and RFID/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and RFID/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and RFID/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and RFID/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and RFID/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and RFID/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and TI SensorTag/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and TI* SensorTag # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide range nodes in the palette. Flows can be then deployed to the run-time in a single-click. The light-weight run-time is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. The TI* multi-standard SensorTag, based on the SimpleLink ultra-low power CC2650 wireless MCU, supports development for Bluetooth Smart, 6LoWPAN and ZigBee. This SensorTag has a unique feature that allows developers to change between different 2.4 GHz technologies by simply loading new software images directly from the SensorTag app over-the-air. In this example, we’ll be communicating to the SensorTag via Bluetooth Low Energy (BLE). The SensorTag includes the following sensors: Infrared and Ambient Temperature, Ambient Light, Humidity, Barometric Pressure, 9-axis motion tracking, and Magnet. 6 | 7 | ## Required Hardware ## 8 | - IoT Gateway that uses Intel® IoT Gateway Technology 9 | - TI SimpleLink Multi-Standard SensorTag Development Kit 10 | 11 | ![](images/ti-sensortag.png) 12 | 13 | ## Assumptions ## 14 | - Intel® IoT Gateway Technology version 3.1 or above 15 | - Node.js is installed on the IoT Gateway (installed by default) 16 | - Node-RED node node-red-node-sensortag is installed on the IoT Gateway 17 | - You can install this package by clicking on Packages and then Add Packages from the Intel® IoT Gateway Developer Hub 18 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 19 | 20 | ## Enabling Bluetooth Low Energy (BLE) on the IoT Gateway ## 21 | By default, Bluetooth is enabled but Bluetooth Low Energy (BLE) is not. 22 | This is easy to turn off via the IoT Gateway administrative web 23 | console. You can access the console via . 24 | - Log in using your root username and password 25 | - Click on the Administration icon and then the Lunch button under LuCI to launch the IoT gateway administration console. 26 | 27 | - Log in using your root username and password. 28 | - Select Network from the menu and choose Bluetooth 29 | - If it says “Disabled” next to Bluetooth Status, click on the Disabled button 30 | 31 | It should look like this when setup correctly 32 | 33 | ![](images/ti-blesetupscreen.png) 34 | 35 | ## Bluetooth Test ## 36 | Before we start, let’s make sure the IoT Gateway can discover the SensorTag device. Ensure a battery is installed in the SensorTag power it on (it goes to sleep if there are no active connections to it). To 37 | turn it on, just press the small button. You should see a green LED start flashing. By the way, when a connection is established to the SensorTag, this LED will turn off. Type the following on the IoT Gateway 38 | console prompt: 39 | 40 | >hcitool lescan 41 | 42 | It should respond with something like this: 43 | 44 | >LE Scan … 45 | > 46 | >B4:99:4C:1E:C0:C0 CC2650 SensorTag 47 | 48 | It may also show other Bluetooh devices in range. 49 | Press Ctrl-C to stop the scanning tool. If it doesn’t show your SensorTag, make sure the SensorTag is turned on and the LED is flashing and try again. 50 | 51 | ## Using Node-RED ## 52 | The Node-RED browser interface can be reached via 53 | . When it first comes up it will look 54 | something like this. 55 | 56 | ![](images/ti-noderedscreen.png) 57 | 58 | Let’s create a Node-RED flow to get the sensor readings from the SensorTag. 59 | 60 | Drag the following nodes from the left bar on to Sheet 1 61 | 62 | - sensorTag 63 | - Debug 64 | 65 | Now, configure the nodes: 66 | 67 | - Double click on the sensorTag node and check what sensors you’d like to include. For this example, let’s check them all. Set the name to sensorTag. Leave the UUID blank (if you have more than 1 SensorTag in range, you can set this to the MAC address of the SensorTag you want to talk to. For this example, we’ll assume there is only one in range. Leave the other fields as default. For example: 68 | 69 | ![](images/ti-sensornode.png) 70 | 71 | - Click OK 72 | - Now wire the sensorTag node to the Debug node by clicking and dragging between the small box on the right of the sensorTag node to the small box on the left of the Debug node. It should look like this: 73 | 74 | ![](images/ti-sensorwire.png) 75 | 76 | - Click on the Deploy button, top right, and Confirm deploy. 77 | - Ensure the “debug” node is turned on. The box extending to the right of the node should be solid/filled in green. 78 | - Switch the column on the right from the Info tab to the debug tab. 79 | - The sensor readings show appear in the debug tab, you may need to press the power button on the SensorTag to turn it on if it’s gone to sleep since we turned it on in the above steps. 80 | 81 | **Congratulations! You are successfully communicating via BlueTooth low energy to a SensorTag device.** 82 | 83 | ## Example flow ## 84 | Node-RED supports exporting and importing of flows (into source json). Here is an export of the above two flows we created. If you import this, the same nodes and configuration we created manually will automatically 85 | appear on the selected Sheet. Import and Export can be found in the Node-RED menu by clicking on the 3 horizontal lines to the right of the Deploy button. 86 | 87 | [{"id":"f80454e.f07fba8","type":"sensorTag","name":"sensorTag","topic":"sensorTag","uuid":"","temperature":true,"humidity":true,"pressure":true,"magnetometer":true,"accelerometer":true,"gyroscope":true,"keys":true,"luxometer":true,"x":240,"y":266,"z":"ec8b1eb.f1374e","wires":[["ad11b15b.52ee5"]]},{"id":"ad11b15b.52ee5","type":"debug","name":"","active":true,"console":"false","complete":"payload","x":543,"y":276,"z":"ec8b1eb.f1374e","wires":[]}] 88 | 89 | ## References ## 90 | - [SensorTag](http://www.ti.com/ww/en/wireless_connectivity/sensortag2015/index.html) 91 | - [Node-red-node-sensortag](https://www.npmjs.com/package/node-red-node-sensortag) 92 | - [Node-RED](http://nodered.org/) 93 | 94 | *indicates that third-party names might be the property of others. 95 | 96 | -------------------------------------------------------------------------------- /Getting Started With Node-Red and TI SensorTag/images/ti-blesetupscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and TI SensorTag/images/ti-blesetupscreen.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and TI SensorTag/images/ti-json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and TI SensorTag/images/ti-json.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and TI SensorTag/images/ti-noderedscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and TI SensorTag/images/ti-noderedscreen.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and TI SensorTag/images/ti-sensornode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and TI SensorTag/images/ti-sensornode.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and TI SensorTag/images/ti-sensortag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and TI SensorTag/images/ti-sensortag.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and TI SensorTag/images/ti-sensorwire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and TI SensorTag/images/ti-sensorwire.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Node-RED and Z-Wave # 2 | 3 | 4 | ## Overview ## 5 | Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide range nodes in the palette. Flows can be then deployed to the runtime in a single-click. The light-weight runtime is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network. Z-Wave is a wireless technology that makes regular household products, like lights, door locks and 6 | thermostats "smart". Z-Wave products "talk" to each other wirelessly and securely and can be accessed and controlled on your phone, tablet or pc. By using Z-Wave you can connect to the things inside your house whether you're at home or while you're away. Currently there are 7 | nearly 1000 different Z-Wave products that all work together. 8 | 9 | ## Required Hardware ## 10 | - IoT Gateway that uses Intel® IoT Gateway Technology 11 | - Z-Wave controller interface (USB) 12 | - *In this example, we used an Aeon Labs* DSA02203-ZWUS Z-Wave Z-Stick Series 2* 13 | 14 | ![](images/image1.jpeg) 15 | 16 | - At least one Z-Wave device 17 | - A simple plug in lamp module and a desk lamp is a good place to start for initial testing. *In this example, we used a GE* Plug-in Smart Switch model 12719.* 18 | 19 | ![](images/image2.jpeg) 20 | 21 | ## Assumptions ## 22 | - Intel® IoT Gateway Technology version 3.1 or above 23 | - Node.js is installed on the IoT Gateway (installed by default) 24 | - Z-Wave controller is plugged in to a USB port on the IoT Gateway 25 | - Z-Wave package is installed from the Intel® IoT Gateway Developer Hub. You can install these packages by clicking on Packages and then Add Packages from the Developer Hub. The Z-Wave package includes: 26 | - OpenZWave library and headers 27 | - Node.js add-on node-openzwave-shared 28 | - Node-RED node-red-contrib-openzwave 29 | - Node-RED is installed on the IoT Gateway and is running (installed by default) 30 | 31 | ## Setting up a Z-Wave Network ## 32 | Before the Z-Wave controller can talk to a Z-Wave device, the device needs to be added or provisioned to the controller. This can be done via software or in the case of the Aeon Labs Z-Stick, via the physical 33 | button on the USB interface. 34 | 35 | 1. Stop Node-RED if it is running 36 | 37 | >systemctl stop node-red-experience 38 | 39 | 2. Unplug the Z-Wave Aeon Labs Z-Stick from the IoT Gateway 40 | 3. Plug the Z-Wave Smart Switch in to an outlet or power strip 41 | 4. Press the button on the Aeon Labs Z-Stick. The light should start to flash slowly. 42 | 5. Within 10 seconds, press the button on the Z-Wave Smart Switch. You should see the light on the Aeon Labs Z-Stick blink and then return to flashing slowly. 43 | - Repeat on other Z-Wave devices if you are adding more than one 44 | 6. Press the button on the Aeon Labs Z-Stick. The light should go out. 45 | 7. Plug the Aeon Labs Z-Stick back in the USB port on the IoT Gateway 46 | - Node the device Linux assigns on the console output. Likely /dev/ttyUSB0. 47 | 8. Start Node-RED 48 | 49 | >systemctl start node-red-experience 50 | 51 | ## Using Node-RED ## 52 | The Node-RED browser interface can be reached via 53 | . When it first comes up it will look 54 | something like this. 55 | 56 | ![](images/image3.png) 57 | 58 | Drag the following nodes from the left bar on to Sheet 1 59 | 60 | - inject (2 instances) 61 | - zwave out 62 | - zwave in 63 | - debug 64 | 65 | First, we need to get the Z-Wave Node ID from the Smart Switch you added in Setting up the Z-Wave Network section. Here’s how we can get that info. 66 | 67 | - Double click on the zwave in node and name it “z-wave in”. 68 | - Then click on the Controller filed and select add new controller. Enter the device location of the port the USB Z-Wave interface is plugged in to. Likely /dev/ttyUSB0. Click on Add. Click on Ok. 69 | - Double click on the debug node, green and likely called msg.payload. Set its name to “z-wave in debug” and click on ok 70 | - Now wire the “z-wave in” node to the “z-wave in debug” node by clicking and dragging between the small box on the right of the “z-wave in” node to the small box on the left of the “z-wave in debug node”. 71 | - It should look like this: 72 | 73 | ![](images/image4.png) 74 | 75 | - Click on the Deploy button, top right, and Confirm deploy. It’s ok some of the nodes are not setup yet. We’ll get to those next. 76 | - Ensure the “z-wave in debug” node is turned on. The box extending to the right of the node should be solid/filled in green. 77 | - Switch the column on the right from the Info tab to the debug tab. 78 | - Press the button on the Z-Wave Smart Switch. The lamp should toggle on/off. A debug message like this should appear each time you toggle the Smart Switch. 79 | 80 | ![](images/image5.png) 81 | 82 | - Note the numeric value listed after “nodeid”. In this case, it’s 4. 83 | 84 | Ok, now that we know the node id, let’s setup a flow to control the Z-Wave Smart Switch 85 | 86 | - Double click on one of the inject nodes. Set the fields as follows: 87 | 88 | ![](images/image6.png) 89 | 90 | - Replace the nodeid numeric value with the value of your z-wave switch as you noted above* 91 | - Click on Ok 92 | - Double click on the other inject node. Set the fields as follows: 93 | 94 | ![](images/image7.png) 95 | 96 | - Replace the nodeid numeric value with the value of your z-wave switch as you noted above* 97 | - Click on Ok 98 | - Double click on the zwave out node and name it “z-wave out”. 99 | - Then click on the Controller filed and select add new controller. Enter the device location of the port the USB Z-Wave interface is plugged in to. Likely /dev/ttyUSB0. Click on Add. Click on Ok. 100 | - Now wire the “Light On” and Light Off nodes to the “z-wave out” node by clicking and dragging between the small box on the right of each node to the small box on the left of the “z-wave out” node. 101 | - It should look like this: 102 | 103 | ![](images/image8.png) 104 | 105 | Your two flows together should look like this: 106 | 107 | ![](images/image9.png) 108 | 109 | - Click on the Deploy button, top right, and Confirm deploy 110 | - Click on the solid/filled in light blue box on the left side of the “Light On” inject node. 111 | - The Z-Wave Smart Switch and lamp should turn on 112 | - Click on the solid/filled in light blue box on the left side of the “Light Off” inject node. 113 | - The Z-Wave Smart Switch and lamp should turn off 114 | 115 | **Congratulations! You are successfully communicating via Z-Wave to Z-Wave devices; controlling and sensing.** 116 | 117 | ## Example flow ## 118 | Node-RED supports exporting and importing of flows (into source json). Here is an export of the above two flows we created. If you import this, the same nodes and configuration we created manually will automatically 119 | appear on the selected Sheet. Import and Export can be found in the Node-RED menu by clicking on the 3 horizontal lines to the right of the 120 | Deploy button. 121 | 122 | [{"id":"9d41a5d9.62be58","type":"zwave-controller","port":"/dev/ttyUSB0","driverattempts":"3","pollinterval":"500"},{"id":"49f6bc58.b60944","type":"zwave-in","name":"z-wave in","controller":"9d41a5d9.62be58","x":161,"y":205,"z":"71d5b1a3.8e2a5","wires":[["4d8a73fb.b2758c"]]},{"id":"2b05244c.d4fadc","type":"inject","name":"Light on","topic":"'switchOn'","payload":"{\"nodeid\":4}","payloadType":"string","repeat":"","crontab":"","once":false,"x":168,"y":64,"z":"71d5b1a3.8e2a5","wires":[["4067c55d.bf983c"]]},{"id":"ee7f0d6b.1180f","type":"inject","name":"Light Off","topic":"'switchOff'","payload":"{\"nodeid\":4}","payloadType":"string","repeat":"","crontab":"","once":false,"x":171,"y":126,"z":"71d5b1a3.8e2a5","wires":[["4067c55d.bf983c"]]},{"id":"4067c55d.bf983c","type":"zwave-out","name":"z-wave out","controller":"9d41a5d9.62be58","x":446,"y":91,"z":"71d5b1a3.8e2a5","wires":[]},{"id":"4d8a73fb.b2758c","type":"debug","name":"z-wave in debug","active":true,"console":"false","complete":"payload","x":396,"y":204,"z":"71d5b1a3.8e2a5","wires":[]}] 123 | 124 | ## Supported (by OpenZwave) Z-Wave Devices/Sensors ## 125 | - [Z-Wave Products](http://products.z-wavealliance.org/) 126 | 127 | ## References ## 128 | - [Node-RED](http://nodered.org/) 129 | - [node-red-contrib-openzwave](http://flows.nodered.org/node/node-red-contrib-openzwave) 130 | - [OpenZWave](http://www.openzwave.com/) 131 | - [node-openzwave-shared](https://github.com/OpenZWave/node-openzwave-shared) 132 | - [Z-Wave](http://www.z-wave.com/home) 133 | - [Z-Wave Alliance](http://z-wavealliance.org/) 134 | - [Official Z-Wave Stack (from Sigma Designs)](http://z-wave.sigmadesigns.com/) 135 | 136 | ## Note ## 137 | The Z-Wave library used in this example is the community supported OpenZWave* stack. This is a Reverse Engineered implementation of the official Z-Wave stack from Sigma Designs*. Details on the official stack can be found [here](http://z-wave.sigmadesigns.com/). The official stack is recommenced for any production deployments. 138 | 139 | *indicates that third-party names might be the property of others. -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image1.jpeg -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image2.jpeg -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image3.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image4.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image5.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image6.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image7.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image8.png -------------------------------------------------------------------------------- /Getting Started With Node-Red and Z-Wave/images/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Node-Red and Z-Wave/images/image9.png -------------------------------------------------------------------------------- /Getting Started With Remote Debug/README.md: -------------------------------------------------------------------------------- 1 | # Remote Debug nodejs applications on IoT Gateways that use Intel® IoT Gateway Technology # 2 | 3 | 4 | ## Introduction: ## 5 | 6 | This recipe describes the steps to remote debug a nodejs app running on IoT Gateways that use Intel® IoT Gateway Technology with the Node-Inspector* tool. Although the Intel® IoT Gateway Developer Hub supports remote debugging JavaScript* applications with Wind River® Helix™ App Cloud; this is an alternative approach. 7 | 8 | ###Scenario: 9 | - IoT Gateways that use Intel® IoT Gateway Technology : The IoT gateway where the nodejs app is running 10 | - Development PC (PC) : A development PC connected to the IoT Gateway network.** 11 | 12 | Example: 13 | 14 | **[GW: 192.168.0.100] <=> [PC: 192.168.0.107]** 15 | 16 | ##Requirements: 17 | 18 | * IoT Gateway: Install the node-inspector module (0.12.6) on the IoT gateway 19 | 20 | $ sudo npm install –g node-inspector 21 | 22 | * PC : install a Chrome* browser 23 | 24 | ##Setup & Debug: 25 | 26 | 1. PC: In a PC terminal window, use SSH to forward the remote debugging port to the IoT gateway. 27 | 28 | $ ssh –L 8080:127.0.0.1:8080 root@192.168.0.100 -N 29 | 30 | >Enter the password for the IoT gateway '@' - the default pw is: root 31 | Notes: copy-and-paste the above cmd can cause error 'could not resolve host name' - just type in the command. 32 | 33 | Example: 34 | ![](images/remote_dbg_1.png) 35 | 36 | 2. IoT Gateway: Open a terminal window on the gateway. 37 | >Note: OR open a SSH terminal from the remote PC with 38 | 39 | # ssh root@192.168.0.100 and password: root 40 | 41 | * Navigate to the nodejs app folder 42 | 43 | $ cd /home/gwuser/ 44 | 45 | * Run the node inspector debugger with this command: 46 | 47 | $ node-debug --cli 48 | 49 | Example: 50 | ![](images/remote_dbg_2.png) 51 | 52 | * Note: to enable live editing, specify the option --save-live-edit on the command as: 53 | 54 | $ node-debug --cli --save-live-edit 55 | 56 | >To edit, set the cursor on a source line and make changes. Once done, right-click and select save. 57 | 58 | 3. PC: Start the remote debug session by opening a Chrome browser with the URL (as displayed in the IoT Gateway terminal) 59 | 60 | http://127.0.0.1:8080/?port=5858 61 | 62 | * The browser will show the Node-Inspector debugger 63 | * From the right-hand panel, you can single-step (into/over), inspect variable, view the stack, and set breakpoint and run through the code 64 | * If the code breaks, the debugger connection also break. Fix the problem and re-run step #2, and refresh the browser 65 | * The app console output will be shown in the IoT Gateway terminal windows in step #2. 66 | 67 | 4. Node-Inspector works almost identical to the Chrome* Dev Tool, the references for using Node-Inspector are here 68 | 69 | https://developer.chrome.com/devtools/docs/javascript-debugging 70 | https://www.npmjs.com/package/node-inspector 71 | https://docs.strongloop.com/display/SLC/Using+Node+Inspector 72 | 73 | *indicates that third-party names might be the property of others. 74 | -------------------------------------------------------------------------------- /Getting Started With Remote Debug/images/remote_dbg_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Remote Debug/images/remote_dbg_1.png -------------------------------------------------------------------------------- /Getting Started With Remote Debug/images/remote_dbg_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Getting Started With Remote Debug/images/remote_dbg_2.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2014-2015 Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DISCONTINUATION OF PROJECT # 2 | This project will no longer be maintained by Intel. 3 | Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project. 4 | Intel no longer accepts patches to this project. 5 | # Intel® IoT Gateway Technology 6 | Here you will find recipes, tutorials, and examples for connecting sensors and cloud solutions to IoT Gateways that use Intel® IoT Gateway Technology. 7 | 8 | - [Changing the Default IP Address](Changing%20the%20Default%20IP%20Address/README.md) 9 | 10 | - [Clearing Secure Boot Keys](Clearing%20Secure%20Boot%20Keys/README.md) 11 | 12 | - [Changing the IoT Gateway to a WiFi Client](Changing%20the%20IoT%20Gateway%20to%20a%20WiFi%20Client/README.md) 13 | 14 | - [Getting Started With Node-RED and AWS IoT](Getting%20Started%20With%20Node-Red%20and%20AWS%20IoT/README.md) 15 | 16 | - [Getting Started With Cloud Commander](Getting%20Started%20With%20Cloud%20Commander/README.md) 17 | 18 | - [Getting Started With Node-RED and Arduino 101 with the Grove Shield](Getting%20Started%20With%20Node-Red%20and%20Arduino%20101%20with%20the%20Grove%20Shield/README.md) 19 | 20 | - [Getting Started With Node-RED and Bluemix](Getting%20Started%20With%20Node-Red%20and%20Bluemix/README.md) 21 | 22 | - [Getting Started With Node-RED and Comet T0310](Getting%20Started%20With%20Node-Red%20and%20Comet%20T0310/README.md) 23 | 24 | - [Getting Started With Node-RED and LightBlue Bean](Getting%20Started%20With%20Node-Red%20and%20LightBlue%20Bean/README.md) 25 | 26 | - [Getting Started With Node-Red and Microsoft Azure IoT Hub](Getting%20Started%20With%20Node-Red%20and%20Microsoft%20Azure%20IoT%20Hub/README.md) 27 | 28 | - [Getting Started With Node-RED and Omega RH-USB](Getting%20Started%20With%20Node-Red%20and%20Omega%20RH-USB/README.md) 29 | 30 | - [Getting Started With Node-RED and Philips Hue](Getting%20Started%20With%20Node-Red%20and%20Philips%20Hue/README.md) 31 | 32 | - [Getting Started With Node-RED and RFID](Getting%20Started%20With%20Node-Red%20and%20RFID/README.md) 33 | 34 | - [Getting Started With Node-RED and TI SensorTag](Getting%20Started%20With%20Node-Red%20and%20TI%20SensorTag/README.md) 35 | 36 | - [Getting Started With Node-RED and Z-Wave](Getting%20Started%20With%20Node-Red%20and%20Z-Wave/README.md) 37 | 38 | - [Getting Started with Node-RED and Nest](Getting%20Started%20With%20Node-Red%20and%20Nest/README.md) 39 | 40 | - [Getting Started with Remote Debug node.js](Getting%20Started%20With%20Remote%20Debug/README.md) 41 | 42 | - [Updating the Intel IoT Gateway Developer Packages](Updating%20the%20Intel%20IoT%20Gateway%20Developer%20Packages/README.md) 43 | -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/README.md: -------------------------------------------------------------------------------- 1 | # Updating the Intel IoT Gateway Developer Packages # ## Overview ## As periodic updates are released, it is important to ensure that you are keeping your gateway development environment up to date. The Developer Hub interface provides an easy mechanism to perform these package updates. Note that this is not the process to update the operating system to the latest Rolling Cumulative Patch Layer (RCPL). A different guide will be published for that. ## Required Hardware ## - IoT Gateway that uses Intel® IoT Gateway Technology - A system running a web browser. In the case of this tutorial, we used a laptop running Windows 10 and Chrome. ## Assumptions ## - Intel® IoT Gateway Technology version 3.1 or above - You have network connectivity to the IoT Gateway and you know it's IP address ## Access The Developer Hub ## To access the Developer Hub, open your web browser and go the . Log in with the username and & password. Once connected, you should see something like this: ![](images/image1.png) You can see by the update indicator in the top right corner that you have updates indicated by the number next to the word Updates. In this case we have 13. Before clicking to update, it is important that you first update the Developer Hub itself. This will ensure that the Developer Hub has the latest code to deal with the rest of the updates since it is performing the updates. You can minimize the charting area to have more screen real estate by clicking the up arrow under the charting area. Next click on the packages tab in order to expose the ability to update and control individual packages. Don't worry if your package list is not yet populated. ![](images/image2.png) For the next steps we need to ensure that your gateway has access to the public internet. You can use the proxy configuration settings on the Administration tab to help with this if you are behind a proxy. Once this is confirmed, click on the Add Repo button where it will allow us to ensure we have all of the latest packages to be updated. You will see the Intel_Repository there by default. Click on the Update Repositories button. After a minute or so, the button text will change to Updated. You can close this window and you should now have an update list of packages under the packages tab. ![](images/image3.png) At this point, click the iot-developer-hub package and a new screen will allow you to update or uninstall that package. Proceed to update the iot-developer-hub package. ![](images/image4.png) ![](images/image5.png) As the notice indicates, this will take a few minutes. It has to download the package update from the internet and install it (which restarts the Developer Hub Interface). This all takes some time, but once you are able to refresh your browser pointing to the gateway IP address and see the Developer Hub up and running again, you should be good to go. Log in again to the Developer Hub and click on the packages tab. At this point you should see that you have one less package to update (indicating that you were successful in updating the iot-developer-hub). In this case it now shows 12 updates instead of 13. If you believe that the update was successful, but the indicator is still showing it hasn't, you can try to update the repositories under Add Repo again to refresh the packages. ![](images/image6.png) You are now ready to install the rest of the packages. To do this you can click on the Install Updates button under the packages tab. It will update the rest of the packages in one action. ![](images/image7.png) ![](images/image8.png) You will notice that the Install Updates button text changes to Installing Updates. This action will again take some time as several packages need to be downloaded and installed. This will also restart several software services running on the gateway. Once the button text changes back to Install updates, you should be able to refresh the browser and see that you have no remaining updates. If enough time is passed that you are convinced it should be done, but the status isn't reflected in the Developer Hub, then you can try to update the repositories under Add Repo again to refresh the packages. Your Developer Hub should now be up to date. -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image1.png -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image2.png -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image3.png -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image4.png -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image5.png -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image6.png -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image7.png -------------------------------------------------------------------------------- /Updating the Intel IoT Gateway Developer Packages/images/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel-iot-devkit/intel-iot-gateway/fbde8de5c3ee7311884e3c81ee5610054e93fabd/Updating the Intel IoT Gateway Developer Packages/images/image8.png --------------------------------------------------------------------------------