Device type
| Slug | raspberry_pi |
| Driver | Tad101Driver |
| Recommended boards | Pi Zero W · Pi 3B+ · Pi 4B · Pi 5 |
Install dependencies
bash
pip install pysher python-socketio requestsPython client (tad101_client.py)
python
import pysher
pusher = pysher.Pusher(
key="YOUR_APP_KEY",
custom_host="soketi.example.com",
port=6001,
secure=False,
)
def connect_handler(data):
channel = pusher.subscribe(f"private-device.{imei}")
channel.bind("tad101.ping", on_ping)
pusher.connection.bind("pusher:connection_established", connect_handler)
pusher.connect()
import time
while True:
time.sleep(30) # send telemetry
Run as a service
ini
[Unit]
Description=TAD101 Raspberry Pi agent
After=network-online.target
[Service]
ExecStart=/usr/bin/python3 /opt/tad101/agent.py
Restart=always
User=pi
[Install]
WantedBy=multi-user.targetEnable with sudo systemctl enable tad101 && sudo systemctl start tad101. Tail logs with sudo journalctl -u tad101 -f.
