fix: parse real Jimi push format (msgType+data) #8

Merged
kianiadee merged 1 commit from quality-program-2026-04-12 into main 2026-04-21 09:10:21 +00:00
Owner

Live diagnostic showed Jimi sends form-encoded msgType+data, not JSON body with data_list. Field names also differ: imei (not deviceImei), alarmTime (not gateTime).

Live diagnostic showed Jimi sends form-encoded msgType+data, not JSON body with data_list. Field names also differ: imei (not deviceImei), alarmTime (not gateTime).
kianiadee added 1 commit 2026-04-21 09:10:19 +00:00
fix: parse actual Jimi push format (msgType+data, field name remap)
Some checks failed
Static Analysis / static (push) Waiting to run
Tests / test (push) Waiting to run
Static Analysis / static (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
636dd2b8b0
Diagnostic logging revealed the real Jimi integration push format:
  Content-Type: application/x-www-form-urlencoded
  Body: msgType=jimi.push.device.alarm&data=<URL-encoded JSON>

Differences from docs:
  - data is one JSON object per POST (not a data_list array)
  - alarm uses imei+alarmTime, NOT deviceImei+gateTime

_parse_request now reads form field `data` (falls back to `data_list`) and
JSON-decodes a single object or array. push_alarm handler accepts either
field naming for forward-compat.

Removes diagnostic INFO log now that format is confirmed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kianiadee merged commit 6371967f8d into main 2026-04-21 09:10:21 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: kianiadee/tracksolid_timescale_grafana_prod#8
No description provided.