Forum

Full Version: XBMC blocks GPIO usage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I'm using XBian 1.0 Beta 1.1 on a Raspberry Pi (Model B Rev. 2) and searched the FAQ, tried iRC and asked for help on G+ without any outcome. With a 433MHz transmitter connected to the GPIOs on the board I like to control my power sockets. This works flawless if XBMC isn't running. But somehow XBMC seems to use the GPIOs too. While it's running I cannot emit my signals like XBMC is blocking my request for some reason. Is there any implementation or applied patch which I have to disable within the media center software to control the GPIOs?

My last thought was, that there may be a timing problem since XBMC uses the CPU excessively.

Thanks in advance,
Peter

PS: the attachment contains the code for controlling the transmitter

edit: adding the attachment failed. Location is now https://www.dropbox.com/s/5ciim5sryrnmap6/elro.py
you forgot the attachment.
(13th Sep, 2013 12:16 AM)mk01 Wrote: [ -> ]you forgot the attachment.

Right Undecided You can find the python script at https://www.dropbox.com/s/5ciim5sryrnmap6/elro.py
Just use http://www.pilight.org. Works perfectly on XBian and with Elro.
(13th Sep, 2013 01:59 AM)CurlyMo Wrote: [ -> ]Just use http://www.pilight.org. Works perfectly on XBian and with Elro.

Seems like a very flexible but big solution. I found another approach that works!! Problems with timing after all.

Code:
# ...
repeat = 24 # Number of transmissions
pulselength = 60 # microseconds
# ...

credits: with ice cream at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=32&t=32177
Don't know why pilight should be big? Uses as good as no CPU resources when idle. Has a footprint of only 1.5mb and does everything you want but better. Even works perfectly in receiving codes.
(13th Sep, 2013 03:41 AM)CurlyMo Wrote: [ -> ]Don't know why pilight should be big? Uses as good as no CPU resources when idle. Has a footprint of only 1.5mb and does everything you want but better. Even works perfectly in receiving codes.

Of course, it has a small footprint, but I like keeping it low-level. After a while with pilight, I have to admit that this is a great way of doing things. But I also haven't had much luck so far. No signals at all.

Despite new challenges, thanks for your replies, they helped me a lot.
@hpeter - as the "Problem" has been fixed can you change the status to Solved - Tnx
Reference URL's