1. Backup Z-Wave Stick
Use ZStick_G5
2. Backup Rpi
Use Win32DiskImager
Use ZStick_G5
2. Backup Rpi
Use Win32DiskImager
Install Mosquitto
sudo apt-get install mosquitto mosquitto-clients python-mosquitto
Configuration File location
/etc/mosquitto
mosquitto.conf File contents
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
connection_messages true
log_type all
log_dest file /var/log/mosquitto/mosquitto.log
log_dest syslog
include_dir /etc/mosquitto/conf.d
Create /var/log/mosquitto/mosquitto_log.sh
#!/bin/bash
Change permissions chmod 777
mosquitto_log.sh
Add to start script
Add to /etc/rc.local
#Start MQTT Logging
/var/log/mosquitto/msquitto_log.sh &
pi
with the password raspberry
. sudo apt-get install openhab-addon-persistence-rrd4j
sudo apt-get install openhab-addon-persistence-logging
sudo apt-get install openhab-addon-persistence-exec
sudo apt-get install openhab-addon-binding-z-wave
sudo apt-get install openhab-addon-binding-mqtt
sudo apt-get install openhab-addon-binding-http
sudo apt-get install openhab-addon-binding-ntp
sudo apt-get install openhab-addon-binding-weather
Change time zone to Berlin
sudo dpkg-reconfigure tzdata
sudo systemctl daemon-reload
sudo systemctl enable openhab
4. Install HABMIN (use updated path to OH above)
cd /usr/share/openhab
sudo wget https://github.com/cdjackson/HABmin/releases/download/0.1.3-snapshot/habmin.zip
sudo unzip habmin.zip
sudo rm habmin.zip
sudo rm addons/org.openhab.binding.zwave-1.5.0-SNAPSHOT.jar
HABMIN Path:
http://raspberry_IP:8080/habmin/
5. Configure SMB to access configuration and log files
http://raspberrypihq.com/how-to-share-a-folder-with-a-windows-computer-from-a-raspberry-pi/
sudo nano /etc/samba/smb.conf - append at the end
[OpenHAB]
comment=OpenHAB Folder share
path= /usr/share/openhab
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
[Openhab_Configuration]
comment=OpenHAB Config
path= /etc/openhab
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
[Openhab_Logs]
comment=OpenHAB Logs
path= /var/log/openhab
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
[Mosquitto_Logs]
comment=Mosquitto Logs
path= /var/log/mosquitto
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
6. Z-wave binding
sudo usermod -a -G dialout openhab
Usb Stick port - dev/ttyACM0
8. Install my.openhab
https://klenzel.de/3687
9. Set Date and Time
apt-get purge ntp
apt-get install openntpd
Next I append -s at the DAEMON_OPTS at /etc/default/openntpd
DAEMON_OPTS="-f /etc/openntpd/ntpd.conf -s"
systemctl enable openntpd.service
systemctl start openntpd.service
If starting the ‘openntpd’ service does not help, then try this.ntpd -s -d
ntpdate -s ntp.obspm.fr
Commands:
sudo /etc/init.d/openhab start
sudo /etc/init.d/openhab stop
sudo /etc/init.d/openhab status
systemctl status homebridge -l
systemctl start homebridge
tail -f /var/log/openhab/openhab.log
tail -f /var/log/openhab/events.log
mosquitto_pub -t /myhome/command/Temperature_Setpoint/state -m 18
mosquitto_sub -v -t /#
mosquitto_sub -v -t /# | xargs -d$'\n' -L1 sh -c 'date "+%D %T.%3N $0"'
Finally, stock Android does have a hidden setting to keep the screen on indefinitely, but only while charging. You need to activate Developer
Mode first (tap the Build number entry in the About phone menu in Settings seven times) and then choose Developer options from the Settings menu. Choose Stay awake and as long as your phone or tablet is plugged in, the screen won't go to sleep after a certain period of time.
Remove SWAP
https://tino.cc/2016/05/07/raspbian-ueber-nfs-netzwerk-share-booten/
sudo dphys-swapfile swapoff
sudo systemctl disable dphys-swapfile
sudo update-rc.d dphys-swapfile remove
sudo apt-get purge dphys-swapfile
sudo rm /var/swap