How to let the websocket override the desktop version

Ask a generic question about the usage of QLC+, not related to a particular operating system
Post Reply
Ihaveseenthelight
Posts: 4
Joined: Sat May 25, 2024 2:39 am
Real Name: Ben devries

Hi, how are you all? I am trying to control a light via a websocket in python. I have everything working to the point where i see my light flashing when i run my ws.send command. However, it is just a flash and then returns to the values specified in my desktop application and localhost. How do i disable their output.
User avatar
GGGss
Posts: 3052
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

Ihaveseenthelight wrote: Sat May 25, 2024 2:51 am However, it is just a flash and then returns to the values specified in my desktop application and localhost. How do i disable their output.
Welcome to the forum,
Please explain your last sentence? What is a desktop application and what do you call a localhost? A localhost refers to 127.0.0.1 in networking terms. It does not relate to QLC+ or lighting consoles in general...
And what output do you want to disable?
All electric machines work on smoke... when the smoke escapes... they don't work anymore
Ihaveseenthelight
Posts: 4
Joined: Sat May 25, 2024 2:39 am
Real Name: Ben devries

Thank you! Oké, it's not the local host then. I don't have my laptop in front of me, but I have an ip address and use port 9999. By using this address and port I can control the sliders from my browser.

The qlc.exe file is what i refer to as the desktop application.

I can adjust a slider in qlc+ or in my browser and that will change the color of the light, but when i use websocket.send('1' | '255') (or something like that) it just flashes red briefly. I want it to remain the specified color i send with python instead of flashing briefly and returning to the color that is specified by the sliders in either qlc+ or my browser.

I can be more detailed tomorrow when i have my laptop.
User avatar
GGGss
Posts: 3052
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

Did you try the web api here? https://www.qlcplus.org/Test_Web_API.html
What you sent was a value for a DMX channel. For a fixture to stay lit, you have to call a scene...
All electric machines work on smoke... when the smoke escapes... they don't work anymore
Ihaveseenthelight
Posts: 4
Joined: Sat May 25, 2024 2:39 am
Real Name: Ben devries

* i read your sentence about the web API first and then wrote the answer below. Oke, so I will have to control scenes then. How would i proceed if want to just send a sequence of values to a channel? Would that even be possible?






Uhm. i got the web api connected yesterday, but that does not seem to work anymore.
However, when i type this in in my browser url, i see the simpledesk and can control the sliders: http://<myipaddress>:9999/simpleDesk
this is my program:

import requests
from websocket import create_connection, WebSocketException
TARGET_WS_URL = "ws://<myipaddress>:9999/qlcplusWS"
ws = create_connection(TARGET_WS_URL)
ws.send(f"1|255")

I would expect channel one to go red.
In the inputs/outputs screen in QLC+ i select my ipadress as the input and DMX USB as output, as i control my lights via an Enttec USB dongle.

The moment I select the this IP address as the input, the lights start flickering in what appear to be random sequences and random colors.
User avatar
GGGss
Posts: 3052
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

Ben,

When you refer to ip-address:9999 your are using the web remote part of QLC+.
You do not have to set an input since the web remote (and the associated api) work out of the box. (That is if you set the correct startup parameter https://docs.qlcplus.org/v4/advanced/co ... parameters)

In your Python environment, your can use Artnet as an output and things will become very easy... QLC+ then translates incomming Artnet packets to DMX output. In this case you need to set an Artnet input and DMX output in Passthrough mode. https://pypi.org/project/python-artnet/
All electric machines work on smoke... when the smoke escapes... they don't work anymore
Ihaveseenthelight
Posts: 4
Joined: Sat May 25, 2024 2:39 am
Real Name: Ben devries

Ah great. Thank you for explaining so clearly and providing the links! I will dive into that.
Post Reply