We’re testing out the official Notehub<->Blynk integration and we are having problems relaying location data. All of the other datastreams are populating just fine, it’s only the location datastream that will not receive any coordinates.
I have a support thread in progress with Blynk support already, as I suspect the problem is on their end. They don’t seem to have it figured out yet however, so I thought I would mention it here in case someone on the Notehub team might be able to lend a hand in some way.
Please let me know if you might have a clue what’s going on, or if you need more info to help troubleshoot it. I’m really hoping there is an easy solution to this, as we bought into the Blues ecosystem specifically because of the advertised Blynk integration. Unfortunately, without location data, the integration is a non-starter for us.
UPDATE: We made a little progress with Blynk support on this, but only enough to know that…
The JSONata transform option definitely does not work for sending data to Blynk. (It appeared as though it was working initially, but only because the integration is apparently still sending the sensor data via sensors.qo in the background even when JSONata was selected as the payload.) Which makes me wonder why was the JSONata Expression option was not put in place in the integration? Having a transform method in between Notehub and Blynk would be incredibly useful, adding an option for augmenting data that doesn’t require MCU code.
The only way to get location data to Blynk is to have the MCU manually add it to a note file, such as: {“req”:“note.add”,“body”:{“location”: [1.11, 2.22]}}. If this is the case, how would we send the “best_lon” and “best_lat” data from the event API? And even if we can access those attributes, it seems rather inefficient for the MCU to be fetching those and feeding them back to the Notecard when those event attributes are already being sent with each sync by default. It would be really simple to alleviate the MCU from having to deal with location at all by using the following JSONata expression, but again the JSONata transform doesn’t seem to be working unfortunately…
Sorry you ran into issues here. I’ll start with the good news: you don’t have to replicate the location logic in your MCU as JSONata has the ability to append the best_lat and best_lon to the body of your Notes. See Using JSONata to Transform JSON - Blues Developers.
I just tried this JSONata out and it appended a location to the body in my webhook.site test route as expected.
However, I did verify that for whatever strange reason these JSONata adjustments do not seem to be making it to Blynk specifically—which is… odd. I’m looking into it. Just wanted to let you know we saw this and appreciate the thorough report.
Confirmed, I am having great success getting the location data to webhook.site as well using JSONata. But yes, JSONata to Blynk is definitely the issue.
Hi TJ, just checking back in to see what you found out about making JSONata work with Blynk. The last thing Blynk support said in the other thread is that they would reach out to Blues to try to resolve it. Thanks!
We’ve confirmed that the JSONata not applying is a bug on our end. I don’t have an exact date for a fix for you, but our cloud team is aware of the problem and it’s on their short list.
When I have an update I’ll reach out and let you know.
JSONata Transform is still not working for us with Blynk unfortunately. We’ve simplified our testing down to passing one single parameter. When we do a hub.sync, it transmits to Blynk successfully if we configure the route for ‘No Transformation’ (and we get a 200 success in the Route Log). However a sync fails to transmit to Blynk when we use a JSONata Expression (and we get a 400 error in the Route Log). I’ll attach some screenshots so you can see what’s going on.
I’m happy to do a screencast with one of your team members so they can see our test results in realtime if that’s helpful.