Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctron/fritzbox-agent
Publishing Fritzbox traffic statistics to Drogue IoT
https://github.com/ctron/fritzbox-agent
iot
Last synced: 6 days ago
JSON representation
Publishing Fritzbox traffic statistics to Drogue IoT
- Host: GitHub
- URL: https://github.com/ctron/fritzbox-agent
- Owner: ctron
- License: apache-2.0
- Created: 2020-11-26T17:12:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-12T23:26:42.000Z (about 1 year ago)
- Last Synced: 2024-05-02T06:15:05.511Z (7 months ago)
- Topics: iot
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fritzbox Agent
This is a small agent, publishing network traffic information to a [Drogue IoT](https://drogue.io) instance.
## Installing
* Install Podman
* Fedora:
~~~shell
sudo dnf -y install podman
~~~* Ubuntu 20.10 (including Raspberry Pi 3/4):
~~~shell
sudo apt -y install podman runc
~~~* Create a systemd unit (`/etc/systemd/system/fritzbox-agent.service`):
~~~ini
[Unit]
Description=Fritzbox Agent
[Service]
Restart=on-failure
ExecStartPre=/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
ExecStart=/usr/bin/podman run --rm --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid -e PASSWORD=fritzbox-password -e APP_ID=app -e DEVICE_ID=device -e DEVICE_PASSWORD=device12 -e ENDPOINT=https://http-endpoint-drogue-iot.apps.your.cluster.tld -d ghcr.io/ctron/fritzbox-agent:latest
ExecStop=/usr/bin/sh -c "/usr/bin/podman rm -f `cat /%t/%n-cid`"
KillMode=none
Type=forking
PIDFile=/%t/%n-pid
[Install]
WantedBy=multi-user.target
~~~Be sure to replace the environment variables:
* `PASSWORD` – The password of the Fritzbox
* `ENDPOINT` – HTTP endpoint in Drogue Cloud
* `APP_ID` – Application ID in Drogue Cloud
* `DEVICE_ID` – Device ID in Drogue Cloud
* `DEVICE_PASSWORD` – Password part of the device credentials* Reload the daemon:
~~~shell
sudo systemctl daemon-reload
~~~* Activate the unit
~~~shell
sudo systemctl enable --now fritzbox-agent.service
~~~