I realise this was posted both on GitHub and here, but just for others, the No value for t error occurs because Gadgetbridge expects any JSON object it receives on a line (eg {"a":42}) to be for it - and if it doesn't see a t field there it complains: https://www.espruino.com/Gadgetbridge#bangle-android
To work around it instead of using Puck.eval to read the file directly, you just do Puck.eval([...]) which then returns what you requested as an array ([{"a":42}]) and then Gadgetbridge doesn't care
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I realise this was posted both on GitHub and here, but just for others, the
No value for t
error occurs because Gadgetbridge expects any JSON object it receives on a line (eg{"a":42}
) to be for it - and if it doesn't see at
field there it complains: https://www.espruino.com/Gadgetbridge#bangle-androidTo work around it instead of using
Puck.eval
to read the file directly, you just doPuck.eval([...])
which then returns what you requested as an array ([{"a":42}]
) and then Gadgetbridge doesn't care