Tag Archive

Below you'll find a list of all posts that have been tagged as "FIrebase"
blogImage

How to build a smart home using Raspberry Pi device

AbstractThis article describes a case study on building a smart home using Raspberry Pi device. We have used AndroidThings as the OS on the Raspberry device, and Firebase as backend service for storing the data (which is synced real time with all devices authenticated). The article gives a brief description on the current trend on Internet of Things (IoT) devices (popular IoT platforms like Raspberry Pi, Arduino, etc.). In addition, the article mentions a brief on AndroidThings OS (provided by Google), which was developed for IoT devices and support Java framework for application developers to develop IoT applications using Java. We also talk about Firebase, which was used as a backend to store data.Possibilities of controlling several devices from a single panel in Aziro (formerly MSys Technologies) office. (Creative visualization)AndroidThingsAndroidThings brings the entire Android platform now to devices on which you can build Java based IoT applications. It has the potential to change the game for IoT, like Android did for devices.The thing that we have found most IoT developers struggle with, is collecting sensor data, transport and save that data to the backend. And the real value lies in analyzing that data for alerts, visualization, etc. And that is where we believe we will see a lot of people understand the values of Firebase, Google Cloud Services more. AndroidThings, developed by Google fits all these pieces together to create a compelling IoT platform.One of the interesting things that is being mentioned as a strength of Android Things is that OS updates will be distributed by Google themselves.FirebaseFirebase provides a quick way to persist sensory data collected at the device level, and it works great with the Android APIs, which is supported by AndroidThings. A lot of mobile and device programmers that I have come across struggle with server side programming. Firebase can really help bridge that gap and make it easier.It will be interesting to see developers use its offline features. If you are new to IoT or in general any device that collects data and needs to transmit it over networks, the golden rule to be assumed is that network connectivity cannot be assumed. As a result, you will need to collect the data offline and when network is available, transmit this over to your server. Firebase with its offline feature can really make this simple for a lot of developers.Firebase has a ton of features including Real-time Database, Authentication, Cloud Messaging, Storage, Hosting, Test Lab and Analytics but I’m only going to use Authentication, Real-time Database.AuthenticationAny proper app has some form of security. Firebase Authentication provides this form of security by flawlessly providing an OAuth platform that integrates popular OAuth providers such as Facebook, Google+ and Twitter.Real-time DatabaseThis is a NoSQL cloud database. Okay, this means that all data in your application is stored online in the cloud and an added advantage is that it syncs across all connected clients in real time (as it changes).Implementation: Smart Home using RaspberryPi.This implementation requires the following:Software:1.Java.2.Android Application Development.Hardware:1.RaspberryPi 32.Ethernet Cable3.LED Bulb4.1KΩ resistor5.Female to Male jumper wires6.Breadboard7.Power Supply for Raspberry Pi8.SD Card (8GB or higher)Demo: LED bulb controlled through internet (using Android device) Software implementation1.Android Client app – talks to firebase, updates value in firebase.2.Android Things App – reads value from firebase and sends instructions to the Led bulb (through Raspberry Pi device)WorkflowAny Internet enabled android mobile that has android app, connects with Firebase using OAuth authentication.After successful authentication, it updates/reads value from Firebase.Firebase updates the values to IoT device that has AndroidThings OS and Android IoT app.IoT device controls all the connected electronic devices.Connecting IoT device in Cloud.Connecting IoT device in Cloud.1. Download the Developer preview from Android Things web site.https://developer.android.com/things/preview/download.html2. Download Android Thing OS for Raspberry Pi3. After formatting your SD Card we have to install the OS.4. After boot up RaspberryPi will connect to your network through Ethernet.5. Once it is successfully connected you will see the following messageconnected to :55556. LED positive pin to 7 (BCM4) and Negative to 9 (Ground)7. Create a Firebase Project in https://firebase.google.com/.8. Go to rules section and change the rules as follows{ "rules": { ".read": "true", ".write": "true" } }9. Download this Android-Things-Aziro (formerly MSys Technologies) project from the Github.https://github.com/Chokkar-G/Android-Things-MSys.git10. Get the google-services.json file from the Firebase project and copy it to your app folder.11. After successful compilation, run your first Android Things project which is configured with Firebase.12. Click on ‘Run’ button in Android studio and select your device.13. Now your application will run on your device and you will see the bulb is blinking.If you use a platform other than RaspberryPi, change pin value as shown below:I have used BCM4 GPIO pin for RaspberryPi device.(BoardDefaults.java) public static String getGPIOForLED() { switch (getBoardVariant()) { case DEVICE_EDISON_ARDUINO: return "IO13"; case DEVICE_EDISON: return "GP45"; case DEVICE_RPI3: return "BCM4"; case DEVICE_NXP: return "GPIO4_IO20"; default: throw new IllegalStateException("Unknown Build.DEVICE " + Build.DEVICE); } }Building Android Client App1. Download AndroidThingClientApp from this github link, import it into android studio.https://github.com/Chokkar-G/AndroidThingClientApp.git2. Get the google-services.json file from the Firebase project and copy it to your app folder.3.Enable Email, google, Facebook login in Authentication section. Source Codehttps://github.com/Chokkar-G/Android-Things-MSyshttps://github.com/Chokkar-G/AndroidThingClientApp Client app Login and Menu ItemsConclusionThe Internet of Things is easier to implement than the average person would think. We have great potential in IoT. This was just a simple demonstration for IoT. From security systems to healthcare; from transport companies to warehouse management, the possibilities in IoT are simply endless. Further, with the advent of mobile apps like IFTTT, communication has gone to the next level. We can confidently say that the future does belong to IoT.References:https://developer.android.com/things/index.htmlhttps://developer.android.com/things/hardware/raspberrypi.htmlhttp://fritzing.org/ (Electrical layout diagram tool)https://www.aziro.com/internet-of-things/https://github.com/amitshekhariitbhu/awesome-android-things

