javascript/websocket issue

All that relates to Javascript, CSS, HTML, ....
Post Reply
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

javascript/websocket issue

Post by Stuart »

As usual, probably a simple problem but it beats me.

I have a heating control system written in Annex on a 32bit chip. I wanted to improve the user interface so I have built a mimic diagram of the system, output using html and svg. To make this active, the html is painted once when the system starts, and from then on the changes (switches and valves operating, boiler lighting, temperatures, programmers switching etc.) are all done using D3js and JSCalls. It works well in test and I am at the stage of integrating the graphics with the controls so it reflects the state of the system. Up to this point I have used different tabs in the same Firefox browser to access the output and the editor.

So far so good. But when I try to access the output on a different device (I have tried several devices and browsers) I get the html initial paint correctly. But I don't get the javascript changes. JS is enabled in the browsers. I don't know much about websockets. But do I need to do something to enable JS for different browsers that I didn't already do for the development machine?

I'm using 1.48.22 noBLE and finding it pretty solid. I have only had one unexplained restart and that was after 200 hours of running.
User avatar
cicciocb
Site Admin
Posts: 1889
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 405 times
Been thanked: 1260 times
Contact:

Re: javascript/websocket issue

Post by cicciocb »

It's hard to answer at your question, probably the JS libraries that you are using are not accessible because you are loading locally ?
Stuart
Posts: 126
Joined: Fri Feb 19, 2021 7:46 pm
Has thanked: 5 times
Been thanked: 20 times

Re: javascript/websocket issue

Post by Stuart »

Solved. You were right, of course. It seems that the jsexternal statement was missing from the file I was using. Which I didn't spot initially as it worked fine on the development machine.
Post Reply