harry99n Posted March 26, 2016 Posted March 26, 2016 Hi, after unsuccessful experiences with bananian I found armbian - due to the active forum and answers to questions it looks like the better choice. I try to install fhem on bpr-r1. Combine a access point with homeautomation server (the router ifunction is handled by another device). After some work with Debian Jessie (lot´s of issues with hostapd and gpio) - Ubuntu with 4.4.1 kernel works stable. Only issue which keeps me from going into operation is following problem: all directories /sys/devices/platform/gpio-sunxi/gpio/gpio* are recreated everytime fhem server starts. The trick from Raspbian with chown -R root:gpio ys/devices/platform/gpio-sunxi/gpio/gpio* is not working, due to recreation. The effect is, that attributes like "active_low" are not working, behaus fhem cannot modify them because of missing access rights. Running fhem as root is not an option. I know for sure, this is not a fhem problem. Some device definition is working fine on 2 RaspberryPis. Where is the place I can tell the system do recreate gpio-subdirectories with user:group = root:gpio as well as 775 as access rights? Greetings Harald
tkaiser Posted March 26, 2016 Posted March 26, 2016 The trick from Raspbian with chown -R root:gpio ys/devices/platform/gpio-sunxi/gpio/gpio* is not working, due to recreation. Why shouldn't that work if you put the line in /etc/rc.local so that it gets executed on every reboot? BTW: Before you start wasting time trying to use the R1 as access point better search the forums before to get an idea what a waste of time and ressources this will be (in other words: it doesn't work as advertised and you better forget about it or replace the hardware)
harry99n Posted March 26, 2016 Author Posted March 26, 2016 Thanks tkaiser for the advice. The AP is just a nice to have feature and I will not waste more time on it. I already bought a USB Wifi stick as replacement. Before writing in this forum I added "chmod and chown" commands into /etc/init.d/fhem before starting fhem - no help. Just now I did a test again: Log file of fhem: 016.03.26 13:22:00 1: OG.fz.RS.tuer_mot: entfernt2016.03.26 13:22:00 1: OG.fz.RS.tuer_dir: entfernt2016.03.26 13:22:00 1: Including fhem.cfg2016.03.26 13:22:00 1: Including myGlobals.inc2016.03.26 13:22:01 3: telnetPort: port 7072 opened2016.03.26 13:22:01 3: WEB: port 8083 opened2016.03.26 13:22:01 3: WEBphone: port 8084 opened2016.03.26 13:22:01 3: WEBtablet: port 8085 opened2016.03.26 13:22:01 2: eventTypes: loaded 56 events from ./log/eventTypes.txt2016.03.26 13:22:01 1: Including /opt/fhem/haus.inc2016.03.26 13:22:01 1: Including /opt/fhem/og.inc/usr/local/bin/gpio: Warning: File not present: /sys/class/gpio/gpio4/edge2016.03.26 13:22:01 1: Can't open file: OG.fz.RS.tuer_dir, active_low2016.03.26 13:22:01 1: Can't open file: OG.fz.RS.tuer_mot, active_low2016.03.26 13:22:01 1: Including /opt/fhem/myEvents.inc2016.03.26 13:22:01 1: Including ./log/fhem.save/usr/local/bin/gpio: Warning: File not present: /sys/class/gpio/gpio4/edge root@lamobo-r1:/opt/fhem# ll /sys/devices/platform/gpio-sunxi/gpio/total 0drwxrwxr-x 18 root gpio 0 Mar 26 13:22 ./drwxr-xr-x 4 root gpio 0 Mar 26 06:58 ../drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio10/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio11/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio14/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio15/drwxr-xr-x 3 root root 0 Mar 26 13:22 gpio17/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio18/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio22/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio23/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio24/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio25/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio27/drwxr-xr-x 3 root root 0 Mar 26 13:22 gpio4/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio7/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio8/drwxr-xr-x 3 root gpio 0 Mar 26 13:21 gpio9/drwxrwxr-x 3 root gpio 0 Mar 26 06:58 gpiochip1/root@lamobo-r1:/opt/fhem# gd !$gd /sys/devices/platform/gpio-sunxi/gpio//sys/devices/platform/gpio-sunxi/gpio /opt/fhem ~root@lamobo-r1:/sys/devices/platform/gpio-sunxi/gpio# ll gpio4total 0drwxr-xr-x 3 root root 0 Mar 26 13:22 ./drwxrwxr-x 18 root gpio 0 Mar 26 13:22 ../-rw-r--r-- 1 root root 4096 Mar 26 13:22 active_lowlrwxrwxrwx 1 root root 0 Mar 26 13:23 device -> ../../../gpio-sunxi/-rw-r--r-- 1 root root 4096 Mar 26 13:22 directiondrwxr-xr-x 2 root root 0 Mar 26 13:23 power/lrwxrwxrwx 1 root root 0 Mar 26 13:23 subsystem -> ../../../../../class/gpio/-rw-r--r-- 1 root root 4096 Mar 26 13:22 uevent-rw-r--r-- 1 fhem dialout 4096 Mar 26 13:22 value GPIO pin 4 and 7 have been recreted by the start of fhem. /usr/local/bin/gpio is right in place. So I came to conclusion there are 2 ways a) change file rights during creation --> ask the forum modify the fhem module RPB_GIO --> searching ins ongoing Greetings Harry99n
Recommended Posts