Aziro Marketing

EXPLORE ALL TAGS
2019 dockercon
Advanced analytics
Agentic AI
agile
AI
AI ML
AIOps
Amazon Aws
Amazon EC2
Analytics
Analytics tools
AndroidThings
Anomaly Detection
Anomaly monitor
Ansible Test Automation
apache
apache8
Apache Spark RDD
app containerization
application containerization
applications
Application Security
application testing
artificial intelligence
asynchronous replication
automate
automation
automation testing
Autonomous Storage
AWS Lambda
Aziro
Aziro Technologies
big data
Big Data Analytics
big data pipeline
Big Data QA
Big Data Tester
Big Data Testing
bitcoin
blockchain
blog
bluetooth
buildroot
business intelligence
busybox
chef
ci/cd
CI/CD security
cloud
Cloud Analytics
cloud computing
Cloud Cost Optimization
cloud devops
Cloud Infrastructure
Cloud Interoperability
Cloud Native Solution
Cloud Security
cloudstack
cloud storage
Cloud Storage Data
Cloud Storage Security
Codeless Automation
Cognitive analytics
Configuration Management
connected homes
container
Containers
container world 2019
container world conference
continuous-delivery
continuous deployment
continuous integration
Coronavirus
Covid-19
cryptocurrency
cyber security
data-analytics
data backup and recovery
datacenter
data protection
data replication
data-security
data-storage
deep learning
demo
Descriptive analytics
Descriptive analytics tools
development
devops
devops agile
devops automation
DEVOPS CERTIFICATION
devops monitoring
DevOps QA
DevOps Security
DevOps testing
DevSecOps
Digital Transformation
disaster recovery
DMA
docker
dockercon
dockercon 2019
dockercon 2019 san francisco
dockercon usa 2019
docker swarm
DRaaS
edge computing
Embedded AI
embedded-systems
end-to-end-test-automation
FaaS
finance
fintech
FIrebase
flash memory
flash memory summit
FMS2017
GDPR faqs
Glass-Box AI
golang
GraphQL
graphql vs rest
gui testing
habitat
hadoop
hardware-providers
healthcare
Heartfullness
High Performance Computing
Holistic Life
HPC
Hybrid-Cloud
hyper-converged
hyper-v
IaaS
IaaS Security
icinga
icinga for monitoring
Image Recognition 2024
infographic
InSpec
internet-of-things
investing
iot
iot application
iot testing
java 8 streams
javascript
jenkins
KubeCon
kubernetes
kubernetesday
kubernetesday bangalore
libstorage
linux
litecoin
log analytics
Log mining
Low-Code
Low-Code No-Code Platforms
Loyalty
machine-learning
Meditation
Microservices
migration
Mindfulness
ML
mobile-application-testing
mobile-automation-testing
monitoring tools
Mutli-Cloud
network
network file storage
new features
NFS
NVMe
NVMEof
NVMes
Online Education
opensource
openstack
opscode-2
OSS
others
Paas
PDLC
Positivty
predictive analytics
Predictive analytics tools
prescriptive analysis
private-cloud
product sustenance
programming language
public cloud
qa
qa automation
quality-assurance
Rapid Application Development
raspberry pi
RDMA
real time analytics
realtime analytics platforms
Real-time data analytics
Recovery
Recovery as a service
recovery as service
rsa
rsa 2019
rsa 2019 san francisco
rsac 2018
rsa conference
rsa conference 2019
rsa usa 2019
SaaS Security
san francisco
SDC India 2019
SDDC
security
Security Monitoring
Selenium Test Automation
selenium testng
serverless
Serverless Computing
Site Reliability Engineering
smart homes
smart mirror
SNIA
snia india 2019
SNIA SDC 2019
SNIA SDC INDIA
SNIA SDC USA
software
software defined storage
software-testing
software testing trends
software testing trends 2019
SRE
STaaS
storage
storage events
storage replication
Storage Trends 2018
storage virtualization
support
Synchronous Replication
technology
tech support
test-automation
Testing
testing automation tools
thought leadership articles
trends
tutorials
ui automation testing
ui testing
ui testing automation
vCenter Operations Manager
vCOPS
virtualization
VMware
vmworld
VMworld 2019
vmworld 2019 san francisco
VMworld 2019 US
vROM
Web Automation Testing
web test automation
WFH

LET'S ENGINEER

Your Next Product Breakthrough

Book a Free 30-minute Meeting with our technology experts.

Aziro has been a true engineering partner in our digital transformation journey. Their AI-native approach and deep technical expertise helped us modernize our infrastructure and accelerate product delivery without compromising quality. The collaboration has been seamless, efficient, and outcome-driven.

Customer Placeholder
CTO

Fortune 500 company