elinbjorck
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # LoRaWAN Networks In this project, Helium and Actility (via Kalmar energy's portal) were used. # Table of contents [TOC] ## Helium Helium uses a low-cost, decentralized network where users pay with Helium tokens to send data. People can buy tokens, or earn them by hosting devices called Hotspots, which provide network coverage. It's a cost-effective and community-driven solution for IoT data transmission. [Data credit calculator](https://helium.plus/data-credits-calculator) Since Helium's coverage relies on community members who host Helium Hotspots. The more Hotspots there are in an area, the better the coverage. [Hotspot map](https://explorer.helium.com/) ### Log in 1. Make sure that you are logged in to [gmail](https://mail.google.com/) with the adress listed in [Credentials](#Credentials). 3. Go to: https://console-vip.helium.com/ 4. Click 'continue with google' and use the gmail adress listed in [Credentials](#Credentials) ### Add device Helium 1. To the left there is a list of options, if not, click on the menu buton in the top left corner. 4. Click on 'Devices' in the list of options to the left. 5. Click on the icon marked with red.![](https://hackmd.io/_uploads/Hy35sY093.png) 6. Give the device a descriptive name. 7. Dev EUI, App EUI and App Key can be found in diferent ways depending in the device. 8. Optional: Add label. Labels allow you to group sensors together and apply the same setings to a whole group. 9. Save device. ### Send downlink Downlinks can be used to configure some of the sensors. The section [Sensors](#Sensors) describe what should be sent in order to configure the device. 1. Go to "Devices" 2. Click the device you want to send a downlink to. 4. Click on the icon marked with red. ![](https://hackmd.io/_uploads/Hy85FaO23.png) 5. Enter the payload and the port that it should be sent to. Click the icon marked with red to put the downlink on que to be sent. The downlink will be sent the next time the sensor sends an uplink. ![](https://hackmd.io/_uploads/ryxK8G933.png) ### Link device to Datacake When a device is added, it can be linked to Datacake. The data from the device is sent from Helium to Datacake, were it can be visualised. 1. Go to "Flows". 2. Click on the pluss sign next to "NODES". ![](https://hackmd.io/_uploads/Sy-1Xw532.png) 3. You will find the device in "Devices" or "Labels", labels can contain many devices. 4. Drag and drop the device out on the work-area. 5. Draw a line between the new device and the existing datacake node. ![](https://hackmd.io/_uploads/S1wQSD9h2.png) For the data to show up on Datacake, the device needs to be added on Datacake. See [Add device Datacake](#Add-device-Datacake) for instructions. ### Rename Helium device 1. Go to 'Devices'. 2. Click the device you want to rename. 3. Click on the pen icon next to the name. ![](https://hackmd.io/_uploads/HJWVDzKnh.png). 5. Update the name, be careful to remember which device it is. ## Actility Actility is an IoT connectivity provider offering a platform for connecting and managing Internet of Things devices. Actility powers [Stadshuben](https://kalmarenergi.se/kalmarstadshubb/) which is an IoT platform provided by Kalmar Energi. ### Portal ![](https://hackmd.io/_uploads/rJgNpSGAh.png) It is possible to filter out sensors that are outside a set range on optional channels that the sensors send. The latest sensor value is then also displayed in the map view, as shown in the image below. ![](https://hackmd.io/_uploads/Bk4L6SM0n.png) To do this, click on `filter channels` in the upper right corner of the map, and select the channel/value you want to filter based on. ![](https://hackmd.io/_uploads/rytLDUzAh.png) ### API It is also possible to use your login credentials (used to log in to Stadshubben) to log in to our API portal - perhaps you will need to complete the registration to be able to access the API portal: Follow these steps to login to the API portal: 1. Navigate to: https://ke-apim.developer.azure-api.net/ . 2. Click on `sign in`: ![](https://hackmd.io/_uploads/S1lXHKCph.png) 3. Go to Azzure Active Directory B2C, and use the credentials to log in. See the picture: ![](https://hackmd.io/_uploads/Hks4SY0T3.png) At this stage it is clear. Explore the APIs and see all other endpoints. To obtain the authentication token through the APIs, one needs to use the Customer Identity API: POST: /v1/resource-owner/token When it comes to authentication via HTTPS Request, you must call the following endpoint https://api.kalmarenergi.se/customer-identity/v1/resource-owner/token with the following info in the Request: - Username: "xxxx" - Passsword: "yyyy" - responseType: "token id_token" - scope: "openid offline_access https://kalmarenergib2c.onmicrosoft.com/6b6a459a-2596-4213-b42b-153f1e0a9af7/Device.Read.Add" - grantType: "passowrd" Se the image below for an example of how to fetch your token: ![](https://hackmd.io/_uploads/By6c8If0h.png) Header is: ![](https://hackmd.io/_uploads/SJzhULM0n.png) To refresh the token itself: POST: /v1/resource-owner/token The payload should be like this: - refreshToken: "xxxx" - grantType: "refresh_token" The Node Id can be obtained through the APIs or from the URL which is in the last part of the URL and it starts right after the slash. The user must log in to Stadshubben to go to Nodes and then click on the target node. When the target node's page is opened, the Id can be obtained from the URL. See below: ![](https://hackmd.io/_uploads/Sy-u8YCp2.png) The node ID for the example above is: 469f0f0f-12fc-440a-81db-56295513151w #### Device API - To call all the nodes to see what they have for Id, ChannelId, ModelId, etc. make a GET request on the following endpoint: GET https://api.kalmarenergi.se/device/v1/nodes - To call a node to see what it has for Id, ChannelId, ModelId, etc. make a GET Request on the following endpoint: GET https://api.kalmarenergi.se/device/v1/nodes/{NodeId} #### Device Data API - To fetch data from a node: GET https://api.kalmarenergi.se/device-data/v1/message-values?nodeId={NodeId}6&pageIndex=1&pageSize=-1&sortBy=Message.CreatedAt&sortDescending=false&channelIds={ChannelId}&channelIds={ChannelId}&channelIds={ChannelId} GET https://api.kalmarenergi.se/device-data/v1/message-values?NodeId={NodeId} GET https://api.kalmarenergi.se/device-data/v1/message-values?ChannelIds={ChannelId}&NodeId={NodeId} #### Device Data Latest API - To retrieve only the most recent message (data) that arrived from a node: GET https://api.kalmarenergi.se/device-data-latest/v1/message-values?nodes={NodeId}&pageIndex=1&pageSize=100 # Sensors There is a large number of sensors available that are LoRa compatible. ## Sensative strips Strips from Sensative are descrete sensors that are available for a number of use-cases. The ones we use are called +comfort. They have temperature, humidity and ambient light sensors. They can also be used as door sensors. The strips are made for indoor use, but they can handle temperatures between -20 and 60 C, so it could be possible to place them in the fridge. ### Included strips Six strips are included in the project, each has already been added to a network, Three are on [Helium](#Helium) and the other three on [Actility/Stadshubben](#Actility). The ones connected to Helium are labeled "H1-3". The ones conected to Actility/Stadshubben are labeled "SH1-3". They have also been configured to send relevant data. They should be ready to be installed wherever they are needed. ### Unpacking new strips When the strips are brand new they come with two magnets atatched to them. When the magnets are removed for the first time the strips try to connect to a network. Wait with removing the magnets untill you have added the strips to a network as described in [Add device Helium](#Add-device-Helium). Information needed to add the sensor is included on a sticker inside the box. ### Configure the strips When the strips are new, they are set to work as a door sensor only. They need to be configured to read temperature, humidity and ambient light. The sensors are configured by sending a downlink to them. The sensative website has a ['Strips configuration aplication'](https://strips-lora-config-app.service.sensative.net/profiles) that provide the correct payloads to send with the downlinks in order to configure the Strip. #### Use Strips configuration aplication 1. Go to ['Strips configuration aplication'](https://strips-lora-config-app.service.sensative.net/profiles). 1. Device model is 'Strips multi sensor +comfort'. 2. Select the profile that fits your use case. 3. The generator will describe the selected profile, continue by clicking "proceed". In these steps it is possible to alter the profile, but this can affect the baterylife of the device. 4. In the last step a payload is shown on top of the page. The payload is in hexadecimal form, under the payload is a switch that turns it base 64 encoded. Which format it should be depends on what network is used for the device. ![](https://hackmd.io/_uploads/SJVgNUUs3.png) 6. Send the payload to your device: [Send downlink(Helium)](#Send-downlink). ### Install strips The strips can be atatched to the wall in a location where measurements are desired. Once they are installed, it could be a good idea to update the name of the strips in [Datacake](#Rename-Datacake-device) and [Helium](#Rename-Helium-device), to something that describes where they are located. ## Sound Sensor ERS sound is measuring sound and also many other things like temperature, humidity, light intensity. ### Installation Remove the back panel of the sensor to install the two batteries. the type of batteries is 3.6V lithium AA. ### Sensor Configuration All sensor settings can be configured via a smartphone application with NFC or over the air via the network server and downlink data to the sensor. #### NFC configuration 1. Download ELSYS “Sensor Settings” application from Google Play and install it on a smartphone or tablet. The device must support NFC. 2. Enable NFC on the device and start the application. 3. Place your device on top of the NFC antenna on the sensor. 4. Remove the device. Current settings will be displayed in the application. 5. Use the application to change any settings if needed. 6. Quickly tap the device on top of the NFC antenna to give the new settings to the sensor. Make sure that the application confirms your new settings. 7. Wait for the sensor to reboot (5 sec), indicated by the LED flashing. Sensor settings have been updated. #### Over the air configuration All settings may be configured over the air via your LoRaWAN® infrastructure. Please visit the support section on this [webpage](https://www.elsys.se/en/downlink-generator/) for more information regarding downlink protocol. The generator creates a downlink that can be sent to the device, for example via [Helium](#Send-downlink). ### Application parameters All parameters for the “Sensor settings” application can be found in the settings document. Please visit the support section on this [webpage](https://www.elsys.se/en/application-settings/) for more information. # Data Visualisation Datacake was used to visualise data from the sensors on the helium network. To see the visualised data click on a device, or on a dashboard. ## Login 1. Go to https://app.datacake.de/login 2. Use the emailadress and password listed in [Credentials](#credentials)![](https://hackmd.io/_uploads/SJM4kbY33.png) ## Add device Datacake 1. Go to devices and click "+ Add Device" 3. Select "LoRaWAN" and click "Next". 4. Select "New Product from template" 5. Search and see if there exist a template for the device. ![](https://hackmd.io/_uploads/H1w58wqh2.png) 6. Select the corect template, click "Next". 7. Select the network that the device is connected to, for example Helium. Click "Next" 8. Add det device by writing its DevEUI, and giving it a name. It can also be given a Location, for example "Dining area". 9. It is possible to add several devices at once by clicking "+ Add another device". ## Rename Datacake device 1. Go to 'Devices'. 3. Click the device you want to rename. 4. Click "configuration". ![](https://hackmd.io/_uploads/r17wYzYn3.png) 5. Update the name, be careful to remember which device it is. 6. Save! ## Dashboards Datacake allows you to create dashbords where the data from the sensors can be visualised. For this project, two dashbords hes been created: "Kallskanken history" and "Kallskänken live" . ### Create Dashbords 1. Click "+Add Dashboard" in the menu to the laft. 3. Name the dashboard and decide who gets access to it. 4. To edit the dashboard, click the icon marked with red. ![](https://hackmd.io/_uploads/Syjbozc2h.png) 5. Click "Add Widget" to explore what can be added to the dashboard and how the data can be visualised. Tip: A good way to learn what can be done is to edit existing dashboards and investigate the widgets that are already set up there. ![](https://hackmd.io/_uploads/rkKuYIc3h.png) # Linking to google sheets If you want to use your data, you can have it on google sheets. You can then consult them easily and do what you want with them. ## How it works We collect the data from the portal and then process it with a decoder to send it. The decoder is a code that takes a part of the data called the "payload" and processes it to extract the desired value. Before receiving the data in the document, we need to use a questionnaire. In this case, we are using google forms in which we have to put questions for each piece of data we want to obtain. ![](https://hackmd.io/_uploads/rk9CEX0a2.png) Then google forms will transfer the data to google sheets. ## Example of datas Here's what you'll see on the google sheets: Date, Temperature, Light and Humidity. Sometimes some data is missing because it hasn't changed since the last measurement. ![](https://hackmd.io/_uploads/BJEyjfRTn.png) # Credentials Credentials needed to manage the sensors on the previously mentioned platforms. ## Gmail **adress:** lnu.kallskanken.iot@gmail.com **password:** IoT-123-

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully