### Install and Start Backend Source: https://github.com/frangoteam/fuxa/blob/master/CONTRIBUTING.md Navigate to the server directory, install dependencies, and start the backend server. ```bash cd server npm install npm start ``` -------------------------------- ### Install and Start Frontend Source: https://github.com/frangoteam/fuxa/blob/master/CONTRIBUTING.md Navigate to the client directory, install dependencies, and start the frontend development server. ```bash cd client npm install npm start ``` -------------------------------- ### Install and Run FUXA from Source Source: https://github.com/frangoteam/fuxa/blob/master/README.md Install FUXA from source by navigating to the server directory, installing dependencies using npm, and starting the application. Ensure Node.js 18 LTS is installed. ```bash cd ./server npm install npm start ``` -------------------------------- ### FUXA Get DAQ Node Usage and Examples Source: https://github.com/frangoteam/fuxa/blob/master/server/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-daq.html Explains how to use the 'get-daq' node and provides examples for setting dynamic timestamps via msg.from and msg.to. ```javascript // Get data for last 24 hours msg.from = Date.now() - 86400000; msg.to = Date.now(); ``` ```javascript // Get data for specific date range msg.from = "2025-01-01 00:00:00"; msg.to = "2025-01-01 23:59:59"; ``` -------------------------------- ### Debug FUXA Frontend Source: https://github.com/frangoteam/fuxa/blob/master/README.md Installs frontend dependencies and starts the development server for the FUXA client. This is useful for debugging the user interface in a browser. ```bash cd ./client npm install npm start ``` -------------------------------- ### Install Docker Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Installs Docker on the system using a convenience script. Ensure you have sudo privileges. ```bash curl -fsSL https://get.docker.com -o get-docker.sh sudo sh ./get-docker.sh ``` -------------------------------- ### Timestamp Examples Source: https://github.com/frangoteam/fuxa/blob/master/server/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-get-history-alarms.html Illustrates how to set dynamic start and end timestamps using message properties for fetching historical alarms. ```javascript // Get alarms for last week msg.start = Date.now() - 604800000; // 7 days ago msg.end = Date.now(); ``` ```javascript // Get alarms for specific date range msg.start = "2025-10-20T00:00:00.000Z"; msg.end = "2025-10-26T23:59:59.999Z"; ``` -------------------------------- ### Create Fuxa Electron Startup Script Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Create a bash script to navigate to the Fuxa Electron directory and start the application using npm start. ```bash #!/bin/bash cd /opt/electron/fuxa-electron npm start ``` -------------------------------- ### Install Electron Globally Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Installs the Electron runtime globally. The --unsafe-perm and --allow-root flags are necessary for global installation on some systems. ```bash sudo npm install -g electron --unsafe-perm=true --allow-root ``` -------------------------------- ### Install MkDocs Dependencies Source: https://github.com/frangoteam/fuxa/blob/master/CONTRIBUTING.md Install the necessary Python packages for running the documentation locally using MkDocs. ```bash pip install "mkdocs<2.0" pip install mkdocs-material ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/frangoteam/fuxa/blob/master/CONTRIBUTING.md Start the local MkDocs server to preview the documentation. Access it at the provided URL. ```bash mkdocs serve ``` -------------------------------- ### Install FUXA Globally via NPM Source: https://github.com/frangoteam/fuxa/blob/master/README.md Installs the FUXA package globally using npm. Ensure Node.js 18 LTS is installed. Use --unsafe-perm for Linux installations, especially with Node.js 18. After installation, run 'fuxa' to start the application. ```bash npm install -g --unsafe-perm @frangoteam/fuxa fuxa ``` -------------------------------- ### Full ODBC Example with Query Manager Source: https://github.com/frangoteam/fuxa/blob/master/docs/HowTo-ODBC.md A comprehensive server-side script example that includes a query manager for handling triggers, polling tags, and updating the FUXA UI. Restart FUXA if encountering issues after script modification. ```javascript // Query Manager, function to provide one shot based on trigger event async function createQueryManager(device) { let lastTriggerState = false; return async function(trigger, sqlQuery) { if (trigger && trigger !== lastTriggerState) { try { const result = await device.pool.query(sqlQuery); lastTriggerState = trigger; return result; } catch (error) { return 'Error executing query'; } } lastTriggerState = trigger; }; } // Initialize the device, sane nane as connection let myDevice = await $getDevice('postgreSQL', true); // Create query Manager for each query type, retains query data let executeInsertQuery = await createQueryManager(myDevice); // Instance Insert let executeSelectQuery = await createQueryManager(myDevice); // Instance Select // Global Variables to retain Data let selResult; // 100ms loop catch Tag Events let myLoop100ms = setInterval(loop100ms, 100); async function loop100ms() { let customerName = $getTag($getTagId('customerName')); let customerPhone = $getTag($getTagId('customerPhone')); let customerEmail = $getTag($getTagId('customerEmail')); let customerAge = $getTag($getTagId('customerAge')); let execSaveCustomer = $getTag($getTagId('execSaveCustomer')); ``` -------------------------------- ### Start Docker Compose Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Starts the FUXA service defined in the docker-compose.yml file in detached mode. ```bash sudo docker compose up -d ``` -------------------------------- ### Verify Node.js and NPM Installation Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Checks the installed versions of Node.js and npm to ensure they meet the requirements. ```bash node -v npm -v ``` -------------------------------- ### Install ODBC Drivers on Debian Source: https://github.com/frangoteam/fuxa/blob/master/docs/HowTo-ODBC.md Commands to update package lists, install unixODBC, and make scripts executable for setting up ODBC drivers. ```bash sudo apt-get update && sudo apt-get install -y unixodbc unixodbc-dev ``` ```bash sudo chmod +x install_odbc_drivers.sh sudo ./install_odbc_drivers.sh sudo cp odbcinst.ini /etc/odbcinst.ini ``` -------------------------------- ### Node-RED FUXA Contrib Nodes Usage Examples Source: https://context7.com/frangoteam/fuxa/llms.txt Examples demonstrating the output message structure for `get-tag-change` and how to set tag values using the `set-tag` node in Node-RED. ```javascript // get-tag-change output message structure: // { // payload: 25.3, // topic: "pressure", // tagId: "dev_opc.pressure", // tagName: "pressure", // timestamp: "2025-01-01T10:30:00.000Z", // previousValue: 24.8 // } // set-tag: inject msg.payload to write to the configured tag // In a Function node before set-tag: msg.payload = 1450; // RPM value to write to dev_modbus.pump_speed return msg; ``` -------------------------------- ### Get Full Project Definition Source: https://context7.com/frangoteam/fuxa/llms.txt Returns the entire FUXA project JSON. Read permission is enforced based on user groups. ```bash curl -s http://localhost:1881/api/project \ -H "x-access-token: $TOKEN" | jq '{hmi: .hmi | keys, devices: (.devices | keys)}' # { "hmi": ["view_main","view_pump"], "devices": ["plc_s7","mqtt_broker"] } ``` -------------------------------- ### Install Node.js and Dependencies for Electron Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Installs Node.js version 18 and updates package lists. This is a prerequisite for setting up FUXA with Electron. ```bash sudo apt-get update curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs ``` -------------------------------- ### Example Usage of 'set-tag' Node Source: https://github.com/frangoteam/fuxa/blob/master/server/integrations/node-red/node-red-contrib-fuxa/nodes/fuxa-set-tag.html This example demonstrates how to use the 'set-tag' node. By setting `msg.topic` to a tag identifier (e.g., "V2") and `msg.payload` to the desired value (e.g., `true`), the node will update the specified FUXA tag with the provided payload. ```javascript msg.topic = "V2"; msg.payload = true; ``` -------------------------------- ### Package the Electron Application Source: https://github.com/frangoteam/fuxa/blob/master/README.md Commands to install dependencies and package the FUXA Electron application after building the server and client. This is typically done within the './app' directory. ```bash cd ./app npm install npm run package ``` -------------------------------- ### Configure Fuxa Electron Systemd Service Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Set up a systemd user service to automatically start the Fuxa Electron application on boot. ```ini [Unit] Description=Start Fuxa Electron Script After=default.target [Service] ExecStart=/opt/fuxa-electron-startup.sh [Install] WantedBy=default.target ``` -------------------------------- ### Manage Plugins Source: https://context7.com/frangoteam/fuxa/llms.txt Endpoints for managing device driver plugins, including listing installed plugins, installing new ones, and uninstalling existing ones. Requires administrator privileges. ```APIDOC ## GET /api/plugins / POST /api/plugins / DELETE /api/plugins ### Description Lists installed plugins (e.g., Modbus, BACnet drivers), installs new ones from npm, or uninstalls existing ones. Requires admin permission. ### Method GET, POST, DELETE ### Endpoint /api/plugins ### Request Example (List Plugins) ```bash curl -s http://localhost:1881/api/plugins \ -H "x-access-token: $TOKEN" | jq . ``` ### Request Example (Install Plugin) ```bash curl -s -X POST http://localhost:1881/api/plugins \ -H "x-access-token: $TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "params": { "name": "@frangoteam/fuxa-mod-bacnet" } }' ``` ### Request Example (Uninstall Plugin) ```bash curl -s -X DELETE "http://localhost:1881/api/plugins?param=@frangoteam/fuxa-mod-bacnet" \ -H "x-access-token: $TOKEN" ``` ### Response Example (List Plugins) ```json [{ "name": "@frangoteam/fuxa-mod-modbus", "version": "1.0.2", "type": "ModbusTCP" }] ``` ### Response Example (Install/Uninstall Plugin) HTTP 200 ``` -------------------------------- ### ODBC Connection Strings Source: https://github.com/frangoteam/fuxa/blob/master/docs/HowTo-ODBC.md Examples of connection strings for PostgreSQL and MySQL databases. Note the SSLMODE variations for MySQL. ```plaintext DRIVER=PostgreSQL;SERVER=Your_DB_IP;PORT=5432;DATABASE=testDB ``` ```plaintext DRIVER=MySQL;SERVER=Your_DB_IP;PORT=3306;DATABASE=testDB;SSLMODE=DISABLED ``` ```plaintext SSLMODE=ENABLE ``` ```plaintext SSLMODE=DISABLED ``` -------------------------------- ### GET /api/settings Source: https://context7.com/frangoteam/fuxa/llms.txt Fetches the current server configuration settings. Sensitive fields are omitted, and authentication is not required. ```APIDOC ## GET /api/settings ### Description Returns the current server configuration with sensitive fields (`secretCode`, SMTP password, DAQ credentials) stripped. Does not require authentication. ### Method GET ### Endpoint /api/settings ### Parameters #### (No parameters) ### Request Example ```bash curl -s http://localhost:1881/api/settings | jq '{secureEnabled, language, nodeRedEnabled, broadcastAll}' ``` ### Response #### Success Response (200) - **secureEnabled** (boolean) - Indicates if secure mode is enabled. - **language** (string) - The current language setting. - **nodeRedEnabled** (boolean) - Indicates if Node-RED is enabled. - **broadcastAll** (boolean) - Indicates if broadcasting to all is enabled. #### Response Example ```json { "secureEnabled": true, "language": "en", "nodeRedEnabled": false, "broadcastAll": false } ``` ``` -------------------------------- ### Example Output: Execute Script Source: https://github.com/frangoteam/fuxa/blob/master/docs/HowTo-Node-Red.md Shows the expected output format after executing a FUXA script. The payload includes a success status, script name, result message, and timestamp. ```json { "payload": { "success": true, "script": "myScript", "result": "Script completed successfully", "timestamp": "2025-01-01T10:45:00Z" } } ``` -------------------------------- ### Get Full Project Definition Source: https://context7.com/frangoteam/fuxa/llms.txt Returns the entire FUXA project JSON containing views, devices, tags, alarms, and scripts. Read permission is enforced based on user groups. ```APIDOC ## GET /api/project — Get full project definition ### Description Returns the entire FUXA project JSON containing views, devices, tags, alarms, and scripts. Read permission is enforced based on user groups. ### Method GET ### Endpoint /api/project ### Response #### Success Response (200) - **hmi** (object) - Contains keys of HMI views. - **devices** (object) - Contains keys of devices. ### Response Example ```json { "hmi": ["view_main","view_pump"], "devices": ["plc_s7","mqtt_broker"] } ``` ``` -------------------------------- ### Set up Electron Project Directory Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Creates the necessary directories and initializes a new Node.js project for the Electron application. ```bash cd /opt sudo mkdir electron cd electron sudo mkdir fuxa-electron cd fuxa-electron sudo npm init -y sudo npm install electron --save-dev ``` -------------------------------- ### Prepare for Custom Docker Image Build Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Sets up the directory structure and downloads the Dockerfile for building a custom FUXA Docker image from source. ```bash cd mkdir docker mkdir fuxa cd docker/fuxa mkdir fuxa-build cd fuxa-build wget https://raw.githubusercontent.com/frangoteam/FUXA/master/Dockerfile ``` -------------------------------- ### Dynamic Timestamp Overrides Source: https://github.com/frangoteam/fuxa/blob/master/node-red/node-red-contrib-fuxa/nodes/fuxa-get-history-alarms.html Examples demonstrating how to dynamically override the start and end timestamps for retrieving historical alarms using `msg.start` and `msg.end` properties. ```javascript // Get alarms for last week msg.start = Date.now() - 604800000; msg.end = Date.now(); ``` ```javascript // Get alarms for specific date range msg.start = "2025-01-01 00:00:00"; msg.end = "2025-01-07 23:59:59"; ``` -------------------------------- ### Example Output: Get DAQ Data Source: https://github.com/frangoteam/fuxa/blob/master/docs/HowTo-Node-Red.md Demonstrates the structure of Data Acquisition (DAQ) data for a single tag. The payload is an array of objects, each containing a timestamp, value, and quality status. ```json { "payload": [ {"timestamp": "2025-01-01T10:00:00Z", "value": 25.3, "quality": "good"}, {"timestamp": "2025-01-01T10:01:00Z", "value": 25.8, "quality": "good"} ] } ``` -------------------------------- ### Example Output: Get Active Alarms Source: https://github.com/frangoteam/fuxa/blob/master/docs/HowTo-Node-Red.md Illustrates the structure of the output when retrieving active alarms. The payload contains an array of alarm objects, each with details like ID, name, status, timestamp, and value. ```json { "payload": [ { "id": "alarm1", "name": "High Temperature", "status": "active", "timestamp": "2025-01-01T10:30:00Z", "value": 85.5 } ] } ``` -------------------------------- ### Get alarm history with time filters Source: https://context7.com/frangoteam/fuxa/llms.txt Retrieve historical alarm data using the /api/alarmsHistory endpoint. Filter by 'from' and 'to' timestamps. The example pipes the output to 'jq length' to count the number of historical alarms. ```bash curl -s "http://localhost:1881/api/alarmsHistory" \ -H "x-access-token: $TOKEN" \ -G --data-urlencode 'from=1711900000000' \ --data-urlencode 'to=1712000000000' | jq 'length' ``` -------------------------------- ### Build Server and Client for Electron App Source: https://github.com/frangoteam/fuxa/blob/master/README.md Steps to build the server and client components of the FUXA Electron application. Navigate to the respective directories and run npm install and npm run build for the client. ```bash cd ./server npm install cd ../client npm install npm run build ``` -------------------------------- ### Using Multiple ODBC Connections Source: https://github.com/frangoteam/fuxa/blob/master/docs/HowTo-ODBC.md Demonstrates how to initialize multiple ODBC device connections in FUXA. Each connection requires a unique name. ```javascript Script 1 let myDevice1 = await $getDevice('postgreSQL', true); Script 2 let myDevice2 = await $getDevice('postgreSQL', true); ``` -------------------------------- ### Build FUXA Frontend for Production Source: https://github.com/frangoteam/fuxa/blob/master/README.md Builds the FUXA frontend for production deployment. This command optimizes the client-side code for performance and size. ```bash cd ./client ng build --configuration=production ``` -------------------------------- ### Get Tag Node Description Source: https://github.com/frangoteam/fuxa/blob/master/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag.html Provides a brief explanation of the FUXA Get Tag node's purpose and how its output is handled. ```html

