buanet / ioBroker.docker

Official Docker Image for ioBroker
https://www.iobroker.net
MIT License
194 stars 70 forks source link

Rpi2.0 Adapter GPIO not working #112

Closed fzzybllz closed 2 years ago

fzzybllz commented 4 years ago

Hi André,

I try to toggle a relay by using gpios via the rpi2.0 adapter on a rpi4b with iobroker running in docker. To resolve the issue I tried wiringPI directly on raspbian and its working fine. So it seems to be an issue with docker. So I found this issue (https://github.com/buanet/docker-iobroker/issues/87) and it seems like my ldd --version is up-to-date. I also found this issue (https://github.com/iobroker-community-adapters/ioBroker.rpi2/issues/18#issuecomment-605895020) created by @mtk64 and it seems like iobroker is not part of the group called gpio (groups iobroker). I'm not sure if this group only exists if wiringPi is installed inside the container, which I did not. According to rpi2.0 readme is it not necessary. The packages needed by the adapter are installed.

Do you have any idea how to go on debugging this issue?

regards Dominik

buanet commented 4 years ago

Hi Dominik, I'm not sure how to help you with that at the moment. Did you try to find some information about that? Maybe you can try something of this to get gpio working: https://stackoverflow.com/questions/30059784/docker-access-to-raspberry-pi-gpio-pins If there are some enhancements needed for the image please let me know.

Regards, André

fzzybllz commented 4 years ago

Hi André, I tried all three possibilities, still not working. But I found that my log shown on iobroker GUI is not showing the "real" log (have to check what's wrong there). When I checked the log-files on CLI I found the following: error: rpi2.0 (556) Error: Pin has not been exported for write error: rpi2.0 (598) Cannot setup port 18 as output: Error: EACCES: permission denied, open '/sys/class/gpio/export' Extract of my compose-file:

privileged: true
volumes:
  - ./app:/opt/iobroker:rw
  - /sys:/sys
devices:
  - "/dev/gpiomem:/dev/gpiomem"
fhammers commented 4 years ago

I have exactly the same problem, tried all documented ways to deal with it but no chance so far..

buanet commented 4 years ago

Hi, as I'm actually not able to figure out what's the problem here (mostly because a day just has 24 hours :wink:), help is wanted! If someone manages it to get GPIO working on a raspberry pi within a docker container please let me know how. I then will integrate it into the image (if needed) and add it to the documentation.

Sorry.

Regards, André

fzzybllz commented 4 years ago

Hi, I feel your trouble 👍 Since my router crashed all my network devices I'm not able to debug further on until I reinstalled my raspberry. Will let you know when I start over. Hopefully someone has an idea what's wrong here.

regards

Gwenselah commented 3 years ago

Hello, are there any news on this topic? On a newly installed raspberry pi4 with raspian and the iobroker in an docker container the issue still persists. @fzzybllz Did you resolved it?

kind regards

mtk64 commented 3 years ago

Hi, resolved by creating my own script to implement a daemon with MQTT broker and universal I/O ob raspi. In Addition it creates a FHEM.inc to integrate that to FHEM also.

Freundliche Grüße Michael Klein

Am 11.11.2020 um 23:01 schrieb Gwenselah notifications@github.com:

Hello, are there any news on this topic? On a newly installed raspberry pi4 with raspian and the iobroker in an docker container the issue still persists. @fzzybllz Did you resolved it?

kind regards

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

rtrnms commented 3 years ago

Hi everybody, hi mtk64,

I'm desperately looking for a solution for this issue. I have the same problems as described above; running the buanet iobroker container (latest) on an rpi3b+ and no success in controlling any of the GPIOs via RPI2.0 adapter in iobroker.

@mtk64, would you be able to share some insights in your workaround? As you have found a way to make it work - it seems you got the problem identified? Maybe @buanet can then add this to the image and we all can profit from it!

thank you all very much for your great efforts in advance best rtrnms

Hi, resolved by creating my own script to implement a daemon with MQTT broker and universal I/O ob raspi. In Addition it creates a FHEM.inc to integrate that to FHEM also. Freundliche Grüße Michael Klein Am 11.11.2020 um 23:01 schrieb Gwenselah @.***>: Hello, are there any news on this topic? On a newly installed raspberry pi4 with raspian and the iobroker in an docker container the issue still persists. @fzzybllz Did you resolved it? kind regards — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

mtk64 commented 3 years ago

Hi, my solution is described here: https://forum.fhem.de/index.php?topic=110571.0 It‘s german but Google will translate:-)

Freundliche Grüße Michael Klein

Am 13.01.2021 um 21:57 schrieb rtrnms notifications@github.com:

Hi everybody, hi mtk64,

I'm desperately looking for a solution for this issue. I have the same problems as described above; running the buanet iobroker container (latest) on an rpi3b+ and no success in controlling any of the GPIOs via RPI2.0 adapter in iobroker.

@mtk64, would you be able to share some insights in your workaround? As you have found a way to make it work - it seems you got the problem identified? Maybe @buanet can then add this to the image and we all can profit from it!

thank you all very much for your great efforts in advance best rtrnms

Hi, resolved by creating my own script to implement a daemon with MQTT broker and universal I/O ob raspi. In Addition it creates a FHEM.inc to integrate that to FHEM also. Freundliche Grüße Michael Klein … Am 11.11.2020 um 23:01 schrieb Gwenselah @.***>: Hello, are there any news on this topic? On a newly installed raspberry pi4 with raspian and the iobroker in an docker container the issue still persists. @fzzybllz Did you resolved it? kind regards — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

mtk64 commented 3 years ago

Sript implements MQTT broker and creates FHEM configuration in addition. It is very simple but easy to adopt. If you dont use FHEM just remove the code.

Freundliche Grüße Michael Klein

Am 13.01.2021 um 21:57 schrieb rtrnms notifications@github.com:

Hi everybody, hi mtk64,

I'm desperately looking for a solution for this issue. I have the same problems as described above; running the buanet iobroker container (latest) on an rpi3b+ and no success in controlling any of the GPIOs via RPI2.0 adapter in iobroker.

@mtk64, would you be able to share some insights in your workaround? As you have found a way to make it work - it seems you got the problem identified? Maybe @buanet can then add this to the image and we all can profit from it!

thank you all very much for your great efforts in advance best rtrnms

Hi, resolved by creating my own script to implement a daemon with MQTT broker and universal I/O ob raspi. In Addition it creates a FHEM.inc to integrate that to FHEM also. Freundliche Grüße Michael Klein … Am 11.11.2020 um 23:01 schrieb Gwenselah @.***>: Hello, are there any news on this topic? On a newly installed raspberry pi4 with raspian and the iobroker in an docker container the issue still persists. @fzzybllz Did you resolved it? kind regards — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

rtrnms commented 3 years ago

Hi Michael,

thanks for sharing this with me/us! I'm German, so I could follow what you have written. I couldn't follow the code so much.. but that's a different story :-).

I see your solution as a "workaround" in the real sense of the word. So you're not using the RPI2.0 Adapter of ioBroker to control the GPIOs. For various reasons, I am desperately looking into exactly this. I know other ways exist to control the GPIOs, but that's not what this issue is about here. Anyways - thanks a lot! @fzzybllz: what's your progress here? I can reproduce your findings but also don't come any closer to a solution...thanks!

buanet commented 2 years ago

As I see no progress in this topic I will close it.

We have a workaround, we have requirements and we have startup scripts (to implement every change to the container needed for this feature).

If someone figures out what's the reason it is not working please let me know. Maybe I can implement something to the Docker image.

Regards, André

Marc-Berg commented 7 months ago

Even if the topic is a bit older, (for me) I have a acceptable solution:

Done!

Works on a Raspi 4B.