Archive for the ‘Inside’ Category

Wiring the house, part 3: Planning the 1-wire sensor network

September 2, 2009

When ordering the needed hardware new possibilities came to mind, as they so often do when you are browsing catalogs of companies selling cool gadgets…

The first version of the 1-wire network will look something like this, possibly with some of the sensors furthest away from the server installed at a later time. Some of these sensors are after all pretty expensive (just the humidity sensor, HIH-4000-001, got it from Digikey, that is attached to the DS2438 AD converter cost around €20). Getting the all the cables in place have also turned out to be a bit tricky, the tubing in the walls back in –65 just weren’t made with cat-6 networks, phone lines and 1-wire networks in mind…

SP53 1-wire network

The Linux server will run either temploggerd and owfs (if I can get it to work on the small Bubba Linux server that I am using, so far it compiles ok but doesn’t seem to respond properly to the sensors), or thermd.

I verified thermd runs (it does work as expected but it takes 15-20 seconds or so to update the graphs) on the Bubba server as long as you install the perl runtimes and quite a few Perl packages, but as owfs offers a better client-server approach it would be the preferred solution.

Wiring the house, part 2: Buying 1-wire sensors and accessories

August 25, 2009

So, having moved from a flat to a house a couple of months back it was time to do some actual work on a home monitoring system.

First task: to find a good source for the needed 1-wire sensors and other electronics and hardware.
Some digging around, comparing a lot of prices resulted in the matrix below.
I then ended up buying my 1-wire products and components from Homechip and Hobby-boards, with some additional components from Electrokit.

Please note that prices and other aspects of the stores are expected to change, the data below represent a snapshot as of August 2009. They should in any case provide some starting points for your own 1-wire online shopping adventures.

Vendor Country Comment
Homechip UK Good prices and fast, affordable delivery across Europe, they don’t have quite the selection of 1-wire products as for example Hobby-Boards or DigiKey (who are outstanding when it comes to components).
But with Homechip offering the core component I needed while also being European the first batch of 1-wire sensors were bought from them. Might try other providers later.A good thing about Homechip is that they carry the
T-sense (made by IButtonLink) at an affordable price. VERY convenient temperature sensor! Ok, a bit more expensive than buying the components, but oh so convenient..
Low shipping costs also to rest of Europe outside of UK.
Hobby-Boards US Nice store with some assembled and ready-to-go 1-wire sensor modules, such as the 8 channel relay board or the nice little DS2423-based dual counter (Note: Homechip carries a similar counter).A GREAT thing about Hobby-Boards is that they offer both schematics and PCB layout for free on their web! This gives some very good inspiration for those of us who like to build things from scratch but have spent the last fifteen years doing other things than designing electronic circuits.Reasonable prices but longer/more expensive shipping if you are in Europe.

