Page 1 of 1

GPIO plugin problems

Posted: Thu Oct 22, 2015 1:58 pm
by enterius
Hi to everyone!

I'm trying to deal with the new GPIO plugin (by the way it's great idea, thank Massimo) for Raspberry Pi QLC+ version and I'm having some problems/questions:
1. I have no idea how to assign GPIO Outputs to any button, function or anything in QLC+. Is there any special way to do this or are outputs not implemented yet? I admit that I'm not very fluent in QLC+.

2. I found how to assign GPIO inputs to buttons (Widget Properties -> External Input and then Choose or Autodetect) but it seems that GPIO's numbers in QLC+ does not correspond to numbers on pins from Massimo's manual. GPIO number read by QLC+ is always one value higher than physical number from pin layout. For example when I short pin 11 to 3.3 V, which is GPIO 17, QLC+ reacts on GPIO 18. Is this a bug or intended behaviour?

3. When I assign GPIO input to Slider I can only get values 0 (GPIO LOW) or 1 (GPIO High). Is there any way to control intensity in this way? For example short press would turn on/off but long press would change Slider value up and down? It would be a great functionality.

4. From time to time instead of pop-up windows I get only black rectangle. If this happens I need to reboot Raspberry to get pop-up windows working again? Is this known bug?

5. I found rebooting Raspberry with QLC+ quite difficult without Web access. I have to switch to console, log in and then use reboot command. Is it possible to add two buttons to QLC+: Shut Down and Reboot?

Ok, I think that's it for now.

Greetings
Krzysztof

Re: GPIO plugin problems

