NoteHub to Image data

Hi All,

I’m trying to send and receive an image payload using a notecard. I can see my encoded image payload in the notehub,

but I can’t read back the payload. I’m using this ref python script
( with some modifications.

Here is my sketch and Its output log.
Notecard_img(python).txt (1.8 KB)

I’m not sure what I’m missing. Let me know your comments.

Pradeep S.

Hi @Pradeep,

I can see a couple of things going on here:

  1. Try putting the base64-encoded string in the payload of the Note, not in the body (and use a Note template). Anything in the payload field will be transferred over the air as compressed binary.
  2. You’re sending image.qo and then trying to retrieve the same data with image.qi, but that’s not how Notehub works. .qo are outbound (from Notecard to cloud) and .qi are inbound (from cloud to Notecard). You need to either route that image.qo Note to a service that processes the image, use the Notehub API to query for that specific Note/event, or (possibly) use a .db Notefile to sync the payload between cloud and device.

Hope that helps!


Hi @RobLauer,

Thanks for the guidance. Now I’m trying to send that “image” data to Qubitro via MQTT. But it looks like it’s only transferring this data, not my image data.

Data in notehub:

Data in Qubitro portal:

Also I have tried the webhooks, and that’s working fine.

I have ensured the Qubitro’s payload size by directly sending the base64 to Qubitro via Python MQTT and it works. So, are there any limitations in notehub or am I doing anything wrong?

Pradeep S.

Are you delivering the base64-encoded string data in the payload field now? If you’re not using templated Notes, you are limited to 250 bytes of data in the payload, but I don’t think that is the issue here.

1 Like

Yes, I have tried to send that via payload file but it limits me. So, just kept in the body. But the thing is I can retrieve the Base64 via webhooks but I don’t know why it’s not visible on MQTT.

Hi @RobLauer, I have tried to reduce my data size and tried that and it works. So, I think the reason is the MQTT connection. Let me know your comments. But I’m curious about how it works in webhooks.