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.