Giter Club home page Giter Club logo

ttn-tracker's People

Contributors

ioperator avatar jaron-strypsteen avatar kizniche avatar tedenda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttn-tracker's Issues

Clarifications

Hello,

I find this really great but for me which I am new into this I found it really hard since there is no precise documentation on how to get everything running. This relats to the TTN Tracker too. I did managed to get an account on the things network also after a few days I choose ABP... also after another day and youtube videos I was able to get the T-Beam to connect to the network. I install the mapper on my raspberry but again is not clear in which format I should enter the keys. Also is there a BING API key... so where should I grab that?

I do respect the owner and his work but again I found it verry dificult to implement.

Would appreciate if someone will be able to do some clarification on the installation and setting up steps.

Thank you,
Catalin

ngnix 502 Bad Gateway

I'm really excited by the prospect of running this app! However, when following the instructions, I get a 502 bad gateway error on ngnix.

I'm using Raspbian 10 (buster)

Any thoughts as to what I might try?

N.b. I had to update the main Dockerfile to reference python3.6 or python3.7 to be able to build the docker image (as reported in another issue elsewhere). I tried python 3.6 and python 3.7 - same results.

Thanks!

Worker failed to boot.

ImportError: cannot import name 'escape' from 'jinja2' (/usr/local/lib/python3.7/site-packages/jinja2/init.py)
[2023-09-03 21:35:14 +0000] [9] [INFO] Worker exiting (pid: 9)
[2023-09-03 21:35:14 +0000] [1] [INFO] Shutting down: Master
[2023-09-03 21:35:14 +0000] [1] [INFO] Reason: Worker failed to boot.
[2023-09-03 21:36:15 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2023-09-03 21:36:15 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2023-09-03 21:36:15 +0000] [1] [INFO] Using worker: gthread
[2023-09-03 21:36:15 +0000] [9] [INFO] Booting worker with pid: 9
[2023-09-03 21:36:15 +0000] [9] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/project/flask_app/app.py", line 8, in
from flask import Flask
File "/usr/local/lib/python3.7/site-packages/flask/init.py", line 14, in
from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (/usr/local/lib/python3.7/site-packages/jinja2/init.py)
[2023-09-03 21:36:15 +0000] [9] [INFO] Worker exiting (pid: 9)
[2023-09-03 21:36:15 +0000] [1] [INFO] Shutting down: Master
[2023-09-03 21:36:15 +0000] [1] [INFO] Reason: Worker failed to boot.

gunicorn container always does restart

Hi,

Cannot get it run. It seems that the gunicorn container does not start correctly and therefor end in a restart loop:

i@raspi-docker:~/work/git-repos/ttn-tracker $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b7063ce22375 ttn-tracker_nginx "nginx -g 'daemon of…" 44 minutes ago Up 22 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp nginx b7661640bdf4 ttn-tracker_flask_app "gunicorn -w 1 --wor…" 44 minutes ago Restarting (3) 38 seconds ago flask_app

I tried to start a shell inside container:
pi@raspi-docker:~/work/git-repos/ttn-tracker $ docker exec -i -t b766 /bin/bash Error response from daemon: Container b7661640bdf4638b191345db29e0d37ac00e4e46b34b78db4519e18331bfcb59 is restarting, wait until the container is running

Is there a way to debug or some other ideas to get rid of this problem?

Add support for The Things Stack (V3)

This application need an update to work with the new version, The Things Stack (V3).

I have started to look in to this today and do not know yet if this is a small thing or more complicated.

Port already used by Portainer

Hello
I tried to recplace port 8000, in the docker-compose.yml, from 8000:8000 to 8090:8000 but is not working. Probably I'm not doing well.
How can I replace the port because I already have running in this port Portainer

Bad Request issue

Hi,

I managed to almost make it work, the map appears but i can't see my device on the map even though im sure that my API keys are correct on the config.py, when i checked the logs :

2024-02-25 04:59:22,683 https://nam1.cloud.thethings.network/api/v3/as/applications/my-application-id/devices/my-device-id/packages/storage/uplink_message?order=-received_at&type=uplink_message?last=15s

2024-02-25 04:59:23,234 Bad Request

on the web browser, the error appears as :
{"error":{"code":16, "message":"error:pkg/rpcmetadata:unauthenticated (the context is not authenticated)", "details":[{"@type":"type.googleapis.com/ttn.lorawan.v3.ErrorDetails", "namespace":"pkg/rpcmetadata", "name":"unauthenticated", "message_format":"the context is not authenticated", "correlation_id":"db5d31c62fc241ecade21edbe2ee967a", "code":16}]}}

this is the error message that i get, i suppose that the app_key i put on the config.py is my end device AppKey from TTN? if so, do you have any more ideas what causes this? i checked the configuration of app.py and it seems correct to me as well, im totally blocked as to where else to check to make it work, i appreciate any help and thank you in advanced.

Issue with GCC and sqlalchemy implementation

Thanks for sharing this very useful code and app!

I found some recent issues. Not sure if general issue or it was just me stumbling across this.

(1) GCC causing make build to fail

Initial container build was not succesful. Looking into the logs shows:

gcc: error: src/greenlet/greenlet.c: No such file or directory
gcc: fatal error: no input files

Specific command that caused this behaviour:

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.6m -c src/greenlet/greenlet.c -o build/temp.linux-armv7l-3.6/src/greenlet/greenlet.o

Seems GCC is not part of "python:3.6-slim-stretch".

See: Python SDK issue

Therefore adjusted flask_app/Dockerfile as following:
Out: python:3.6-slim-stretch
In: python:3.7

For sure not optimal as it blows up entire container, but works for now.

(2) flask_app container rebooting because of sqlalchemy

Second thing I noticed: Container "ttn-tracker_flask_app" was reloading every 5 seconds.
After looking into the logs, those were pointing towards sqlalchemy integration ("AttributeError: can't set attribute").

See: sqlalchemy version issue

Therefore, I have adjusted preferences file as following:
Out: flask_sqlalchemy==2.4.4
In: flask_sqlalchemy==2.5.1

Using this settings, issue is solved. Not sure if best way, though.

Hope this helps.
Cheers

Add filters to application

I have used this app lately while mapping, but I would like to have some sort of filter in it.
It would be nice if you can show only markers that is added last hour, today or for only one unit.
Tried to figure it out my self but don't really get it to work and the web stuff I am not familiar with.

Can you give some tips and point in the right direction?

How to access logging info from python?

Thank you so much for fixing the bad gateway issue I reported. I'm now trying to get the app fully working - I'm just not sure how to get the information from the python logger. Any hints? Could it be added to the readme?

I've tried connecting to localhost:8000 - I get a 404 error.

I've also been experimenting with v3 integrations. I think I've successfully got the json back from the TTN app but not able to parse it yet. Without logging info it's too hard!

Thanks,

Andrew

no points on v3

no points on v3

The issue is that ttn-track is getting data from the ttn v3 api but not displaying any point on the map

Log of the container says:
ttps://eu1.cloud.thethings.network/api/v3/as/applications/SOMETHING/devices/SOMETHING/packages/storage/uplink_message?last=11s

If i manually do the request with same url and token via postman, i get valid data, i think that ttn-tracker isnt processing the data in the right way

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.