openhab / openhabian Goto Github PK
View Code? Open in Web Editor NEWopenHABian - empowering the smart home, for Raspberry Pi and Debian systems
Home Page: https://community.openhab.org/t/13379
License: ISC License
openHABian - empowering the smart home, for Raspberry Pi and Debian systems
Home Page: https://community.openhab.org/t/13379
License: ISC License
Preconfigure connection following https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761
Hi Thom,
I find the menu options in openHABian a bit confusing for new users. I was never sure which open is actually needed to just update openHAB (until looked over the code).
Looking to try and help however I can so happy to do a pull request with my recommended changes for you to review.
Hi again,
(issue following our discussion openHABian hassle-free RPi image yesterday)
Meanwhile I've been looking at the raspbian-ua-netinst links you provided, and I get your point now.
It really would be nice to be able to integrate this wifi connection, certainly for users who don't want to 'look into the PI'. And as proposed to include this opportunity into your "installer-config.txt" file would be a very nice idea !!
A remark though : if users have the choice between an installation with ethernet or wifi, the ethernet should be advised for the higher speed.
So what I basically propose is by default provide the lines necessary in the config file, and at installation to check if the default values have been changed. If not changed, nothing has to be done. If changed, make the installation (described below).
Default, tested and confirmed during my own installations, only these two lines should be needed:
wifi ssid=
wifi password=
More parameters could be provided as described here, but I'm not familiar with the other lines (and hence won't be able to test them).
So, if ssid and /or password blank : no wifi connection to be set up.
If ssid and password provided : make wifi connection.
Now, I'm wondering if it would be easier to include this possibility form raspbian-ua-netinst, or do you think about adding something of your own.
I the last case, the steps involved to make the wifi should be further analyzed.
But basically it comes down to this :
. the connection should (obviously) work before any other download is needed
. like mentioned before, the file to be written to is :
/etc/wpa_supplicant/wpa_supplicant.conf
. at the end of this file write this :
network={
ssid="YOUR_SSID"
psk="YOUR_PASSWORD"
}
. once the file written a reboot should be done (to be confirmed if a reboot is needed)
So, is this description something you could use?
http://rarsoft.com/download.htm
wget http://rarsoft.com/rar/rarlinux-x64-5.4.0.tar.gz
tar -xzvf rarlinux*.tar.gz
(cd rar && make install)
rm rarlinux*.tar.gz
rm -r rar
@kaikreuzer
openHABian has gotten quite mature over the last few months and has a nice userbase that helped test and improve it. I'd like to synchronize the release of "Version 1.0", the introduction of openHABian in docs (with the Big PR) and the transfer to the openhab organization. It would be great to do that before the next big announcement, meaning the openHAB beta 5 build. (Could also wait of course)
openHABian is at a state where I can just declare it as version 1.0, I could also settle a few more Issues, depending on the time I have. The documentation article is at the bare minimum right now, if I have the time, I could enhance it to a full blown description of what openHABian contains and how to use it. Transferring the project to the openhab organization will not be a big deal as GitHub will redirect the old URL.
What are your thoughts?
@BClark09 might also be interested in this, ping ;)
With Debian, you can place the following inside .ssh/config
Host openhab
HostName localhost
User openhab
Port 8101
and then you'd be able to connect to the karaf console without having to remember the port number or specific syntax.
ssh openhab
Since this image is all for simplifying the use and setup of openHAB, would you think this is a good addition to have?
Add one more function which is executed at the end of the initial setup and configures a few details like
adduser openhab dialout
adduser openhab tty
adduser pi dialout
adduser pi tty
Besides, this needs to go inside Homematic function:
adduser pi homegear
Currently there are known performance and serial device (ZWave) issues when 64-bit java is used. On a 64-bit ARM machine we should instead install 32-bit java.
https://community.openhab.org/t/openhabian-hassle-free-rpi-image/13379/400?u=david
In the git update routine:
I know several people(most?) like to set static IP of their pi, so that they dont need to fuzz around in their router settings todo so. This can be achieved by alternating: sudo vi /etc/network/interfaces
# The loopback interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
#your static IP
address 192.168.1.118
#your gateway IP
gateway 192.168.1.1
netmask 255.255.255.0
#your network address "family"
network 192.168.1.0
broadcast 192.168.1.255
I chose Raspbians default username+password to make the start for every user as easy as possible. Changing the password is of course something a user should do and can easily by executing raspi-config
... but yeah. That's something we could promote more, maybe by forcing the user to set a password on first ssh login or first openhabian-config
execution.
What I'v done:
Download openhabian-ua-netinst-20160915-git9e034e7.img
Rip to sd card using dd
Boot it up on a RaspberryPi2, with a monitor plugged in, to see what's happen!
Issue:
The script failed around line 267
The repository was added just fine, but openhab2-offline was not installed
A manual apt install openhab2-offline work fine.
Anybody else experimenting this issue?
Edit: Maybe the repository is not fine after all...
W: Failed to fetch https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/Packages HttpError404
I miss a menu which could handle all password changes for the system.
passwd
I also wonder if it would be easier for the end user if the Samba account (openhab) and local admin (pi) would have the same username, eg. openhab-admin
. Then there could be one "set admin password promt" which changes both passwords.
I'm having trouble with the installer,
https://github.com/openhab/openhabian/blob/master/scripts/etc/init.d/rcS line 412:
rootfs_mkfs_options=${rootfs_mkfs_options:-'-f'}
The -f is causing this error for me: debian-pi/raspbian-ua-netinst#29
mounting /dev/mmcblk0p2 on /rootfs failed: Invalid argument
I'm having trouble building the img after removing the -f, the openhab-build.sh script isn't working for me although I am quite new to compiling so I may be doing something wrong.
SD card comes usually with different sizes of a few bytes, so using an SD copy program don’t allow you to copy the image to another SD card. It might better to not take the always the full available bytes per SD card. An better option might be to take a bit less as available like 7.8 GB or 15.8 GB) … sure a few bytes are lost but you won’t run into issues using an SD image copy program.
Installing Go, first try:
apt install make ruby-dev gcc rpm bison
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source /home/pi/.gvm/scripts/gvm
gvm listall
gvm install go1.4 -B
gvm use go1.4
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.7 #or go1.6 or go1.5 or go1.5.4
Last command fails.
A very powerful log analyzer. Filtering rules for openHAB have to be built.
alias openhablog='tail -n 100 -f /var/log/openhab2/openhab.log -f /var/log/openhab2/events.log'
alias openhablog2='multitail /var/log/openhab2/openhab.log /var/log/openhab2/events.log'
alias openhablog3='multitail /var/log/openhab2/openhab.log -ci yellow -I /var/log/openhab2/events.log'
Thirst of all thanks for the great work on openHABian! It is so easy to set up an raspberry pi with openHAB now :)
The main reason I use a raspberry is the GPIO board to connect to the real world ;) but the GPIO binding does not work on openHAB. I tried to find a solution and was spending a few days with this. The workarounds found did not work for me:
Using a piB+ v1 is generating many messages about ignoring dependencies.
V 0.9
Hello there,
Since there are some ongoing development efforts on Audio add-ons for openHAB2, it would be a good opportunity to enable audio by default.
When I've set up latest openHABian on my Raspberry PI3, I observed that there were no audio devices enabled. I tested it with aplay -l
.
What I did was modifying /boot/config.txt
by adding the following line:
dtparam=audio=on
Now my audio works flawlessly :)
Wouldn't it be good to have some Advanced Option available that would setup audio in RPi?
I don't know if the solution above applies to RPi2.
Cheers
Enhance the openhab log tail with coloring. can be done with tools like grc or ccze. Needs further investigation.
Hi Thomas!
Great work with openHABian, I've tried it with a spare Raspberry Pi 3 that was lying around and everything went perfect! Awesome!
But one thing that I missed (and that it is preinstalled on Raspbian) is to be able to get the Raspberry Pi's IP address without connecting a monitor to it, just using avahi-discover. For that, you only need to install the package "avahi-daemon" to the distribution and then any device on the network can get the its IP address through avahi-discover. Even more, if the Raspberry Pi has the avahi-daemon installed, you can establish an SSH connection just typing "ssh [email protected]". I know that the package can be installed after the first ssh connection with "sudo apt install avahi-daemon", but IMHO it's worth adding it to the distribution.
Many thanks again for all your hard work and best regards,
Aitor
After apt-get update, upgrade (upgrade has chrashed before finishing...) I get the error message: sudo: unable to open /var/lib/sudo/ts/pi: Read-only file system
Is threre any fix for that? (install from 4 days ago)
Thank you,
Lajos
Good morning Thomas!
Would it be possible to add the openhab user to the dialout group after openHAB is successfully installed?
Bindings that depend on USB controllers (ZWave, Enocean, RXFcom,...) need access to the USB devices (/dev/ttyUSB0, /dev/ttyACM0,...), so automatically adding the openhab user to the dialout group will avoid users to ssh the device just to type "sudo usermod openhab -a -G dialout".
Small detail that will make openhab users life easier ;)
Thank you for your patience!
Color this part: "[openHABian] ... OK"
https://community.openhab.org/t/authentication-in-oh2/1723/28
probably via nginx revproxy
As I understand in openhab/openhab-linuxpkg#2 the package directory will change to bintray, just as the beta builds are. We need to be prepared for this change so that it can be quickly reflected in openHABian.
openHABian is equiped with a nice vimrc file making the vim editor more useful.
Despite the fact that vim is superior to nano (pun intended), I can see how some prefer to use nano. If someone wants to contribute a nano configuration, do not hold back.
When running the setup on something other than a RasberryPi, the raspi-config should not be executed.
Is the ability to have openHAB or another part of your system send mails needed?
Is it possible to add the required settings for serial Modules (accessing /dev/ttyAMA0 is not possible, because the console or Bluetooth module is attached to it)
Then the abnorm serial port needs to be defined in the setenv file. (ttyUSB* could be automatically detected, but once using ttyAMA0, you need to specify all used ports.)
This might be difficult, because there is a different approach on the RPi3 because it has the Bluetooth module.
When using zwave and enocean (one of them connected to USB, one connected to the GPIO Pins)
-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0:/dev/ttyUSB*
I was wondering if it was possible to add the component: https://github.com/mthenw/frontail to the build, its a very nice light weight application for streaming logs to the browser. It's a tail -F with UI.
It makes keeping a log window open nice and easy and i dont need two SSH sessions open.
I'm not sure if the built in hardware watchdog of the pi is enabled (default = off), e.g. when openHAB isn't responding any more or something else gets instable.
If not already done, you should think about enabling the hw wd.
(etckeeper is installed to protect against accidental deletion of files. (Check if period needs to be increased))
A real backup-to-external strategy is needed as SD cards are known to crash at some point.
Integrate DMX setup to Openhabian
introtext="This will install and setup DMX binding on your RPI , this binding uses the Open Ligthning Project(http://opendmx.net/index.php/) to communicate between OH and the physically USB DMX dongle (example url)
failtext="Sadly there was a problem setting up the selected option. Please report this problem in the openHAB community forum or as a openHABian GitHub issue."
successtext="Setup was successful."
Opem lightning Architecture is an opensource prototcol to communicate with several lightfixture over for an example the DMX protocol. To install OLA on RPI its a bit tricky because we need to compile the code from source code:
sudo apt-get --assume-yes install bison
sudo apt-get --assume-yes install flex
sudo apt-get --assume-yes install uuid
sudo apt-get --assume-yes install uuid-dev
sudo apt-get --assume-yes install cppunit
sudo apt-get --assume-yes install protobuf-compiler
sudo apt-get --assume-yes install python-protobuf
sudo apt-get --assume-yes install libprotobuf-dev
sudo apt-get --assume-yes install libprotoc-dev
sudo apt-get --assume-yes install protobuf-compiler
sudo apt-get --assume-yes install libcppunit-dev
sudo apt-get --assume-yes install libcppunit-1.13-0
sudo apt-get --assume-yes install pkg-config
sudo apt-get --assume-yes install libncurses5-dev
sudo apt-get --assume-yes install libtool
sudo apt-get --assume-yes install libmicrohttpd-dev
sudo apt-get --assume-yes install python-numpy
sudo apt-get --assume-yes install libmicrohttpd10
sudo apt-get --assume-yes install libavahi-client-dev
sudo apt-get --assume-yes install zlib1g-dev
sudo apt-get --assume-yes install libftdi-dev
sudo apt-get --assume-yes install libftdi1
sudo apt-get --assume-yes install libusb-1.0-0-dev
sudo apt-get --assume-yes install autoconf
sudo apt-get --assume-yes install g++
sudo apt-get --assume-yes install make
Already installled (please double check this!)
sudo apt-get --assume-yes install automake
sudo apt-get --assume-yes install libprotobuf-lite8 (Works without)
sudo apt-get --assume-yes install liblo-dev(Works without)
run this tool
sudo libtoolize
Grab OLA
cd /bin
sudo git clone https://github.com/OpenLightingProject/ola.git
cd /bin/ola
Install it
sudo git pull #just if you wait to continue
sudo autoreconf -i
sudo ./configure --enable-rdm-tests
sudo make
sudo make check
sudo make install
sudo ldconfig
Time to test it:
start OLA
olad -l 3
To enable to run as a service we need to make a service script:
sudo nano /usr/lib/systemd/system/olad.service
OLAD service file:
# based on examples found at
# https://learn.adafruit.com/running-programs-automatically-on-your-tiny-computer/systemd-writing-and-enabling-a-service
# https://medium.com/@johannes_gehrs/getting-started-with-systemd-on-debian-jessie-e024758ca63d
# https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
# https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Before=
# https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Wants=
# copy to target with:
# sudo cp olad.service /etc/systemd/system/
# enable service
# sudo systemctl enable olad.service
# start
# sudo systemctl start olad.service
# check status
# sudo systemctl status olad.service
# disable service
# sudo systemctl disable olad.service
# remove service file:
# sudo rm /etc/systemd/system/olad.service
[Unit]
Description=OLAD Open Lighting Architecture daemon
# wants would mean if this unit is started it also starts the wanted unit.
# we don't need this because device_manager itself starts this unit explicitly if its time.
# Wants=device_manager.service
# After means that this unit only starts if the listed unit is started
After=network.target
[Service]
# Type=simple is default
Type=simple
# run as user
User=pi
# commandline
ExecStart=/bin/ola/olad/olad -l 3
# redirect standard output to
StandardOutput=null
# if process exits (with fail or success) restart it.
Restart=always
[Install]
# start with system.
WantedBy=multi-user.target
Alias=olad.service
OLA can communicate over artnet, usb dongles etc..
When using USB devices it is recommended to give it synannyms and you need to make sure that openhab has the correct rights to communicate with it, example todo so is given below:
Edit sudo nano /etc/udev/rules.d/30-ftdidmx.rules
Add the following rule:
ACTION=="add", BUS=="usb", SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", GROUP:="dialout", MODE:="0660"
to meet your usb dongle requirements.
Integration into openHAB 2 is described here: https://github.com/openhab/openhab/wiki/DMX-Binding
Regarding: https://github.com/ThomDietrich/openhabian/blob/master/openhabian-setup.sh#L369-L373
After merge: openhab/openhab-distro#318
Replace karaf settings path:
runtime/karaf/etc
-> userdata/etc
For compatibility: Act on both
Tried to install the distro according to readme.
Got hit by a lot of these errors:
dpkg: regarding .../dpkg_1.17.27_armhf.deb containing dpkg, pre-dependency problem:
dpkg pre-depends on libbz2-1.0
libbz2-1.0 is not installed.
I think its best to look at the raw log for precise information.
Hardware: RaspberryPi 2, 16gb sd-card.
The additions based on #18 are great but not fully working for me using Razberry.
i still needed to add manually to /usr/share/openhab2/runtime/karaf/bin/setenv
the port definition, e.q. -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0
so that openhab2 recognizes the port.
i have seen many people struggle with that in the community so why not just enhance openhabian to provide that setting right away or via a setting to configure it.
During first boot installation the setup script is called with the argument unattended
. An additional debug
or verbose
should unset the SILENT flag. This might be helpful for debugging installation problems like #51
steps clear.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.