Page 1 of 1
Having issues getting GPIO button to trigger button in virtual console
Posted: Tue Nov 29, 2022 9:54 pm
by adkaros
Hello,
I'm currently working on a project using QLC 4.12.6 on the raspberry pi, specifically the raspberry pi / QLC+ image.
I have a button in the virtual console that I want to trigger via a GPIO input, I have the button set to GPIO 11, which translates to DMX 17 based on what I've read here
https://www.qlcplus.org/downloads/raspb ... _Guide.pdf
A couple of things I've tried
- OSC: I dug up some old QLC forum posts with some helpful information but all I could get was the number going up on the "packets recieved" in the inputs tab, using 127.0.0.1 and my local IP. I was sending the packets via netcat, here is sample code that I constructed after looing into OSC and what QLC seems to expect -
Code: Select all
echo -e '/behavior/strobe\0\0,i\0\0\x00\x00\x00\xFF' | ncat -u 127.0.0.1 7700
- I also used the OSC number calculator and mapped a channel in an OSC profile with the address/number, auto-detect did not work for my case (not using hardware, but sending osc with auto detect active also did nothing.
- GPIO: Using the 'GPIO Lines' option is the universe input dropdown (although this option is only available on the pi/qlc web interface) Any idea how to configure this to trigger a button? I tried setting up a profile using DMX, then creating a new channel entry for 17 (based on the GPIO -> DMX numbering that qlc uses, also tried 11 for the GPIO pin #), and then hooking this up to the button in the virtual console I'd like to trigger
I'm trying to achieve what is described in this post, so far I have a python script detecting GPIO input.
http://www.qlcplus.org/forum/viewtopic.php?t=8542
I also have felt limited in some aspects on the raspberry pi version of QLC through the web interface, the documentation seems to suggest that you can get access to all the features like the desktop version has in the
Direct Access (5.2) section, although I only see the terminal when I plug in an HDMI from the PI to my monitor, am I missing something there?
But otherwise I'm mostly wondering if there is more documentation or info on the "GPIO Lines" option that I see on the qlc web interface for the PI, just feeling like I may be missing something.
Appreciate any tips or suggestions, thanks!
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Nov 30, 2022 9:31 am
by GGGss
Hook a monitor to your raspberry and power it up. From there on, you'll get access to the desktop and can configure the GPIO's natively.
Create an input profile by using the wizzard. Hit the GPIO with a signal. (Pull to zero or push to high - that is up to you). The wizzard will detect the signal and now you can use this signal to be bound to your button on VC.
What that button does is again up to you...
The GPIO needs a rising edge, so if you want to retrigger your VC button, the state of the input first has to go to zero, (meaning you have to switch it again), and only then you get the rising edge to retrigger. So switch = ON, switch = OFF, switch is ON again.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Nov 30, 2022 3:51 pm
by adkaros
GGGss wrote: ↑Wed Nov 30, 2022 9:31 am
Hook a monitor to your raspberry and power it up. From there on, you'll get access to the desktop and can configure the GPIO's natively.
I must be missing something here, I have my Pi hooked up to my monitor via HDMI, and it always boots into the terminal view. Do I need to enter a command to get to the desktop view? Or should that be the default behavior? Thanks.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Nov 30, 2022 4:10 pm
by adkaros
Ok looks like I got into the desktop mode by changing boot options in raspi-config but the default username/password combo doesn't work (which did work in the terminal). tried changing password as well, reboot, try again, no luck.
UPDATE: Looks like I'm entering the correct user/password credentials, (tested by entering a wrong password, which says 'password incorrect'), when I enter correct password, the screen blacks out as if it was successful and then boots me back to the login prompt with no error. As if it failed to log in.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Nov 30, 2022 10:52 pm
by adkaros
EOD Follow-up:
Having trouble getting into Pi desktop using the qlc/pi image, as mentioned, I enter the correct username and password (correct because when I enter the wrong password it doesn't advance and then black out the screen, and also shows "incorrect password" message) and it boots me back to login screen.
Tried a couple of things
- Package conflict resolution: I tried disabling VNC driver through raspi-config, I read online that this can cause issues. didn't change anything.
- Change password from default: was able to change password but didn't help solve issue
- Storage space: Read that this can happen if there is no storage space left on root, but I was only at 80% on root when I tried, and fresh SD install also couldn't log in.
- Fresh install on new SD card: Tried just doing fresh install, sudo apt-get update (to allow me to fetch packages), sudo apt-get install lightdm (for desktop interface)
Any advice here? It feels like it should've worked with a fresh install on the sd card but once again maybe I'm missing an install of a particular package? Appreciate the help.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Nov 30, 2022 11:29 pm
by edogawa
There is no Pi desktop on the qlc/pi image. it is composed in a very special way where qlc is started as a service, using a graphics library instead of an X server.
Read the docs I'd say. The purchase also gives you a .deb file to install on a standard RaspiOS system, if you prefer. I do that and am happy with it, on RPi 4 or 400, YMMV.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Thu Dec 01, 2022 11:57 am
by GGGss
Like Edgar suggested, spend a tenner on donation and enjoy the special crafted raspi image. You will enjoy the money spend.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Thu Dec 01, 2022 3:12 pm
by adkaros
edogawa wrote: ↑Wed Nov 30, 2022 11:29 pm
There is no Pi desktop on the qlc/pi image. it is composed in a very special way where qlc is started as a service, using a graphics library instead of an X server.
Read the docs I'd say. The purchase also gives you a .deb file to install on a standard RaspiOS system, if you prefer. I do that and am happy with it, on RPi 4 or 400, YMMV.
I want to start by clarifying that our team did purchase the paid version of the qlc/pi image, that is also where the aforementioned issues are occurring. I've read the docs pretty extensively but there is a chance I could've missed a thing, is there any section in particular for getting desktop QLC to work?
Also I checked the .xsession-errors on the device and found the following after attempting a login to the desktop GUI
Code: Select all
Xsession: unable to start X session --- no "/home/pi/.xsession" file, no
"/home/pi/.Xsession" file, no session managers, no window managers, and no
terminal emulators found; aborting.
I'm a bit confused because you say there is no desktop mode, but the docs do specify that there is a desktop mode in the
Direct Access (5.2) section, do you have any examples of set up with a graphics library instead of using the X server? I've heard of people using tightvncserver (
https://forums.raspberrypi.com/viewtopi ... 6&t=123457)
Do I need to configure one of the graphic drivers in the raspi-config? I tried VNC and the experimental gl driver, but no luck there either. Thanks for the continued help.
Edit: It looks like copying the Xsession file (from /etc/X11) to home/pi and renaming it to .Xsession let me log in, without blacking out the screen and kicking me back, but on reboot, the login screen never comes back up. But now that xsession error is gone and I don't see any other errors. I hate to ask for a full solution, but I feel like I'm shooting in the dark here - is there steps outlined anywhere on how to set desktop gui up? I'm just not sure how else I can get this GPIO triggering working without getting access to the auto-detect feature in the full featured QLC, the web interface doesn't give me access to those options
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Fri Dec 02, 2022 8:16 am
by edogawa
What confused me was the term "desktop mode". I just tried to point out that there is no X server/graphical Desktop session available, instead QLC runs fullscreen and draws its widgets by means of a graphics library. Which doesn't touch the problem this thread is about. i haven't spent sufficient attention, it seems, sorry.
Also, I haven*t used Massimo's image in a long while, so I can't really comment on the issue described.
Like I said, I use the .deb file from the download area and install it on an ordinary RaspiOS (or even PatchboxOS when using my RPi4 with Pisound HAT).
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Fri Dec 02, 2022 10:13 am
by GGGss
I get a Pi, put the SD card with Massimo's image, attach a monitor, apply power and after tad seconds the GUI is displayed.
Go to input-output, select GPIO as input, press on configure, this screen is revealed.
It's only after I want to exit the GUI [ctrl]+[F10] (not sure - have to read the manual), I have to provide credentials.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Tue Dec 06, 2022 4:40 pm
by adkaros
GGGss wrote: ↑Fri Dec 02, 2022 10:13 am
I get a Pi, put the SD card with Massimo's image, attach a monitor, apply power and after tad seconds the GUI is displayed.
Go to input-output, select GPIO as input, press on configure, this screen is revealed.
2022-12-02 11.07.47.jpg
It's only after I want to exit the GUI [ctrl]+[F10] (not sure - have to read the manual), I have to provide credentials.
Can you send me a link to this image? Or where you bought it? I'm using qlcplus_raspios_bullseye_20220828.7z, I have never gotten that screen to show up when connecting to monitor, it always goes to the terminal.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Dec 07, 2022 1:09 pm
by GGGss
GGGss wrote: ↑Fri Dec 02, 2022 10:13 am
It's only after I want to exit the GUI [ctrl]+[F10] (not sure - have to read the manual), I have to provide credentials.
correction: it's [CTRL]+[F10] (to stop 'produce' mode) & [CTRL]+[ALT]+[Backspace] to quit the QLC+ instance.
The lower part of this:
https://www.qlcplus.org/raspberry.html gets you to the image (and upcoming releases).
I will not release any links to the Raspberry Pi SD card image. This is the sole return (money-wise) for Massimo's efforts.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Dec 07, 2022 3:51 pm
by adkaros
GGGss wrote: ↑Wed Dec 07, 2022 1:09 pm
I will not release any links to the Raspberry Pi SD card image. This is the sole return (money-wise) for Massimo's efforts.
That's understood, once into the "reserved area" with the download links, which version did you pick to use?
Below is the version I am using
qlcplus_raspios_bullseye_20220828
I see there is different versions, such as Buster, Stretch, Bullseye, etc.
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Wed Dec 07, 2022 5:16 pm
by GGGss
that is the one: qlcplus_raspios_bullseye_20220828
clean-burn
Wait long enough for the interface to show up AND have a screen connected.
That's it basically
I have a network cable connected (and keyboard and mouse) Get Your Horses Ready Men !
Re: Having issues getting GPIO button to trigger button in virtual console
Posted: Tue Dec 20, 2022 3:23 pm
by adkaros
Solved unintentionally by using a different monitor..
For anyone having this issue, just try different monitors and hopefully one works.