kotori icon indicating copy to clipboard operation
kotori copied to clipboard

Add TTS (The Things Stack) / TTN (The Things Network) decoder adapter

Open amotl opened this issue 3 years ago • 2 comments
trafficstars

Dear @thiasB, @MKO1640 and @einsiedlerkrebs,

finally, aiming to resolve #8, and attaching to your requests at [1] ff., this patch adds a basic decoder for TTS/TTN v3 Uplink Messages [2], submitted using Webhooks [3].

It can be improved by adding further commits to the collab/tts-ttn branch, if you want to share a hand. It will also need a dedicated documentation page within the "Channel decoders" section [4], optimally with a short but concise walkthrough tutorial how to configure a corresponding webhook within the TTS/TTN console, like [5].

You can invoke the specific test case after checking out the referenced branch by running those commands within the toplevel directory of the repository in two different shells:

make start-foundation-services
source .venv/bin/activate
pytest -vvv -m ttn --capture=no

With kind regards, Andreas.

[1] https://community.hiveeyes.org/t/ttn-daten-an-kotori-weiterleiten/1422/34 [2] https://www.thethingsindustries.com/docs/reference/data-formats/#uplink-messages [3] https://www.thethingsindustries.com/docs/integrations/webhooks/ [4] https://getkotori.org/docs/handbook/decoders/ [5] https://www.thethingsindustries.com/docs/integrations/webhooks/creating-webhooks/

amotl avatar Jan 19 '22 23:01 amotl

What else is needed. Would you like to do some more testing?

thiasB avatar Apr 29 '22 12:04 thiasB

Dear @thiasB,

thank you for the heads up. I hope to be able to follow up on this soon. It needs additional thinking if the patch already covers what we are aiming at and then some testing and polishing, including corresponding documentation.

With kind regards, Andreas.

amotl avatar May 25 '22 13:05 amotl

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.14 :tada:

Comparison is base (ea4981e) 52.69% compared to head (fe6aaa7) 52.84%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   52.69%   52.84%   +0.14%     
==========================================
  Files          99      100       +1     
  Lines        5224     5240      +16     
==========================================
+ Hits         2753     2769      +16     
  Misses       2471     2471              
Flag Coverage Δ
unittests 52.84% <100.00%> (+0.14%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
kotori/daq/decoder/__init__.py 96.87% <100.00%> (+0.57%) :arrow_up:
kotori/daq/decoder/tts_ttn.py 100.00% <100.00%> (ø)
kotori/daq/services/mig.py 86.36% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 07 '23 20:05 codecov[bot]

What else is needed. Would you like to do some more testing?

I just added a corresponding documentation section with fe6aaa7277a, and I think it will be fine now for a first iteration. Let me know if you can spot any errors, or where you see opportunities for improvements [^1].

[^1]: I also just invited you as a member to the daq-tools organization, so it's easier to add you as a reviewer on corresponding, TTN-related patches for Kotori.

amotl avatar May 07 '23 21:05 amotl