Posts tagged ‘script’

At my parents place, we installed photovoltaic cells. The produced electricity is converted to AC power and is coupled with the normal grid: if we produce too little, the grid provides the remaining power; overproduction is given to the grid.

The inverter (the device that converts DC into AC) is a SolarMax C-series. It has a 2-line LCD display that gives out some basic information: current, voltage, power; produced energy today, this month, this year, … This is very useful information, but is a bit hard to access. The instruction manual reveals that there is a computer interface available to read out its data. Naturally, I wanted to explore this!

Continue reading ‘SolarMax MaxTalk protocol reverse engineered’ »

I just found a very nice post describing nice things to do with Bluetooth. By using the Proximity tool, my MacBook Pro can monitor the precense of my cell phone. Proximity will run an AppleScript when a selected device enters and/or leaves Bluetooth range. Most  phones are class 2 Bluetooth devices, which gives a range of 10m (outdoors). This allows you to automatically lock your desktop when you leave and unlock when you come back.

Continue reading ‘Useful things to do with Bluetooth’ »

Our weather station has a serial connection and comes with Windows-software to view the weather data on your PC. The app is very eye-candy, but doesn’t do anything more than displaying the data. I’m more interested in long-term trending. So I wrote my own application to talk to the weather station and store the result in an rrdtool database.

Continue reading ‘Reverse engineering the Oregon WMR928NX weather station’ »

I think I can skip the buildup on why backups are important and I’ll focus this post on the “how”. There are a lot of ways to make backups. Obviously some are better than others; in this post I’ll just explain how I do my backups.

The script I use was designed with the following items in mind:

  • The storage medium is a hard drive. This has some advantages like random-access which can be used.
  • Storage capacity should be as small as possible; differential and/or incremental backups are almost unavoidable in this.
  • The backups should be pulled from the server. This way you know when a server is behaving strangely. If you push your backups and the server has a bad day, he won’t tell you that he forgot his backups!
  • Since the backup contains sensitive data (eg SSL private keys, /etc/shadow), the network transfer should be encrypted.
  • The backup needs to be taken as root. This is the only way to ensure that all files could be read. (Yes, technically you could use specific capabilities instead of root)

Continue reading ‘Backup script – incremental snapshots’ »