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