IoT Open Tech
Home
  • Platform
  • Modules
  • Devices
Guides
Changelog
Home
  • Platform
  • Modules
  • Devices
Guides
Changelog
  • Getting started
    • API Access
    • Connect Gateway
    • Quick start
  • Integrations

    • Grafana plugin
    • Node-RED
    • Node-RED (MQTT)
    • SNMP Integration
    • Monitoring Plugin
    • Google Assistant
  • Gateways

    • Cisco IXM LoRa
      • Cisco IXM - Common Packet Forwarder
      • Cisco IXM - LoRa Packet forwarder
    • Inteno Firmware upgrade
    • Tektelic Kona Micro GW
    • LORIX One LoRa Gateway
      • LORIX One - LORIX OS
      • LORIX One - Legacy Image
    • Milesight LoRa Gateway
      • Milesight LoRa gateway with Semtech Packet Forwarder
    • Multitech LoRa Gateway
    • Raspberry Pi
    • Signal K Marine Server

Raspberry Pi

The Raspberry Pi is a family of cheap single-board computers very well suited for testing and evaluation purposes. It is also possible to use in production in some applications.

It is easy to integrate a Raspberry Pi to the IoT Open Platform.

What do I get?

After completing this guide you will have a Raspberry Pi with local SSH access (and console access if you wish) that runs a local MQTT broker and is connected to the IoT Open platform. If you have a Z-Wave dongle and some devices they will also be connected. From here there are lots of things you can do. You can connect to the local MQTT broker with any tool and you can install Node-RED on the Raspberry Pi to build local logic, among many other fun things.

Prerequisites

  • An IoT Open Lynx account and an Installation
  • A Raspberry Pi (RPi)
  • The IoT Open Raspberry Pi Image
  • An SD or Micro-SD card (depending on RPi version)
  • A Z-Wave USB dongle
  • At least one Z-Wave device

Goal and steps to get there

The goal is to connect our RPi to the IoT Open platform and include some Z-Wave devices to it. The devices will show up in the IoT Open platform ready for use.

The steps we need to perform are:

  • Install the image on the RPi
  • Create credentials for the RPi in our Installation
  • Enter the credentials in the RPi
  • Connect the RPi
  • Include the Z-Wave device(s)
  • Test it out!

Install the IoT Open RPi image

Download the IoT Open Image and save it. Then it needs to be installed to the SD-card (everything on the SD-card will be overwritten). This is done in different ways depending on your operating system and is well documented here. Since you have the image already you can start reading under Installing images on ''Your preferred OS''.

In order to continue it is necessary to log in to the Raspberry Pi. There are several ways to do this. Easiest is to connect a screen (HDMI) and a keyboard to the RPi and log in to the console. If you are familiar with SSH that is also an option since SSH is enabled by default.

The default username and password are:

Username: iot  
Password: open

Now is a good time to change the password to something you remember. To do this type passwd and follow the instructions.


Once logged in to the RPi you are ready to move on.

Create credentials to the installation

To connect the RPi to the right installation in IoT Open there needs to be a connection between them. This is done from the IoT Open standard user interface.

Navigate to the correct installation, click Settings and open the Edge Client tab. Click Create new credentials. Please observe that this resets the current credentials. The credentials are shown as a complete iotopen.json file. They will only be shown once, so copy the file using the copy symbol at the top.

Now let's continue to configure the RPi.

Configure the RPi

On the RPi we have to enter the credentials in the file /etc/iot-open/iotopen.json. If you are not used to Linux or Unix systems nano is probably the easiest tool to use. Type sudo nano /etc/iot-open/iotopen.json to open the file.

Replace the content of the file with the file you copied. It should look like below.

{
  "api": "https://lynx.iotopen.se",
  "client_id": 45,
  "installation_id": 45,
  "mqtt_broker": "lynx.iotopen.se:8883",
  "mqtt_client_id": "edge-45",
  "mqtt_password": "b7f61ff2235f6568e463b75e04ff00bc",
  "mqtt_username": "box:45",
  "timezone": "Europe/Stockholm"
}

Press CTRL-X (then Y, then Enter) to save the file.

The keys in the file are described in Edge Client. Set timezone to the time zone of the RPi.

When done the RPi is ready to be connected.

Connect the RPi

There are two ways to connect the newly configured RPi to IoT Open. Either reboot it with sudo reboot or run sudo iotopen-verify. Make sure your Z-Wave dongle was connected when the RPi booted, otherwise connect it and reboot.

Include the Z-Wave device(s)

To include the Z-Wave devices there are two things we need to do.

  • Set the Z-Wave chip in inclusion mode
  • Include the device by doing the special command on it (read the manual for the device)

There are several ways to set the Z-Wave chip in inclusion mode. Easiest is to use the Workbench tool. You can find it in IoT Open Academy. Log in and click on Tools -> Workbench. Choose the right installation in the upper right corner.

Click on the Misc button in the menu and choose Inclusion under the Z-Wave drop-down. You can now include your device. There should be lots of traffic in the MQTT window when the device is included.

Verify that it works

Check that there were devices and functions created in the installation. Then everything should be good to go.

Next steps

With this start you can do lots of fun stuff. E.g. you can run Node-RED on the Raspberry Pi. Write scripts in any language you like or run edge-applications on your Raspberry Pi.

The possibilities are endless!

Last updated:
Prev
Multitech LoRa Gateway
Next
Signal K Marine Server