Embedded Data Systems US This company among other things makes the HA7Net, which is an Ethernet equipped 1-wire master controller with some real intelligence in it. It contains a web server, upgradable firmware, various tools for reading/writing/maintaining a 1-wire network. The HA7Net also has three 1-wire ports, making it dead simple to create a star-formed 1-wire network.The HA7Net acts as the 1-wire centre point in my network, it is then read by various other software on the internal TCP/IP network.
Temperatur.nu Sweden temperatur.nu contains both temperatures across Sweden updated by people’s personal computer connected weather stations, as well as an online shop and a good forum for Swedes interested in home and weather monitoring systems. Quite a few good 1-wire related threads in the forums.The store has a fair number of components as well as pre-assembled sensor modules. Prices are a bit high compared to for example Homechip but if you are in Sweden and need fast delivery it may be worth it.
The store also has various home automation products, such as radio controlled 220V switches.
IbuttonLink US Makers of some good 1-wire products, such as the LinkUSB 1-wire interface, which can be used instead of the standard DS9490R from Maxim. They also make the very convenient T-Sense temperature sensor, but as this is available from HomeChip at the same or even better price (given the current USD to EUR exchange rate), I’ve got my T-Sensors from Homechip.
1.wire shop Germany Expensive German online store
Fuchs Shop Germany Expensive German online store
SparkFun US GREAT company with a fantastic amount of cool gadgets and electronics kits in the store, usually with very affordable prices. If you like fiddling around with electronics and microcontrollers you’ll love SparkFun. SparkFun offer free schematics for many of their kits, they also have good tutorials and forums. Great site!
Digikey US
Intl
Giant retailer of electronics components. More than 1900 employees, more than 450.000 products in stock. If you need an electronics component, Digikey is likely to have it, and at a good price. Based in US means longer delivery and higher shipping costs though.
Edit: Turns out Digikey has a great international service as well! For their Swedish customers they even offer free shipping on orders of more than €65, which is pretty easy to reach when looking through their catalog…
Electrokit Sweden Probably Sweden’s best online store for electronics components and Arduino microcontrollers. Good prices, very affordable shipping costs.
Lawicel-shop Sweden Sells various embedded systems products, including Arduino boards. Seem to be more expensive than Electrokit.
Maplin UK Sells all sorts of electronics and components. Might be worth considering for UK people.
Energibutiken Sweden Online store with a small but fairly good selection of products relating to energy monitoring. They among other things have an interesting data logger for those who don’t want to be bothered by running a server for their 1-wire projects.

Syncing Firefox sessions across computer and platforms

August 21, 2009

I regularly use 3-4 different computers, from time to time also guest operating systems running in virtual machines. For years I have been thinking it would be great if you could bring your current Firefox status with you to a different computer, for example between a Mac and PC.

After recently actually looking into this topic I found the new Mozilla Weave Firefox extension. It is in beta and have some bugs, but is very promising even in its current state. However, it doesn’t sync sessions.

I recently also started using the nice Dropbox service for file syncing. Dropbox has both Windows and Mac clients and works fully transparently: any file you put in the dedicated Dropbox folder on your local computer is automatically synced to the Dropbox service and from there propagated out to your other computers where you have Dropbox installed and running. As you get 2 GB of free storage that is more than plenty for storing session information.

Only thing missing now is to find where Firefox’ sessions files are stored. As I am using the excellent Session Manager Firefox extension, a quick look in the Advanced tab of its options dialog revealed that you can indeed specify where Session Manager’s session files should be stored. Change this to your local Dropbox folder and you are set! As soon as you save a session in Session Manager it will be almost instantly available on your other computers. To use them on these other computers you use the “Load session…” command in Session Manager’s menu, which in turn is found in Firefox’ Tools menu.

Have been using this setup for some weeks now, works flawlessly.

Wiring the house

August 18, 2009

Moving to a house from an apartment made me realize you have new things to consider.

- How much money is spent on heating?

- We have a 45-year old, huge waterboiler in the basement, how much does it cost to keep it running? Would we save money by replacing it with a modern one?

- It is said that return-on-investment on air-air heatpumps is quite short, around 18 months is often mentioned. But before installing such a pump to reduce the need for electrical heating it would be great to have a system in place measuring how much electricity is used for electrical heating before and after the pump is installed, and how much energy the pump itself uses.

- How do you measure the above, collect the data and present it in a good way?

- After installing radio controlled switches across the house, how do you control them in a good way? The included remote works ok, but a computer interface is really what is needed to create more advanced lightning setups.

In the coming posts I’ll sum up the experiences made in planning, building, configuring and running the above services. Having searched the net for information and experiences from others I have found some, but not a whole lot. Hopefully my findings will help others with similar plans and ideas.

iPhone/iPod Touch 1.1.2 hacked – before it is released. Or is it..?

November 9, 2007

The title says it all. Before Apple has even started shipping the updated 1.1.2 firmware, it seems some people have been able to unlock (=Jailbreak) it. Kudos to these people, but I just can’t help wondering how long Apple will be able to keep this game running. Eventually they must (??) understand that keeping the platform too locked down is generating significant badwill. And with something like 25% of all iPhones being unlocked, why not just accept the fact that people want to install their own apps?

True, there is an SDK coming that will allow for third party, native apps.
The answer probably lies in the fact that Apple gets a piece of the revenue generated by AT&T and other carriers offering the iPhone. Recent numbers indicate that Apple gets USD 18/month from AT&T for each iPhone user in the US!! With 1+ million iPhones sold in US alone (probably 1.25 by now?), and 200k estimated before end of year in UK, this is big money for Apple. Even if they wanted to open up the platform for third party apps, the operators wouldn’t like that and Apple would loose some significant, low-risk revenue.

Finally: The image showing an unlocked 1.1.2 also shows 14 GB memory – but the iPhone comes in a maximum of 8 GB, to my knowledge. So this may very well be a Photoshop job. Still, it is probably just a matter of days before the real 1.1.2 firmware is hacked.

[Edit: Now that was a very late night post done by a brain which had already called it a day.... as some people correctly pointed out, the image clearly says it is an iPod Touch. Which comes in 16GB version. My mistake - me bad]

iPod Touch = Sysadmin console deluxe

November 8, 2007

I just love the iPod Touch. Very, very sexy device. It gets a firmer and firmer grip on me by each passing day…

I realized something neat the other day. After unlocking it at jailbreakme.com I installed various apps, including the BSD subsystem and a VT100 terminal emulator. When traveling out of town during the last few days, I decided to try the new SSH server I had set up at a computer at home, to allow for some remote backups and admin.

And it worked just like expected: After starting the VT100 terminal it was simply a matter of typing “SSH computer.my.domain”, enter the credentials and I was in. Very cool, I could do everything I could do while at my desk at home.

It’s only a matter of time before sys admins and network engineers are running around with shiny iPod Touches as their main work tool while on a service mission… Seriously, could very well work as a compliment for them, especially considering many of the usual, very powerful Linux tools are available.

iPod Touch – first impressions

October 18, 2007

Got my iPod Touch a week ago. Ordering it was an impulse decision when I realized it had been released in the US. Rarely have I anticipated a gadget so much… And it pretty much lives up to expectations, at least when it comes to the first impression. I won’t put any pics here, there are plenty of those already on the net.

First, when it comes to box design the guys at Apple have really outdone themselves. The Touch comes in a small, sturdy, compact little matte black box. Very nice. Unpacking and setup is a breeze, I made a point of eying through the manual, just to realize it didn’t really contain any actual usage instructions, only some installation instructions. The user interface is pretty intuitive, but to learn the more advanced commands (like double tapping on the screen to bring the device out of locked state and show the play controls) you have to go Apple’s web site and read the tutorials. A bit silly, but works ok.

16 GByte sounds like a lot compared to the 4 GB in my old Nano, but as soon as you start adding video podcasts or movies those 16 GB disappear quickly. Given that the Touch is so much bigger than the Nano and that miniaturization has advanced since the Nano was designed, wouldn’t 32 GB in the Touch be possible? Maybe it’s coming.

As for other hardware aspects of the Touch, the screen is simply outstanding. Very, very nice. Great colors, contrast and a real hard glass surface makes it a lot less scratch sensitive than the Nano, which almost scratched simply by looking at it. The mirrored back side (same as on earlier iPods) is however just as sensitive as before, and even though I’ve kept my Touch in a cloth bag at all times, it is already scratched. Bummer. Buying a hard/soft case to the Touch at the same time as buying the Touch is highly recommended! Unfortunately, it seems as the case manufacturers haven’t kept up with Apple – you can’t find any Touch cases at all for sale in Sweden. Ok, the Touch hasn’t started selling here yet, but given that there are plently of iPhone cases for sale here (and the iPhone for sure isn’t even close to have launched here yet – any iPhone used in Sweden has to be hacked). As for

Finally, the good, the bad and the ugly:

