User avatar
marciokoko
Posts: 297
Joined: Sat Aug 27, 2016 4:33 pm

Fetch firebase data via python and push

Wed Oct 05, 2016 1:49 am

I have data on firebase that holds time values, namely:

Timeoff = 0600
Timeon = 1800

Whenever my rpi2 boots, I need to run the script which fetches the firebase values and then uses them to turn the lights on and off at those times.

Then for a more sophisticated scenario I'd like to have firebase push the changes to my rpi2 in order to fetch the values.

I've found that adding this command:

(sleep 10;python scriptname.py)&

to the /etc/rc.local file.

This takes care of part 1. Now I would need to handle the firebase push. Anyone worked with this?

enik1
Posts: 6
Joined: Tue Sep 27, 2016 8:26 am

Re: Fetch firebase data via python and push

Wed Oct 05, 2016 10:44 am

Are you talking about Google Firebase? I don't think they have a Python API to receive data pushes.

Enik
AWT and Swing developer

Return to “Beginners”