Fetch firebase data via python and push
Posted: 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?
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?