Page 1 of 1

Websocket talkback

Posted: Tue Dec 03, 2013 4:00 pm
by everythingDaniel
Does the websocket server for the web console talk back to the page in any way shape of form? If I send some data to it, could I retrieve all the values that are on in the virtual console? I want to be able to know which things are on and off, but every time the web console refreshes it all defaults to off/grey, when some things should be green.

This is not exactly about the web console in QLC+, but another web console I am building from the same Javascript.



Thanks.

Websocket talkback

Posted: Tue Dec 03, 2013 4:11 pm
by Massimo Callegari
Hi to you.
Again, the answer is: web access is **experimental**.
It will be released as working when it will reach a working state. Unfortunately my spare time lately is not so much.

By the way what does your last sentence mean ?

Websocket talkback

Posted: Tue Dec 03, 2013 4:23 pm
by everythingDaniel
Thanks for the reply, I am well aware it's a experimental feature, I've been looking at all parts of it to see what makes it tick.

I think I posted about it a while back, but I built a web panel from the QLC+ Javascript web framework. It's been running rock steady 24/7 for a long while now on a dedicated iPhone with no glitches or dropped connections. More or less it is the light switch for my room.

Websocket talkback

Posted: Tue Dec 03, 2013 5:05 pm
by Massimo Callegari
Eh, unfortunately there's been no big improvement since then.
I worked on other areas of the code that needed some love.

Now I am back on this topic and evaluating an efficient way to send signals back to the web interface. Takes some time.

By the way, are the one who had websockets dying after 30 seconds (or so) ?
Found anything better than polling the sockets ?

Websocket talkback

Posted: Tue Dec 03, 2013 5:13 pm
by everythingDaniel
Yepp, that is me, with the sockets that kept dying. Reconnecting every so often was the best I could come up with, I don't think it is the best option over all, but it does work very well and fast.

I think it would be great, if possible, to send a command to the server, and have it return a list of values of what the status of everything is.

I'm a web guy more or less, I have very little knowledge of C and such. So in my mind, the Websocket server is a PHP script that is in the background, that takes data and saves it to a SQL DB on/off or 0-255, then QLC+ pulls the data after a change and does what it does. So My mind is thinking just do a query and pull all the values back through the socket.

I know thats probably not anywhere how it actually works, but that's my mindset for some reason.

--DL

Websocket talkback

Posted: Tue Dec 03, 2013 5:55 pm
by Massimo Callegari
I am wondering. Does the dying thing happen only on iPhone ?
Have you tried Chrome, Safari and Firefox on different devices ?

As far as I can tell, Chrome works pretty well and doesn't seem to shut the door in the websockets face :)

QLC+ webaccess goal is not to give a complete administration like you were at the PC. If so, you would encounter serious latency issues, especially over WiFi.
Basically the webserver inside QLC+ is mongoose (http://cesanta.com/) which implements basic websockets.
Web pages are created dynamically by QLC+ upon request and they just reflect what you have placed in your virtual console.
"Talk back" signals will be just the widgets change of status. I'll start with buttons and progress with sliders, frames and so on

Websocket talkback

Posted: Wed Dec 04, 2013 9:32 am
by Massimo Callegari
Ok, you were right and I take it back.
I had to add the poll. Period.
If you compile from sources, now there's a better situation on webaccess. I've added talkbacks of buttons, sliders and cue lists

Websocket talkback

Posted: Wed Dec 04, 2013 12:37 pm
by everythingDaniel
Gotcha, yes I did the tests on OSX/iPhone chrome and Safari, Chrome on Ubuntu.

When I get back home I'm oping to have to try my hand at compiling.


-DL

Websocket talkback

Posted: Thu Dec 05, 2013 2:00 am
by everythingDaniel
Well I guess compiling is not my thing, I'll wait to see the changes on the next release! Looking forward to playing around with it.


--DL