Price of petrol in Sydney

Posted by

I just discovered a page on the ACCC's website, where the graph the average price of petrol across Sydney on a daily basis.

The page confirms something I've known empirically for a while now: the best day to buy petrol in Sydney is Tuesday. The only people who should ever buy petrol on any other day of the week are taxis or other people who use more than a full tank per week.

Sydney Graph

You can see in the graph above that the troughs in price (and a trough is usually at least 10c per litre lower than a peak!) usually occur on a Tuesday, just before the peak on a Wednesday or Thursday.

So spread the word: buy your petrol on a Tuesday! Actually, better advice would be to monitor this ACCC website and always time your petrol-buying to coincide with a trough... After all, the cycle does move around a little bit. Six to twelve months ago, I remember the trough usually occured on a Wednesday, but it's been slowly moving backwards in the weeks.

iMON LCD patch (v0.3)

Posted by

Update (May, 2008): with the release of LIRC 0.8.3 you no longer need the LIRC patch. Additionally, the forums are now the place to discuss development/use of the patches (particularly this post, which has the latest installation instructions). There's plenty of friendly people there who are more than willing to help out.

It's been a little while since the last update to the drivers, but I wanted to release this new version which has many updates by Christian Leuschen. The biggest feature is support for the output LCDproc command (which lets us control the icons around the outside of the screen!) and also better shutdown support (so you can have it turn on the built-in clock, for example). You can download the patch below (again, the LIRC patch is the same as the original -- there's a bit of work left to do there, but hopefully not much).

lirc-0.8.2-imonlcd-0.1.patch
lcdproc-0.5.2-imonlcd-0.3.patch

As before, the instructions are on the original page, so follow those to install. Here's a photo of the newer features in action (sorry, it's hard to take a photo of an LCD screen at the best of times, and this is at night time to boot...)

iMON LCD

What's Left?

Now, the LIRC and LCDproc patches are almost done. I believe all the features that are required are already there, there's just a bit of tidying up to do. Once that's done, I'll be submitting the patches to be included in the CVS of the respective projects. Now, I don't think there'll be a problem with the LCDproc patch, but from what I see, LIRC is undergoing some major changes to get the kernel-mode components included in the kernel, so we'll see how we go there.

As for the screen itself, it "mostly" works now with whatever LCDproc client you throw at it (be it lcdproc itself, or mythlcdserver, etc). The only problem is that these clients do not understand any of the output support present in the driver, so they are unable to drive to the icons on the screen.

But the icons are, in my opinion, one of the best features of the screen! So we've got to do something about that! I believe Christian mentioned he'd patched VDR to (I assume) make use of the icons, which is great, but it doesn't help those of us running MythTV :) so I'm kind of undecided how to go.

Should I patch mythlcdserver to include support for the iMON's icons? Or should I write a totally new client which just controls the icons?

The advantage of the first is that, once you install the latest version of everything, it'll Just WorkTM. It's also quite a bit simpler for me to create a patch for an existing project than to start a whole new project! The disadvantage is that it would mean mythlcdserver will now include iMON-specific code, when most people won't even have an iMON LCD. I guess that's more of a philosophical question than anything, and you could always control it via a --enable-* option or something.

The advantage of the second option is that it'll work no matter what PVR software you run, or even if you just use lcdproc (though we'd need to have some special code there to query your PVR software for when it's watching TV vs a DVD, etc -- so maybe that's not such a big advantage at all, really). The disadvantage is that it's an extra step for people with the device to install. Additionally, as I mentioned before, I'm quite new at all this Linux stuff and I've certainly never started a whole new project before, so I wouldn't know where to begin...

In the end, I think that patching mythlcdserver would be the most beneficial for most people. Does anyone have thoughts on this? I'm hoping to get started on this patch over the next few weeks...

Anyway, I hope you all enjoy the patch, and please head over to the forums if you have any comments, questions, or suggestions!

Codeka.com Forums

Posted by

So I downloaded and installed phpBB as the all-new, all-singing, all-dancing Codeka.com Forums! You can access the forums at the link below -- if you have any questions, queries or concerns about (for example) the iMON LCD patches, I would definitely encourage you to post them over there. The main reason being that it's much easier for me to keep a conversation going in multiple separate threads than as a big long list of comments to a blog post :)

It's currently using the stock-standard phpBB skin, so it doesn't look that good, but I'm hoping if I get some free time (yeah, right!) to skin it so that it looks like the rest of Codeka.com.

Anyway, I really encourage you to sign up and start posting!

Don't delay, post today!!

iMON LCD patch (v0.2)

Posted by

Thanks to everyone for their feedback, I've got a new version of the iMON LCD patch ready for your consumption. This version fixes the problems that people had getting the screen to display anything but garbage on a 32-bit CPU. I'm putting this one down to my inexperience on Linux here :-) The new patch is available below:

lirc-0.8.2-imonlcd-0.1.patch
lcdproc-0.5.2-imonlcd-0.2.patch

