HTML Demo project

240 views
Skip to first unread message

Stuart Gillies

unread,
Oct 19, 2020, 4:01:04 PM10/19/20
to Annex WiFi RDS
I have just successfully made an mqtt transaction system function with several communicating modules, so have some experience of Annex RDS, but I just started with adding some html to my project. For starters I worked through the demo projects (html clock, then the Bas version of the clock). The html works fine and updates the time, the problem arises when I try to run the bas version. Here, I get the clock display but the javascript obviously isn't functioning as it sits at midnight. Even the example code doesn't update the time, so it isn't my typing.

Some idea of where to look for clues would be helpful!

I'm running in Firefox under Ubuntu 20.04, and am now also running the Toolkit under WINE. I haven't tested everything under WINE, but certainly the html conversion works.

Dwight

unread,
Oct 19, 2020, 10:25:20 PM10/19/20
to Annex WiFi RDS
Hi Stu,
I think it would be easier for others to give guidance and feedback if you could share the code that is not working.
Can you post it?

thanks
dwight

Electroguard

unread,
Oct 20, 2020, 8:37:39 AM10/20/20
to Annex WiFi RDS
I don't know anything about your system stuartg... but maybe my system can offer some clues of where to look for your problems...

My Annex 'Sentry' alarm has an RTC module and TM display giving a live clock 24/7, which has been running standalone ok for more than a year, announcing visitors over a distributed TTS audio system.
A Watchdog monitors the Sentry 24/7 and can reboot it if needed, and log any failures.
A RouterDog similarly monitors and can remotely reboot the routers if needed.
They (and others) sync time to the second with the Sentry RTC at startup, plus any time any other device starts up or re-syncs (I prefer my system isolated from the internet).
The Sentry Log records all device startups, and all sensor events, to file for viewing by remote browser.  So there's a lot of activity and interaction going on, all without problems.

Sometimes I use a Win10 laptop to view and clear the Sentry Log, and once or twice have used an Android phone, but usually it will either be directly from my MX Linux Firefox browser, or else from Firefox in a Win7 virtual machine running in VMware on MX Linux.

The important point I'm making is that I very much depend on my system, which is computer independent, very reliable, and its mix of Annex devices keep going wonderfully.


BUT NOT IF I KEEP BROWSER CONNECTIONS OPEN.
I have found that keeping websocket connections open between device and browser is like continuously twisting up a tourniquet... something will eventually break.
It may keep struggling along for days, but inevitably things will choke up and require closing the web page with its tangled javascript, and invariably also require a reboot of the device.

Any device with an Output web page websocket connection which is continuously updating (such as the second hands of a clock) is best closed when no longer needed.
If multiple webpages are opened to multiple devices, they can all be disconnected by closing down the browsers multiple tabs, then when the browser is reloaded with all its previous tabs, only those which are freshly revisited will actually reconnect their websockets again (so don't close the browser with an Annex tab active, else it will be reconnected when the browser starts up again).

Another option is to specifically close all pages when done and relaunch them from shortcut icons created on your desktop.

There is currently no way to disable html logging other than manually checking Stop Log checkbox in the Editor page, so BE AWARE that every time you close an Editor page, the Stop Log checkbox defaults to unchecked again, and will be echoing all your browser writes (every second if you are displaying clock seconds) to the log window until you remember to manually Stop Log again.

In summary - Annex is usually good as gold in my experience, but long-term browser javascript connections can be problematic. When such problems are experienced, the only sure recovery is to delete the connected web page and reboot the device (preferably by cycling power), and don't forget to Stop Log again after reconnecting.

Good luck.

Stuart Gillies

unread,
Oct 21, 2020, 5:01:22 AM10/21/20
to Annex WiFi RDS
thanks for the ideas, which I will pursue. However, this isn't 'my system', it is simply the demo on the AnnnexRDS HTML Conversion web page. So there is nothing I can share with you that you don't have.

Fundamentally, the question is, why would a javascript procedure not execute when following the instructions on the demo page?

cicciocb

unread,
Nov 9, 2020, 6:00:17 AM11/9/20
to Annex WiFi RDS


On Wednesday, 21 October 2020 11:01:22 UTC+2, Stuart Gillies wrote:
thanks for the ideas, which I will pursue. However, this isn't 'my system', it is simply the demo on the AnnnexRDS HTML Conversion web page. So there is nothing I can share with you that you don't have.

Fundamentally, the question is, why would a javascript procedure not execute when following the instructions on the demo page?

HI Stuart,
could you clarify your question ?

Do you want execute a javascript function from annex ? 

Gerard Sontag

unread,
Nov 10, 2020, 6:30:38 AM11/10/20
to Annex WiFi RDS
Hello Stuart,
just in case....
Could you check that javascript is enabled on your browser (Firefox) by typing :
about:config                         in the address bar
then accept
then type :
javascript.enabled
and verify that it is set to true

Stuart Gillies

unread,
Nov 10, 2020, 2:41:52 PM11/10/20
to Annex WiFi RDS
Yes, javascript is enabled. Everything else works. I simply followed the Demo instructions, and the clock worked up to the point where the js function is included. Then it didn't. I will do it again. This was just a precursor to building a web page to display data from my home mqtt monitoring. Presumably the clock demo with js works for others?

Stuart Gillies

unread,
Feb 18, 2021, 5:47:45 AM2/18/21
to Annex WiFi RDS
I came back to this today as I wanted to 'borrow' some code. But it still won't work as a basic program, despite using the exact code from the demo example. The clock displays, but the time is 0:0:0 and doesn't update. I tried it with both Firefox and Chrome under ubuntu, Firefox under Android, and Firefox under Win10. In every case the html works, and the bas file doesn't.

It would be nice to nail this if possible.

Stuart
Reply all
Reply to author
Forward
0 new messages