The good

  • User interface is slick, responsive and simply gorgeous.
  • Cover Flow is awesome!
  • Watching video on the iPod is great, but also requires a totally different kind of attention than for example listening to an audio podcast. It is for example hard to walk to the subway and watch video at the same time – but listening to a podcast at the same time works great.

The bad

  • 16 GB memory is twice as much as 8 GB (which is was the smaller Touch has), but still only half of 32 GB…
  • Stability. On several occasions the Touch has almost hung when watching a video podcast and switching to some other application. There is a Linux system somewhere beneath that shiny surface and it promise a lot of stability and good multitasking, but there obviously are some bugs that need to be fixed.
  • I would really have liked the Touch to be GPS enabled.

The ugly

  • Apple has done it again – crippling the feature set of their products. There is absolutely no reason what so ever why the Touch couldn’t have more of the same application set as the iPhone. The Touch has great WiFi connectivity and a nice web browser – but no email client!
  • Not possible to install third party applications. This is by far my most serious concern about the iPod Touch! Given the form factor and great implementation of a touch interface, the iPod Touch has a fantastic potential beyond just being a portable media player. I would personally love to use it for reading emails, having a client to connect automatically to FON access points, having a ssh client to allow for remote management of Linux boxes, … And imagine a restaurant equipping the staff with iPod Touches, taking the orders in the devices, sending them via WiFi to the kitchen…

The explanation to most of the above concerns is probably that Apple didn’t want the iPhone and iPod Touch to be too close to each other, from a feature point of view. Still, after Apple’s reduction of the iPhone’s price, the price tags aren’t that different. I’d really expect more features in the Touch, given it’s price point. Still, it’s a nice device that replaces my Touch in all occasions except when out running, working out, biking, skiing etc. For those activities the Touch is too big and sensitive, whereas the Nano is perfect.

Update 2007-Oct-18:
Apple has announced they will make an SDK available, to allow for third party native applications to be developed. Most likely some kind of certification similar to Symbian Signed will be needed, to protect against malicious software.

Tweaking Bubba

September 27, 2007

I realized the other day that it is only a matter of time before I loose track of what changes have been made to the Bubba’s original configuration. What applications have been installed? What config files are being used? If I ever had to re-install the Bubba, or were to configure a Bubba for someone else, it would take a lot of time to get it going.

Enter this post. Ok, keeping track of all config files may be too ambitious, but it feels like a good idea to at least keep a log of what packages are installed. It will evolve over time, maybe some key config files/data will be included as well. And if it turns out to be a handy resource for other Bubba users – even better.

  1. Slimserver. If you have a Squeezebox media adapter, the Bubba is a fantastic match. Put your mp3s on the Bubba, install Slimserver (which is the server-side companion to the Squeezebox), hook up the Squeezebox to your stereo and you have a very nice, silent, always-on, low-power solution for listening to your mp3s. No more booting of the desktop PC, or having a power-hungry, loud server sitting in a corner somewhere. The guys at Excito has made a complete package available for download, including a Slimserver version that runs ok on the Bubba (the latest Slimserver versions are a bit too demanding for current generation Bubba, so you have to live without some of the latest features. I have never missed anything though, so it’s not a problem). More info here.
  2. Using SMART to monitor health of hard disk. Smartmontools is a very nice little package that monitors the health of your hard disk(s). Fairly small footprint, good feature set. Very flexible scheduling options allow you to do (for example) a basic test on a daily basis, and a more thorough test once a week, month or whatever. Once again, the Excito forums provide good info. More info here and here.

TODO list