The LIRC patch has not changed, so if you've already patched your LIRC, then there's nothing you need to do there. If you have not, please check my last post for instructions. Check that post, too, if you need instructions installing the LCDproc patch. One thing I would note is that this patch is against the original version of LCDproc 0.5.2 -- not my last patch. So if you've already patched the base 0.5.2 LCDproc, you'll have to re-extract the tar and apply this patch. I guess that's one of the problems of patching... no versioning!

This version also adds support for "big" numbers, so if you're running MythTV, you can get a cool-looking clock by setting mythlcdserver to use "big numbers" for the clock.

It's also got initial support for the "output" command in LCDproc for controlling the icons, but I can't seem to get that to work. I think I might have to plug the screen into my Windows box again and do another packet trace of the SoundGraph Windows drivers, to see if I've missed anything there.

Anyway, please drop me a line and let me know how this version goes. Thanks!

iMON LCD patch (v0.1)

Posted by

Update (May, 2008): with the release of LIRC 0.8.3 you no longer need the LIRC patch. Additionally, the forums are now the place to discuss development/use of the patches (particularly this post, which has the latest installation instructions). There's plenty of friendly people there who are more than willing to help out.

Update: a newer version of this patch is available now, please use that instead of the one listed here: click here. If you're already following the instructions from that page, then disregard this :-)

OK, this is it, the first version of my patches to get the new iMON LCD screens, found for example, in thee Antec Fusion Black as well as various Silverstone cases. Download the patches below, and I'll include some instructions as well.

lirc-0.8.2-imonlcd-0.1.patch
lcdproc-0.5.2-imonlcd-0.1.patch

Installation

As you read this, be aware that I'm not a Linux expert by any stretch of the imagination. It'd be better if you were already familiar with patching and installing things from source, but I'll do my best so bear with me :)

First of all, you need LIRC 0.8.2, which provides the kernel-mode interface to the LCD. Untar that file to somewhere (I used ~/lirc-0.8.2, then issue the following command:


~/lirc-0.8.2$ patch -p1 < /path/to/lirc-0.8.2-imonlcd-0.1.patch
~/lirc-0.8.2$ ./setup.sh

From this menu, choose the first option then select the "Soundgraph iMON MultiMedian IR/VFD" driver from the USB menu. Choose "Save & run configure", which will run the configure script. Next run:


~/lirc-0.8.2$ make
~/lirc-0.8.2$ sudo make install
~/lirc-0.8.2$ sudo modprobe lirc_imon

You should be able to setup LIRC and get your remote working at this point, but since that's out of scope of my patches, I'll just skip that bit. The next thing you need to do is download the source for LCDproc version 0.5.2, again, I untar'ed mine to ~/lcdproc-0.5.2, the run:


~/lcdproc-0.5.2$ patch -p1 < /path/to/lcdproc-0.5.2-imonlcd-0.1.patch
~/lcdproc-0.5.2$ aclocal && automake && autoconf
~/lcdproc-0.5.2$ ./configure --enable-drivers=imonlcd
~/lcdproc-0.5.2$ make
~/lcdproc-0.5.2$ sudo make install

Note: You need recent versions of autotools (sudo apt-get install automake autoconf on Ubuntu, for example) to run these commands.

Now, at this point, you'll have to edit the /usr/local/etc/LCDd.conf file to setup the server. Change the Driver to be "imonlcd" (which is the new driver that I've made), set the DriverPath option to "/usr/local/lib/lcdproc/". Next, to the end of the this file, add the following:


[imonlcd]
Size=16x2
Device=/dev/lcd0

Save the file and you should now be able to start the LCDd server and see something on your LCD! The following command-line is good for a start:


~/lcdproc-0.5.2$ sudo LCDd -f -r 4

If you don't see any errors, you'll be able to see the LCDproc server screen on your LCD! If you do get errors, or you don't see anything, leave a comment and I'll see if we can't work it out :-)

The next step, then, would be to set up the LCD screen in http://www.mythtv.org/. I'll leave the details up to the great documentation on the MythTV wiki but if all goes well, you should see something like this:

It works!

Going Forward

The iMON LCD is a powerful little screen. My patch hardly does it justice. For example, the device is a purely pixel-based display (as far as I know...) which means I've had to embed a simple "font" for displaying text. But at the end of the day, I should be able to use the pixel-based display for a much better looking progress bar than what is currently there!

Additionally, the kernel module that I've built for LIRC supports all the features (that I'm aware of anyway) of the screen, but LCDproc does not. For example, I'm not aware of any way to turn the icons around the outside on/off from LCDproc (that is, there's no support for such features at this time). Of course, I could add support for it, but that'll be a pretty big patch -- and I'd then have to patch mythlcdserver to use it as well, and so on... I'm sure it'll happen, but don't expect it tomorrow is all I'm saying :)

Thanks

I'd just like to thank Venky Raju for writing the original iMON patches (I borrowed heavily from his code :) ) and I'd also like to thank "ralph.y" from this page, who did most of the hard work of reverse engineering the protocol -- great work all round!