The Socket API doesn’t accept any JSON in Data and I am unable to use the JSON fields in any Route payloads. These messages make it to the data router but it doesn’t recognize the data/json.
Example socket API message
{“devicekey”:"!SecretKey",“data”:{“state”:“home”}, “tags”:“ha_location”}
If I can’t put JSON as data in a message and use that as variables in Route Payloads then i’m going to have to find another platform that supports this. Other than single string messages there isn’t really a point in the socket API…
If I could at least just use the entire data JSON and pass that through an advanced webhook that would work for me. I dont necessarily need to use each part as variables. I can’t do anything with the json data at all.
Just tested this on my end, also not working, even when enclosed in parenthesis like below {"k":"keygoeshere","d":"{"Lat":"###.######", "Long":"-###.######","Alt":"139.50","Heading":"90","Sats": "9"}","t":"GPS"}
Ok, further testing is showing me that it’s having issues parsing because of the double quotes. I don’t know how to get around that… I can try adding an extra escape character (like {"k":"keygoeshere","d":"{\"Lat\":\"###.######\", \"Long\":\"-###.######\",\"Alt\":\"139.50\",\"Heading\":\"90\",\"Sats\": \"9\"}","t":"GPS"})
Edit:
Wow, that actually worked. Setting my string to