With the Bubba having such limited memory and processing power, you really can’t put too many applications on it. So it is a bit of a balance act to decide which ones of the built-in features to enable, and what new packages to install. Below follows the current candidate list of nice-to-haves..

  1. Webmin. Very nice and extensible browser based server management solution. Kind of demanding on system resources, so it is likely to run slowly on Bubba. Also, it is a bit tricky to set up under Apache (by default it comes with its own web server, which in the case of Bubba just eats up precious resources). Some discussions (here and here) on Excito forums indicate it is indeed possible to use Webmin on Bubba.
  2. Some good, lightweight system monitoring server. With the limited process speed and amount of memory in the Bubba, it would be nice to have a way of monitoring system resource usage, and ideally warn by an email when some threshold is passed (too much swapping to disk, for example).
  3. Setting up secure tunneling to allow for access to Bubba (SSH, http, https) from very within very restrictive firewalls. Starting points for more info are found here and here (and many other places). Tinyproxy also seems to be a good, lightweight solution. Remains to be seen if it works on Bubba.
  4. Hardening of SSH. More info here and here (good one).
  5. Backup, backup of backup, and backup of backup of backup. So I am paranoid – I admit it. I want triple backups of my data, with the last backup being physically separated from the first two. My vision is to have the Bubba back up photos, documents and other valuable stuff normally residing on my desktop PC. The decTop then will backup the Bubba (decTop is another small, fan-less system, similar to Bubba). The decTop will then finally replicate its hard drive to some external site, possibly another Bubba placed at some friends house, maybe using this approach. Could also use a service like Mozy, I am however not sure what the backup performance would be like from Europe, and as they don’t have a Linux client it would require the PC to drive the backup.

Using Bubba as media server

September 6, 2007

After testing a lot of different media center solutions for the PC, as well as trying to convert an ASUS WL-500g Premium running OpenWRT into a media server, I realized I’d like to listen to some music and watch some movies, and not just try to get the underlying technology working.

So I bought a Bubba. Nice little box, I especially like that there is no fan and that power consumption is low. I have placed in the closet next to the wireless router and modem, so whatever little noise it makes no-one will hear it.

An important reason for choosing the Bubba was the very active and helpful community around it. I have several times been very pleasantly surprised at the speed with which Excito’s (the company behind Bubba) staff reply to questions. A bonus is that it runs pretty much a standard Debian, so there is plenty of software to play around with.

On the negative side… Well it only has 128 MB memory, which is really on the low side if you want to run a LAMP server together with some media streaming software. As I have a Squeezebox connected to the stereo, running Slimserver on the Bubba was high priority. Initial tests weren’t too successful, but the good people at Excito helped out and even put together a full Debian package with Slimserver and other needed software. The web interface to Slimserver is a bit sluggish and indexing of lot’s of mp3s isn’t lightning fast, but it works and does what you expect it to do.

As for media and other features the Bubba comes pre-configured with UPnP and DAAP, a real mail server, print server etc. Good stuff!

To sum things up, I now have a really small, energy efficient, secure, silent backup/file/media server that is running 24/7.

Oh yes, a bonus with the Bubba is that it is quite easy to set it up to automatically back up your PC (or Mac). With a 500 GB drive in the Bubba and using rsync to copy only changed files from the PC to the Bubba, backups are easy and invisible. I had a recent bad experience with some spyware that crippled the PC, and that got me thinking about good backup solutions.

Watching TV on your PC, part 1

March 22, 2007

The title of this post suggest that there is more to come on this topic…. Time will tell if that’s the case, but my general feeling after having spent a fair amount of time on trying out various options for building a mediacenter/htpc/whatever you want to call it, is that the technology may be there, but it takes some serious hacking skills to get it working. And that most of the mediacenter software packages out there aren’t really mature.

Background is that I’ve thrown out the old VCR, I don’t own a DVD player, am looking into getting a new (flat) TV – and that I like the idea of accessing music, movies, basic Internet browsing etc through the TV.

So, when I replaced the trusty old Dell Dimension 8100 (P4 1.4 GHz, 384 MB RAM, 70 GB HD, Haupaugge PVR-350 TV card) with a custom built, small form factor PC the timing was right to see if the Dell could be rebuilt to act as media server. Apart from being big and loud, it should have enough horsepower in it. Or so I thought, at least if I used a suitable Linux distro. Another dimension was to us OpenSource or freeware tools, rather than buying a Windows Mediacenter license. Finally, if a mediacenter was to enter my (our!) living room, it must easy to use and offer some real advantages to having DVDs, CDs etc – my girlfriend would not accept anything else. Fair enough, I actually agree on this. Technology and gadgets are cool, but for day-to-day use things must be usable.

