@signageos/front-applet 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +207 -0
- package/README.md +3 -0
- package/dist/bundle.js +9 -0
- package/dist/bundle.js.map +1 -0
- package/docs/README.md +5 -0
- package/docs/js-api/js-api-introduction.md +73 -0
- package/docs/js-api/js-applet-basics.md +294 -0
- package/docs/js-api/js-applet-resources.md +172 -0
- package/docs/js-api/js-browser.md +170 -0
- package/docs/js-api/js-command.md +208 -0
- package/docs/js-api/js-display.md +48 -0
- package/docs/js-api/js-file-system.md +568 -0
- package/docs/js-api/js-hardware-serial.md +142 -0
- package/docs/js-api/js-hardware.md +70 -0
- package/docs/js-api/js-iframes.md +88 -0
- package/docs/js-api/js-input.md +84 -0
- package/docs/js-api/js-loading-fonts.md +138 -0
- package/docs/js-api/js-monitoring-commands.md +108 -0
- package/docs/js-api/js-monitors.md +55 -0
- package/docs/js-api/js-offline-cache-media-files.md +314 -0
- package/docs/js-api/js-offline-cache-simple-data.md +134 -0
- package/docs/js-api/js-sensors.md +70 -0
- package/docs/js-api/js-sync-playback.md +197 -0
- package/docs/js-api/js-timing.md +54 -0
- package/docs/js-api/js-video-inputs-internal-ports.md +149 -0
- package/docs/js-api/js-video-stream.md +230 -0
- package/docs/js-api/js-video.md +282 -0
- package/docs/management-api/1-js-management.md +133 -0
- package/docs/management-api/10-js-management-application.md +123 -0
- package/docs/management-api/11-js-management-network.md +185 -0
- package/docs/management-api/12-js-management-security.md +86 -0
- package/docs/management-api/13-js-management-wifi.md +357 -0
- package/docs/management-api/2-js-management-firmware.md +93 -0
- package/docs/management-api/3-js-management-remote-control.md +73 -0
- package/docs/management-api/4-js-management-power.md +94 -0
- package/docs/management-api/5-js-management-screen.md +263 -0
- package/docs/management-api/6-js-management-time.md +166 -0
- package/docs/management-api/7-js-management-volume.md +46 -0
- package/docs/management-api/8-js-management-package.md +62 -0
- package/docs/management-api/9-js-management-debug.md +53 -0
- package/es6/FrontApplet/Browser/Browser.d.ts +24 -0
- package/es6/FrontApplet/Browser/Browser.js +73 -0
- package/es6/FrontApplet/Browser/Browser.js.map +1 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +174 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +55 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -0
- package/es6/FrontApplet/Browser/events.d.ts +15 -0
- package/es6/FrontApplet/Browser/events.js +14 -0
- package/es6/FrontApplet/Browser/events.js.map +1 -0
- package/es6/FrontApplet/Browser/messages.d.ts +5 -0
- package/es6/FrontApplet/Browser/messages.js +3 -0
- package/es6/FrontApplet/Browser/messages.js.map +1 -0
- package/es6/FrontApplet/Command/Command.d.ts +16 -0
- package/es6/FrontApplet/Command/Command.js +68 -0
- package/es6/FrontApplet/Command/Command.js.map +1 -0
- package/es6/FrontApplet/Command/ICommand.d.ts +4 -0
- package/es6/FrontApplet/Command/ICommand.js +3 -0
- package/es6/FrontApplet/Command/ICommand.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js +3 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEvent.js +3 -0
- package/es6/FrontApplet/Command/ICommandEvent.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEventListener.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js +3 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js.map +1 -0
- package/es6/FrontApplet/Debug/Debug.d.ts +22 -0
- package/es6/FrontApplet/Debug/Debug.js +35 -0
- package/es6/FrontApplet/Debug/Debug.js.map +1 -0
- package/es6/FrontApplet/Display/Display.d.ts +11 -0
- package/es6/FrontApplet/Display/Display.js +35 -0
- package/es6/FrontApplet/Display/Display.js.map +1 -0
- package/es6/FrontApplet/Error/AppletCommandError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletCommandError.js +11 -0
- package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletError.d.ts +7 -0
- package/es6/FrontApplet/Error/AppletError.js +10 -0
- package/es6/FrontApplet/Error/AppletError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletHardwareError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js +11 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletResourcesError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js +11 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletSecurityError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js +11 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletStreamError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletStreamError.js +10 -0
- package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletVideoError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletVideoError.js +11 -0
- package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodes.d.ts +18 -0
- package/es6/FrontApplet/Error/ErrorCodes.js +23 -0
- package/es6/FrontApplet/Error/ErrorCodes.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.d.ts +3 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js +22 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.d.ts +6 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js +10 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -0
- package/es6/FrontApplet/Error/FileNotFoundError.d.ts +8 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js +10 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -0
- package/es6/FrontApplet/Error/SosError.d.ts +20 -0
- package/es6/FrontApplet/Error/SosError.js +22 -0
- package/es6/FrontApplet/Error/SosError.js.map +1 -0
- package/es6/FrontApplet/Error/errorHelper.d.ts +12 -0
- package/es6/FrontApplet/Error/errorHelper.js +50 -0
- package/es6/FrontApplet/Error/errorHelper.js.map +1 -0
- package/es6/FrontApplet/Exchange/Exchange.d.ts +7 -0
- package/es6/FrontApplet/Exchange/Exchange.js +28 -0
- package/es6/FrontApplet/Exchange/Exchange.js.map +1 -0
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +30 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js +210 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.d.ts +4 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js +3 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js.map +1 -0
- package/es6/FrontApplet/FileSystem/types.d.ts +66 -0
- package/es6/FrontApplet/FileSystem/types.js +20 -0
- package/es6/FrontApplet/FileSystem/types.js.map +1 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.d.ts +6 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js +46 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -0
- package/es6/FrontApplet/FrontApplet.d.ts +56 -0
- package/es6/FrontApplet/FrontApplet.js +183 -0
- package/es6/FrontApplet/FrontApplet.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +30 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +92 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Hardware.d.ts +20 -0
- package/es6/FrontApplet/Hardware/Hardware.js +51 -0
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.d.ts +6 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +15 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js +11 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js +3 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/Led.d.ts +11 -0
- package/es6/FrontApplet/Hardware/Led/Led.js +38 -0
- package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -0
- package/es6/FrontApplet/Hardware/SerialPort.d.ts +14 -0
- package/es6/FrontApplet/Hardware/SerialPort.js +45 -0
- package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -0
- package/es6/FrontApplet/Hash/generator.d.ts +1 -0
- package/es6/FrontApplet/Hash/generator.js +10 -0
- package/es6/FrontApplet/Hash/generator.js.map +1 -0
- package/es6/FrontApplet/IMessage.d.ts +6 -0
- package/es6/FrontApplet/IMessage.js +3 -0
- package/es6/FrontApplet/IMessage.js.map +1 -0
- package/es6/FrontApplet/IPostMessage.d.ts +5 -0
- package/es6/FrontApplet/IPostMessage.js +3 -0
- package/es6/FrontApplet/IPostMessage.js.map +1 -0
- package/es6/FrontApplet/Iframe/Iframe.d.ts +24 -0
- package/es6/FrontApplet/Iframe/Iframe.js +51 -0
- package/es6/FrontApplet/Iframe/Iframe.js.map +1 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.d.ts +6 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js +3 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +6 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +5 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +1 -0
- package/es6/FrontApplet/Input/Input.d.ts +20 -0
- package/es6/FrontApplet/Input/Input.js +35 -0
- package/es6/FrontApplet/Input/Input.js.map +1 -0
- package/es6/FrontApplet/Management/App.d.ts +37 -0
- package/es6/FrontApplet/Management/App.js +50 -0
- package/es6/FrontApplet/Management/App.js.map +1 -0
- package/es6/FrontApplet/Management/Audio.d.ts +9 -0
- package/es6/FrontApplet/Management/Audio.js +40 -0
- package/es6/FrontApplet/Management/Audio.js.map +1 -0
- package/es6/FrontApplet/Management/Debug.d.ts +11 -0
- package/es6/FrontApplet/Management/Debug.js +50 -0
- package/es6/FrontApplet/Management/Debug.js.map +1 -0
- package/es6/FrontApplet/Management/Firmware.d.ts +37 -0
- package/es6/FrontApplet/Management/Firmware.js +50 -0
- package/es6/FrontApplet/Management/Firmware.js.map +1 -0
- package/es6/FrontApplet/Management/FirmwareType.d.ts +4 -0
- package/es6/FrontApplet/Management/FirmwareType.js +8 -0
- package/es6/FrontApplet/Management/FirmwareType.js.map +1 -0
- package/es6/FrontApplet/Management/IBatteryStatus.d.ts +7 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js +3 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js.map +1 -0
- package/es6/FrontApplet/Management/IBrightness.d.ts +6 -0
- package/es6/FrontApplet/Management/IBrightness.js +3 -0
- package/es6/FrontApplet/Management/IBrightness.js.map +1 -0
- package/es6/FrontApplet/Management/INetworkInfo.d.ts +53 -0
- package/es6/FrontApplet/Management/INetworkInfo.js +17 -0
- package/es6/FrontApplet/Management/INetworkInfo.js.map +1 -0
- package/es6/FrontApplet/Management/IOrientation.d.ts +4 -0
- package/es6/FrontApplet/Management/IOrientation.js +3 -0
- package/es6/FrontApplet/Management/IOrientation.js.map +1 -0
- package/es6/FrontApplet/Management/IWifiEvent.d.ts +11 -0
- package/es6/FrontApplet/Management/IWifiEvent.js +12 -0
- package/es6/FrontApplet/Management/IWifiEvent.js.map +1 -0
- package/es6/FrontApplet/Management/Management.d.ts +44 -0
- package/es6/FrontApplet/Management/Management.js +113 -0
- package/es6/FrontApplet/Management/Management.js.map +1 -0
- package/es6/FrontApplet/Management/Network.d.ts +26 -0
- package/es6/FrontApplet/Management/Network.js +83 -0
- package/es6/FrontApplet/Management/Network.js.map +1 -0
- package/es6/FrontApplet/Management/Package.d.ts +8 -0
- package/es6/FrontApplet/Management/Package.js +38 -0
- package/es6/FrontApplet/Management/Package.js.map +1 -0
- package/es6/FrontApplet/Management/Power.d.ts +13 -0
- package/es6/FrontApplet/Management/Power.js +78 -0
- package/es6/FrontApplet/Management/Power.js.map +1 -0
- package/es6/FrontApplet/Management/RemoteControl.d.ts +14 -0
- package/es6/FrontApplet/Management/RemoteControl.js +61 -0
- package/es6/FrontApplet/Management/RemoteControl.js.map +1 -0
- package/es6/FrontApplet/Management/Screen.d.ts +18 -0
- package/es6/FrontApplet/Management/Screen.js +114 -0
- package/es6/FrontApplet/Management/Screen.js.map +1 -0
- package/es6/FrontApplet/Management/Security.d.ts +21 -0
- package/es6/FrontApplet/Management/Security.js +56 -0
- package/es6/FrontApplet/Management/Security.js.map +1 -0
- package/es6/FrontApplet/Management/Time.d.ts +16 -0
- package/es6/FrontApplet/Management/Time.js +59 -0
- package/es6/FrontApplet/Management/Time.js.map +1 -0
- package/es6/FrontApplet/Management/Wifi.d.ts +29 -0
- package/es6/FrontApplet/Management/Wifi.js +151 -0
- package/es6/FrontApplet/Management/Wifi.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.d.ts +21 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js +16 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.d.ts +2 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js +21 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.d.ts +25 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +23 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.d.ts +5 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.d.ts +4 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js +8 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -0
- package/es6/FrontApplet/Monitors/Monitors.d.ts +16 -0
- package/es6/FrontApplet/Monitors/Monitors.js +31 -0
- package/es6/FrontApplet/Monitors/Monitors.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/Cache.d.ts +38 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js +199 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IFile.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +47 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.d.ts +16 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js +8 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +7 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js.map +1 -0
- package/es6/FrontApplet/Offline/IAddFont.d.ts +50 -0
- package/es6/FrontApplet/Offline/IAddFont.js +22 -0
- package/es6/FrontApplet/Offline/IAddFont.js.map +1 -0
- package/es6/FrontApplet/Offline/IElement.d.ts +7 -0
- package/es6/FrontApplet/Offline/IElement.js +6 -0
- package/es6/FrontApplet/Offline/IElement.js.map +1 -0
- package/es6/FrontApplet/Offline/IFileType.d.ts +3 -0
- package/es6/FrontApplet/Offline/IFileType.js +4 -0
- package/es6/FrontApplet/Offline/IFileType.js.map +1 -0
- package/es6/FrontApplet/Offline/ISaveFile.d.ts +49 -0
- package/es6/FrontApplet/Offline/ISaveFile.js +26 -0
- package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +26 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +25 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/Offline.d.ts +27 -0
- package/es6/FrontApplet/Offline/Offline.js +105 -0
- package/es6/FrontApplet/Offline/Offline.js.map +1 -0
- package/es6/FrontApplet/Offline/Types.d.ts +7 -0
- package/es6/FrontApplet/Offline/Types.js +9 -0
- package/es6/FrontApplet/Offline/Types.js.map +1 -0
- package/es6/FrontApplet/Sensors/Proximity.d.ts +16 -0
- package/es6/FrontApplet/Sensors/Proximity.js +36 -0
- package/es6/FrontApplet/Sensors/Proximity.js.map +1 -0
- package/es6/FrontApplet/Sensors/Sensors.d.ts +11 -0
- package/es6/FrontApplet/Sensors/Sensors.js +18 -0
- package/es6/FrontApplet/Sensors/Sensors.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEvent.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.d.ts +5 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamMessage.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js +3 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamProperties.d.ts +10 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js +3 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js.map +1 -0
- package/es6/FrontApplet/Stream/Stream.d.ts +22 -0
- package/es6/FrontApplet/Stream/Stream.js +131 -0
- package/es6/FrontApplet/Stream/Stream.js.map +1 -0
- package/es6/FrontApplet/Stream/StreamProtocol.d.ts +9 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js +13 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -0
- package/es6/FrontApplet/Stream/streamEvents.d.ts +8 -0
- package/es6/FrontApplet/Stream/streamEvents.js +3 -0
- package/es6/FrontApplet/Stream/streamEvents.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncEvent.d.ts +4 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js +3 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.d.ts +7 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js +3 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js.map +1 -0
- package/es6/FrontApplet/Sync/Sync.d.ts +20 -0
- package/es6/FrontApplet/Sync/Sync.js +102 -0
- package/es6/FrontApplet/Sync/Sync.js.map +1 -0
- package/es6/FrontApplet/Sync/syncEvents.d.ts +6 -0
- package/es6/FrontApplet/Sync/syncEvents.js +3 -0
- package/es6/FrontApplet/Sync/syncEvents.js.map +1 -0
- package/es6/FrontApplet/Timing/Timing.d.ts +10 -0
- package/es6/FrontApplet/Timing/Timing.js +16 -0
- package/es6/FrontApplet/Timing/Timing.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +2 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js +4 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +11 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js +33 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.d.ts +6 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js +3 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js.map +1 -0
- package/es6/FrontApplet/Touch/Touch.d.ts +13 -0
- package/es6/FrontApplet/Touch/Touch.js +54 -0
- package/es6/FrontApplet/Touch/Touch.js.map +1 -0
- package/es6/FrontApplet/Validate/Validate.d.ts +43 -0
- package/es6/FrontApplet/Validate/Validate.js +266 -0
- package/es6/FrontApplet/Validate/Validate.js.map +1 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.d.ts +8 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js +140 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEvent.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoEvent.js +6 -0
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEventListener.d.ts +5 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js +3 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoMessage.d.ts +4 -0
- package/es6/FrontApplet/Video/IVideoMessage.js +3 -0
- package/es6/FrontApplet/Video/IVideoMessage.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoProperties.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoProperties.js +3 -0
- package/es6/FrontApplet/Video/IVideoProperties.js.map +1 -0
- package/es6/FrontApplet/Video/Video.d.ts +39 -0
- package/es6/FrontApplet/Video/Video.js +242 -0
- package/es6/FrontApplet/Video/Video.js.map +1 -0
- package/es6/FrontApplet/createFrontApplet.d.ts +2 -0
- package/es6/FrontApplet/createFrontApplet.js +9 -0
- package/es6/FrontApplet/createFrontApplet.js.map +1 -0
- package/es6/Monitoring/Console/consoleCommands.d.ts +6 -0
- package/es6/Monitoring/Console/consoleCommands.js +4 -0
- package/es6/Monitoring/Console/consoleCommands.js.map +1 -0
- package/es6/Monitoring/Html/htmlCommands.d.ts +9 -0
- package/es6/Monitoring/Html/htmlCommands.js +5 -0
- package/es6/Monitoring/Html/htmlCommands.js.map +1 -0
- package/es6/Monitoring/Montoring.d.ts +12 -0
- package/es6/Monitoring/Montoring.js +159 -0
- package/es6/Monitoring/Montoring.js.map +1 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.d.ts +20 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js +7 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js.map +1 -0
- package/es6/Monitoring/Timing/timingCommands.d.ts +4 -0
- package/es6/Monitoring/Timing/timingCommands.js +4 -0
- package/es6/Monitoring/Timing/timingCommands.js.map +1 -0
- package/es6/Monitoring/Video/videoCommands.d.ts +10 -0
- package/es6/Monitoring/Video/videoCommands.js +4 -0
- package/es6/Monitoring/Video/videoCommands.js.map +1 -0
- package/es6/Monitoring/monitoringCommands.d.ts +8 -0
- package/es6/Monitoring/monitoringCommands.js +5 -0
- package/es6/Monitoring/monitoringCommands.js.map +1 -0
- package/es6/Sensors/IButton.d.ts +9 -0
- package/es6/Sensors/IButton.js +8 -0
- package/es6/Sensors/IButton.js.map +1 -0
- package/es6/Sensors/IRfidAntenna.d.ts +10 -0
- package/es6/Sensors/IRfidAntenna.js +8 -0
- package/es6/Sensors/IRfidAntenna.js.map +1 -0
- package/es6/bundle.d.ts +12 -0
- package/es6/bundle.js +13 -0
- package/es6/bundle.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Network
|
|
3
|
+
author: Miroslav Behina
|
|
4
|
+
date: 1.4.2018
|
|
5
|
+
type: js-management-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- js_management_api
|
|
11
|
+
- network
|
|
12
|
+
description: "[Management JS API] Network management API allows you to manually set network interfaces or set back DHCP and current active network info."
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Network
|
|
16
|
+
Network management API allows you to manually set network interfaces or set back DHCP and current active network info.
|
|
17
|
+
|
|
18
|
+
## All methods
|
|
19
|
+
::: table-responsive
|
|
20
|
+
| Method | Description | Supported since |
|
|
21
|
+
| ------ | -------- | :-------------: |
|
|
22
|
+
| `getActiveInfo()` | Information about network interfaces, IP addesses and MAC addresses (**DEPRECATED**) | 4.0 |
|
|
23
|
+
| `listInterfaces()` | Information about network interfaces | 4.9 |
|
|
24
|
+
| `setManual()` | Allows you to set network settings manually | 4.0 |
|
|
25
|
+
| `setDHCP()` | Allows you to set network settings automatically from DHCP | 4.0 |
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
## getActiveInfo()
|
|
29
|
+
Method `getActiveInfo()` will display information about connected network.
|
|
30
|
+
|
|
31
|
+
::: alert alert--warning
|
|
32
|
+
This method is deprecated. Use `listInterfaces()` instead.
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
### Javascript example
|
|
36
|
+
```javascript
|
|
37
|
+
await sos.management.network.getActiveInfo();
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Example of response
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"activeInterface": "ethernet",
|
|
44
|
+
"dns": [
|
|
45
|
+
"192.168.1.1",
|
|
46
|
+
"1.1.1.1"
|
|
47
|
+
],
|
|
48
|
+
"gateway": "192.168.1.1",
|
|
49
|
+
"localAddress": "192.168.1.137",
|
|
50
|
+
"ethernetMacAddress": "b8:27:eb:25:8f:63",
|
|
51
|
+
"wifiMacAddress": "b8:27:eb:25:8f:63",
|
|
52
|
+
"netmask": "255.255.255.0"
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
57
|
+
<div class="col-12 d-flex">
|
|
58
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/network/">
|
|
59
|
+
<div>
|
|
60
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
61
|
+
<i class="fab fa-github svg-black"></i>
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Getting network data from device</h3>
|
|
65
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</a>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
## listInterfaces()
|
|
73
|
+
Returns list of all network interfaces, and their information like MAC address, IP address, etc.
|
|
74
|
+
|
|
75
|
+
### Javascript example
|
|
76
|
+
```javascript
|
|
77
|
+
const interfaces = await sos.management.network.listInterfaces();
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Example of response
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
"type": "ethernet",
|
|
86
|
+
"name": "eth0",
|
|
87
|
+
"macAddress": "b8:27:eb:25:8f:63",
|
|
88
|
+
"localAddress": "192.168.1.137",
|
|
89
|
+
"gateway": "192.168.1.1",
|
|
90
|
+
"netmask": "255.255.255.0",
|
|
91
|
+
"dns": [
|
|
92
|
+
"192.168.1.1",
|
|
93
|
+
"1.1.1.1"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "wifi",
|
|
98
|
+
"name": "wlan0",
|
|
99
|
+
"macAddress": "b8:27:eb:25:8f:63"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
105
|
+
<div class="col-12 d-flex">
|
|
106
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/network/">
|
|
107
|
+
<div>
|
|
108
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
109
|
+
<i class="fab fa-github svg-black"></i>
|
|
110
|
+
</div>
|
|
111
|
+
<div>
|
|
112
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Getting network interfaces from device</h3>
|
|
113
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</a>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
## setManual()
|
|
121
|
+
Manually configures a network interface.
|
|
122
|
+
|
|
123
|
+
### Object properties
|
|
124
|
+
|
|
125
|
+
#### New way
|
|
126
|
+
| Name | Type | Required | Description |
|
|
127
|
+
| ---- | ---- | :------: | ------ |
|
|
128
|
+
| `interfaceName` | String | <div class="red">Yes</div> | Network interface name, can be retrieved from `listInterfaces()` |
|
|
129
|
+
| `options.localAddress` | String | <div class="red">Yes</div> | Network local address |
|
|
130
|
+
| `options.gateway` | String | <div class="red">Yes</div> | Network gateway |
|
|
131
|
+
| `options.netmask` | String | <div class="red">Yes</div> | Network netmask |
|
|
132
|
+
| `options.dns` | Array | <div class="red">Yes</div> | Array of additionally DNSs |
|
|
133
|
+
|
|
134
|
+
#### Old way (deprecated)
|
|
135
|
+
| Name | Type | Required | Description |
|
|
136
|
+
| ---- | ---- | :------: | ------ |
|
|
137
|
+
| `interface` | String | <div class="red">Yes</div> | Network type interface, can be only `ethernet` or `wifi` |
|
|
138
|
+
| `localAddress` | String | <div class="red">Yes</div> | Network local address |
|
|
139
|
+
| `gateway` | String | <div class="red">Yes</div> | Network gateway |
|
|
140
|
+
| `netmask` | String | <div class="red">Yes</div> | Network netmask |
|
|
141
|
+
| `dns` | Array | <div class="red">Yes</div> | Array of additionally DNSs |
|
|
142
|
+
|
|
143
|
+
### Javascript example
|
|
144
|
+
```javascript
|
|
145
|
+
// new way
|
|
146
|
+
await sos.management.network.setManual('eth0', {
|
|
147
|
+
localAddress: '192.168.1.133',
|
|
148
|
+
gateway: '192.168.1.1',
|
|
149
|
+
netmask: '255.255.255.0',
|
|
150
|
+
dns: ['8.8.8.8', '192.168.1.1'],
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// old way (deprecated)
|
|
154
|
+
await sos.management.network.setManual({
|
|
155
|
+
interface: 'ethernet',
|
|
156
|
+
localAddress: '192.168.1.133',
|
|
157
|
+
gateway: '192.168.1.1',
|
|
158
|
+
netmask: '255.255.255.0',
|
|
159
|
+
dns: ['8.8.8.8', '192.168.1.1'],
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## setDHCP()
|
|
164
|
+
Configures a network interface to use DHCP to get an IP address asigned from the network.
|
|
165
|
+
|
|
166
|
+
### Object properties
|
|
167
|
+
|
|
168
|
+
#### New way
|
|
169
|
+
| Name | Type | Required | Description |
|
|
170
|
+
| ---- | ---- | :------: | ------ |
|
|
171
|
+
| `interfaceName` | String | <div class="red">Yes</div> | Network interface name, can be retrieved from `listInterfaces()` |
|
|
172
|
+
|
|
173
|
+
#### Old way (deprecated)
|
|
174
|
+
| Name | Type | Required | Description |
|
|
175
|
+
| ---- | ---- | :------: | ------ |
|
|
176
|
+
| `networkInterface` | String | <div class="red">Yes</div> | Network type interface, can be only `ethernet` or `wifi` |
|
|
177
|
+
|
|
178
|
+
### Javascript example
|
|
179
|
+
```javascript
|
|
180
|
+
// new way
|
|
181
|
+
await sos.management.network.setDHCP('eth0');
|
|
182
|
+
|
|
183
|
+
// old way (deprecated)
|
|
184
|
+
await sos.management.network.setDHCP('ethernet');
|
|
185
|
+
```
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Security
|
|
3
|
+
author: Michael Zabka
|
|
4
|
+
date: 20.5.2020
|
|
5
|
+
type: js-management-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- js_management_api
|
|
11
|
+
- security
|
|
12
|
+
description: "[Management JS API] Security management API allows you to manually set PIN code interfaces or get current PIN code."
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Security
|
|
16
|
+
Security management API allows you to manually set PIN code interfaces or get current PIN code.
|
|
17
|
+
|
|
18
|
+
## All methods
|
|
19
|
+
|
|
20
|
+
::: table-responsive
|
|
21
|
+
| Methods | Description | Supported since |
|
|
22
|
+
| ------ | -------- | :-------------: |
|
|
23
|
+
| `getPinCode()` | Get PIN code, 4 digits number string | 4.1 |
|
|
24
|
+
| `setPinCode()` | Set PIN code, 4 digits number string | 4.1 |
|
|
25
|
+
| `generateRandomPinCode()` | Generate 4 digits number string and set it as PIN code | 4.1 |
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
## getPinCode()
|
|
29
|
+
Method `getPinCode()` will returns current PIN code, 4 digits number string.
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
await sos.management.security.getPinCode(); // Returns e.g. "1234"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## setPinCode()
|
|
36
|
+
Method `setPinCode()` will set the current PIN code, 4 digits number string.
|
|
37
|
+
PIN code `0000` is not allowed according to the default PIN after boot when the device is not connected to the internet!
|
|
38
|
+
|
|
39
|
+
::: table-responsive
|
|
40
|
+
| Param | Type | Required | Description |
|
|
41
|
+
| -------- | ------ | :----------: | ---------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `pinCode` | String | <div class="red">Yes</div> | Set new PIN code |
|
|
43
|
+
:::
|
|
44
|
+
|
|
45
|
+
### Javascript example
|
|
46
|
+
```javascript
|
|
47
|
+
await sos.management.security.setPinCode("9999");
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
<div class="row d-flex align-content-stretch force-padding-20">
|
|
51
|
+
<div class="col-12 d-flex">
|
|
52
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/security-pin-code/">
|
|
53
|
+
<div>
|
|
54
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
55
|
+
<i class="fab fa-github svg-black"></i>
|
|
56
|
+
</div>
|
|
57
|
+
<div>
|
|
58
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Management Security PIN code</h3>
|
|
59
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</a>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## generateRandomPinCode()
|
|
68
|
+
Method `generateRandomPinCode()` will generate random 4 digits number string and set it as current PIN code.
|
|
69
|
+
|
|
70
|
+
### Javascript example
|
|
71
|
+
```javascript
|
|
72
|
+
await sos.management.security.generateRandomPinCode(); // Generate new random PIN code
|
|
73
|
+
const newPinCode = await sos.management.security.getPinCode(); // Get PIN code as string
|
|
74
|
+
console.log(newPinCode);
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Errors
|
|
78
|
+
Although we are doing our best, following errors may occur when working with the Applet Resources.
|
|
79
|
+
|
|
80
|
+
::: table-responsive
|
|
81
|
+
| Code | Type | Message |
|
|
82
|
+
| ---- | ---- | ------- |
|
|
83
|
+
| 41701 | AppletSecurityError | Invalid PIN code (has to be 4 digits string) |
|
|
84
|
+
| 41702 | AppletSecurityError | Not allowed PIN code 0000, use another pin code |
|
|
85
|
+
| 41703 | AppletSecurityError | Get PIN code failed because was not set yet. Try to get PIN code later or set the PIN code using `setPinCode` method first. |
|
|
86
|
+
:::
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Wi-Fi
|
|
3
|
+
author: Michal Artazov
|
|
4
|
+
date: 1.9.2020
|
|
5
|
+
type: js-management-api
|
|
6
|
+
tags:
|
|
7
|
+
- applet
|
|
8
|
+
- applet_api
|
|
9
|
+
- api
|
|
10
|
+
- js_management_api
|
|
11
|
+
description: "[Management JS API] Wi-Fi API allows you to configure Wi-Fi, if the device supports it."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Wi-Fi
|
|
15
|
+
|
|
16
|
+
Wi-Fi API allows you to configure Wi-Fi, if the device supports it.
|
|
17
|
+
|
|
18
|
+
::: alert alert--warning
|
|
19
|
+
* Before using this API, ensure that the device supports Wi-Fi via `sos.management.supports("WIFI")`.
|
|
20
|
+
* More info about how to check it, you can find [**THERE**](/api/js/management/1-js-management#supports)
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
## State management
|
|
24
|
+
Wi-Fi can be in several states. Depending on which state it is in, its behavior will vary. The 3 possible states are:
|
|
25
|
+
|
|
26
|
+
* DISABLED
|
|
27
|
+
* CLIENT
|
|
28
|
+
* AP
|
|
29
|
+
|
|
30
|
+
::: alert alert--info
|
|
31
|
+
It is only allowed to switch to another state when in the DISABLED state. It is not allowed to go directly from CLIENT to AP or vice versa.
|
|
32
|
+
:::
|
|
33
|
+
|
|
34
|
+
### DISABLED
|
|
35
|
+
|
|
36
|
+
Wi-Fi is disabled. The DISABLED state is persistent between reboots.
|
|
37
|
+
|
|
38
|
+
### CLIENT
|
|
39
|
+
|
|
40
|
+
Wi-Fi is in the client state, i.e. it is capable of connecting to a network, similarly to a phone or laptop.
|
|
41
|
+
CLIENT state is persistent between reboots with all of its configuration.
|
|
42
|
+
|
|
43
|
+
### AP
|
|
44
|
+
|
|
45
|
+
Wi-Fi is in access point state, i.e. it itself becomes a Wi-Fi network that others can connect to.
|
|
46
|
+
AP state is not persistent and on reboot the device will be in DISABLED state.
|
|
47
|
+
|
|
48
|
+
## Country settings
|
|
49
|
+
|
|
50
|
+
Different regulations apply to Wi-Fi communication in different countries.
|
|
51
|
+
Under normal circumstances, everything should work with default settings.
|
|
52
|
+
However, if you experience any problems, you might want to try changing Wi-Fi country configuration to your country.
|
|
53
|
+
See [`getCountry()`](/api/js/management/13-js-management-wifi#getcountry) and [`setCountry()`](/api/js/management/13-js-management-wifi#setcountry) methods.
|
|
54
|
+
|
|
55
|
+
## All methods
|
|
56
|
+
|
|
57
|
+
::: table-responsive
|
|
58
|
+
| Methods | Description | Supported since |
|
|
59
|
+
| -------------------- | ------------------------------------------------------------------ | :---------------: |
|
|
60
|
+
| `isClientEnabled()` | Is in CLIENT state? | 4.3.0 |
|
|
61
|
+
| `enableClient()` | Switch to CLIENT state | 4.3.0 |
|
|
62
|
+
| `isAPEnabled()` | Is in AP state? | 4.3.0 |
|
|
63
|
+
| `enableAP()` | Switch to AP state | 4.3.0 |
|
|
64
|
+
| `disable()` | Switch to DISABLED state | 4.3.0 |
|
|
65
|
+
| `getConnectedTo()` | When in CLIENT state, return which network it is connected to | 4.3.0 |
|
|
66
|
+
| `connect()` | When in CLIENT state, connect to a network | 4.3.0 |
|
|
67
|
+
| `disconnect()` | When in CLIENT state, disconnect from a network | 4.3.0 |
|
|
68
|
+
| `getCountry()` | Get which country Wi-Fi is configured for | 4.3.0 |
|
|
69
|
+
| `setCountry()` | Configure Wi-Fi for a specific country | 4.3.0 |
|
|
70
|
+
| `scanDevices()` | When in CLIENT or AP states, scan available networks | 4.3.0 |
|
|
71
|
+
| `on()` | Call listener anytime an event is emitted | 4.3.0 |
|
|
72
|
+
| `once()` | Call listener the first time an event is emitted | 4.3.0 |
|
|
73
|
+
| `removeListener()` | Remove a listener previously registered via on() or once() methods | 4.3.0 |
|
|
74
|
+
| `removeAllListeners()` | Remove all listeners | 4.3.0 |
|
|
75
|
+
:::
|
|
76
|
+
|
|
77
|
+
## Events
|
|
78
|
+
|
|
79
|
+
::: table-responsive
|
|
80
|
+
| Event | Description |
|
|
81
|
+
| ------------------- | -------------------------------------------------------- |
|
|
82
|
+
| `client_enabled` | Wi-Fi was set to CLIENT state |
|
|
83
|
+
| `client_connected` | Wi-Fi is in CLIENT state and connected to a network |
|
|
84
|
+
| `client_disconnected` | Wi-Fi is in CLIENT state and disconnected from a network |
|
|
85
|
+
| `ap_enabled` | Wi-Fi was set to AP state |
|
|
86
|
+
| `disabled` | Wi-Fi was set to DISABLED state |
|
|
87
|
+
:::
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
<div class="row d-flex align-content-stretch force-padding-10">
|
|
91
|
+
<div class="col-12 d-flex">
|
|
92
|
+
<a class="wide-box wide-box--white d-flex align-content-stretch widebox-kb-color" target="_blank" href="https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/wifi-access-point/">
|
|
93
|
+
<div>
|
|
94
|
+
<div class="wide-box__image d-flex align-items-center">
|
|
95
|
+
<i class="fab fa-github svg-black"></i>
|
|
96
|
+
</div>
|
|
97
|
+
<div>
|
|
98
|
+
<h3 class="wide-box__title wide-box__title__small pl-85">Applet with Wi-Fi Access Point</h3>
|
|
99
|
+
<div class="wide-box__description">Working example on our Github</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</a>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
## isClientEnabled()
|
|
107
|
+
Returns true, if Wi-Fi is in CLIENT state. Otherwise, returns false.
|
|
108
|
+
|
|
109
|
+
### Javascript example
|
|
110
|
+
```javascript
|
|
111
|
+
const isClientEnabled = await sos.management.wifi.isClientEnabled();
|
|
112
|
+
if (isClientEnabled) {
|
|
113
|
+
// do something
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## enableClient()
|
|
118
|
+
Sets Wi-Fi to CLIENT state, meaning it has the ability to connect to a Wi-Fi network or scan available networks in the area.
|
|
119
|
+
|
|
120
|
+
::: alert alert--info
|
|
121
|
+
It is not allowed to call this method, when in AP state. You must first switch to **DISABLED** state.
|
|
122
|
+
:::
|
|
123
|
+
|
|
124
|
+
### Javascript example
|
|
125
|
+
```javascript
|
|
126
|
+
await sos.management.wifi.enableClient();
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## isAPEnabled()
|
|
130
|
+
Returns true, if Wi-Fi is in AP state. Otherwise, returns false.
|
|
131
|
+
|
|
132
|
+
### Javascript example
|
|
133
|
+
```javascript
|
|
134
|
+
const isAPEnabled = await sos.management.wifi.isAPEnabled();
|
|
135
|
+
if (isAPEnabled) {
|
|
136
|
+
// do something
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## enableAP()
|
|
141
|
+
Sets Wi-Fi to AP state, meaning the device will become a Wi-Fi network that other devices can connect to.
|
|
142
|
+
It will run in WPA-Personal mode. As such, it requires an SSID (network name) and password that other devices will use to connect.
|
|
143
|
+
|
|
144
|
+
::: alert alert--info
|
|
145
|
+
* It is not allowed to call this method when in CLIENT state. You must first switch to **DISABLED** state.
|
|
146
|
+
* Before calling this method, make sure the device supports Wi-Fi AP via `sos.management.supports("WIFI_AP")`
|
|
147
|
+
:::
|
|
148
|
+
|
|
149
|
+
::: table-responsive
|
|
150
|
+
| Param | Type | Required | Description |
|
|
151
|
+
| -------- | ------ | :----------: | ---------------------------------------------------------------------------------------------- |
|
|
152
|
+
| `ssid` | String | <div class="red">Yes</div> | Device will be visible as a Wi-Fi network with this name. Max. allowed length is 32 characters. |
|
|
153
|
+
| `password` | String | <div class="red">Yes</div> | Devices that wish to connect to this network will use this password. Must be between 8 and 32 characters. |
|
|
154
|
+
:::
|
|
155
|
+
|
|
156
|
+
### Javascript example
|
|
157
|
+
```javascript
|
|
158
|
+
await sos.management.wifi.enableAP("my_network", "secretPassword123#");
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## disable()
|
|
162
|
+
Sets Wi-Fi to **DISABLED** state. All previously configured networks will be forgotten.
|
|
163
|
+
|
|
164
|
+
### Javascript example
|
|
165
|
+
```javascript
|
|
166
|
+
await sos.management.wifi.disable();
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## getConnectedTo()
|
|
170
|
+
If connected to a Wi-Fi network, returns the name of the network. Otherwise, returns null.
|
|
171
|
+
|
|
172
|
+
::: alert alert--info
|
|
173
|
+
It is only allowed to call this method in CLIENT state.
|
|
174
|
+
:::
|
|
175
|
+
|
|
176
|
+
### Javascript example
|
|
177
|
+
|
|
178
|
+
```javascript
|
|
179
|
+
const connectedTo = await sos.management.wifi.getConnectedTo();
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## connect()
|
|
183
|
+
Connect to a network.
|
|
184
|
+
|
|
185
|
+
::: alert alert--info
|
|
186
|
+
It is only allowed to call this method in the **CLIENT** state.
|
|
187
|
+
:::
|
|
188
|
+
|
|
189
|
+
::: table-responsive
|
|
190
|
+
| Param | Type | Required | Description |
|
|
191
|
+
| ------------------- | ------ | :---------: | ---------------------------------- |
|
|
192
|
+
| `ssid` | String | <div class="red">Yes</div> | Name of the network you want to connect to. |
|
|
193
|
+
| `password` | String | <div class="yellow">No</div> | Network's password. |
|
|
194
|
+
:::
|
|
195
|
+
|
|
196
|
+
### Javascript example
|
|
197
|
+
```javascript
|
|
198
|
+
// network without password
|
|
199
|
+
await sos.management.wifi.connect('network1');
|
|
200
|
+
|
|
201
|
+
// or network with password
|
|
202
|
+
await sos.management.wifi.connect('network2', 'password123');
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## disconnect()
|
|
206
|
+
Disconnect from the network, if connected to one.
|
|
207
|
+
|
|
208
|
+
::: alert alert--info
|
|
209
|
+
It is only allowed to call this method in the **CLIENT** state.
|
|
210
|
+
:::
|
|
211
|
+
|
|
212
|
+
### Javascript example
|
|
213
|
+
|
|
214
|
+
```javascript
|
|
215
|
+
await sos.management.wifi.disconnect();
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## getCountry()
|
|
219
|
+
Get currently configured country code.
|
|
220
|
+
|
|
221
|
+
::: alert alert--info
|
|
222
|
+
It is not allowed to call this method in the **DISABLED** state.
|
|
223
|
+
:::
|
|
224
|
+
|
|
225
|
+
### Javascript example
|
|
226
|
+
```javascript
|
|
227
|
+
const countryCode = await sos.management.wifi.getCountry();
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## setCountry()
|
|
231
|
+
Configure Wi-Fi for country-specific regulations.
|
|
232
|
+
|
|
233
|
+
::: alert alert--info
|
|
234
|
+
It is not allowed to call this method in the **DISABLED** state.
|
|
235
|
+
:::
|
|
236
|
+
|
|
237
|
+
::: table-responsive
|
|
238
|
+
| Param | Type | Required | Description |
|
|
239
|
+
| ----------- | ------ | :-----------: | -------------------------------------------------------------------------------------------- |
|
|
240
|
+
| `countryCode` | String | <div class="red">Yes</div> |2-letter country code. See this [list of countries and their codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). |
|
|
241
|
+
:::
|
|
242
|
+
|
|
243
|
+
### Javascript example
|
|
244
|
+
```javascript
|
|
245
|
+
await sos.management.wifi.setCountry('ES');
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## scanDevices()
|
|
249
|
+
Get list of available Wi-Fi networks in the area.
|
|
250
|
+
|
|
251
|
+
::: alert alert--info
|
|
252
|
+
* It is only allowed to call this method in the **CLIENT** state.
|
|
253
|
+
* Before calling this method, make sure the device supports scanning via `sos.management.supports("WIFI_SCAN")`
|
|
254
|
+
:::
|
|
255
|
+
|
|
256
|
+
### Javascript example
|
|
257
|
+
```javascript
|
|
258
|
+
const devices = await sos.management.wifi.scanDevices();
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## on()
|
|
262
|
+
Call a callback everytime an event is emitted.
|
|
263
|
+
|
|
264
|
+
::: table-responsive
|
|
265
|
+
| Param | Type | Required | Description |
|
|
266
|
+
| -------- | -------- | :--------------: | --------------------------------------------------- |
|
|
267
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
|
|
268
|
+
| `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted |
|
|
269
|
+
:::
|
|
270
|
+
|
|
271
|
+
### Javascript example
|
|
272
|
+
```javascript
|
|
273
|
+
sos.management.wifi.on('client_connected', () => {
|
|
274
|
+
console.log('Wi-Fi is connected');
|
|
275
|
+
});
|
|
276
|
+
sos.management.wifi.on('client_disconnected', () => {
|
|
277
|
+
console.log('Wi-Fi is disconnected');
|
|
278
|
+
});
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## once()
|
|
282
|
+
Call a callback the first time an event is emitted.
|
|
283
|
+
|
|
284
|
+
::: table-responsive
|
|
285
|
+
| Param | Type | Required | Description |
|
|
286
|
+
| -------- | -------- | :------------: | ----------------------------------------------------- |
|
|
287
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
|
|
288
|
+
| `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted |
|
|
289
|
+
:::
|
|
290
|
+
|
|
291
|
+
### Javascript example
|
|
292
|
+
```javascript
|
|
293
|
+
sos.management.wifi.once('client_connected', () => {
|
|
294
|
+
console.log('Wi-Fi is connected');
|
|
295
|
+
});
|
|
296
|
+
sos.management.wifi.once('client_disconnected', () => {
|
|
297
|
+
console.log('Wi-Fi is disconnected');
|
|
298
|
+
});
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## removeListener()
|
|
302
|
+
Remove an event listener previously registered via [`on`](/api/js/management/13-js-management-wifi#on) or [`once`](/api/js/management/13-js-management-wifi#once).
|
|
303
|
+
|
|
304
|
+
::: table-responsive
|
|
305
|
+
| Param | Type | Required | Description |
|
|
306
|
+
| -------- | -------- | :----------: | ------------------------------------------------------- |
|
|
307
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
|
|
308
|
+
| `listener` | Method | <div class="red">Yes</div> | Callback that was previously registered |
|
|
309
|
+
:::
|
|
310
|
+
|
|
311
|
+
### Javascript example
|
|
312
|
+
```javascript
|
|
313
|
+
// first register a listener
|
|
314
|
+
const listener = () => {
|
|
315
|
+
console.log('Wi-Fi is connected');
|
|
316
|
+
};
|
|
317
|
+
sos.management.wifi.on('client_connected', listener);
|
|
318
|
+
|
|
319
|
+
// then remove it
|
|
320
|
+
sos.management.wifi.removeListener('client_connected', listener);
|
|
321
|
+
|
|
322
|
+
// now if client_connected is emitted, the listener callback wouldn't be called anymore
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## removeAllListeners()
|
|
326
|
+
Remove all listeners previously registered via [`on`](/api/js/management/13-js-management-wifi#on) or [`once`](/api/js/management/13-js-management-wifi#once), either for a specific event or for all events.
|
|
327
|
+
|
|
328
|
+
::: table-responsive
|
|
329
|
+
| Param | Type | Required | Description |
|
|
330
|
+
| ---------------- | ------ | :--------: | -------------------------------------------------------- |
|
|
331
|
+
| `event` | String | <div class="yellow">No</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
|
|
332
|
+
:::
|
|
333
|
+
|
|
334
|
+
### Javascript example
|
|
335
|
+
```javascript
|
|
336
|
+
// first register a listener
|
|
337
|
+
sos.management.wifi.on('client_connected', () => {
|
|
338
|
+
console.log('Wi-Fi is connected');
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// then remove it
|
|
342
|
+
sos.management.wifi.removeAllListeners('client_connected');
|
|
343
|
+
// now if client_connected is emitted, the listener callback wouldn't be called anymore
|
|
344
|
+
|
|
345
|
+
// next remove all listeners
|
|
346
|
+
sos.management.wifi.removeAllListeners();
|
|
347
|
+
// now if any event is emitted, no listener callbacks would be called
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### FAQ
|
|
351
|
+
- Do I need to reboot my RPi for the Wi-Fi changes to take place?<br>
|
|
352
|
+
No, the device will automatically adapt to any saved changes
|
|
353
|
+
|
|
354
|
+
- How can I tell if the device has successfuly connected to the network?<br>
|
|
355
|
+
Once the device starts the connecting process and sucessfully connects, 2 events will be emmited:<br>
|
|
356
|
+
1. client_enabled
|
|
357
|
+
1. client_connected
|