SyntaxError: Unexpected token Since update 3.3.2

Since the update from homeyscript 3.3.2 my script isn’t working anymore.
I dont’t know why it’s not working anymore

There Error

Blockquote
———————————————————
:x: Script Error
:warning: SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at WarmWaterMeterStand.js:1:22
at processTicksAndRejections (node:internal/process/task_queues:96:5)

The script

Blockquote
const payload = JSON.parse(args[0]);
setTagValue(‘energy’, { type: ‘number’, title : ‘energy’ }, payload.energy);
setTagValue(‘temp in’, { type: ‘number’, title : ‘temp1’ }, payload.temp1);
setTagValue(‘temp uit’, { type: ‘number’, title : ‘temp2’ }, payload.temp2);
setTagValue(‘flow’, { type: ‘number’, title : ‘flow’ }, payload.flow);
setTagValue(‘volume’, { type: ‘number’, title : ‘volume’ }, payload.volume);
return true;

Your JSON is not valid. If the message is right, it starts with a ‘u’, not with a {.
Can you check the response of the http GET (I think you are reading it this way).

PS: u could come from undefined (?). Is you array ok and has one entry?

Hi Ronny,

Strange thing is, it worked for more than a year.
This is the MQTT broker info in homey, i cannot find the “u”

0220610-19:36:25 received ‘{“energy”: 21.93, “volume”: 262.897, “temp1”: 57.74, “temp2”: 54.71, “flow”: 9.0}’ on ‘kamstrup/values’
20220610-19:36:36 OnMessage called
20220610-19:36:36 received ‘{“energy”: 21.93, “volume”: 262.897, “temp1”: 57.74, “temp2”: 54.71, “flow”: 9.0}’ on ‘kamstrup/values’
20220610-19:36:47 OnMessage called
20220610-19:36:47 received ‘{“energy”: 21.93, “volume”: 262.897, “temp1”: 57.74, “temp2”: 54.71, “flow”: 9.0}’ on ‘kamstrup/values’
20220610-19:36:58 OnMessage called

I have this flow; For testing I removed the homeyscript card and flow start card. And added a telegram message to my. But that won’t trigger either…

Solved… Restarted the MQTT app in Homey.
Stupid i didn’t do this at first… Thanks anyway for your help.