Receiving Images From Raspberry

What have you put in the Firebase Token box ?
This should be the project API Key, which is @ 40 characters.

https://prueba1-a9b45-default-rtdb.firebaseio.com/
this is the token box

1
i put it on firebase set up
1

That is the Firebase Url. I am talking about the Token, the one above. This should be the API key.

Can you please paste it here

Also did you setup your firebase project on a europe or us server? If europe, you may need to create a new project on the us server (for some reason this is the one that works with AI2)

It is OK, I have got it working.

Can you please ensure that there is a base64 string in the Hello tag. ( I cannot view your console)

It's USA server,
hxRY0A6IchqhUJ7zLf2np3bPPmtIMDOjbFU5uL7m

1

but it doesn't have 24 characters

OK, that top code is the API Key

We do not need to use the secret code for connecting to Firebase.

I changed your ProjectBucket to FIREBASE RICIBIR from FIREBASE_RICIBIR to stop the app crashing. make sure this is where you are sending the base64 string FIREBASE RICIBIR/Hello

it's with base64 string

OK

It is the underscore in FIREBASE_RICIBIR that is causing the problem.

Create a new tag/bucket called FIREBASERICIBIR - all one word, and send your base64 string to a tag called Hello there.

Saddly, i got the same problem. I've changed the project Bucket without "_" and it still closes :frowning:
1

Please put the base64 string back, i nearly have it working

I did it, the base64 is wrote on the tag

Success!!

image

Got some real world things to do now, will be back later.....

OMG! You're a genius!. ok i'll be here to know how you figured this out. Thank you!

As it stands:
image

Can you try sending the base64 String to Firebase with double quotes around it?

"/9j\/4AAQSkZJRgABAQEAYABgAAD\/4RE...."
1 Like

it REALLY WORKS!!! i finally got image from Firebase. Thank you so much!!!!!! :grin: :grin: :grin: :grin: :grin: :grin: :grin: :grin: :grin: :grin: :grin:

Although we have found a working solution, I am still not completely satisfied. We should be able to put FIREBASERICIBIR in the ProjectBucket here:

image

but this makes the app crash in companion, which it should not do.

I will do a bit more testing.

You should delete your existing project, and create a new one, because all your connection details are available in this topic to anyone.

I tried to change tags, but it don't recieve anything. But it works, so i'll work with that for now.
Don't worry, it's just a testing database. i won't use it for personal purposes. Thanks a lot! :grin: :grin: :grin:

I believe I have figured out the problem, it is when the Firebase REST API is used to upload data (or other external source), it is handled differently to how the Firebase component would upload it. If you then try to access the data using the AI2 Firebase component, the Firebase component doesn't like it. Firebase have also changed the way they display data in the console, no longer showing the escape \ characters, which just adds to the confusion. I need to read up to see if there is anything more fundamental other than visual changes, but it does seem that one needs to apply the escape character and the double quotes for the Firebase component to accept data back.

Have been thinking about some options for you:

  1. Use the web component in AI2 (no Firebase component) to call down the base64 from realtime database

  2. Send image file direct to Firebase Storage, then fetch as a file with web component to AI2

  3. Send image file as base64 to google drive (using google apps script), then fetch as file

  4. If not already, run an http server on the RPi and serve the file for the app to call from AI2

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.