npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@geoborders/node-red-contrib-geoborders

v0.4.1

Published

Nodi Node-RED ufficiali GeoBorders per GeoAccess ed EMS backup/dati EMS con autenticazione API key.

Readme

@geoborders/node-red-contrib-geoborders

Palette ufficiale GeoBorders per Node-RED.

Nodi inclusi

GeoBorders API

Configuration node condiviso e non trascinabile nella palette. Salva:

  • nome della connessione;
  • indirizzo base del server, normalmente https://api.geoborders.com;
  • API key;
  • timeout delle richieste.

L'API key è dichiarata come credenziale Node-RED e viene inviata con:

X-API-Key: LA_TUA_API_KEY

GeoAccess Switch

Legge lo stato oppure accende e spegne uno switch remoto tramite GeoBorders API.

Comandi supportati:

  • status;
  • on oppure 1;
  • off oppure 0.

EMS-backup

Invia all'API GeoBorders il backup dell'EMS oppure richiede la configurazione salvata per effettuare un restore.

Valori gestiti:

  • site_id: identifica il sito;
  • configuration_file: configurazione inviata nel backup e restituita nel restore;
  • ems_version: inviata soltanto nel backup;
  • diagnostic_file: inviato soltanto nel backup.

Entrambi i nodi visibili hanno due uscite:

  1. successo;
  2. errore.

Installazione

Dalla directory utente di Node-RED, normalmente ~/.node-red:

npm install @geoborders/node-red-contrib-geoborders

Sul Cerbo GX con Venus OS Large è possibile installare il file .tgz da:

Menu → Manage palette → Install → Upload module tgz file

Nella palette apparirà la categoria GeoBorders con:

  • GeoAccess Switch;
  • EMS-backup.

GeoBorders API rimane nascosto perché è un configuration node.

Configurazione GeoBorders API

Aprire uno dei nodi GeoBorders, premere la matita accanto al campo API e inserire:

Server: https://api.geoborders.com
API key: ********
Timeout: 15

GeoAccess Switch

Lettura stato

GET /public/geoaccess/node_red_functions.php?app=read_status&type=SWITCH&id=123
X-API-Key: LA_TUA_API_KEY

Accensione

GET /public/geoaccess/node_red_functions.php?app=write_status&value=1&type=SWITCH&id=123
X-API-Key: LA_TUA_API_KEY

Spegnimento

GET /public/geoaccess/node_red_functions.php?app=write_status&value=0&type=SWITCH&id=123
X-API-Key: LA_TUA_API_KEY

Quando il nodo è impostato su Usa msg.payload:

msg.payload = "status";
msg.payload = "on";
msg.payload = "off";

ID e comando dinamici:

msg.geoaccess = {
    site_switch_id: 123,
    action: "on"
};
return msg;

EMS-backup

Il nodo può usare percorsi fissi configurati nell'editor oppure valori dinamici presenti in msg.ems_backup.

Mandare il backup

msg.ems_backup = {
    action: "backup",
    site_id: 123,
    ems_version: "1.4.0",
    configuration_file_path: "/data/ems/configuration.json",
    diagnostic_file_path: "/data/ems/diagnostic.zip"
};
return msg;

È possibile passare direttamente i file come Buffer:

msg.ems_backup = {
    action: "backup",
    site_id: 123,
    ems_version: "1.4.0",
    configuration_file: Buffer.from("..."),
    diagnostic_file: Buffer.from("...")
};
return msg;

Richiesta API:

POST /public/geoaccess/node_red_functions.php?app=write_backup
X-API-Key: LA_TUA_API_KEY
Content-Type: multipart/form-data; boundary=...

Campi multipart:

site_id                 obbligatorio
ems_version             opzionale
configuration_file      opzionale
diagnostic_file         opzionale

Deve essere presente almeno uno tra ems_version, configuration_file e diagnostic_file. È quindi possibile inviare soltanto la versione EMS:

msg.ems_backup = {
    action: "backup",
    site_id: 123,
    ems_version: "1.4.1"
};
return msg;

Richiedere la configurazione per restore

msg.ems_backup = {
    action: "restore",
    site_id: 123
};
return msg;

Richiesta API:

GET /public/geoaccess/node_red_functions.php?app=read_backup&site_id=123
X-API-Key: LA_TUA_API_KEY
Accept: application/octet-stream, application/json

L'API può restituire direttamente il file binario oppure JSON:

{
  "configuration_file": "BASE64...",
  "configuration_file_encoding": "base64"
}

Il nodo restituisce:

msg.payload = Buffer;
msg.filename = "configuration-site-123.bin";
msg.ems_backup = {
    action: "restore",
    site_id: "123",
    configuration_file: Buffer,
    configuration_filename: "configuration-site-123.bin",
    success: true
};

Nel restore non vengono richiesti né restituiti ems_version e diagnostic_file.

Esempi

  • examples/02-geoaccess-switch.json;
  • examples/03-ems-backup.json.

Dopo l'importazione aprire GeoBorders API e inserire l'API key, che non viene inclusa nei flow esportati.

Aggiornamento dalla 0.3.0

La versione 0.4.0 rimuove GB Tag e aggiunge EMS-backup. I flow che non usavano GB Tag non richiedono modifiche.

La versione 0.4.1 rende indipendenti i dati inviati da EMS-backup: è possibile trasmettere soltanto ems_version, soltanto uno dei file oppure qualsiasi combinazione dei tre valori.

Test

npm test
npm run pack:check

Pubblicazione

npm login
npm whoami
npm test
npm run pack:check
npm publish . --access public

Licenza

Software proprietario GeoBorders. Consultare LICENSE.