Posted: Thu Oct 22, 2015 1:58 pm
by mcallegari
First of all, let's start to say that the GPIO plugin is in a very early stage of development and it surely needs improvements.
You are the first one trying it, after me of course.
The topic is quite wide and when I have the picture of the whole possible usages, I can write the proper documentation and refine the code.
enterius wrote:1. I have no idea how to assign GPIO Outputs to any button, function or anything in QLC+. Is there any special way to do this or are outputs not implemented yet? I admit that I'm not very fluent in QLC+.
That's because of 2.
enterius wrote:2. I found how to assign GPIO inputs to buttons (Widget Properties -> External Input and then Choose or Autodetect) but it seems that GPIO's numbers in QLC+ does not correspond to numbers on pins from Massimo's manual. GPIO number read by QLC+ is always one value higher than physical number from pin layout. For example when I short pin 11 to 3.3 V, which is GPIO 17, QLC+ reacts on GPIO 18. Is this a bug or intended behaviour?
One thing is the RPi physical numbers, another thing is what the Linux kernel exposes.
This picture should clear it out: [EDIT: this should be it but I still couldn't find the one I used during my tests]
http://wiringpi.com/wp-content/uploads/ ... /gpio1.png
[EDIT 2: or this one (ignore Wiring Pi)] http://3.bp.blogspot.com/-gmSvHB8OAHo/V ... 2BPins.png
As you can see, GPIO numbers start from 0, while QLC+ channels start from 1. That's the +1/-1 offset you see.
The same channels should be used for output. QLC+ channel 1 will trigger GPIO number 0 and so on.
enterius wrote:3. When I assign GPIO input to Slider I can only get values 0 (GPIO LOW) or 1 (GPIO High). Is there any way to control intensity in this way? For example short press would turn on/off but long press would change Slider value up and down? It would be a great functionality.
GPIO have high/low states only. For now I have implemented that. If you read my blog post you will see that in the future I might implement PWM.
Forget long press and custom stuff like that. You need to implement that in your hardware.
enterius wrote:4. From time to time instead of pop-up windows I get only black rectangle. If this happens I need to reboot Raspberry to get pop-up windows working again? Is this known bug?
Which popup ? Doing what ? GPIO enabled ?
Please be more specific, otherwise I have no clue of what you're talking about.
enterius wrote:5. I found rebooting Raspberry with QLC+ quite difficult without Web access. I have to switch to console, log in and then use reboot command. Is it possible to add two buttons to QLC+: Shut Down and Reboot?
This has already been asked in this forum.
At the moment I have no plans to add such buttons.
Just unplug the Pi. I do it all the time and never lost a bit.

Re: GPIO plugin problems

Posted: Thu Oct 22, 2015 1:58 pm
by enterius
Thanks for very fast response.
I'll try to provide more details then :) I'm using Raspberry Pi B+ for testing.
mcallegari wrote:First of all, let's start to say that the GPIO plugin is in a very early stage of development and it surely needs improvements.
You are the first one trying it, after me of course.
The topic is quite wide and when I have the picture of the whole possible usages, I can write the proper documentation and refine the code.
I'm very well aware that this plugin is a fresh thing and that's why I want to test it and share results, as I have loads of ideas possible usage. So feel free to treat me as you GPIO tester ;)
enterius wrote:1. I have no idea how to assign GPIO Outputs to any button, function or anything in QLC+. Is there any special way to do this or are outputs not implemented yet? I admit that I'm not very fluent in QLC+.
Ok, so from what you wrote, I understand that I should add one generic fixture for every GPIO output I want to use and then instead of DMX address assign to it the number of GPIO +1. I just tried but it works only on very specific GPIOs. For example it works with address 25 (GPIO24) but it won't work with 26 (GPIO25) which is always ON.
mcallegari wrote:
enterius wrote:2. I found how to assign GPIO inputs to buttons (Widget Properties -> External Input and then Choose or Autodetect) but it seems that GPIO's numbers in QLC+ does not correspond to numbers on pins from Massimo's manual. GPIO number read by QLC+ is always one value higher than physical number from pin layout. For example when I short pin 11 to 3.3 V, which is GPIO 17, QLC+ reacts on GPIO 18. Is this a bug or intended behaviour?
One thing is the RPi physical numbers, another thing is what the Linux kernel exposes.
This picture should clear it out: [EDIT: this should be it but I still couldn't find the one I used during my tests]
http://wiringpi.com/wp-content/uploads/ ... /gpio1.png
[EDIT 2: or this one (ignore Wiring Pi)] http://3.bp.blogspot.com/-gmSvHB8OAHo/V ... 2BPins.png
As you can see, GPIO numbers start from 0, while QLC+ channels start from 1. That's the +1/-1 offset you see.
The same channels should be used for output. QLC+ channel 1 will trigger GPIO number 0 and so on.
Now I'm even more confused ;) Your pictures show that there are 8 original (column Name) GPIOs from GPIO0 to GPIO7. In your QLC manual for Raspberry PI 2 there are 26 GPIOs from GPIO2 to GPIO27 but some of them are reserved for SPI or other protocols. In GPIO plugin configuration I have 30 GPIOs numbered from 0 to 29! And then in fixture channel address I can have values from 1 to 512. I think that it would be nice to un-confuse it somehow. Another thing is that it seems that I can't freely use any of GPIOs because only some of them work as inputs and others as outputs. So maybe it would be a good idea to change GPIO plugin configuration window and list there only GPIOs we actually can use with proper direction (IN,OUT or both)?
mcallegari wrote:
enterius wrote:3. When I assign GPIO input to Slider I can only get values 0 (GPIO LOW) or 1 (GPIO High). Is there any way to control intensity in this way? For example short press would turn on/off but long press would change Slider value up and down? It would be a great functionality.
GPIO have high/low states only. For now I have implemented that. If you read my blog post you will see that in the future I might implement PWM.
Forget long press and custom stuff like that. You need to implement that in your hardware.
Yes, I read your blog and PWM will be great but ability to operate with short/long press with GPIO would open the whole world of possibilities. The main purpose I would like to use it is to be able to control brightness in a simple way with physical push-buttons. You can do this with MIDi controllers or other expensive and complicates stuff, but it would be much easier and cheaper to use just one or more push-buttons and be able to override web, MIDI or computer control. You could then also use any radioline with simple remote to control not only ON/OFF but also brightness. I use it in my LED controllers for a long time and it's a very convenient way to control light. Think about it ;)
mcallegari wrote:
enterius wrote:4. From time to time instead of pop-up windows I get only black rectangle. If this happens I need to reboot Raspberry to get pop-up windows working again? Is this known bug?
Which popup ? Doing what ? GPIO enabled ?
Please be more specific, otherwise I have no clue of what you're talking about.
Almost every pop-up window like Fixture Properties, Widget Properties, Save As dialogue, etc. I don't think this has anything in common with GPIO. It just looks like a general bug. Unfortunately I still don't know what causes this. It's quite random and happens usually after long time of editing project directly in Raspberry.
mcallegari wrote:
enterius wrote:5. I found rebooting Raspberry with QLC+ quite difficult without Web access. I have to switch to console, log in and then use reboot command. Is it possible to add two buttons to QLC+: Shut Down and Reboot?
This has already been asked in this forum.
At the moment I have no plans to add such buttons.
Just unplug the Pi. I do it all the time and never lost a bit.
Ok, I get it but I think that I lost a few changes to my project after unplugging, although I'm not sure.
So at least make my life easier and tell me how to go back to QLC+ after switching to console with Ctrl+Alt+Backspace? :)

Re: GPIO plugin problems

Posted: Thu Oct 22, 2015 10:12 pm
by mcallegari
Now I'm even more confused ;) Your pictures show that there are 8 original (column Name) GPIOs from GPIO0 to GPIO7. In your QLC manual for Raspberry PI 2 there are 26 GPIOs from GPIO2 to GPIO27 but some of them are reserved for SPI or other protocols. In GPIO plugin configuration I have 30 GPIOs numbered from 0 to 29! And then in fixture channel address I can have values from 1 to 512. I think that it would be nice to un-confuse it somehow. Another thing is that it seems that I can't freely use any of GPIOs because only some of them work as inputs and others as outputs. So maybe it would be a good idea to change GPIO plugin configuration window and list there only GPIOs we actually can use with proper direction (IN,OUT or both)?
Just no.
The GPIO plugin is a generic plugin, not specific to the Raspberry Pi.
QLC+ can be compiled on other ARM boards like the Beaglebone, ODROID C-1, pcDuino, etc
It's on you to be aware of what can and cannot be used as a generic GPIO.
Also, the Raspberry Pi IO can be configured in several ways, using its specific configurations files.
What I provide with my image is an average of different things to allow several peripheral to work out of the box, such as: SPI LED strips, SPI displays/touchscreens, UART devices, I2C devices.
If you need all the IO available as GPIO, then you need to do a manual configuration on your own. To be honest I never tried it myself, so if you do it, please share a bit of information in this forum.

What I can do, instead, is adding a chapter to the user guide PDF, with a table indicating which are (by default) the GPIO lines available on the Raspberry Pi.
So at least make my life easier and tell me how to go back to QLC+ after switching to console with Ctrl+Alt+Backspace? :)
Chapter 5.3 of the user guide:

Code: Select all

service qlcplus start/stop/restart
...like on every Debian-based system in the world...

Re: GPIO plugin problems

Posted: Thu Oct 22, 2015 10:12 pm
by enterius
mcallegari wrote:Just no.
The GPIO plugin is a generic plugin, not specific to the Raspberry Pi.
QLC+ can be compiled on other ARM boards like the Beaglebone, ODROID C-1, pcDuino, etc
It's on you to be aware of what can and cannot be used as a generic GPIO.
Also, the Raspberry Pi IO can be configured in several ways, using its specific configurations files.
What I provide with my image is an average of different things to allow several peripheral to work out of the box, such as: SPI LED strips, SPI displays/touchscreens, UART devices, I2C devices.
If you need all the IO available as GPIO, then you need to do a manual configuration on your own. To be honest I never tried it myself, so if you do it, please share a bit of information in this forum.
Ok, understood. So I guess I have a lot of to learn about Pi now to achieve what I want :) But i will try and if i succeed I share.
mcallegari wrote:What I can do, instead, is adding a chapter to the user guide PDF, with a table indicating which are (by default) the GPIO lines available on the Raspberry Pi.
That would be great!
mcallegari wrote:Chapter 5.3 of the user guide:

Code: Select all

service qlcplus start/stop/restart
...like on every Debian-based system in the world...
I red user guide twice and yet I missed it :) Forgive me, but I'm much more electronics than software guy :)

Thanks for help and explanations. I'm off to testing...

Re: GPIO plugin problems

Posted: Fri Oct 23, 2015 12:18 pm
by stef35
i am also interrested by an update of User Guide because i am a bit lost with configuring Gpio as input, with wiring details
For instance, i am a bit surprised to see your push button wired with 3.3V Pin. (see post viewtopic.php?f=17&t=8894)
Thanks Massimo

Re: GPIO plugin problems

Posted: Fri Oct 23, 2015 1:30 pm
by mcallegari
So you guys don't really want me to rest huh ? :)

I'll update the guide soon, when I have enough energies and time to do it.

Re: GPIO plugin problems

