Hallo!
ich habe 2xDS2482-800 und ind 1xDS2482-100 am I2C Bus hängen.
Die I2C Adressen sind 18,19,1A
Wenn ich mit "sudo ./owhttpd -p 2121 --i2c=/dev/i2c-1:0 --i2c=/dev/i2c-1:1 --i2c=/dev/i2c-1:2" ows aufrufe, findet er alle Ports und alle Sensoren.
Wie trägt man das in owfs.conf ein?
Wenn ich "device = /dev/i2c-1" eintrage, findet er nur ein ic (mit der Adresse 18).
Der Parameter "device = /dev/i2c-1:0" funktioniert nicht. Er bringt die Fehlermeldung "No valid 1-wire buses found"
In der Hilfe meiner Aufsteckplatine steht:
"The /dev/i2c-<n>:<i> syntax denotes offset <n> from I2C address 0011000b on I2C bus of <i>. The mentioned command line syntax thus tells owhttpd to look for 1-Wire controllers at addresses 0011000b, 0011001b and 0011010b on the I2C bus of BSC1"
Aber wie kann ich das in der config abbilden?
Vielen Dank für einen Tipp!
Marty
Versuchs mal so:
owfs.conf
# Sample configuration file for the OWFS suite for Debian GNU/Linux.
#
#
# This is the main OWFS configuration file. You should read the
# owfs.conf(5) manual page in order to understand the options listed
# here.
######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
#
# USB device: DS9490
#server: usb = all
#
# Serial port: DS9097
#server: device = /dev/ttyS1
#
# i2c port: DS2482-100 or DS2482-800
server: i2c = /dev/i2c-1:ALL
#
# owserver tcp address
#server: server = 192.168.10.1:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
#
mountpoint = /mnt/1wire
allow_other
#
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
ftp: port = 2120
####################### OWSERVER ########################
server: port = localhost:4304
error_print = 1
error_level = 6
Leider kein Erfolg:
server: i2c = /dev/i2c-1:ALL
bekomme ich die Meldung:
CALL: ow_parsename.c:(99) path=[]
bei
device = /dev/i2c-1
server: i2c = /dev/i2c-1:ALL
bekomme ich folgende Meldung:
CALL: ow_parsename.c:(99) path=[]
CONNECT: ow_ds2482.c:(397) Found an i2c device at /dev/i2c-1 address 18
CONNECT: ow_ds2482.c:(426) i2c device at /dev/i2c-1 address 18 appears to be DS2482-x00
CONNECT: ow_ds2482.c:(702) DS2482-800 (Eight channels)
Leider wieder nur ein Controller gefunden.
Wenn ich folgendes eingebe:
sudo ./owhttpd -p 2121 --i2c=/dev/i2c-1:0 --i2c=/dev/i2c-1:1 --i2c=/dev/i2c-1:2 --foreground --error_level 4
bekomme ich:
CONNECT: ow_avahi_link.c:(68) No Avahi support. Library libavahi-client couldn't be loaded
CONNECT: ow_dnssd.c:(82) Zeroconf/Bonjour is disabled since dnssd library isn't found
CALL: ow_parsename.c:(99) path=[]
CONNECT: ow_ds2482.c:(397) Found an i2c device at /dev/i2c-1 address 1A
CONNECT: ow_ds2482.c:(426) i2c device at /dev/i2c-1 address 1A appears to be DS2482-x00
CONNECT: ow_ds2482.c:(691) DS2482-100 (Single channel)
CONNECT: ow_ds2482.c:(397) Found an i2c device at /dev/i2c-1 address 19
CONNECT: ow_ds2482.c:(426) i2c device at /dev/i2c-1 address 19 appears to be DS2482-x00
CONNECT: ow_ds2482.c:(702) DS2482-800 (Eight channels)
CONNECT: ow_ds2482.c:(397) Found an i2c device at /dev/i2c-1 address 18
CONNECT: ow_ds2482.c:(426) i2c device at /dev/i2c-1 address 18 appears to be DS2482-x00
CONNECT: ow_ds2482.c:(702) DS2482-800 (Eight channels)
Ich kann zwar ein Startskript schreiben wo der Parameter übergeben wird.
Allerdings ist das nicht ganz konform zur Distri und damit außerhalb des automatischen updates.
Übrigens ist es egal ob ich owhttpd aus /usr/bin oder meine selbst kompilierte aus /opt/owfs/bin verwende.
Gruß Marty
Komisch, bei mir geht es so (1x DS2482-800 und 1x DS2482-100 am Pi, aktuellstes wheezy, OWFS-2.9p1)
Welche Distri und Hardware läuft bei Dir?
Hallo Joachim,
Wheezy auf dem Raspberry PI
Linux rsp01 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux
2.8.p15-1 wird durch apt-get installiert.
Unter /opt/owfs habe ich 2.9p1 selbst compiliert.
Als Hardware verwende ich die Abiowire (http://www.axiris.eu/en/index.php/one-wire/abiowire)
Die Adressen werden auch mit i2cdetect gefunden:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 19 1a -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
51 ist eine RTC, die ist aber nicht im Betrieb.
Dann kann ich Dir leider nicht helfen.
Gruß Joachim
Zitat von: Joachim am 01 Januar 2014, 21:04:20
Dann kann ich Dir leider nicht helfen.
Gruß Joachim
Danke Joachim für die Hilfe! Dir noch Alles gute für 2013.
Ich habe nun ein Skript erstellt, das alle 3 Programme startet und die Attribute übergibt.
Gestartet wird die Version, die bei wheezy mit dabei ist.
Sollte jemand ähnliche Probleme haben, hier mein Skript:
Ich habe das Skript ows.sh genannt.
#!/bin/bash
### BEGIN INIT INFO
#
# Provides: ows-system
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: ows initscript
#
### END INIT INFO
## Fill in name of program here.
PROG_PATH="/usr/bin/"
PROG1="owfs"
PROG_ARGS1="-C --i2c=/dev/i2c-1:0 --i2c=/dev/i2c-1:1 --i2c=/dev/i2c-1:2 -m /mnt/1wire --allow_other"
PROG2="owserver"
PROG_ARGS2="-p 4304 --i2c=/dev/i2c-1:0 --i2c=/dev/i2c-1:1 --i2c=/dev/i2c-1:2"
PROG3="owhttpd"
PROG_ARGS3="-p 2121 --i2c=/dev/i2c-1:0 --i2c=/dev/i2c-1:1 --i2c=/dev/i2c-1:2"
PIDFILE="/var/run/ows.pid"
start() {
if [ -e $PIDFILE ]; then
## Program is running, exit with error.
echo "Error! programs are currently running!" 1>&2
exit 1
else
## Change from /dev/null to something like /var/log/$PROG if you want to save output.
cd $PROG_PATH
./$PROG1 $PROG_ARGS1 2>&1 >/dev/null &
##./$PROG $PROG_ARGS 2>&1 >/var/log/aws.log &
echo "$PROG1 started"
./$PROG2 $PROG_ARGS2 2>&1 >/dev/null &
echo "$PROG2 started"
./$PROG3 $PROG_ARGS3 2>&1 >/dev/null &
echo "$PROG3 started"
touch $PIDFILE
fi
}
stop() {
if [ -e $PIDFILE ]; then
## Program is running, so stop it
echo "$PROG1 is running"
killall $PROG1
echo "$PROG2 is running"
killall $PROG2
echo "$PROG3 is running"
killall $PROG3
rm -f $PIDFILE
echo "$PROG1 stopped"
echo "$PROG2 stopped"
echo "$PROG3 stopped"
else
## Program is not running, exit with error.
echo "Error! ows not started!" 1>&2
exit 1
fi
}
## Check to see if we are running as root first.
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
case "$1" in
start)
start
exit 0
;;
stop)
stop
exit 0
;;
reload|restart|force-reload)
stop
start
exit 0
;;
**)
echo "Usage: $0 {start|stop|reload}" 1>&2
exit 1
;;
esac
exit 0