Here is my latest creation, quite simple but efficient !
It's basically a kind of generic alarm system :
You can have as many smartphones you want
The system can work in fully automatic mode, alarms being sent only when you are not at home (option)
All this stuff is synchronized with firebase Messaging (here is the Magic !)
How does it work ?
- sensor sends a Message, Firebase routes it to all the associated phones
- each phone can clear the alarm ... and sends a message to firebase, which sends it to all phones
- each phone is thus a de-centralized alarm central
The real time capabilities of firebase are amazing, any alarm is cleared in less than a few seconds. I have tested this in France between phones distant of more than 600 km
Finally it's a kind of real time MQTT broker, where no connection of clients are needed.
Interesting also is that firebase messages wake up the App (static intent ?) so no battery drain while sleeping, no foreground notification, it just works even when the phone is locked.
Registration of sensors is done while the sensor is not connected to your wifi router. It then exposes its own SSID where you can connect... configure it and that's it. Afterwards the sensor automatically connects to your router and of course to internet.
You can share your configuration with other smartphones. This is done with firebase storage using secured file sharing.
Sensors are all based around ESP8266. They are cheap and reliable (provided you reboot them from time to time.)
My basic idea was to have at home a fully automatic alarm system. We are always forgetting to switch on/off our alarm...
Now, as our familly is fully equiped with Androids phones, and as nobody forgets this precious device, we have an automatic alarm system
Thank you @Erel for this fast and efficient firebase integration into B4A.
And thank you to all of you who share these nice libraries.
[edit] see it in action with a smoke detector below
It's basically a kind of generic alarm system :
- sensors send alarms
- smartphones receive alarms
- smartphones clear alarms
You can have as many smartphones you want
The system can work in fully automatic mode, alarms being sent only when you are not at home (option)
All this stuff is synchronized with firebase Messaging (here is the Magic !)
How does it work ?
- sensor sends a Message, Firebase routes it to all the associated phones
- each phone can clear the alarm ... and sends a message to firebase, which sends it to all phones
- each phone is thus a de-centralized alarm central
The real time capabilities of firebase are amazing, any alarm is cleared in less than a few seconds. I have tested this in France between phones distant of more than 600 km
Finally it's a kind of real time MQTT broker, where no connection of clients are needed.
Interesting also is that firebase messages wake up the App (static intent ?) so no battery drain while sleeping, no foreground notification, it just works even when the phone is locked.
Registration of sensors is done while the sensor is not connected to your wifi router. It then exposes its own SSID where you can connect... configure it and that's it. Afterwards the sensor automatically connects to your router and of course to internet.
You can share your configuration with other smartphones. This is done with firebase storage using secured file sharing.
Sensors are all based around ESP8266. They are cheap and reliable (provided you reboot them from time to time.)
- The PIR sensor on the picture can trigger a long pulse able to wake up the ESP8266 (CH-PD pin).
- ESP8266 then boots and does its job to send firebase messages, and enters into deep sleep
- After this time out, the PIR sensor totally shuts down the ESP8266, and looks for the next alarm
My basic idea was to have at home a fully automatic alarm system. We are always forgetting to switch on/off our alarm...
Now, as our familly is fully equiped with Androids phones, and as nobody forgets this precious device, we have an automatic alarm system
Thank you @Erel for this fast and efficient firebase integration into B4A.
And thank you to all of you who share these nice libraries.
[edit] see it in action with a smoke detector below
Last edited: