I would like to to turn on and off an LED with my RPI3 GPIO from openhab2.
I have try what I have read on every search I had made for the past 5 days but without any luck… like I say I’m now to raspberry OS and python…
I’m able to turn the led on and off using the terminal but not using openhab2. I have installed the GPIO binding and nothing. I also try using openhabian and nothing…
Because you already have it working in a terminal, I would agree that using exec binding and scripted commands is going to be the fastest solution here. I have used GPIO on the pi for output as well as reading sensors.
For GPIO ouput control on the raspi, Check out the wiringPi library here http://wiringpi.com/
Very simple to implement, and you can just as easily script the commands. Then use exec binding to run commands for openhab switch ON/OFF.
I’m using the latest openhab2, I downloaded Raspbian and did the apt-update/upgrade and downloaded later the openhab2 and did the update…
Logs, I don’t know how to get them… like I say I’m new on this.
I installed the Wemo, and the GPIO biding… Wemo work perfect. but I don’t get anything on the GPIO…
I was able to find on the net to run this commands:
“sudo /etc/init.d/openhab2 stop” and “sudo /usr/share/openhab2/start.sh” and when I do it it runs with out any issues… so I’m thinking it could be a permission issues… that I don’t know how to fix it… when run this commands it works until I reboot the raspberry… and when I run that command my homekit MISC that is running just doesn’t work…
so I’m try to learn more, and I’m try to turn on and off some LED connected to GPIO so I can learn how its work so I can move forward and keep learning other stuff…
For an apt-get installation, the recommended and preferred installation method for operating systems that support it, logs are located in /var/log/openhab2. For any installation type you can see the logs in the Karaf console:
Yes it was a permission issue!!! I forgot to change the openhab.services to root… even openhab was added to the gpio group it was not working… but not it is!!! Thanks !!!
now I’m going to see how the exec binding works… since I would like to be able to read an DHT11 Temp & Humi Sensor Module. so lets see how that works!!!