I just received the first PCB prototype for the “Room Node”. Since this is the first version i’m counting on being forced to revise the layout multiple times before get satisfied with the result.
The heart of the Room Node is a Atmel Atmega328 microprocessor which is connected to the RS485 Home Automation bus and working in a slave mode with a Linux server as master.

I call it the “Room Node” since the idea is to have one of these in each room to be able to monitor:
- Temperature (with Maxim 1-wire DS18B20)
- Ambient Light (with a simple photocell)
- Movement / Motion (with an external IR/Microwave motion detector)
I am also planning for a number of “User Interaction” possibilities:
- LED Indicator (To indicate status / alarm state)
- Buzzer (as a complement to the LED)
- Temperature control (a linear rotary potentiometer)
Comments Off
I take a lot of photos, but I don’t seem to take the time to do anything with them… sadly enough.
Anyway, here’s a couple that i stumbled upon today.
Comments Off
Jag blev just färdig med renoveringen av sovrummet i sommarstugan.
Efter att ha målat tak och fönster samt tapetserat om och lagt in nytt golv så blev det en ganska radikal skillnad.

Sovrum - Sommarstuga - Före Renovering

Sovrum - Sommarstuga - Efter Renovering
Nu är det bara resten av stugan kvar :)
Comments Off
Jag har länge velat kontrollera bland annat mina fönsterlampor från datorn och på så vis kunna fjärrstyra dessa mottagare från när och fjärran.
Jag har sedan tidigare ett antal billiga PROOVE mottagare (samt några dyrare NEXA mottagare) monterade för alla fönsterlampor i huset, så det hela handlade om att komplettera med en sändare som kunde kopplas till datorn.
När jag initialt började fundera på detta så hittade jag lite grundläggande information angående NEXA-protokollets uppbyggnad, men jag kom aldrig till skott att bygga en lösning för det hela. En tid senare så hittade jag en produkt från telldus.se som heter tellstick, denna produkt stöder flertalet protokoll däribland NEXA/PROOVE. Efter att jag hade sett denna produkt började jag bygga på en prototyplösning för att kunna kontrollera dessa mottagare via RS232 porten på min Linux server.

Prototyp av RS232 baserad Nexa sändare
Efter att ha byggt en proof-of-concept lösning på en labbplatta så snickrade jag snabbt ihop en “prototyp” på ett labb-kort. Konstruktionen bygger på en MAX232CPE interfacekrets kopplad till en Atmel ATtiny2313 mikrokontroller som i sin tur skickar styrdata med hjälp av en 433MHz sändarmodul med ASK modulering.
Comments Off
This is a simple bash script that establish a reverse SSH tunnel. It also re-establish the tunnel if for some reason is torn down.
The idea is to run the script as a cron-job periodically, say once every five minutes. The script will then check if the tunnel is up and if not, re-establish the tunnel.
This is very handy if you for some reason need to gain access to a remote linux server which is behind a NAT that you don’t control. It also means that you don’t need to care about dynamic DNS’s and such if the remote network changes IP frequently.
#!/bin/sh
# $REMOTE_HOST is the name of the remote system
REMOTE_HOST=my.home.system
# $REMOTE_PORT is the remote port number that will be used to tunnel
# back to this system
REMOTE_PORT=5000
# $COMMAND is the command used to create the reverse ssh tunnel
COMMAND="ssh -q -N -R $REMOTE_PORT:localhost:22 $REMOTE_HOST"
# Is the tunnel up? Perform two tests:
# 1. Check for relevant process ($COMMAND)
pgrep -f -x "$COMMAND" > /dev/null 2>&1 || $COMMAND
# 2. Test tunnel by looking at "netstat" output on $REMOTE_HOST
ssh $REMOTE_HOST netstat -an | egrep "tcp.*:$REMOTE_PORT.*LISTEN" \
> /dev/null 2>&1
if [ $? -ne 0 ] ; then
pkill -f -x "$COMMAND"
$COMMAND
fi
Once the tunnel is established it’s easy to connect back to the remote server by simply establishing a SSH connection against the “Remote Port” specified in the script. e.g. ssh -p 5000 localhost
The bash script was originally found on the following site: http://www.brandonhutchinson.com/ssh_tunnelling.html
Comments Off
Här kommer lite bröllopsbilder på Herr & Fru Johansson från deras bröllop den 25e Augusti.

Ambika & Dan 1

Ambika & Dan 2

Ambika & Dan 3

Ambika & Dan 4

Ambika & Dan 5

Ambika & Dan 6

Ambika & Dan 7

Ambika & Dan 8

Ambika & Dan 9

Ambika & Dan 10
Comments Off