Post by barfsurfer on Dec 31, 2014 19:31:22 GMT
The original post was definitely my inspiration to get into Home Automation. I have zero experience with all this stuff, so it has been quite a journey for me (and still not complete). I ran into many small hiccups along the way, so I figured I'd post my journey here to help others as they attempt to get this stuff working.
First off, here's what I initially bought:
Stuff I bought:
CanaKit Raspberry Pi B+ Ultimate Starter Kit
SainSmart 20 Sensor Module Starter Kit
Arduino Ethernet Shield Network Expansion Board
Arduino Prototype Shield w/ Mini Breadboard
Arduino Uno R3 Clone w/ 3.3V Selectable Power
RFM69HW 433Mhz +20dBm HopeRF Wireless Transceiver
I am using a Macbook Air with Yosemite as my only computer.
Raspberry Pi Setup - Pretty straightforward to install Raspbian. Followed instructions to do SSH and VNC server too. Struggled a bit with VNC server, trick was that in addition to the IP address you want to connect to, you need to add the port. So it's xxx.xxx.xxx.xxx:5901 for example.
My initial attempt to install openHab and get it running on the Pi was unsucessful. Couldn't launch the server.
Installed openHAB via github.com/openhab/openhab/wiki/Linux---OS-X, that was pretty easy. Struggled to find the configuration file, it's located in /etc/openhab/configurations
Started server, seems to be working, but browser doesn't connect. Using http://localhost:8080/openhab.app?sitemap=yourname but it doesn't work. Created post on google group to try and troubleshoot.
Guy suggested looking at log file. Located directory /var/log/openhab but contents are empty.
Success! Initial install instructions were crap. Instead I just downloaded the install files, created my own install directory and now it's running!
192.168.2.10:8080/openhab.app?sitemap=demo
Struggled a bit on getting the designer app up and running. Initially tried on the pi but learned this app is too fat for the pi. So I downloaded the mac installer, but it wouldn't run - just a splash screen. Found solution on the google group -
Add the following line
-Djava.awt.headless=true
to the file /Applications/openHAB Designer.app/Contents/MacOS/openHAB-Designer.ini
Which resolved.
In general, it seems most of the Arduino sketches require additional libraries to be able to compile. For example, the ethernet gateway sketch - Looking for library pubsub. Found something on Github - github.com/knolleary/pubsubclient and installed that into Arduino libraries, but still can't compile to the Arduino.
Wrote to the tutorial author about this, he suggested I rename library directory and remove the version number (this is what it named by default when I downloaded from github). This worked! Programmed Ethernet gateway.
Mosquitto - hello world example: michaelconnors.net/article/462/hello-mqtt This helped me confirm and test I had installed Mosquitto on the Pi
Wireless gateway - needed a library for the wireless transceiver. Downloaded that from Github, added the library, and was able to compile the sketch.
Wired up Wireless Gateway and RF modules per instructions. Got the sketch onto the board, and it's properly listening!
Had trouble with basic sensor sketch for distance sensor / Garage door opener. Although the author states it will work w/o the temp / humidity sensors and such, I kept getting compile errors which seemed to be related to these bits of the code. I started commenting out anything that related to anything other than the distance sensor, and eventually got the sketch to compile and running on the board.
Success! For a little while at least. The distance sensor was successfully broadcasting at 933MHz and showing distance measurements - at least for a few minutes. While that was going on I was trying to set up the receiver to confirm it was indeed receiving the distance measurements. At some point, things went badly though and the serial monitor just went blank on the distance sensor node. Tried resetting, re-sending the sketch, etc., but it's just showing nothing. So I guess something failed, but not sure what.
That's my next step - trying to figure out what went wrong on the distance sensor node. I'll keep updating this thread as I continue.
First off, here's what I initially bought:
Stuff I bought:
CanaKit Raspberry Pi B+ Ultimate Starter Kit
SainSmart 20 Sensor Module Starter Kit
Arduino Ethernet Shield Network Expansion Board
Arduino Prototype Shield w/ Mini Breadboard
Arduino Uno R3 Clone w/ 3.3V Selectable Power
RFM69HW 433Mhz +20dBm HopeRF Wireless Transceiver
I am using a Macbook Air with Yosemite as my only computer.
Raspberry Pi Setup - Pretty straightforward to install Raspbian. Followed instructions to do SSH and VNC server too. Struggled a bit with VNC server, trick was that in addition to the IP address you want to connect to, you need to add the port. So it's xxx.xxx.xxx.xxx:5901 for example.
My initial attempt to install openHab and get it running on the Pi was unsucessful. Couldn't launch the server.
Installed openHAB via github.com/openhab/openhab/wiki/Linux---OS-X, that was pretty easy. Struggled to find the configuration file, it's located in /etc/openhab/configurations
Started server, seems to be working, but browser doesn't connect. Using http://localhost:8080/openhab.app?sitemap=yourname but it doesn't work. Created post on google group to try and troubleshoot.
Guy suggested looking at log file. Located directory /var/log/openhab but contents are empty.
Success! Initial install instructions were crap. Instead I just downloaded the install files, created my own install directory and now it's running!
192.168.2.10:8080/openhab.app?sitemap=demo
Struggled a bit on getting the designer app up and running. Initially tried on the pi but learned this app is too fat for the pi. So I downloaded the mac installer, but it wouldn't run - just a splash screen. Found solution on the google group -
Add the following line
-Djava.awt.headless=true
to the file /Applications/openHAB Designer.app/Contents/MacOS/openHAB-Designer.ini
Which resolved.
In general, it seems most of the Arduino sketches require additional libraries to be able to compile. For example, the ethernet gateway sketch - Looking for library pubsub. Found something on Github - github.com/knolleary/pubsubclient and installed that into Arduino libraries, but still can't compile to the Arduino.
Wrote to the tutorial author about this, he suggested I rename library directory and remove the version number (this is what it named by default when I downloaded from github). This worked! Programmed Ethernet gateway.
Mosquitto - hello world example: michaelconnors.net/article/462/hello-mqtt This helped me confirm and test I had installed Mosquitto on the Pi
Wireless gateway - needed a library for the wireless transceiver. Downloaded that from Github, added the library, and was able to compile the sketch.
Wired up Wireless Gateway and RF modules per instructions. Got the sketch onto the board, and it's properly listening!
Had trouble with basic sensor sketch for distance sensor / Garage door opener. Although the author states it will work w/o the temp / humidity sensors and such, I kept getting compile errors which seemed to be related to these bits of the code. I started commenting out anything that related to anything other than the distance sensor, and eventually got the sketch to compile and running on the board.
Success! For a little while at least. The distance sensor was successfully broadcasting at 933MHz and showing distance measurements - at least for a few minutes. While that was going on I was trying to set up the receiver to confirm it was indeed receiving the distance measurements. At some point, things went badly though and the serial monitor just went blank on the distance sensor node. Tried resetting, re-sending the sketch, etc., but it's just showing nothing. So I guess something failed, but not sure what.
That's my next step - trying to figure out what went wrong on the distance sensor node. I'll keep updating this thread as I continue.