es zh CN GlobalVariable - Supergiovane/node-red-contrib-knx-ultimate GitHub Wiki
🌐 Language: EN | IT | DE | FR | ES | 简体中文
Navigation: Home Overview: Changelog • FAQ • Security • Docs: Language bar KNX Device: Gateway • Device • Protections Other KNX Nodes: Scene Controller • WatchDog • Logger • Global Context • Alerter • Load Control • Viewer • Auto Responder • HA Translator • IoT Bridge HUE: Bridge • Light • Battery • Button • Contact • Device SW update • Light sensor • Motion • Scene • Tap Dial • Temperature • Zigbee connectivity Samples: Logger • Switch Light • Dimming • RGB color • RGBW color + White • Command a scene actuator • Datapoint 213.x 4x Setpoint • Datapoint 222.x 3x Setpoint • Datapoint 237.x DALI diags • Datapoint 2.x 1 bit proprity • Datapoint 22.x RCHH Status • Datetime to BUS • Read Status • Virtual Device • Subtype decoded • Alexa • Apple Homekit • Google Home • Switch on/off POE port of Unifi switch • Set configuration by msg • Scene Controller node • WatchDog node • Global Context node • Alerter node • Load control node • Viewer node • MySQL, InfluxDB, MQTT Sample Contribute to Wiki: Link
<
Este nodo mapea la dirección de grupo recibida del bus a la variable de contexto global,
Y permita escribir en el bus KNX a través de esta variable.
- Agregue el nodo de contexto global al proceso y logerne; Este nombre se usa como el nombre base de la variable global.
- Leer usando el sufijo
_read
(comomyvar_read
). - Escriba para usar el sufijo
_Write
(como 'myvar_write`). - Las variables se pueden expusir como solo lectura o leer/escribir en configuración.
- Por razones de seguridad, modifique el nombre predeterminado.
Nota: Después de ejecutar la escritura, <same> _Write
se borrará automáticamente para evitar la escritura repetida.
Propiedades | Descripción |
---|---|
Puerta de entrada | KNX Gateway. |
Nombre variable | El nombre básico de la variable global.Se crean <Name> _read y <Name> _Write . No use el nombre predeterminado por razones de seguridad. |
Exponer como variable global | Seleccione si y cómo exponer variables globales y cómo.Si no necesita escribir, se recomienda establecer en solo lectura. |
Intervalo de escritura de bus | Encuesta <Name> _Write y escriba en el bus. |
{ address: "0/0/1", dpt: "1.001", payload: true, devicename: "Dinning Room->Table Light" }
### leer variables```javascript
const list = global.get("KNXContextBanana_READ") || [];
node.send({ payload: list });
const ga = list.find(a => a.address === "0/0/10");
if (ga && ga.payload === true) return { payload: "FOUND AND TRUE" };
if (ga && ga.payload === false) return { payload: "FOUND AND FALSE" };
```### Escribe en el autobús a través de variables```javascript
const toSend = [];
toSend.push({ address: "0/0/10", dpt: "1.001", payload: msg.payload });
// 如果已导入 ETS,可省略 dpt,由系统据 payload 推断
toSend.push({ address: "0/0/11", payload: msg.payload });
global.set("KNXContextBanana_WRITE", toSend);
```## Ejemplo completo
<a href = "https://github.com/supergiovane/node-red-contrib-knx-ultimate/wiki/sampleglobalcontextnode" target = "_ blank"> <i class="fa fa-info-circle"> </i> View Ejemplo </a>