Netron web interface - quicker and smoother version?

Hello,

Is it worth to provide you a more robust, quicker and smoother web interface for Netron?

I’ve just bought my first netron EP4, and I found the web interface, lovely, but very slow, and saw a lot of enhancement which can be done (full async interface on 1 page only, with usage of promises to accelerate the different fetchs).

Does it interest you? If yes, which kind of navigator is targeted, only recent one (Chrome, Edge, Opera, Firefox ?)

Best regards,

Sylvain

It works very fast on my laptop using edge, but we have heard mentions of a slow web ui this from very few users. I suspect some antivirus possibly causing this.
Share a video of what it looks like for you.

Oh, my feedback was more about the code behind the web interface which is not very robust (several call to the same api, no // calls, no reuse of codes, lost of menu compact when navigating between page, heavy DOM). There’s only small things, mostly related to UI.

image

I’m working on it on my side, will keep you informed :slight_smile:

As result it requires less external calls, and it will needs 7 more requests to get the same information from the device.

Will see if it worth it, but it seems we can do a more powerful interface

Some news about the development, everything seems to going fine.
I’ve used workaround to continue to dev as CORS is blocking the direct access from the web, but it should works just fine once uploaded in the EN4 to replace current web system.

The post to set information on EN4 is not yet in place, but it will come later on.

For the moment, just trying to get all pages set-up, just started this afternoon.

As a post is always better with medias, here a quick video where the project is, and with a quick comparison with current solution:

As major change compare to current version:

  • Usage:
    • Light/Dark mode (automatically retrieved from your computer or smartphone) which can also be manually forced by using the toggle on top right
    • Single time loading, the page never needs to be reloaded
      • Navigation is kept, compact menu is kept, page switching is instantaneous
    • “Quick” graphical refresh to get a bit more modern, while keeping original spirit
  • Technical:
    • Only using bootstrap for main theming (css) and few dynamic effect (mostly menu)
    • Switch to Font Awesome 6 free version
    • JS ES6 vanilla (no add-on, except bootstrap that I would like to remove at a certain time)
    • All called to api done once, and then the page is not reloaded, either API recall (until it will be needed to recall API for running cues (need to see if a websocket or long polling can be setup) and identify feature)
    • Current size is about 1 Mo
  • Next steps:
    • Continue the page integration from API (maybe the rotary encoders from Device Settings will be skipped and replaced by a simpler slider)
    • Reverse-eng. the different form validations
    • Reverse-eng. the different devices (e.g.: RDM10) specificities (I’m currently focused for my own, EN4 only)
    • Trying to upload the modified .img on my EN4 to test with the real APIs :crossed_fingers:

Good night :slight_smile:

1 Like

Some news, it is going ahead, more slowly than I was expected :frowning:

I’ve found a nice virtual keyboard, so it’s in, that will help a lot ! (see NX1 - Netron webpage - keyboard is missing

DMX ports is done, it was an important part.

The config is now in external file to ease the maintenance/customization:

I’ve figured out that before to go to deep, I need to have automatic test to validate each steps. Found out cypress which is very cool to use!

Edit:
DMX Port page almost ended :slight_smile:

If people want to give a try with the interface (no package available for download, because it still very draft work): Netron template

The github repository is there if some of you want to help on this project :slight_smile: GitHub - Spb8Lighting/Netron-UI: Netron UI is a standalone web-application targeting to replace Netron web-application (network hardware from Obsidian Control Systems)

Latest update:

I think this view can interest few people, automatically create cuelist view based on cues status:

If some people want to help me, I would appreciate to get the different configuration from your Netron device to test the different configuration before the first upload on my own device (needed before public release).

I’ve wrote the following code to download all the configuration file from a Netron Device, and directly download it locally as ZIP file: (it requires the device accessing the Netron web page to be connected to the Internet as I have a dependency to JSZip)

// Load JSZip library
const script = document.createElement('script')
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js'
script.onload = async () => {
    const zip = new JSZip()
    const urls = [
        'Setting.json', 'IP.json', 'index.json', 'DMXPorts.json', 'Identify.json',
        'Presets.json', 'UserPresets.json', 'Cues.json', 'CuesSetting.json',
        'CuesStatus.json', 'RemoteInputs.json', 'DMXInputab.json', 'DMXInputmerger.json'
    ]
    await Promise.all(urls.map(async url => {
        try {
            const response = await fetch(url)
            if (!response.ok) throw new Error(`Failed to fetch ${url}`)
            const content = await response.json()
            zip.file(url, JSON.stringify(content, null, 2))
        } catch (error) {
            console.warn(`Skipping ${url}: ${error.message}`)
        }
    }))
    zip.generateAsync({ type: 'blob' }).then(content => {
        const link = document.createElement('a')
        link.href = URL.createObjectURL(content)
        link.download = 'NETRON_JSON_FILES.zip'
        link.click()
    })
}
document.head.appendChild(script)

To use it, access your netron web interface as you’re used too.

Then, open the web developer tool (CTRL+SHIFT+I) (valid for EDGE and CHROME), the access the console:

You can try to paste the code, but if it is the first time you access your console, you’ll have an advertisement that it can be dangerous to paste code here, and that’s right!

To allow to paste the code, you need to follow the instruction given in this advertisement (you need to type “allow for pasting” or something similar, then press enter.

From now you should be able to paste the code, and press enter to generate the zip file:

As an output, it will download a zip file named “NETRON_JSON_FILES.zip”, if you can share with me, it will be great :slight_smile: