Software apps and online services
After running the example Temperature_Alarm code for ControlEverything's SI7020-A20 sensor, I realized I wanted to build a fully remote temperature monitoring system.
While this example code provides a way to read the current temperature and set the alarm limit through the Particle Cloud, it still relied on a buzzer that you could only hear if you were in proximity. Also, it didn't allow you to set both high and low limits at the same time; or, choose between Fahrenheit and Celsius.
Starting with the example code, I set about adapting it to provide to a few more controls as well as replacing the buzzer with event publishing to deliver alarms and regular temperature readings.
What I ended up with was a temperature monitor that lets you:
- Inspect the current temperature reading.
- Inspect the current alarm state.
- Set and inspect the temperature scale.
- Set a high temperature limit, a low temperature limit, and turn on an alarm for neither, either, or both limits.
- Publish changes in the alarm state through the Particle Cloud.
- And, publish the current temperature at your chosen intervals.
The API and Event is fully specified in the ReadMe, including instructions for compiling and flashing the remote-temp app to a Photon.
With a fully featured Cloud API in hand, I took a peek at it using Porter.
The raw view was a little intimidating; so, I customized the fields in a way that seemed sensible to me.
Now there are drop downs for the alarm and publishing mode options; buttons to set the temperature scale; and, sliders to set the alarm limits and publishing intervals.
I also reordered everything to group controls with their associated variables. Still, I felt this would be more than I would need on a day to day basis.
Here, I hid some of the variables that displayed the settings, while keeping the controls. I also hid the temperature scale information. I can still view access all of the variables and functions on the device by switching to the "Basic" view mode.
With the UI set up, I wanted to check and see if temperature data was being published every minute, as I had configured.
With events streaming in, it was time to move on to notifications. As I like my office quite cool, I used a Porter Action to set up an alert to notify me when temperature alarm event was published.
I then set the high temperature limit to 70° F; and, Porter delivered a push notification to phone.
Finally, I wanted to let to wanted to let my colleagues check in on the office temperature.
To let them check the temperature I set up device sharing without app control. Now, others with the secret url can view what's going on, but can't change my alert or publishing settings.
With a few simple components, a rich API, and a few minutes spent configuring Porter; I've got a high customizable and somewhat multi-user remote temperature monitor for my office. 🎉