This repository is for my home automation by using Raspberry Pi and Arduino.
The automated gardening is working now.
Another function does not work yet.
- Gardening monitoring
- Written on Qiita site in Japanese.
- Solar power monitoring
- Under implementing.
- documents
- Overview, Schematics, etc.
- nodes
- C/C++ source code working on Arduino.
- All node will have Arduino and XBee.
- server
- Python source code working on Raspberry Pi.
- Raspberry Pi will work as server to gather the all information sent by all node.
-
Raspberry Pi as XBee cordinator
-
Locate 'setting.conf' with below values.
$ cat /etc/home-automation/setting.conf [rpiuartreceiver] port = /dev/ttyAMA0 baurate = 9600 [vegetablesplantermonitor] address = 0x0013a20040b44f84 xively_api_key = xxx xively_feed = yyy
-
Run the blew commands.
$ git clone https://github.com/dodo5522/home-automation $ cd ./home-automation $ ./setup.sh $ sudo /etc/init.d/home-automation start
-
-
Arduino with XBee router
-
Use Arduino IDE 1.5.8 or later.
-
Add c++11 flag on Arduino toolchain setting files. You can find the file like below.
$ find /Applications/Arduino.app -name platform.txt /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/platform.txt /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/sam/platform.txt
-
Add flag setting onto both of the above setting file.
--- origin.txt 2014-11-03 01:01:18.000000000 +0900 +++ modify.txt 2014-11-03 01:01:03.000000000 +0900 @@ -17,7 +17,7 @@ compiler.c.elf.flags=-Os -Wl,--gc-sections compiler.S.flags=-c -g -x assembler-with-cpp compiler.cpp.cmd=arm-none-eabi-g++ -compiler.cpp.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf +compiler.cpp.flags=-std=gnu++11 -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf compiler.ar.cmd=arm-none-eabi-ar compiler.ar.flags=rcs compiler.objcopy.cmd=arm-none-eabi-objcopy
-
Build and program Arduino with gardening or powerplant library.
-