This how to has been for the installation of v0.8. A revised version for v0.9 will come soon.
This forum will explain things about Pimatic. I will try to explain things as good and clear as I can.
I will add more steps and device configs from time to time. This forum is write disabled to stay clearly arranged. If you have questions, wishes or improvements please use this threat here :
http://forum.pimatic.org/topic/194/howto-pimatic-discussion-threat.
For more advanced users there’s also the possibility to install the linux filesystem on a USB HDD (NO USB STICK!!!), have a look here howto prepare your SD-Card
Now I would say let’s begin with setting up Pimatic from scratch :
You can either check the instructions on the Pimatic website http://www.pimatic.org/guide/getting-started/ or follow these steps.
Text in black background and white letters
are linux commands that you can copy here and paste!
If you are using a Raspberry Pi, get the latest Raspian image from here : http://downloads.raspberrypi.org/raspbian_latest
Then write this image with this tool Win32DiskImager to your SD-Card.
Boot your Pi and login via ssh (eg. Putty) with user pi and password raspberry.
Now set up your Pi with sudo raspi-config
and expand your filesystem.
The actual distribution is called “Jessie” and comes with a slightly different boot process then the predecessor “Wheezy”. Jessie is booting to the GUI when installed from scratch.
For a Pimatic only system you should change the boot options.Thie following option will prevent from booting the system to the GUI.
Now you should do a reboot. After that you can set your local settings and maybe other stuff with raspi-config.
Do not overclock your Raspberry, since onverclocking may crash the system when Pimatic is running!!
Now do the usual updates with
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
You’re ready to install Pimatic Go ahead with the following 19 steps :
1.) wget http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-arm-pi.tar.gz -P /tmp
2.) cd /usr/local
3.) sudo tar xzvf /tmp/node-v0.10.24-linux-arm-pi.tar.gz --strip=1
4.) sudo apt-get install build-essential
5.) mkdir /home/pi/pimatic-app
6.) cd /home/pi/
7.) sudo npm install pimatic --prefix pimatic-app --production
8.) cd pimatic-app
9.) sudo cp node_modules/pimatic/config_default.json config.json
10.) sudo nano /home/pi/pimatic-app/config.json
(very important :insert admin password!!! otherwise pimatic won’t start and comes up with an error message)
11.) sudo chmod 777 /home/pi/pimatic-app/
12.) sudo reboot
13.) cd ./pimatic-app/node_modules/pimatic
14.) sudo npm link
15.) wget https://raw.github.com/pimatic/pimatic/master/install/pimatic-init-d
16.) sudo cp pimatic-init-d /etc/init.d/pimatic
17.) sudo chmod +x /etc/init.d/pimatic
18.) sudo chown root:root /etc/init.d/pimatic
19.) sudo update-rc.d pimatic defaults
Now you are ready to start pimatic for the first time!
There are three ways to start pimatic generally.
- Automatically at system start (since we daemonized Pimatic with the entries in init-d)
- With the command
sudo service pimatic start
(will run Pimatic as daemon / service in the background) - With the command
sudo pimatic.js
(can be executed everywhere, since we globalized it)
For the first start i recommend to use option 3 since Pimatic will do some compiling and setting up things. this may take a while, so you are able to watch the debug outputs on the console screen and see what Pimatic is doing actually.
If you run sudo “service pimatic start” you won’t get any debug messages since Pimatic will run in the background.
When Pimatic is through with all the setup stuff, you will see a message like that :
Now you can access the Pimatic gui via browser by entering the IP of your pi and go ahead with the further setup = > Step 2 - GUI overview.