PitDroid: An Android app for your HeaterMeter


 

Colin Bonstead

TVWBB Member
Android app: PitDroid

I made an Android app for monitoring your HeaterMeter: PitDroid!

The first thing you need to do once you've installed and started it is go into settings and enter the address of your HeaterMeter. It should be something like 192.168.1.10. If you've forwarded your HeaterMeter outside your firewall you can put in the external address instead, so you can monitor it on the go too.


PitDroid 2.2 - Released 9/29/2020
  • Updated to latest Android libraries to fix a crash
PitDroid 2.1 - Released 1/27/2019
  • Converted app from Java to Kotlin and did some general cleanup
PitDroid 2.0 - Released 8/13/2017
  • Added a confirmation dialog when changing the set temp, so you can tweak it to an exact value, or cancel the change
  • Couple of fixes for landscape mode in the gauge view
PitDroid 2.0 beta - Released 12/30/2016
  • New graphical thermometer dashboard (to change the pit set temp, make sure you're logged in and just drag the red marker)
  • Fixed issue on Android 6+ devices where alarms wouldn't go off if the device went into doze mode
  • When alarms are set there is a persistent notification with the current temps
  • Alarm notifications will show on Android Wear
PitDroid 1.3.1 - Released 10/6/2015
  • Fixed graph text size on high DPI devices.
PitDroid 1.3 - Released 10/4/2015
  • Changed development environment to Android Studio. Should help with issues on newer Android devices.
  • Added an alternate server address in the settings. It's useful for users that can't access the external address of their HeaterMeter from inside their network.
  • Fixed an issue with not being able to authenticate with more recent versions of the HeaterMeter software.
  • Switched to the new Android "light" look, since I couldn't figure out how to get the old "dark" look working again.
PitDroid 1.2.1 - Released 11/13/2013
  • Crash fix
  • Added an option to keep the screen on
  • Dashboard display of the most recent update time
PitDroid 1.2 - Released 7/26/2013
  • Added support for changing the pit set temp.
  • Added an explicit exit button. Now if you've got an alarm set you need to either turn it off or push the exit button and confirm that you're ok with exiting.

PitDroid 1.1.2 - Released 7/24/2013
  • Fixed crash when viewing graph before server is up (thanks Uipko!)
  • Added option to not have an alarm if the server can't be contacted (for flaky wi-fi connections)

PitDroid 1.1.1 - Released 4/16/2013
  • Fixed dumb crash :(

PitDroid 1.1 - Released 4/15/2013
  • Added pan/zoom support to the graph (thanks Eric T!)
  • Ported over estimated time until alarm/degrees per hour from the web page

PitDroid 1.0 - Released 3/25/2013
  • Now available on the Play store!
  • If you have an alarm set, now it will sound if the probe isn't giving readings, or it can't contact the HeaterMeter.
  • Less crappy looking status bar icon for < 3.0 devices.

PitDroid 0.3 - Released 3/9/2013
Changed the alarm sound to use the alarm sound channel. This way it can sound even if your phone is in silent or vibrate mode. There is an option in the settings to not play the sound if your phone is in silent or vibrate (by default it will though). The alarm channel is what stuff like the Android alarm clock uses, so if you have that turned all the way down for some reason you won't hear anything. On my phone, if I change the ringer volume there is a little settings box next to the volume slider. Pick that to see what your alarm volume is set to.

PitDroid 0.2 - Released 2/22/2013
I've uploaded a new build, 0.2. The main change is that there are now alarms. You can set a low and high temperature alarm for each probe, and if they go out of that range it will make a sound and vibrate.

If you set an alarm, an icon will show up in your notifications area to show you that PitDroid is running in the background. This is because if an alarm is set your phone is going to wake up every x minutes (configurable in the settings, defaults to 15 minutes) to check if an alarm needs to be triggered. That can turd out your battery life if your phone is normally sleeping (ie, screen is off, no other apps are working).

If you want to stop PitDroid from polling you need to either disable all your set alarms, or close PitDroid. On my Android 4.1 phone you can hold home and then press on the PitDroid picture and swipe it off to the side to close it, other versions of Android will vary. You'll know it's not polling in the background if you don't see the icon in the notification area. (The icon looks kind of crappy right now on non-4.x devices, I'll fix that later.)

PitDroid 0.1 - Released 2/20/2013
Initial release.
 
Last edited:
I used my HeaterMeter to smoke a brisket today (I have the week off :cool:), and I did some more work on PitDroid. I've got the interface for setting alarms set up and actually had it working by the end of the day. My phone actually woke up and vibrated when the pit temp got too low, and I went out to clean up the coals a bit. Still some bugs to work out and a bit of cleanup to do, but once that is done I'll put out a vesion 0.2, maybe tomorrow. I also forwarded an external port to my HeaterMeter and tried checking it while I was out today and it worked fine. Here's a sneak preview of the updated interface:

dash_v2.jpg
 
Oh, and I updated the graph screenshot with one from partway through the cook today. Please ignore all those parts where it says the lid was open, that was just the crazy wind gusts here fooling the HeaterMeter. Well, I did have the lid off for the last one, because I was wrapping the brisket in some butcher paper, and the raging winds took advantage of the open pit and stoked the coals up to 400 degrees. It was fun clamping that back down.
 
Nice! I hope you can get .2 tomorrow as I will be doing a brisket starting early Saturday morning and going back to bed :)
 
