On my intranet I was listening to the KNX Bus via long polling and ajax requests using
/cgi-bin/scada-vis/general/objects-update.cgi
Since updating to firmware 20160927, this no longer works, I haven't had time to dig into it yet. Is there a new state-of-the-art way to listen to the bus which will update values on a webpage without reloading the page (i.e. to update a field containing a temperature value, or switch status, etc.)
Long polling is still there, but only for the admin part, so as a temporary solution you can access it via /scada-main/objects/update
I'll prepare a WebSocket example later on.
03.01.2017, 13:51 (This post was last modified: 03.01.2017, 14:02 by ceyhanc.)
(03.01.2017, 11:26) pid=\2913' Wrote:Here's a short example for how it can work via WebSocket, the problem is that this example requires latest beta firmware and work won't on 2016.09.30.
(28.12.2016, 12:29)ceyhanc Wrote: Can anyone share a Websocket example which is working with same HTTP port ?
Can you explain which kind of data do you want to send over websocket?
I need to ask, when localbus.init runs;
1. Does websocket server runs at same ip/port with visualisation ?
2. when we try to listen 1 object; will server push to chaged data or actual data to client ?
3. can we listen multiple objects with [ localbus.listen('object', ] notation ?
We want to take some binary objects true/false values to our native Android/IOS app.
Our aims;
1. We use several alarm objects and get informations of them fastly (like TCP socket communication)
2. We want to server will push to alarm info to client.
3. We want to do all communications with one port. (All LM Visualisation and this information)
4. We dont want to use JSON/XML (It requires reconnect to server for getting informations every 5 sec.)
(03.01.2017, 11:26)admin Wrote: Here's a short example for how it can work via WebSocket, the problem is that this example requires latest beta firmware and work won't on 2016.09.30.
Thanks.
1. Will everything else keep working if I upgrade to the latest beta firmware?
2. Will the websocket code still run in the next official firmware release? (I do not want to reprogram my intranet with every release)
3.
Quote:Long polling is still there, but only for the admin part, so as a temporary solution you can access it via /scada-main/objects/update
Can't get this work, what is the name of the .cgi file in the folder you mentioned?
Many thanks!
Edit: oh- I might have had a /cgi in my path. Will check tonight.
Does websocket also work the other way round, e.g. what is the code to send a grp.write from html/js/jquery?
I tried altering the path as described a few posts above, did not work, see my code snippets above. I also tried adding /cgi-bin/ at the beginning of the altered path, also no success. I'd really like to fix this that my site is up and running again and switch to websocket as soon as the beta firmware is final. Thank you!
(04.01.2017, 09:01)admin Wrote: As for sending values from client you can use these functions (keep in mind that only group addresses can be used here, not object names):
That would be great, can you please send the beta firmware to the email I am registered here in the forum? Furthermore, do the packages for MySQL work on the beta firmware? Many thanks!
Which device do you need the FW for? MySQL will work, but you will have to re-install the packages, because custom packages are not kept during FW upgrade.