element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Forget Me Not Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Forget Me Not Design Challenge
  • More
  • Cancel
Forget Me Not Design Challenge
Blog Pas Home / Week 1 Result, products and softwares learning
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: verrverr
  • Date Created: 11 Aug 2014 3:21 AM Date Created
  • Views 807 views
  • Likes 0 likes
  • Comments 1 comment
  • forget_me_not
  • pas_home
Related
Recommended

Pas Home / Week 1 Result, products and softwares learning

verrverr
verrverr
11 Aug 2014

Pas Home - Index

 

This week, like many, I made a little prototype with openHAB and sensors. Here's my recipe and a video

 

Cette semaine comme beaucoup, j'ai fait un petit proto avec openHAB et les capteurs. Voici ma recette et une video

 

imageimageimage

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Here is my installation procedure on my two raspberrypi

Voici ma procédure d'installation sur mes deux raspberrypi

 

For my first raspberrypi with owfs and node.js

Pour mon premier raspberrypi avec OWFS et node.js

# Step 1 Prepare
- Download RASPBIAN Debian Wheezy
  http://www.raspberrypi.org/downloads/
- Format SD Card with SDFormatter.exe
  https://www.sdcard.org/downloads/formatter_4/eula_windows/
- Write Raspbian with win32diskimager-v0.9-binary
  http://sourceforge.net/projects/win32diskimager/
- Boot raspberrypi and configure setting
  timezone, password, keyboard and internet
- Update raspberrypi
  sudo apt-get update
  sudo apt-get upgrade
  sudo reboot
- Activation de l’I2C (http://innovelectronique.fr/2013/03/02/utilisation-du-bus-i2c-sur-raspberrypi/)
  # Replace 'blacklist i2c-bcm2708' with '#blacklist i2c-bcm2708' in /etc/modprobe.d/raspi-blacklist.conf
  sudo sed -i 's/blacklist i2c-bcm2708/#blacklist i2c-bcm2708/g' /etc/modprobe.d/raspi-blacklist.conf
  # Add 'i2c-dev' in /etc/modules
  sudo sed -i '$ a\i2c-dev' /etc/modules
  sudo reboot
  # Test i2c
  # dmesg | grep i2c
  # ls /dev/i2c*


# Step 2 Install OWFS (http://www.gaggl.com/2013/01/accessing-1-wire-devices-on-raspberry-pi-using-owfs/)
  sudo apt-get install owfs ow-shell
  # Change config
  # Remove fake device
  sudo sed -i 's/server: FAKE/#server: FAKE/g' /etc/owfs.conf
  # Add i2c device
  sudo sed -i '$ a\--i2c=ALL:ALL' /etc/owfs.conf
  # Allow access from a remote device
  sudo sed -i 's/server: port = localhost:4304/server: port = 4304/g' /etc/owfs.conf
  # Restart service
  sudo /etc/init.d/owserver restart
  sudo /etc/init.d/owhttpd restart
  sudo /etc/init.d/owftpd restart

# Step 3 Install nodejs (http://joshondesign.com/2013/10/23/noderpi)
  cd ~
  wget http://nodejs.org/dist/v0.10.28/node-v0.10.28-linux-arm-pi.tar.gz
  tar -xvzf node-v0.10.28-linux-arm-pi.tar.gz
  echo NODE_JS_HOME=/home/pi/node-v0.10.28-linux-arm-pi >> /home/pi/.bash_profile
  sudo sed -i '$ a\PATH=$PATH:$NODE_JS_HOME/bin' /home/pi/.bash_profile
  # reboot or logout login user for bash_profile reload
  sudo reboot
  # Test
  # node --version

# Step 4 Install small web app for led control usint http call from openhab
  # Copier le zip pascalhome_ledcontrol.zip dans /home/pi/pascalhome_ledcontrol.zip
  cd ~
  sudo /home/pi/pascalhome_ledcontrol.zip
  cd /home/pi/ledcontrol
  npm install
  sudo /home/pi/node-v0.10.28-linux-arm-pi/bin/node app.js
  # Test led
  # http://192.168.0.194:3000/ledcontrol?status=ON
  # http://192.168.0.194:3000/ledcontrol?status=OFF

 

For my second raspberrypi with OpenHAB

Pour mon second raspberrypi avec OpenHAB

# Step 1 Prepare
- Download RASPBIAN Debian Wheezy
  http://www.raspberrypi.org/downloads/
- Format SD Card with SDFormatter.exe
  https://www.sdcard.org/downloads/formatter_4/eula_windows/
- Write Raspbian with win32diskimager-v0.9-binary
  http://sourceforge.net/projects/win32diskimager/
- Boot raspberrypi and configure setting
  timezone, password, keyboard and internet
- Update raspberrypi
  sudo apt-get update
  sudo apt-get upgrade
  sudo reboot
- Make EnOceanPi Ready
  #Download and extract rpi-serial-console script
  sudo wget https://raw.github.com/lurch/rpi-serial-console/master/rpi-serial-console -O /usr/bin/rpi-serial-console && sudo chmod +x /usr/bin/rpi-serial-console  
  sudo rpi-serial-console disable
  sudo reboot
- For gpio addon work ()
  sudo apt-get install libjna-java


# Step 2 Install OpenHab and my demo app
- Install openHAB Core
  sudo wget https://github.com/openhab/openhab/releases/download/v1.5.0/distribution-1.5.0-runtime.zip -O /home/pi/distribution-1.5.0-runtime.zip
  sudo mkdir /opt/openhab
  cd /opt/openhab/
  sudo unzip /home/pi/distribution-1.5.0-runtime.zip
- Installing my demo openHab config
  # Transferer le zip pascalhome_openhab_proto1.zip dans /home/pi/pascalhome_openhab_proto1.zip
  sudo unzip /home/pi/pascalhome_openhab_proto1.zip

- Change openHAB start.sh
  # for encoean append -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0  right after java
  sudo sed -i 's/java /java -Dgnu.io.rxtx.SerialPorts=\/dev\/ttyAMA0 /g' /opt/openhab/start.sh
  # for gpio addon "start.sh" and append -Djna.boot.library.path=/usr/lib/jni right after java
  sudo sed -i 's/java /java -Djna.boot.library.path=\/usr\/lib\/jni /g' /opt/openhab/start.sh

- Start openHAB
  sudo chmod +x start.sh
  sudo ./start.sh

  # Test openhab
  # http://192.168.0.192:8080/openhab.app?sitemap=demo

  #Troubleshooting with gpio after restart openhab
  #If the message Device or resource busy is printed unexport your gpio with next command
  echo 21 > /sys/class/gpio/unexport
  echo 20 > /sys/class/gpio/unexport
  #https://sites.google.com/site/semilleroadt/raspberry-pi-tutorials/gpio

Attachments:
pascalhome_ledcontrol.zip
pascalhome_openhab_proto1.zip
  • Sign in to reply
  • verrverr
    verrverr over 11 years ago

    Sorry for the quality of images and video, my lens was dirty.

     

    Désolé pour la qualité des images et de la vidéo, ma lentille étais sale.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube