TheThingsIndustries / generic-node-se

Generic Node Sensor Edition
https://www.genericnode.com
Other
108 stars 31 forks source link

Configurable sensors transmission interval via downlink #208

Closed elsalahy closed 2 years ago

elsalahy commented 2 years ago

Summary:

It should be possible to adjust sensors_lorawan transmission interval via a downlink.

Why do we need this?

To be able to change the device behavior using a downlink.

What is already there? What do you see now?

A programmed transmission interval (can be configured before compilation/flashing).

What is missing? What do you want to see?

Adjusting the transmission interval using a downlink.

How do you propose to implement this?

Please note:

Environment:

Baremetal.

Acceptance Criteria:

What can you do yourself and what do you need help with?

Can be done by one person.

elsalahy commented 2 years ago

@marnixcro please ask any questions you might have here before jumping into implementation. This issue is a breakdown of the out of the box app wishlist here

elsalahy commented 2 years ago

@marnixcro please also add iInteractive LED behavior on sensors transmissions (blinking). But please make sure you sleep properly (set used LED pins to analog and add them in stop mode hooks)

SloMusti commented 2 years ago

The practice I found useful is for devices is to allow for a system interval to be in range of 1-1440 minutes, which means device will try to send at least one a day and one can not configure it outside that scope. A desired implementation of this setting would also be to be reboot persistent, particularly if a system default is rather fast, as otherwise an unnoticed reboot can result in poor battery life.

mcserved commented 2 years ago

@elsalahy some minor questions:

  1. You probably also want a led sequence for the downlinks right?
  2. I think the idea of it being boot persistent from @SloMusti makes a lot of sense. Would it be better to do it on the external flash or try to do it in the internal one you think? Internal flash would be nicer in my opinion as the user could very easily overwrite it by erasing it before programming, making development somewhat easier. Although the external flash could have other benefits you might prefer.
  3. The LED should probably also indicate the downlink right (with different blinks if it passed or failed)?
elsalahy commented 2 years ago

@marnixcro

  1. Feel free to propose something.
  2. Please open another issue for this (reboot persistence) and keep this issue focused on configurable transmission interval via downlinks.
  3. Feel free to propose something, I guess successful downlink config should be Green, and failure should be Red!