Used to perform predetermined function calls on IoT devices when a given value in Firebase RTDB is detected. Actions are performed asynchronously and delays/args can be used to customize responses.
Project description
Firebase Responder
Used to perform predetermined function calls on IoT devices when a given value in Firebase RTDB is detected. Actions are performed asynchronously and delays/args can be used to customize responses.
Usage
Initialize group of responses and pass handler() as callback function for Firebase listener.
responder = ResponderGroup(1, 3, "ok")
firebase_admin.db.reference('path/to/value').listen(responder.handler)
Add device along with sequence of functions to be called, delays, args etc.
# led1 init goes here
responder.add(ResponderCustom(3, 2, [led1.turn_on, led1.set_colour, led1.set_colour], [500, 500, 500],
[None, [255, 0, 0], [0, 0, 30]]))
responder.add(ResponderStatic("test", led2.turn_on, led2.turn_off, 1500)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
firebase_responder-1.0.4.tar.gz
(156.4 kB
view hashes)
Built Distribution
Close
Hashes for firebase_responder-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39c14d32119c9cfe1e6f84ed1e384b2dba1f02e529de7f3839bc59a7e30a7e40 |
|
MD5 | 6b884e1eba40afd8c957df3916633ee0 |
|
BLAKE2b-256 | ed406910908c06163d4384fc35ebe66ef8b54f734ef44ca9349a9f3b7077183e |