hiveeyes / terkin-datalogger

Datalogger for MicroPython and CPython.
https://terkin.org
GNU Affero General Public License v3.0
60 stars 28 forks source link

[LoRa] set deep sleep interval by downlink message #49

Closed thiasB closed 4 years ago

thiasB commented 4 years ago

Introduction

The datalogger can now process two kinds of LoRaWAN downlink messages.

  1. Change deep sleep interval in minutes (via port 1).
  2. Pause transmission of sensor data, e.g. when working on the bees (via port 2). In this mode, an almost empty payload is sent. What is now always transmitted in digital_output_1 is this status: "pause" or "active".
    • Since keys for both commands are saved to NVRAM they remain valid after power cycle, reset and deep sleep.
    • keep in mind that the changes take effect after the next uplink with a successful downlink transmission to the device

Operation

Deep sleep interval

Pause sensor data

Telegram bot

thiasB commented 4 years ago

https://github.com/thiasB/terkin-datalogger/blob/ttn-telegram-bot/client/telegram/tg_terkin_bot.py The bot is here. merge on your own will.

amotl commented 4 years ago

Thanks!

amotl commented 4 years ago

https://github.com/thiasB/terkin-datalogger/blob/ttn-telegram-bot/client/telegram/tg_terkin_bot.py The bot is here. merge on your own will.

Thanks also. Please just issue another PR to merge it.