The Development Log


 
Update the sketch on the 328p via avrupdate/hmdude? No there's no bootloader on the ATmega in the HeaterMeter (when connected to the rPi). The chip is flashed using SPI, the same way something like a USBtinyISP would flash a bootloader, except instead of putting a bootloader on, I just flash the program directly.

Optiboot is great and all but the SPI method is 10x faster (4Mbit vs 112kbit). Also you can't reboot to the Optiboot by using the watchdog, it will only boot into Optiboot if the RESET button was pushed. The down side to SPI is that you can't erase single blocks of the ATmega storage, so I've got to do what's called a "chip erase" before writing, which sets all the bytes of the ATmega to 0xff.

To answer the question I think you might be asking:
The bootloader is used to allow you to program the chip over serial (UART FTDI cable). It is a little stub program that copies blocks from the serial port and writes them to flash. If there was no bootloader the only way to put a new Arduino sketch on would be over SPI which would mean they'd have to have 4 more wires, and the USB connection would be a lot more complicated. Because I can program over SPI directly, no need for a bootloader.
 
I hear that sound from my girlfriend when I start talking sometimes. Are you tuning me out too?
emot-v.gif
 
No. :) It meant that I got it!

That does make sense. SPI is faster and doesn't need a hard reset, but overwrites the entire chip.
 
Added the ability to save a PNG image of a graph from the archive view of that graph. This would work a little slicker but Internet Explorer suuuuuuuuuuuucks so you've got to right-click "Save image as..." on all platforms because it would be confusing if it only half worked. This is something I'd like to integrate into the Home screen so you can save a PNG of a live graph or upload to imgur / facebook / google+ directly but I haven't worked out how the UI would work. I might save that for when the Home is redesigned, which will also allow you to archive right from Home.

linkmeterd now will take it upon itself to try to install the AVR firmware if it can't get a peep out of the HeaterMeter for 10 seconds after startup. This will happen on every start, not just the first time afteryou flash the card. Avrupdate is now also much more resilient in terms of timing problems making it fail to run the update because the SPI device isn't alive yet. Hopefully this combination will mean nobody will ever have to manually run avrupdate on a new system.
 
bryan... had a thought today..i wonder if there is anyway to tie this all into a smart watch or google glasses. A smart watch would be awesome. it could ding or vibrate when things are ready or done......i am thinking your new light version might be just what the dr ordered... Anyone else like the idea of a smartwatch tie in????. .. i used my heater meter for the first time today (weather has sucked in buffalo lately) it worked amazingly kept temp perfect even in rain....
 
That depends on what you're trying to push data to. The alarm system is a little overwhelming right now, with having to write scripts, but anything you can push web data to can get an alert when the alarm goes off. The question is what protocol.

I really like the Google Cloud Messaging framework, especially their newest version they unveiled at I/O a couple weeks ago. It is more designed for one server to push data to thousands of clients rather than having one server (LinkMeter) push data to one client per server. Maybe I can make it push up to my server then alerts are filtered out to users based on settings you've created for your account at HeaterMeter.com. Then I can charge $10 a month for service and make millions! (kidding)
 
Styled the LED configuration section of the conf page and wired it up to the save/load handlers. LED customization is done. Fixed some graph selection bugs that have been around since inception, and added ability to zoom on the PNG export from the archive view.

Added the ability to pass "norestore" on the command line to prevent configuration restore. See the wiki for more information.

Prepping for version 8 release now.
 
Bryan, I like the LED controls. If i could make a new feature suggestion, would it be possible to have the list of all the triggers for each LED with multiple select capability?
 
The LEDs are assigned a single trigger, not a list of triggers so it is possible to list them all but only one can be selected. What multiple selections would you want to make? I could make an Any Alarm trigger if that would solve it.
 
I was just thinking it would be nice to have the red led come on if any of the food probes went over threshold or if pit went above or below threshold. All involving multiple triggers.
 
Maybe I should shut up and play with it some more :) I have no idea what the 'any alarm' function is, I don't see it in the list. Sorry if I'm being dense. Also, wouldn't trigger if the pit probe went out of bounds as well? Guess either way, a red light makes sense......
 
Well what you asked for was the ability to turn the red LED on if any temperature is outside your set threshold, which in my mind are all alarms. There's no "any alarm" trigger now but that's easy to add. Supporting multiple triggers per LED is a rewrite.
 
I think I've got sysupgrade support working, even though it seems like it has the potential to be a little hokey. Something keeps the root volume locked so it is still open during the upgrade. Even doing it manually I can't stop all the processes and get it to unlock "device is busy". The flash seems to work though as long as I don't attempt to remount it and write to it. If I do that it breaks the filesystem in a way that requires you to pull the SD card and flash it manually.

I'll keep using it and see if it ever doesn't work with the method I'm using. If it works, great! I just need to respect the "save configuration" flag on the web interface because as it is now it always restores the config. Shouldn't be too tough though.

I also increases the "responsiveness" of the home page so that after any change the next 2 status updates aren't throttled which previously meant you'd have to wait 1-5 seconds before the page showed any changes you made. Now it is 0-2 seconds, usually 1.
 
Added "autobackup" of rrd file. This makes a copy of the current database every few minutes so if you lose power the graph isn't lost. There's still some work to be done on it to makes sure it works properly in online and offline network modes. This is also great for when you unplug HeaterMeter and say "Ah crap! I forgot to stash to the archive", because you can just plug it back in and stash it.

Fxed a loooooooong standing (since the start) bug in rrdtool that could sometimes cause linkmeterd to lock up the whole web interface requiring a reboot. Technically it wasn't locked up, rrdtool was just busy working and using 100% CPU. The cause turned out to be when the system clock jumps forward thanks to the time being set from the internet. If that happens between the time I check to make sure it hasn't happened and the time I try to insert the row, rrdtool will think it needs to build data rows for every 2 seconds between January 1, 1970 and the current time. This takes an insanely long amount of time on a little 700MHz CPU, on the order of an hour or more. I've patched rrdtool with a "fast-forward" mode that reduces this computation to milliseconds.

Added "Any alarm" LED trigger to web interface
 
Bryan, I am wondering if the HM is capable of using the entire length of the (4-line) display? Reason being, the temps get jammed in right next to the name of the probe, for longer names there is no space between the name and the temp, which makes it hard to read at a glance. Meanwhile, on the other side (past the temps) there is a bunch of blank display. It would be nice if the temps could be pushed over further to the right on the display to allow a little space between the name and temperature, would be much easier to read....

PS I really like that you have added the save feature on the graph. Couple times I have pulled the plug on the HM before I saved the graph and was sorry I lost it. Other times I have had to restart the HM for whatever reason and I lose the graph, which kinda sucks cause it marks the time I put the meat on the grill for me. So thanks for doing that, nice feature....
 
Last edited:
Bryan, I am wondering if the HM is capable of using the entire length of the (4-line) display?
Feature requests should get their own thread so people can see it distinctly rather than coming across it in the Dev Log.

This has been requested before but it adds a lot of progmem usage so I took it back out. I'll try again someday with some other implementations and see if I can come up with a more optimized way of doing it.
 

 

Back
Top