Fixing Bad Packets on Water Concentrator
cd /usr/openhab2/MASTER
root@beaglebone:/usr/openhab2/MASTER# vi start.sh
cd `dirname $0`
# set path to eclipse folder. If local folder, use '.'; otherwise, use /path/to/eclipse/
eclipsehome='runtime/server';
# set ports for HTTP(S) server
if [ ! -z ${OPENHAB_HTTP_PORT} ]
then
HTTP_PORT=${OPENHAB_HTTP_PORT}
else
HTTP_PORT=8080
fi
if [ ! -z ${OPENHAB_HTTPS_PORT} ]
then
HTTPS_PORT=${OPENHAB_HTTPS_PORT}
else
HTTPS_PORT=8443
fi
# get path to equinox jar inside $eclipsehome folder
cp=$(find $eclipsehome -name 'org.eclipse.equinox.launcher_*.jar' | sort | tail -1);
if [ -z '$cp' ]; then
echo 'Error: Could not find equinox launcher in path $eclipsehome' 1>&2
exit 1
fi
# program args
prog_args='-Dlogback.configurationFile=./runtime/etc/logback.xml -DmdnsName=openhab -Dopenhab.logdir=./userdata/logs -Dsmarthome.servicecfg=./runtime/etc/services.cfg -Dsmarthome.servicepid=org.openhab -Dsmarthome.userdata=./userdata -Dorg.quartz.properties=./runtime/etc/quartz.properties -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-ssl.xml,etc/jetty-deployer.xml,etc/jetty-https.xml,etc/jetty-selector.xml'
echo Launching the openHAB runtime...
#java $prog_args \
-Dosgi.clean=true \
-Declipse.ignoreApp=true \
-Dosgi.noShutdown=true \
To stop the Java process:
root@beaglebone:/usr/openhab2/MASTER# pkill java
To Check if the Java process has stopped:
root@beaglebone:/usr/openhab2/MASTER# ps aux|grep java
root 17375 0.0 0.1 3128 704 pts/0 S+ 08:59 0:00 grep java
FILE STRUCTURE FROM BBB ROOT:
root@beaglebone:/# ls
bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var
root@beaglebone:/# cd usr
root@beaglebone:/usr# ls
bin games include lib local openhab2 sbin share src
root@beaglebone:/usr# cd openhab2
root@beaglebone:/usr/openhab2# ls
MASTER
root@beaglebone:/usr/openhab2# cd MASTER
root@beaglebone:/usr/openhab2/MASTER# ls
addons conf LICENSE.TXT README.TXT run.sh runtime start.bat start_debug.bat start_debug.sh start.sh userdata
root@beaglebone:/usr/openhab2/MASTER# cd conf
root@beaglebone:/usr/openhab2/MASTER/conf# ls
items persistence rules scripts services sitemaps things transform
root@beaglebone:/usr/openhab2/MASTER/conf# cd persistence
root@beaglebone:/usr/openhab2/MASTER/conf/persistence# ls
rrd4j.persist
root@beaglebone:/usr/openhab2/MASTER# cd addons
root@beaglebone:/usr/openhab2/MASTER/addons# ls
org.openhab.binding.zwave-1.8.0-SNAPSHOT.jar org.openhab.ui.habmin_2.0.0.SNAPSHOT-0.0.15.jar
org.openhab.persistence.rrd4j-1.8.0-20151206.020011-132.jar pnpscadawmbus.jar
root@beaglebone:/var# ls
backups cache lib local lock log mail opt run spool tmp www
root@beaglebone:/var/log# ls
alternatives.log btmp debug.2.gz dpkg.log.1 lastlog messages.3.gz syslog.5.gz xinput_calibrator.pointercal.log
alternatives.log.1 btmp.1 debug.3.gz dpkg.log.2.gz lightdm messages.4.gz syslog.6.gz Xorg.0.log
apache2 ConsoleKit debug.4.gz faillog lpr.log news syslog.7.gz Xorg.0.log.old
apt daemon.log dmesg fontconfig.log mail.err openvpn.log user.log xrdp-sesman.log
auth.log daemon.log.1 dmesg.0 fsck mail.info openvpn.status user.log.1
auth.log.1 daemon.log.2.gz dmesg.1.gz kern.log mail.log syslog user.log.2.gz
auth.log.2.gz daemon.log.3.gz dmesg.2.gz kern.log.1 mail.warn syslog.1 wicd
auth.log.3.gz daemon.log.4.gz dmesg.3.gz kern.log.2.gz messages syslog.2.gz wtmp
auth.log.4.gz debug dmesg.4.gz kern.log.3.gz messages.1 syslog.3.gz wtmp.1
bootstrap.log debug.1 dpkg.log kern.log.4.gz messages.2.gz syslog.4.gz wvdialconf.log
rrd4j file:
root@beaglebone:/usr/openhab2/MASTER/userdata# cd persistence
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence# ls
rrd4j
Log files:
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence# ls
rrd4j
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence# cd rrd4j
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence/rrd4j# ls
pnpscadawmbus_meter_00001939_burst.rrd pnpscadawmbus_meter_00124599_leak.rrd pnpscadawmbus_meter_76320340_tamper.rrd
pnpscadawmbus_meter_00001939_comms.rrd pnpscadawmbus_meter_00124599_reading.rrd pnpscadawmbus_meter_76330140_burst.rrd
To delete all files containing the serial number use:
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence/rrd4j# rm *00000000*
rrd4j.cfg file resides in services:
root@beaglebone:/usr/openhab2/MASTER/conf# cd services
root@beaglebone:/usr/openhab2/MASTER/conf/services# ls
basicui.cfg cometvisu.cfg pnpscada.cfg rrd4j.cfg runtime.cfg
To see whats inside the file:
root@beaglebone:/usr/openhab2/MASTER/conf/services# cat rrd4j.cfg
To search for first instance in the file:
vi filname (vi rrd4j)
/00000000 (Enter and the cursor will go to first character of the search string)
Remove or change then to save and exit do:
Esc :wq (Hit Escape key, then :qw)
To remove the meter serial number from the rrd4j.persist file; go to:
root@beaglebone:/usr/openhab2/MASTER/conf/persistence# vi rrd4j.persist
Remove # from in front of Java in start.sh file:
root@beaglebone:/usr/openhab2/MASTER# vi start.sh
cd /usr/openhab2/MASTER
root@beaglebone:/usr/openhab2/MASTER# vi start.sh
cd `dirname $0`
# set path to eclipse folder. If local folder, use '.'; otherwise, use /path/to/eclipse/
eclipsehome='runtime/server';
# set ports for HTTP(S) server
if [ ! -z ${OPENHAB_HTTP_PORT} ]
then
HTTP_PORT=${OPENHAB_HTTP_PORT}
else
HTTP_PORT=8080
fi
if [ ! -z ${OPENHAB_HTTPS_PORT} ]
then
HTTPS_PORT=${OPENHAB_HTTPS_PORT}
else
HTTPS_PORT=8443
fi
# get path to equinox jar inside $eclipsehome folder
cp=$(find $eclipsehome -name 'org.eclipse.equinox.launcher_*.jar' | sort | tail -1);
if [ -z '$cp' ]; then
echo 'Error: Could not find equinox launcher in path $eclipsehome' 1>&2
exit 1
fi
# program args
prog_args='-Dlogback.configurationFile=./runtime/etc/logback.xml -DmdnsName=openhab -Dopenhab.logdir=./userdata/logs -Dsmarthome.servicecfg=./runtime/etc/services.cfg -Dsmarthome.servicepid=org.openhab -Dsmarthome.userdata=./userdata -Dorg.quartz.properties=./runtime/etc/quartz.properties -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-ssl.xml,etc/jetty-deployer.xml,etc/jetty-https.xml,etc/jetty-selector.xml'
echo Launching the openHAB runtime...
#java $prog_args \
-Dosgi.clean=true \
-Declipse.ignoreApp=true \
-Dosgi.noShutdown=true \
To stop the Java process:
root@beaglebone:/usr/openhab2/MASTER# pkill java
To Check if the Java process has stopped:
root@beaglebone:/usr/openhab2/MASTER# ps aux|grep java
root 17375 0.0 0.1 3128 704 pts/0 S+ 08:59 0:00 grep java
FILE STRUCTURE FROM BBB ROOT:
root@beaglebone:/# ls
bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var
root@beaglebone:/# cd usr
root@beaglebone:/usr# ls
bin games include lib local openhab2 sbin share src
root@beaglebone:/usr# cd openhab2
root@beaglebone:/usr/openhab2# ls
MASTER
root@beaglebone:/usr/openhab2# cd MASTER
root@beaglebone:/usr/openhab2/MASTER# ls
addons conf LICENSE.TXT README.TXT run.sh runtime start.bat start_debug.bat start_debug.sh start.sh userdata
root@beaglebone:/usr/openhab2/MASTER# cd conf
root@beaglebone:/usr/openhab2/MASTER/conf# ls
items persistence rules scripts services sitemaps things transform
root@beaglebone:/usr/openhab2/MASTER/conf# cd persistence
root@beaglebone:/usr/openhab2/MASTER/conf/persistence# ls
rrd4j.persist
root@beaglebone:/usr/openhab2/MASTER# cd addons
root@beaglebone:/usr/openhab2/MASTER/addons# ls
org.openhab.binding.zwave-1.8.0-SNAPSHOT.jar org.openhab.ui.habmin_2.0.0.SNAPSHOT-0.0.15.jar
org.openhab.persistence.rrd4j-1.8.0-20151206.020011-132.jar pnpscadawmbus.jar
root@beaglebone:/var# ls
backups cache lib local lock log mail opt run spool tmp www
root@beaglebone:/var/log# ls
alternatives.log btmp debug.2.gz dpkg.log.1 lastlog messages.3.gz syslog.5.gz xinput_calibrator.pointercal.log
alternatives.log.1 btmp.1 debug.3.gz dpkg.log.2.gz lightdm messages.4.gz syslog.6.gz Xorg.0.log
apache2 ConsoleKit debug.4.gz faillog lpr.log news syslog.7.gz Xorg.0.log.old
apt daemon.log dmesg fontconfig.log mail.err openvpn.log user.log xrdp-sesman.log
auth.log daemon.log.1 dmesg.0 fsck mail.info openvpn.status user.log.1
auth.log.1 daemon.log.2.gz dmesg.1.gz kern.log mail.log syslog user.log.2.gz
auth.log.2.gz daemon.log.3.gz dmesg.2.gz kern.log.1 mail.warn syslog.1 wicd
auth.log.3.gz daemon.log.4.gz dmesg.3.gz kern.log.2.gz messages syslog.2.gz wtmp
auth.log.4.gz debug dmesg.4.gz kern.log.3.gz messages.1 syslog.3.gz wtmp.1
bootstrap.log debug.1 dpkg.log kern.log.4.gz messages.2.gz syslog.4.gz wvdialconf.log
rrd4j file:
root@beaglebone:/usr/openhab2/MASTER/userdata# cd persistence
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence# ls
rrd4j
Log files:
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence# ls
rrd4j
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence# cd rrd4j
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence/rrd4j# ls
pnpscadawmbus_meter_00001939_burst.rrd pnpscadawmbus_meter_00124599_leak.rrd pnpscadawmbus_meter_76320340_tamper.rrd
pnpscadawmbus_meter_00001939_comms.rrd pnpscadawmbus_meter_00124599_reading.rrd pnpscadawmbus_meter_76330140_burst.rrd
To delete all files containing the serial number use:
root@beaglebone:/usr/openhab2/MASTER/userdata/persistence/rrd4j# rm *00000000*
rrd4j.cfg file resides in services:
root@beaglebone:/usr/openhab2/MASTER/conf# cd services
root@beaglebone:/usr/openhab2/MASTER/conf/services# ls
basicui.cfg cometvisu.cfg pnpscada.cfg rrd4j.cfg runtime.cfg
To see whats inside the file:
root@beaglebone:/usr/openhab2/MASTER/conf/services# cat rrd4j.cfg
To search for first instance in the file:
vi filname (vi rrd4j)
/00000000 (Enter and the cursor will go to first character of the search string)
Remove or change then to save and exit do:
Esc :wq (Hit Escape key, then :qw)
To remove the meter serial number from the rrd4j.persist file; go to:
root@beaglebone:/usr/openhab2/MASTER/conf/persistence# vi rrd4j.persist
Remove # from in front of Java in start.sh file:
root@beaglebone:/usr/openhab2/MASTER# vi start.sh
Tags: bad packetsconcentratoropenhabwater concentratorwater meter