As my Linux skills are rudimentary, I went with Ubuntu and MythTV, as others seemed to recommend it, and there is a good guide at https://help.ubuntu.com/community/MythTV_Edgy. Especially MythTV is very flexible and powerful. The guide is both good and pretty complete, but I nevertheless ended up spending a full day on reading, installing, re-doing same thing again because something didn’t download properly, configuring MySQL etc etc – lot’s of time. Eventually yes, I managed to get MythTV running, but it is slow, hangs every now and then (too often) and is generally useless on this particular machine/setup. May very well be that I have configured things incorrectly, but having followed instructions in the guide to the letter, I’d say the configuration is at least decent. This ain’t working..

Ripped the TV card out of the Dell and put it into the newly built, shiny PC (AMD Athlon 64 4000+, 2GB RAM, 550 GB HD, Nvidia GeForce 7950GT). Even though this PC is not to be used as a mediacenter, it wouldn’t hurt being able to watch TV while doing other things, right? Next step is then to look for software to achieve this.

With a pretty fast AMD CPU and a good graphics card, I expect this Windows XP Pro based system to handle any reasonable TV task I could throw at it. Starting off with Hauppauge’s own tools, these are pretty archaic. The PVR-350 has been around for some years, but the drives are still reasonably recently updated. Anyway, they worked fine and I could watch TV in the provided tools. But the Hauppauge tools are basic to say the least – not nearly what I want.

Enter GB-PVR, a Windows based PVR (Personal Video Recorder) software that has been around for some years now. I tried it a few years ago and it was then quite buggy and not nearly something you could use in a living room setting (the girlfriend-acceptance-factor). To GB-PVR’s benefit, it has come a long way since I tried it last time (as I recall it, a couple of years back I had to re-install my entire PC after trying out GB-PVR on it…). It worked ok, but hung a few times and is not quite as slick as I would like it to be. Specifically, the xmltv programming features were a bit tricky to get working. And the fact that a private Swedish company has strange connections (sorry, in Swedish) to the product makes me hesitant to use it in a real/live/permanent setting.

Next and final attempt so far is to use Media Portal. Also Windows based, Open Source. It took a few hours to set up everything, but the installation is smooth, even offering on-the-fly download of all the TV channels offered by my cable TV provider (ComHem) – way cool! By the options tried so far Media Portal is by far the best. Ok, it’s running on a much more powerful PC than MythTV was, but considering I that MythTV requires you to be more than a little familiar with Linux to install and especially maintain, that is not an option for most of the people out there. User friendliness is key for the vast majority of people.

All in all, I now have Media Portal running nicely. There are some quirks such as occasional hanging when you view TV in full screen mode, the keyboard shortcuts doesn’t always work at all/as expected, but the automatically updated Program Guide is really, really cool. Many thanks to the people at xmltv for this! If you are interested in xmltv and live in Sweden, I recommend a visit to tv.swedb.se.

The main problem with both Media Portal and GB-PVR has been that TV picture and sound get out of synch or chopped up when you do some other heavier work on the PC, or when Windows for some reason decide it needs to do a lot of swapping or similar. On the positive side both GB-PVR and Media Portal installs just as easily as any other Windows program. Configuring them takes some time, but nothing too bad, and this is expected from any similar application.

As a proof-of-concept that you can watch TV on your PC the work so far has been successful. But I still don’t see it as good enough for deployment into the living room… Will keep looking at options though, some of the options left to explore are:

  • Windows Vista
  • LinuxMCE. Open Source Linux project
  • SageTV. Looks a bit similar as Media Portal. Commercial
  • Beyond TV. Commercial
  • Media Engine. Open Source for limited hardware
  • … probably several more