It was very windy yesterday.

I find I get better automated open lid results by increasing the % temp change needed to trigger them. This works well when it is windy, or when you are smoking at 160F too.

dave
 
Yeah the defaults are made for my grill, which is a big green egg so if the temperature ever drops 6% there's no doubt the lid is open.

The graph looks pretty sweet. Is it a HTML canvas with the flot control on it? Also how are you getting the data? Polled or server-sent streaming?
 
I just uploaded a new version with alarm support, the details are in the first post.

Hey Bryan, the graph is done with a library I found, AndroidPlot. The data I am just polling. I looked into using the streamed version, but it doesn't seem like something Android supports. If you want data pushed to you, you're supposed to use some Android cloud thing. Oh, and if anyone wants to look at the code, it's on GoogleCode. I licensed it under the Apache 2.0 license, so people can do what they want with it.
 
The data I am just polling. I looked into using the streamed version, but it doesn't seem like something Android supports. If you want data pushed to you, you're supposed to use some Android cloud thing.
Nah that's for when you're disconnected and need to send infrequent short messages.

What you do is a create a worker thread that creates the BufferedReader like you're doing but have it not return. Just keep calling BufferedReader::Readline() and you'll get the streaming status messages which are just lines of text:
event: hmstatus
data: { json data that you're getting now }
(blank line)

When you get an hmstatus event, parse the data with your parseStatus() and post it back to the main thread. It is just like updating a progress meter from a background thread except instead of pushing the progress up to the view, you'll pushing a NamedSample object.
 
Installed and played around with a little bit ago. Simple, worked great for me.

The only semi-goofy thing is that I didn't have a pit probe plugged in, and it read -225 ( the zero from no probe, minus 225 for the set temperature). Bryan, does your display routine do some validation / math on that value that isn't passing across the web service / request that Colin is polling?

(I confess I'm too lazy to fire up the work laptop and load the code for either.... )

Jarrod
 
So after using this last night, I do have one suggestion. Use Androids Alarm system to sound the alarm. So with my alarm clock app or for tasker when I have it play an alarm, I can have my phone on silent but whenever they are triggered, the alarm sounds audible. With PitDroid I had to keep my sound on the phone last night and anytime I got a new email, new IM, new notification of any kind the phone would make a noise and I woke a few times when I didnt need to. It would be great to leave the phone on silent, but have PitDroid sound an alarm either way.
 
Hey Jarrod, it's expected that you would see -225 if the pit probe isn't connected. The second parameter is degrees off from the set point, so I guess it's considering the current temperature zero. I should probably just not show it in that case though.

Jason, I didn't even know you could make a sound if the phone is on silent. I kind of assumed it would just block any attempts. I always keep my phone on vibrate though, so I don't really have much experience with sounds. I'll look into that though.
 
Jason, I didn't even know you could make a sound if the phone is on silent. I kind of assumed it would just block any attempts. I always keep my phone on vibrate though, so I don't really have much experience with sounds. I'll look into that though.

Try downloading https://play.google.com/store/apps/details?id=com.alarmclock.xtreme.free&feature=nav_result. Put your phone on silent and then set an alarm. The phone will sound the alarm regardless of whether or not your phone is on silent.
 
A way to get around not being able to trigger alarms when in vibrate mode is to temporarily disable vibrate mode when the alarm goes off:
Code:
AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
int ringerMode = audioManager.getRingerMode();
if (ringerMode != AudioManager.RINGER_MODE_NORMAL)
{
    audioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
    int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_ALARM);
    audioManager.setStreamVolume(AudioManager.STREAM_ALARM, maxVolume, 0);
}
You'll want to save the old ringer mode and set it back once the alarm is turned off too. Probably the volume of the alarm stream as well.
 

 

Back
Top