All Projects → balena-io → Balena Electronjs

balena-io / Balena Electronjs

Licence: apache-2.0
electronJS-based resin application template

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Balena Electronjs

Q3lite
Q3lite, an OpenGL ES port of Quake III Arena for embedded Linux systems.
Stars: ✭ 64 (-81.61%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Raspibackup
Backup and restore your running Raspberry
Stars: ✭ 268 (-22.99%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Raspberrypi tempmon
Raspberry pi CPU temperature monitor with many functions such as logging, GPIO output, graphing, email, alarm, notifications and stress testing. Python 3.
Stars: ✭ 52 (-85.06%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Homekitcam
A project to make a Raspberry Pi driven, HomeKit Enabled camera.
Stars: ✭ 69 (-80.17%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Docker Jdownloader
JDownloader 2 Docker Image (Multiarch) - Passed 40M Downloads
Stars: ✭ 85 (-75.57%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Gumcp
Web Control Panel for Raspberry Pi
Stars: ✭ 124 (-64.37%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Nwjs rpi
[NW.js port for Raspberry Pi] binary compiled for the ARMv6 used in Raspberry Pi (compatible with RPi 2 and RPi 3)
Stars: ✭ 91 (-73.85%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Debian Pi Aarch64
This is the first 64-bit system in the world to support all Raspberry Pi 64-bit hardware!!! (Include: PI400,4B,3B+,3B,3A+,Zero2W)
Stars: ✭ 2,505 (+619.83%)
Mutual labels:  raspberry-pi, raspberrypi, raspberry
Pigeon
Pigeon is a simple 3D printed cloud home surveillance camera project that uses the new Raspberry Pi Zero W
Stars: ✭ 266 (-23.56%)
Mutual labels:  raspberry-pi, raspberrypi
Kupiki Hotspot Script
Create automatically a full Wifi Hotspot on Raspberry Pi including a Captive Portal
Stars: ✭ 265 (-23.85%)
Mutual labels:  raspberry-pi, raspberry
Sireprat
Remote Command Execution as SYSTEM on Windows IoT Core (releases available for Python2.7 & Python3)
Stars: ✭ 326 (-6.32%)
Mutual labels:  raspberry-pi, raspberrypi
Vue Electron Template
An Electron & Vue.js template with Hot-reloading enabled and common Vue plugins, dev, debug and build scripts configured.
Stars: ✭ 260 (-25.29%)
Mutual labels:  boilerplate, electronjs
kiwi
Kiwi turns your Pimoroni Keybow into a fully customizable poor-man's Elgato Stream Deck!
Stars: ✭ 40 (-88.51%)
Mutual labels:  raspberrypi, raspberry
My Pihole Blocklists
Create custom pi-hole blocklists
Stars: ✭ 269 (-22.7%)
Mutual labels:  raspberry-pi, raspberrypi
diy-linux-guide
An LFS like guide for cross-bootstrapping a small system for the Raspberry Pi
Stars: ✭ 26 (-92.53%)
Mutual labels:  raspberrypi, raspberry
Raspberry Pi Cross Compilers
Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. 🍇
Stars: ✭ 261 (-25%)
Mutual labels:  raspberry-pi, raspberrypi
godot-gameshell
Godot export templates and instructions for the GameShell portable game console and other single-board computers
Stars: ✭ 34 (-90.23%)
Mutual labels:  raspberrypi, raspberry
Glodroid manifest
Android manifest for GloDroid (AOSP for the world's most accessible development platforms)
Stars: ✭ 266 (-23.56%)
Mutual labels:  raspberry-pi, raspberrypi
Meta Raspberrypi
Yocto BSP layer for the Raspberry Pi boards
Stars: ✭ 276 (-20.69%)
Mutual labels:  raspberry-pi, raspberry
Rpisurv
Raspberry Pi surveillance
Stars: ✭ 293 (-15.8%)
Mutual labels:  raspberry-pi, raspberrypi

This project is deprecated and replaced by balena-electron-env


Balena Electronjs

a boilerplate for developing kiosks, digital signage or other human-machine interaction projects based on ElectronJS and balena

Warning regarding armv6

This project does not currently support the armv6 architecture (ie Raspberry Pi 0 and 1) due to electron limitations. If the issue is fixed on the electron side, we will include it in this project. More on this here

Getting started

  • Sign up on balena
  • go through the getting started guide and create a new application
  • install the balena-cli on your computer
  • clone or download this repository to your local workspace
  • balena push <applicationName>
  • see the magic happening, your device is getting updated Over-The-Air!

Configure via environment variables

Variable Name Value Description Device-specific
RESIN_HOST_CONFIG_gpu_mem a value from 64 to 396 the amount of RAM dedicated to the GPU Raspberry Pi (all revs)

Apply the above settings in the "Fleet Configuration" panel (if applying it for the all devices withing your application), or "Device Configuration" panel (if applying it for a single device).

WHY THIS TEMPLATE

Achieving kinda-smooth desktop application display on devices like the raspberrypi is hard. This project aims to provide a quickstart template.

URL LAUNCHER config via ENV VARS

!!! Please note that since 0.1.0 the bool-based env vars dropped true / false strings in favour of 0 / 1 ones. !!!

simply set these environment varables in your app via "Environment Variables" panel in the balena dashboard to configure the behaviour of your devices.

Please note that the bool type definition in the table is meant to accept to either 0 or 1 values.

  • URL_LAUNCHER_URL string - the URL to be loaded. use file:////usr/src/app/data/index.html to load a local electronJS (or any website) app - defaults to file:////usr/src/app/data/index.html
  • URL_LAUNCHER_NODE bool (converted from string) - whether or not enable nodejs - defaults to 0
  • URL_LAUNCHER_KIOSK bool (converted from string) - whether or not enter KIOSK mode - defaults to 1
  • URL_LAUNCHER_TITLE string - the title of the window. Seen only with URL_LAUNCHER_FRAME=true - defaults to RESIN.IO
  • URL_LAUNCHER_FRAME bool (converted from string) - set to "true" to display the window frame. Seen only with URL_LAUNCHER_KIOSK=false - defaults to 0
  • URL_LAUNCHER_CONSOLE bool (converted from string) - set to "true" to display the debug console - defaults to 0
  • URL_LAUNCHER_WIDTH int (converted from string) - - defaults to 1920
  • URL_LAUNCHER_HEIGHT int (converted from string) - - defaults to 1080
  • URL_LAUNCHER_TOUCH bool (converted from string) - enables touch events if your device supports them - defaults to 0
  • URL_LAUNCHER_TOUCH_SIMULATE bool (converted from string) - simulates touch events - might be useful for touchscreen with partial driver support - be aware this could be a performance hog - defaults to 0
  • URL_LAUNCHER_ZOOM float (converted from string) - The default zoom factor of the page, 3.0 represents 300% - defaults to 1.0
  • URL_LAUNCHER_OVERLAY_SCROLLBARS bool (converted from string) - enables overlay scrollbars - defaults to 0
  • TFT bool (converted from string) - sets the target display to TFT screen like the piTFT but still requires you to set the proper device tree overlay configuration for it - defaults to 0
  • TFT_ROTATE int (converted from string) - accepted values: 0,90,180,270 - defaults to 0
  • ELECTRON_ENABLE_HW_ACCELERATION bool (converted from string) - enable hardware acceleration - defaults to 0
  • ELECTRON_BALENA_UPDATE_LOCK bool (converted from string) - Enable supervisor update locking (see Update Locking)
  • ELECTRON_APP_DATA_DIR string - Override the appData directory (see Electron API Documentation: app)
  • ELECTRON_USER_DATA_DIR string - Override the userData directory (see Electron API Documentation: app)

Update Locking

NOTE: Take care to only listen for a response once, and avoid sending multiple requests before the response arrived.

const {ipcRenderer} = require('electron')

Acquiring the Lock

// Listen for a response
ipcRenderer.once('balena-update-lock', (event, error) => {
  if (error) { ... }
})

// Send the 'lock' command to acquire the lock
ipcRenderer.send('balena-update-lock', 'lock')

Releasing the Lock

// Listen for a response
ipcRenderer.once('balena-update-lock', (event, error) => {
  if (error) { ... }
})

// Send the 'unlock' command to release the lock
ipcRenderer.send('balena-update-lock', 'unlock')

Checking the Lock

// Listen for a response
ipcRenderer.once('balena-update-lock', (event, error, isLocked) => {
  console.log('Locked:', error || isLocked)
})

// Send the 'check' command to check on the state of the lock
ipcRenderer.send('balena-update-lock', 'check')

Related

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].