Get the value of a FUXA tag.

The tag value is set to msg.payload.

``` -------------------------------- ### Manage FUXA Plugins via API Source: https://context7.com/frangoteam/fuxa/llms.txt These bash commands show how to list, install, and uninstall device driver plugins using the FUXA API. Admin privileges are required, authenticated via 'x-access-token'. ```bash # List installed plugins curl -s http://localhost:1881/api/plugins \ -H "x-access-token: $TOKEN" | jq . # [{ "name": "@frangoteam/fuxa-mod-modbus", "version": "1.0.2", "type": "ModbusTCP" }] ``` ```bash # Install a plugin curl -s -X POST http://localhost:1881/api/plugins \ -H "x-access-token: $TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "params": { "name": "@frangoteam/fuxa-mod-bacnet" } }' # HTTP 200 ``` ```bash # Uninstall a plugin curl -s -X DELETE "http://localhost:1881/api/plugins?param=@frangoteam/fuxa-mod-bacnet" \ -H "x-access-token: $TOKEN" # HTTP 200 ``` -------------------------------- ### Get scheduler configuration by ID Source: https://context7.com/frangoteam/fuxa/llms.txt Retrieve the full schedule and settings for a specific scheduler using its ID with the GET /api/scheduler endpoint. Requires an access token. ```bash curl -s "http://localhost:1881/api/scheduler?id=scheduler_pump_daily" \ -H "x-access-token: $TOKEN" | jq . ``` -------------------------------- ### Loading Application Settings Source: https://github.com/frangoteam/fuxa/blob/master/app/electron/settings.html Asynchronously loads all application settings (auto-start, fullscreen, right-click, text selection) and recent projects when the settings page loads. Updates the UI elements accordingly. ```javascript async function loadSettings() { try { const [autoStart, fullscreen, rightClick, textSelection, recentProjects] = await Promise.all([ window.electronAPI.getAutoStartSettings(), window.electronAPI.getFullscreenSettings(), window.electronAPI.getRightClickSettings(), window.electronAPI.getTextSelectionSettings(), window.electronAPI.getRecentProjects() ]); document.getElementById('autoStartEnabled').checked = autoStart.enabled; document.getElementById('fullscreenEnabled').checked = fullscreen.enabled; document.getElementById('rightClickEnabled').checked = rightClick.enabled; document.getElementById('textSelectionEnabled').checked = textSelection.enabled; const select = document.getElementById('autoStartProject'); select.innerHTML = ''; recentProjects.forEach(project => { const option = document.createElement('option'); option.value = project.path; option.textContent = project.name; if (autoStart.projectPath === project.path) { option.selected = true; } select.appendChild(option); }); updateProjectSelect(); } catch (error) { console.error('Failed to load settings:', error); } } ``` -------------------------------- ### Get Tag Node Configuration Form Source: https://github.com/frangoteam/fuxa/blob/master/node-red/node-red-contrib-fuxa/nodes/fuxa-get-tag.html Defines the HTML structure for the configuration form of the FUXA Get Tag node, including input fields for the node name and the tag name, with a datalist for tag suggestions. ```html
``` -------------------------------- ### Prepare Docker Compose Directory Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Creates directories for Docker Compose configuration and FUXA data. This is a prerequisite for using the Docker Compose method. ```bash cd mkdir docker mkdir fuxa cd docker/fuxa sudo nano docker-compose.yml ``` -------------------------------- ### Toggling Project Select Visibility Source: https://github.com/frangoteam/fuxa/blob/master/app/electron/settings.html Manages the enabled/disabled state and visual styling of the 'Auto Start Project' dropdown based on the 'Enable Auto Start' checkbox. This function is called on initial load and when the checkbox state changes. ```javascript document.getElementById('autoStartEnabled').addEventListener('change', updateProjectSelect); function updateProjectSelect() { const select = document.getElementById('autoStartProject'); const enabled = document.getElementById('autoStartEnabled').checked; select.disabled = !enabled; select.classList.toggle('disabled', !enabled); } ``` -------------------------------- ### Access FUXA Server Logs via API Source: https://context7.com/frangoteam/fuxa/llms.txt These bash commands demonstrate how to list available log files and download their content for diagnostics. Access requires admin privileges authenticated with 'x-access-token'. ```bash # List log files curl -s http://localhost:1881/api/logsdir \ -H "x-access-token: $TOKEN" | jq . # ["fuxa.log", "fuxa.2024-04-01.log"] ``` ```bash # Download a log file curl -s "http://localhost:1881/api/logs?file=fuxa.log" \ -H "x-access-token: $TOKEN" -o fuxa.log ``` -------------------------------- ### Manage FUXA Users via API Source: https://context7.com/frangoteam/fuxa/llms.txt These bash commands demonstrate how to list, create/update, and delete users using the FUXA API. All operations require an 'x-access-token' with admin privileges. ```bash # List all users curl -s http://localhost:1881/api/users \ -H "x-access-token: $TOKEN" | jq . # [{ "username": "operator1", "fullname": "John Doe", "groups": "operator", "info": "" }] ``` ```bash # Create or update a user curl -s -X POST http://localhost:1881/api/users \ -H "x-access-token: $TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "params": [{ "username": "operator1", "fullname": "John Doe", "password": "Secure@123", "groups": "operator", "info": "Day shift" }] }' # HTTP 200 ``` ```bash # Delete a user curl -s -X DELETE "http://localhost:1881/api/users?param=operator1" \ -H "x-access-token: $TOKEN" # HTTP 200 ``` -------------------------------- ### Make Linux Binary Executable Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Use this command to grant execute permissions to the downloaded Linux headless binary. ```bash chmod +x fuxa-headless-linux-x64 ``` -------------------------------- ### GET /api/scheduler Source: https://context7.com/frangoteam/fuxa/llms.txt Retrieves a scheduler's full schedule and settings by its ID. ```APIDOC ## GET /api/scheduler ### Description Retrieves a scheduler's full schedule and settings by its ID. ### Method GET ### Endpoint /api/scheduler #### Query Parameters - **id** (string) - Required - The ID of the scheduler to retrieve. ### Request Example ```bash curl -s "http://localhost:1881/api/scheduler?id=scheduler_pump_daily" \ -H "x-access-token: $TOKEN" | jq . ``` ### Response #### Success Response (200) - **schedules** (object) - The schedule configuration. - **settings** (object) - The scheduler settings. #### Response Example ```json { "schedules": { "Pump Motor": [ { "deviceName": "Pump Motor", "startTime": "06:00", "endTime": "22:00", "days": [true,true,true,true,true,false,false], "mode": "timer" } ] }, "settings": { "devices": [{ "name": "Pump Motor", "variableId": "dev_modbus.pump_run" }], "deviceActions": [] } } ``` ``` -------------------------------- ### GET /api/alarmsHistory Source: https://context7.com/frangoteam/fuxa/llms.txt Retrieves the historical alarm log with optional time/group filters. ```APIDOC ## GET /api/alarmsHistory ### Description Retrieves the historical alarm log with optional time/group filters. ### Method GET ### Endpoint /api/alarmsHistory #### Query Parameters - **from** (string) - Optional - Start timestamp for the history log. - **to** (string) - Optional - End timestamp for the history log. ### Request Example ```bash curl -s "http://localhost:1881/api/alarmsHistory" \ -H "x-access-token: $TOKEN" \ -G --data-urlencode 'from=1711900000000' \ --data-urlencode 'to=1712000000000' | jq 'length' ``` ### Response #### Success Response (200) - **length** (number) - The number of historical alarms. #### Response Example ```json 42 ``` ``` -------------------------------- ### Electron Main Process Configuration Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Basic Electron main process configuration to create a browser window. This script sets up the window to open in fullscreen mode. ```javascript const { app, BrowserWindow } = require('electron'); function createWindow() { const win = new BrowserWindow({ //width: 800, //height: 600, fullscreen: true, // Enable full-screen mode ``` -------------------------------- ### GET /api/version Source: https://context7.com/frangoteam/fuxa/llms.txt Retrieves the current API version string. This endpoint does not require authentication and is not rate-limited. ```APIDOC ## GET /api/version ### Description Returns the API version string. Not rate-limited and requires no authentication. ### Method GET ### Endpoint /api/version ### Parameters #### (No parameters) ### Request Example ```bash curl -s http://localhost:1881/api/version ``` ### Response #### Success Response (200) - (string) - The API version string. #### Response Example ``` "1.0.0" ``` ``` -------------------------------- ### Get API version Source: https://context7.com/frangoteam/fuxa/llms.txt Retrieves the API version string. This endpoint is not rate-limited and does not require authentication. ```bash curl -s http://localhost:1881/api/version # "1.0.0" ``` -------------------------------- ### Run Linux Headless Binary Source: https://github.com/frangoteam/fuxa/blob/master/docs/Installing-and-Running.md Execute the FUXA headless binary on Linux after making it executable. Access the web interface via http://localhost:1881. ```bash ./fuxa-headless-linux-x64 ``` -------------------------------- ### Get Active Alarms Source: https://context7.com/frangoteam/fuxa/llms.txt Returns all currently active alarm states. An optional JSON filter can narrow results. ```APIDOC ## GET /api/alarms — Get active alarms ### Description Returns all currently active alarm states. An optional JSON filter can narrow results. ### Method GET ### Endpoint /api/alarms ### Response #### Success Response (200) - (array) - An array of active alarm objects. ### Response Example ```json [ ``` -------------------------------- ### Manage FUXA API Keys via API Source: https://context7.com/frangoteam/fuxa/llms.txt These bash commands illustrate managing API keys for machine-to-machine access. Use the 'x-api-key' header for authenticated requests after creating a key. Admin privileges are needed for management operations via 'x-access-token'. ```bash # List all API keys curl -s http://localhost:1881/api/apikeys \ -H "x-access-token: $TOKEN" | jq . # [{ "id": "ci-pipeline", "key": "abc123xyz", "enabled": true, "expires": null }] ``` ```bash # Create a new API key curl -s -X POST http://localhost:1881/api/apikeys \ -H "x-access-token: $TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "params": [{ "id": "ci-pipeline", "key": "abc123xyz456", "enabled": true, "expires": "2026-01-01T00:00:00Z" }] }' # HTTP 200 ``` ```bash # Use the key for any API call curl -s http://localhost:1881/api/alarms \ -H "x-api-key: abc123xyz456" | jq . ``` ```bash # Delete a key curl -s -X DELETE http://localhost:1881/api/apikeys \ -H "x-access-token: $TOKEN" \ -G --data-urlencode 'apikeys=["ci-pipeline"]' # HTTP 200 ``` -------------------------------- ### Get Active Alarms Source: https://context7.com/frangoteam/fuxa/llms.txt Returns all currently active alarm states. An optional JSON filter can narrow results. ```bash # All active alarms curl -s http://localhost:1881/api/alarms \ -H "x-access-token: $TOKEN" | jq . # [ ```