This post describes the process of becoming a Fithome member and starting to send the first readings.
The goal is to put a process in code that:
The process starts with downloading the Fithome app.
A homeowner downloads the FitHome app from either the Apple App Store or Google Play store.
The app checks the available_monitors node of the Firebase db to see if there are monitors available.
(2A) If there are monitors available, the homeowner is shown the Start Training screen.
(2B) If there is a waitlist, the homeowner is shown the waiting list sign up screen.
When a monitor is checked back into the available_monitors node, a Firebase Cloud Message is sent to the app as well as to SMS notifying the availability of the monitor.
Whichever screen is shown, the homeowner is made aware of the limited geographic availability of the FitHome experience. The limit is to make sure the homeowner will have a quality experience since personalized interactions are part of the experience. For example, when an electrician comes out to install the monitor, or an electricity saver expert comes out to advise on ways to save electricity.
The FitHome experience ends here for a homeowner that does not find their zip code listed. At this point, the homeowner can delete the FitHome app.
If their zip code is listed, they continue with the following….
The homeowner enters member registration information and then taps on the “START TRAINING”.
After tapping “START TRAINING”, the app uses the email and password to create an account in the Firebase account database.
Next, the app creates a node in the Firebase db where the node name is the user id. The node contains additional fields collected on the Start Training screen.
The app removes one of the monitor names from the available_monitors node, appends the month/date/year, and stores this as the machine within the Member Info node. For example, if the date was 07/05/2019 and the available monitor was named bambi, the entry would be bambi-07052019.
Other fields created by the app during the Fithome experience include:
The status field can be either:
These fields are created as the state of the experience changes. They will be used for FitHome member services and FitHome app to track the installation and active progress of the homeowner. This way, we will ensure a positive and efficient process experience.
#### Firebase Event - Monitor Handling A Firebase function is triggered when a Firebase member entry is created. The Firebase function sends a text message to FitHome member services. The text message includes the machine name of the monitor assigned to the homeowner. When FitHome member services receives the text message, they:
The homeowner sets up a 1/2 hour appointment for an electrician to come out and install the monitor.
The available dates/times are pulled from the available_times node.
The available_time field of the member info node is set to the number of the available_time used. This way, we can track what appointment has been set for this member.
A Firebase function sends an SMS to the electrician noted in the available_time assigned to the member. The installation is scheduled.
If the monitor installation needs to be rescheduled, the member’s status field is updated to reschedule. This triggers a FCM to be sent to the app and through SMS. The member goes to the FitHome app and chooses a new time.
After plugging the CTs into the energy monitor, the electrician installs the CTs on the two power lines. The energy monitor is either plugged into an available socket, or the circuit breaker socket is used to add a plug from the circuit breaker box.
The homeowner uses their laptop to connect the monitor to their home wifi as discussed in this writeup
Now that the monitor is connected to the wifi and the CTs have been installed, it will start sending power readings to the db.