I have my 3d printer connected to Home assistant which I use Node Red to do some automations.
I am trying to send a message with the status information from moonraker (Klipper firmware) when there is an error.
I can get the error message in Node red but am having trouble using it. At first glance it looks like JSON but has errors when I parse it.
The Status message is ....
{"code":"key244": "msg":"Extrude only move too long (-3912.506mm vs 2000.000mm)
See the 'max_extrude_only_distance' config option for details", "values":[-3912.506, 2000.000]}
If I send this to a Home Assistant Call Service (Notification) as the Message. I get an error
Call-service error. extra keys not allowed @ data['0']
Ideally I would like to strip the value of message out of this (Extrude only move too long (-3912.506mm vs 2000.000mm) See the 'max_extrude_only_distance' config option for details)
But if I pass the message to a JSON node I get ..
Unexpected token : in JSON at position 16
Any ideas how I can work with this status message? to send it out as a string?