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 Don't forget the windows 02 - installation week
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: hlipka
  • Date Created: 19 Aug 2014 10:05 PM Date Created
  • Views 433 views
  • Likes 0 likes
  • Comments 1 comment
  • forget_me_not
  • more_intelligent_home
Related
Recommended

Don't forget the windows 02 - installation week

hlipka
hlipka
19 Aug 2014

Having received all the remaining stuff this week (the EOP350 programmer, a second RaspBerry Pi and the TBS1052B-EDU scope) I started installing RaspBerry Pi and OpenHAB.

RasPi installation

Since I work completely headless with my RaspBerry, I needed a Linux version that doesn't need a monitor for initial setup (I could have bought a HDMI-to-DVI adapter cable, but I don't need it in the end). First I did look at the Rasbian server edition, that should have been what I needed. It a<lso comes in a version that only needs a single 1Gb memory card, which would have been nice. But after installation it the RaspBarrey didn't aquire a network address, so I was blocked.

Next I took a larger µSD card (the recommended 8Gb) and installed Raspbian itself on it. This proved to be much more successful. Next steps are for easing the remote access:

  • create a user for openhab itself (and make it member of the 'dialout' group for serial port access)
  • create a SSH keypair (I'm using putty as SSH client)and place the public key into ~/.ssh/authorized_keys2 (don't forget to set the permissions for user-access only, otherwise the SSH server won't accept the file)

openHAB installation

For the openHAB installation there are already several great instructions here in the blog, most helpful for me where the ones from fvan. I installed openHAB designer on my Linux desktop, for now I'm not using it. But I collected some additional notes while doing the installation:

  • since I used the 'systeminfo' binding, I needed to  install the native libraries for Hyperic Sigar. For that, follow the instructions in the openHAB forum
  • I created a service script for openHAB, following the instructions in the openHAB wiki. Don't forget to run the 'update-rc.g openhab defaults' at the end to have it run automatically at boot time
  • to run openHAB on port 80 (as a web server should) without root privileges, I installed the 'authbind' tool ('apt-get install authbind') and changed the start script:
    • use port 80 instead of 8080
    • instead of calling 'java', call 'authbind'. The actual line looks like
      start-stop-daemon --start ...... -exec authbind -- $DAEMON $DAEMON_ARGS || return 2
  • to have authbind really allow the openhab user to use port 80, execute
    • sudo touch /etc/authbind/byport/80
    • sudo chmod 500 /etc/authbind/byport/80
    • sudo chown openhab:openhab /etc/authbind/byport/80
    • sudo touch /etc/authbind/byport/443
    • sudo chmod 500 /etc/authbind/byport/443
    • sudo chown openhab:openhab /etc/authbind/byport/443
  • repeat if needed for other ports (e.g. SNMP)

The configuration of openHAB was OK for the first part, but the persistence configuration was tricky and took a while. I had a small syntax error in my items file (which got parsed by openHAB fine nonetheless). But openHAB refused to write any entries in the Items table, without any error or warning why this might be. In the end I switched over to a generic persistence rule, and several restarts later everything was fine.

Next steps

So I now have a fine setup of openHAB, though I'm tempted to repeat everything from scratch with the second Pi, just to check whether it might work if I stick to the script (many items from the list above were done if random order, so maybe thats why some problems occurred).

While looking at the openHAB documentation, I noticed that there is a REST API available. It also support using long polling and web sockets, so it should be perfect for getting all notifications, without constant polling. In contrast, the iOS and Android apps have a rather long delay in noticing any state changes.

The suggested client library is the Atmosphere framework, for which an Android version is available. So it should not be too complicated.

So for the next week, I will start working on a small prototype involving the REST API. This will a command line application only, so I can concentrate on the actual functionality.

If time permits, I will start writing a review for the scope, which could go in the test and measurements section. Oh, and I need to work on the list of stuff to order from Farnell image

Index

Don't forget the windows 01 - an introduction

  • Sign in to reply
  • fvan
    fvan over 11 years ago

    Thanks for the reference, glad you find my posts helpful!

     

    Frederick

    • 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