Commit Graph

14 Commits

Author SHA1 Message Date
tarcourt dd8e7602f5 fix: v2 Light multiplier x3 was 2014 (PDF OCR error) should be 512 2026-07-03 18:22:39 +02:00
tarcourt 4363617cff chore: gitignore python cache 2026-07-03 18:18:11 +02:00
tarcourt 035d4fed26 feat: v2 event_count for Light/Door/Move/Reed; unified naming 2026-07-03 18:17:48 +02:00
tarcourt d432d9607e ui: mode-aware chart per device (Temp/Light/Door/Vibration/Magnet) 2026-07-03 18:14:37 +02:00
tarcourt 12d80eb63b ui: humidity as '%' instead of '% RH' 2026-07-03 18:11:33 +02:00
tarcourt 2e30847608 ui: remove connection status dot entirely 2026-07-03 18:10:53 +02:00
tarcourt 974f4f16d7 ui: remove connecting badge and redundant button alert badge
- Replaced connection status badge with a small colored dot in the header
  (green when connected, red when disconnected, gray while connecting)
- Removed the 'button' badge on device cards - it duplicated the info
  already shown when mode == Button and just added visual noise
2026-07-03 18:09:13 +02:00
tarcourt d84da9f9ae ui: light, professional dashboard redesign
- Light theme with slate palette (bg #f8fafc, cards white with borders)
- Inter font + JetBrains Mono for hex/device IDs
- Emojis removed, replaced with colored text badges (mode, format, alerts)
- Battery/RSSI shown with tone-based badges (green > amber > rose)
- Cleaner header, connection status pill with dot indicator
- Chart with cleaner grid, tooltip, and legend positioning
- Table with proper typography and hover states
- Footer with brief system info

Inspired by modern SaaS dashboards (Linear, Stripe, Cal.com).
2026-07-03 18:05:13 +02:00
tarcourt 1549d4a73e feat: Sens'it v2 decoder + auto-detection v2/v3
Sens'it v2 has a totally different payload layout than Discovery v3:
- Bit order LSB→MSB (was MSB→LSB in v3)
- Mode in bits 0-2 (was bits 7-3 in v3)
- Battery split across bytes 0 & 1 (was 5 contiguous bits in v3)
- Temperature always sent (in T° MSB byte 1) even outside temp mode

Auto-detection uses byte 0 reserved bits: 0b110 = v3, otherwise = v2.
Frontend updated to render new fields: move_events, reed_events, fw_major/minor.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-03 18:02:44 +02:00
tarcourt 2e24415224 docs: precise SNEK callback config for JSON POST body
- Step-by-step field-by-field callback config table
- Common pitfall documented: don't paste JSON body in "Line pattern"
- Exact JSON body template format (spaces around colons required)
- Companion dashboard deployment steps

Backend also cleaned up: unified query-string / JSON body parsing
via a single _num() helper instead of nested try/except blocks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-03 17:58:05 +02:00
tarcourt a77776d6d8 feat: web dashboard for live device data
Small companion service that receives SNEK callbacks, decodes Sens'it
Discovery payloads for all 6 modes (Standby, Temperature, Light, Door,
Vibration, Magnet), stores in SQLite, and serves a responsive dashboard.

Backend (Python Flask):
- POST /webhook: receive SNEK callback
- GET /api/devices, /api/messages, /api/decode
- GET /events: Server-Sent Events for live push
- SQLite persistence at /data/messages.db

Frontend:
- Tailwind CSS via CDN, Chart.js for temp/humidity graph
- Live updates via SSE
- Device cards with icons per mode
- Message log with human-readable summaries

Deploy:
- Separate deployment (snek-dashboard) with own PVC
- LoadBalancer on 192.168.1.213:80
- SNEK callback URL: http://snek-dashboard.snek.svc.cluster.local/webhook

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-03 17:43:11 +02:00
tarcourt c7ab02cc59 feat: auto-disable message authentication at startup
SNEK resets to authentication=enabled on every restart and does not persist
the state anywhere. The entrypoint now waits for the SNEK API to be ready
and POSTs to /ned/saturation to disable auth automatically.

- Registered devices without HMAC public keys (e.g. demo Sens'it) are
  decoded immediately on first boot and after any pod restart
- To re-enable auth in production, comment the polling block in entrypoint.sh

README updated with details in the "Configuration des devices" section.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-03 17:38:45 +02:00
tarcourt 66db42b362 docs: security section + fix MAX_DEVICES doc
- Add "Sécurité, vie privée & aspects légaux" section covering:
  - What the SDR dongle actually captures (RF broadcast)
  - What SNEK exposes by default (nothing for unregistered devices)
  - Theoretical interception attack scenario
  - Legal aspects (Article 226-15, RGPD)
  - Best practices to mitigate

- Fix MAX_DEVICES doc: 5 is the hard limit (JS frontend hardcoded)
  Removed misleading claim that config change to 10 works

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-03 17:30:59 +02:00
tarcourt ff648fa9b2 init: SNEK on Kubernetes
- Dockerfile: Ubuntu 20.04 + all SNEK dependencies (libgtk2-perl, libffi6, etc.)
- entrypoint.sh: flash firmware via foxctl, start main_sigfox
- deploy/snek.yaml: K8s manifest (namespace, PVC, deployment, LoadBalancer)
- README: full documentation covering hardware, software, decoding, callbacks
2026-07-03 17:16:32 +02:00