BUG-04 (MEDIUM): the _parse_request docstring promised "JSON body or
form-encoded body" support, but the implementation only called
request.form(). If Jimi sent application/json (per the docs), the form
parse returned an empty FormData, the function returned ("", []), and
the entire push was silently dropped. Now branches on Content-Type and
parses JSON bodies directly, falling back to the form path that matches
the live Jimi behaviour.
BUG-05 (MEDIUM): push_obd treated obdJson as a dict after json.loads
even though malformed payloads can decode to a list. The subsequent
obd.get(...) raised AttributeError, caught by the per-item except and
logged as a generic "Failed to process" warning — silently losing the
reading. Now coerces lists to their first dict element and falls back
to {} for any other non-dict shape so the timestamp/lat/lng extraction
still runs.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>