Posted: Fri Oct 23, 2015 1:30 pm
by enterius
mcallegari wrote:So you guys don't really want me to rest huh ? :)

I'll update the guide soon, when I have enough energies and time to do it.
Come on! We know it's a pleasure for you :) And we all will be very grateful!
I'll help with testing anyway, so you will have some time to rest :)

Re: GPIO plugin problems

Posted: Fri Oct 23, 2015 1:30 pm
by stef35
Hello Enterius

Just to be sure, when you say
For example when I short pin 11 to 3.3 V, which is GPIO 17, QLC+ reacts on GPIO 18
You use a push button to do that

thanks

Re: GPIO plugin problems

Posted: Fri Oct 23, 2015 1:30 pm
by mcallegari
enterius wrote:
mcallegari wrote:So you guys don't really want me to rest huh ? :)
I'll update the guide soon, when I have enough energies and time to do it.
Come on! We know it's a pleasure for you :) And we all will be very grateful!
No, it's not a pleasure for me especially because lately I realized people don't read the documentation.
I am discouraged to write every word in every document if I know then nobody will read it...just because they're italian, french or just lazy.

Also who is the "we all" that will be grateful ?
If 100% is the total of QLC+ users then 1% is the Raspberry Pi users and 0,01% is GPIO plugin users.

So please don't speak for me. I am the one who decides what to do with my spare time.

Re: GPIO plugin problems

Posted: Fri Oct 23, 2015 1:30 pm
by enterius
mcallegari wrote:No, it's not a pleasure for me especially because lately I realized people don't read the documentation.
I am discouraged to write every word in every document if I know then nobody will read it...just because they're italian, french or just lazy.

Also who is the "we all" that will be grateful ?
If 100% is the total of QLC+ users then 1% is the Raspberry Pi users and 0,01% is GPIO plugin users.

So please don't speak for me. I am the one who decides what to do with my spare time.
Ok, I'm sorry that you treated my post so negative. I didn't mean to rush you or make you do something you don't like. I wrote it with a smile, because I thought that all this QLC+ development is your great hobby and you do it with pleasure. Now I see it's not exactly like that.
So to make things clear I will wait very patiently for you to have some time and update the documentation. I can't help in this one because I don't know much about programming and I don't know Pi very well at the moment. But if you need any help with hardware or testing it then I will be glad to help. Just write to me what you need. It doesn't have to be about GPIO, I can also test some other features. I can also draw some schematics for your documentation when I know what pins are what, etc.

Re: GPIO plugin problems

Posted: Fri Oct 23, 2015 1:30 pm
by enterius
stef35 wrote:Hello Enterius
Just to be sure, when you say
For example when I short pin 11 to 3.3 V, which is GPIO 17, QLC+ reacts on GPIO 18
You use a push button to do that
thanks
Yes, I do it with a push button.

Re: GPIO plugin problems

Posted: Tue Oct 27, 2015 1:22 pm
by stef35
I quite understand your point of view, Massimo.
Documentation is the worst part of the job, for me as well in my work ;)
But what's the point to implement things that users are not aware of or even do not know how to use it?
Documentation is made for this. After, it is readen or not. But you do the job
And you 've done it pretty well so far: i have really appreciated your tuto video

Re: GPIO plugin problems

Posted: Tue Oct 27, 2015 1:22 pm
by mcallegari
stef35 wrote:Documentation is made for this. After, it is readen or not. But you do the job
Point is: this is not my job.
What's instead the point of having thousands of users using a software and very few contributing back to it ?
This is not commercial software, it's open source and it is expected to have a community of users supporting it.
If I am the community then there's no community at all.

Instead of asking asking and asking, why don't you people help to write the documentation ?
I explained as much as I could how the GPIO plugin works. Now it's just a matter of drawing a table of the GPIO working and not working specifically on the Raspberry Pi.
Please don't tell me I am the only one in the world that can do it.

You can count on the fingers of your hands the open source projects with as much documentation as QLC+ has.
But still, there is always a way to complain.
I am kind of sick of this attitude.

Again, I will write the documentation WHEN I CAN. If you can't live without it, try to figure it out yourself and share the information.

Re: GPIO plugin problems

Posted: Tue Oct 27, 2015 1:22 pm
by stef35
Again, I will write the documentation WHEN I CAN. If you can't live without it, try to figure it out yourself and share the information
Don't worry for the doc, and make a rest. You looks lke to need it.
See you