Issue with Web API and RPI 4 (Debian Buster 27.05.2020)

All the topics related to QLC+ on the Raspberry Pi
Post Reply
Sn00zerman
Posts: 8
Joined: Thu Nov 22, 2018 10:08 pm
Real Name: Kris Wauters

Hello all,

I'm in the process of moving my tests to the RaspBerry Pi (instead of my macs)
I downloaded the latest 4.12.2 from the reserved web area, but I'm facing some issues:

- Whenever I connect "locally" to 127.0.0.1 with the Web-API-test, I can connect, no matter if QLCPlus runs or not !!!
- The values that I set with "Simple Desk channel set", can be read back with the "GetChannelsValues".
However, I don't see the sliders move in Simple Desk. (this works fine on a mac)
- When I try to connect to the RPI from a Mac (with the Web API test), I doesn't connect.
I can ping the machines in both directions,so network connection is OK !
- I tried running QLC+ on the RPI with and without the --web at the end, doesn't change the situation.


I'm lost with this one, I must be missing something :-(
Any help is appreciated :-)


best regards from Belgium,
Kris
User avatar
GGGss
Posts: 2732
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

Hallo Kris,

You have to make sure that the QLC+ instance is bound to the 'outside' network interface. (Hence not 127.0.0.1)
This is to make sure that the port QLC+ uses, is touchable from outside.

Sliders moving in Simple Desk ... as a result of setting them from the API? Is not meant to be working in real-time (?? !!)
Simple Desk is more like a test-mode desk and in production, the focus goes to Virtual Desk.

Groetjes,
All electric machines work on smoke... when the smoke escapes... they don't work anymore
Sn00zerman
Posts: 8
Joined: Thu Nov 22, 2018 10:08 pm
Real Name: Kris Wauters

Hello,

Well, the problem is (was) not network related :-)
On RPI, a service QLC+ is running, and this service does not communicate with a desktop instance of QLC+.
(that's why setting variables via the web-api, do not reflect in the desktop instance, and visa versa, and I could connect to the local webinterface, even when the desktop instance of QLC+ was not running)
Furthermore, there is an issue with websocket in FireFox 79.0 (64 bit- on MacOS Catalina 10.15.6. - the websocket seems not to be able to connect !
I used my own piece of software (that I wrote in Python, to make communication possible between an Elgato Stream Deck XL (without official Elgato software, connected to a RPI3) and QLC+ (running on a RPI4))

In the meanwhile, I fixed my own problem :-)

As a temporary solution (proof-of-concept):
1. I stopped the service with:

Code: Select all

sudo service qlcplus stop
2. I started QLC+ with:

Code: Select all

qlcplus -w
This resulted in the same behaviour as on my mac machines, when I did set something via the web-api,
this changes where immediately reflected in the desktop instance of QLC+ :-)

Because I'm going to use this RPI4 mostly with QLC+ (+running a few tasks in the background, so I can't use the full qlcplus RPI image),
and I want QLC+ to startup after boot, fullscreen, with my "musicstudio" workspace loaded, I did fix the permanently:

Permanent fix:
1. In the folder /etc/init.d I renamed qlcplus to qlc+.bak:

Code: Select all

sudo mv qpcplus qlc+.bak
I also did take away the execute rights of this file:

Code: Select all

sudo chmod -x qlc+.bak
This prevents the QLC+ service from starting af boot time.
2. Next, I created a qlcplus.desktop file in /home/pi/.config/autostart
In case the autostart folder does not exists (yet):

Code: Select all

mkdir /home/pi/.config/autostart
4. Make the qlcplus.desktop file:

Code: Select all

nano /home/pi/.config/autostart/qlcplus.desktop
5. Next, insert the following data in this file:

Code: Select all

   [Desktop Entry]  
   Type=Application
   Name=QLCplus
   Exec=/usr/bin/qlcplus -w -f -o /home/pi/musicstudio.qxw
6. save the file, exist it, and reboot ...
7. Eeh voila, QLC+ starts after reboot, running fullscreen, with an accesible web-interface that is attached to the desktop version of QLC+, and running my musicstudio workspace :-)
(behaving exactly the same as on my mac machines)

I don't know if this is the correct way (I'm a mac user and windows developer by default), but it works for me.
Maybe somebody can explain what the qlcplus service is actually for ? It doesn't communicate with the desktop instance of QLC+ !

Next step for me: creating all my fixtures and create scenes. (to be activated via the web-api)


best regards,
Kris
Post Reply