-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Add production app documentation #51
Conversation
@johanstokking, no need to go into the details, just wanted to alert you on this! |
1f2624e
to
77812d7
Compare
|
||
So make sure you trigger an uplink via the button or wait for a periodic uplink message in order for the device to receive your downlink. | ||
|
||
## Heartbeat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A payload downlink formatter may be added later for this, but the commands are small enough to be doable using binary/hex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed, I leave this up to you guys to play with and add to this documentation in the future
The javascript payload formatter below can be used to decode the vanilla app. | ||
|
||
```javascript | ||
function decodeUplink(input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be formatted to:
function decodeUplink(input) {
var data = {};
if (input.fPort == 1) {
data.batteryVoltage = (input.bytes[0] / 10);
data.fwVersion = input.bytes[1] + (input.bytes[2] / 10);
}
if (input.fPort == 2) {
data.temperature = ((input.bytes[0] << 8) + input.bytes[1]) / 10;
data.humidity = ((input.bytes[2] << 8) + input.bytes[3]) / 10;
}
return {
data: data,
};
}
Maybe worth adding to the Device Repository instead ? For the old Uno/Nodes, we allow people to select one of the default sketches as a firmware version, so maybe we could have the production app as one of the available firmwares, and it could use this formatter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current design of our GNSE repo, I don't recommend having a production app as standalone app.
The reason for this is that the applications were designed to allow for flexibility and versatility.
Adding a production app there will actively diminish the other applications purpose.
With sensors_lorawan and secure_element_lorawan I think users have all the foundation they need to build something similar to the production app.
I would like to also highlight that this this device addresses a different segment of developers than the ones using UNOs and The Things Node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth adding to the Device Repository instead ?
I think it should be in both
|
||
## Temperature and Humidity | ||
The temperature and humidity uplink message on FPort 2 contains: | ||
- The temperature in Celsius. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to be consistent with the ending dots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this one, can't find others
77812d7
to
374cb4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just improving readability a bit
|
||
The vanilla application uses the on-board secure element to join the LoRaWAN network using over the air activation (OTAA) method. | ||
|
||
You can claim your device on the The Things Stack cloud by following this [guide](https://www.thethingsindustries.com/docs/devices/device-claiming/claim-devices/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can claim your device on the The Things Stack cloud by following this [guide](https://www.thethingsindustries.com/docs/devices/device-claiming/claim-devices/). | |
You can claim your device on the The Things Stack cloud by following [this guide](https://www.thethingsindustries.com/docs/devices/device-claiming/claim-devices/). |
|
||
After claiming, you can power up the device using two standard AA batteries. | ||
|
||
If the device powers up correctly, you will see the red, green and blue LEDs blinking thus indicating successful boot-up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the device powers up correctly, you will see the red, green and blue LEDs blinking thus indicating successful boot-up. | |
If the device powers up correctly, you will see the red, green and blue LEDs blinking thus indicating a successful boot-up. |
|
||
## Joining the network | ||
|
||
The device will attempt to join LoRaWAN network using OTAA indicated by the blinking red led. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The device will attempt to join LoRaWAN network using OTAA indicated by the blinking red led. | |
The device will attempt to join the LoRaWAN network using OTAA indicated by the blinking red LED. |
|
||
The device will attempt to join LoRaWAN network using OTAA indicated by the blinking red led. | ||
|
||
When the device joins successfully, the buzzer will ring briefly the red LED will stop blinking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the device joins successfully, the buzzer will ring briefly the red LED will stop blinking. | |
When the device successfully joins, the buzzer will briefly ring and the red LED will stop blinking. |
|
||
## Default uplinks and events | ||
|
||
After a successful join, the device will periodically transmit two types of messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a successful join, the device will periodically transmit two types of messages. | |
After a successful join, the device will periodically transmit two types of messages: |
|-------|-----------------------------| | ||
| 0x06 | 0x00 | | ||
|
||
- Turn on the blue LED: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Turn on the blue LED: | |
To turn on the blue LED: |
weight: 1 | ||
--- | ||
|
||
The vanilla app uplinks are compromised of two simple messages (heartbeat and temperature/humidity) to reduce the complexity and show a simple example of the device functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vanilla app uplinks are compromised of two simple messages (heartbeat and temperature/humidity) to reduce the complexity and show a simple example of the device functionality. | |
The vanilla app uplinks are composed of two simple messages, a heartbeat and a temperature/humidity uplink, to reduce the complexity and show a simple example of the device functionality. |
|
||
Please see [The Things Stack Javascript payload formatter documentation](https://www.thethingsindustries.com/docs/integrations/payload-formatters/javascript/) for information on how to use payload formatters. | ||
|
||
The javascript payload formatter below can be used to decode the vanilla app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The javascript payload formatter below can be used to decode the vanilla app. | |
The Javascript payload formatter below can be used to decode the vanilla app. |
The heartbeat uplink message on FPort 1 contains: | ||
- The device battery voltage (useful for replacing the batteries) | ||
- The firmware version (useful for checking which commands to send) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Temperature and Humidity | ||
The temperature and humidity uplink message on FPort 2 contains: | ||
- The temperature in Celsius | ||
- The humidity in percentage (between 0% to 100%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The humidity in percentage (between 0% to 100%) | |
- The relative humidity percentage (between 0% to 100%) |
Summary
This adds documentation for the production app.
Screenshots
...
Changes
Notes for Reviewers
...
Checklist
make server
, posted screenshots, verified external links.new-in-version
shortcode, according to the guidelines in CONTRIBUTING.