Replies: 3 comments 3 replies
-
I believe I encountered similar issues. 1st the text that comes out of the recognition engine does some interesting 'hoops' to deal with embedded single quote marks. Dealing with quote marks in csv type data structures is always a challenge. 2nd, I believe I found that Apprise does not create valid JSON all the time. I ended up writing my own MQTT publisher and not using Apprise. The code and setup is in the link below, perhaps it will give you some ideas. https://gist.github.com/deepcoder/c309087c456fc733435b47d83f4113ff |
Beta Was this translation helpful? Give feedback.
-
As the developer of Apprise, i'd love to fix the issue, but no one reported the bug. I just stumbled upon this by accident. Can you show me specifically what you're doing? MQTT is just a message broker, it's actually up to the system passing in the data to format it how they want it. Apprise does nothing but offer a common notification proxy to multiple platforms (MQTT included). If you pass in But if you can see a use-case where Apprise should assume the data passed to it will be obstructed or bad and should vet/clean it up, i can try to see what i can do here. This wouldn't be an ideal approach though i don't think. If i could see a code example where it is failing for you guys, maybe i can help you debug it as well. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answers. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
i tried to use mqtt to send my detections to my smartHome.
I am using this Notification body:
{"Common_Name": "$comname", "Scientific_Name": "$sciname", "Confidence_Score": "$confidence"}
Sending this via mqtt, this is what arrives at my mqtt server:
\{"Common_Name": "Dohle", "Scientific_Name": "Corvus monedula", "Confidence_Score": "0.8049797"\}
When trying to parse this to json i am getting this error message: "Unexpected token \ in JSON at position 0"
The problem is
\
, which i did not add to the message.Sending
{"Common_Name": "$comname", "Scientific_Name": "$sciname", "Confidence_Score": "$confidence"}
via mqtt works fine.Any ideas?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions