{"library":"node-red-contrib-config","title":"Node-RED Context Configuration Node","description":"node-red-contrib-config is a Node-RED node designed for managing and setting flow and global context variables. It allows developers to define configuration values in a centralized location within their Node-RED flows and apply them either during the Node-RED startup phase (initialization) or dynamically at runtime through messages or manual triggers. This enables robust management of application state and parameters, supporting scenarios where configuration needs to be altered programmatically or manually without redeploying entire flows. The current stable version is 1.2.2, with releases occurring periodically based on feature enhancements and bug fixes rather than a strict schedule. Its key differentiator lies in providing a dedicated, visual mechanism within the Node-RED environment for both initial and dynamic context variable management, serving as an important tool for maintaining consistent application settings across complex deployments.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install node-red-contrib-config"],"cli":null},"imports":["npm install node-red-contrib-config","Search for 'config' in the Node-RED palette and drag the node to your flow.","msg.context.global.get('myVar'); flow.get('myOtherVar');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"[{\"id\":\"b6833c82.c22a7\",\"type\":\"config\",\"z\":\"f27157a9.390a88\",\"name\":\"PC_Stability (Startup)\",\"property\":\"global.PC_Stability\",\"value\":\"OK (startup)\",\"valueType\":\"str\",\"active\":true,\"x\":170,\"y\":100,\"wires\":[[\"71a7b11c.e3f324\"]]},{\"id\":\"b22989c4.954aa8\",\"type\":\"config\",\"z\":\"f27157a9.390a88\",\"name\":\"PC_Stability (Manual)\",\"property\":\"global.PC_Stability\",\"value\":\"Warning (manual)\",\"valueType\":\"str\",\"active\":false,\"x\":170,\"y\":180,\"wires\":[[\"71a7b11c.e3f324\"]]},{\"id\":\"98c8c257.067c28\",\"type\":\"inject\",\"z\":\"f27157a9.390a88\",\"name\":\"Set OK (msg)\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":160,\"y\":260,\"wires\":[[\"b6833c82.c22a7\"]]},{\"id\":\"86d6d45e.d875a\",\"type\":\"inject\",\"z\":\"f27157a9.390a88\",\"name\":\"Set Warning (msg)\",\"topic\":\"\",\"payload\":\"\",\"payloadType\":\"date\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"x\":180,\"y\":320,\"wires\":[[\"b22989c4.954aa8\"]]},{\"id\":\"71a7b11c.e3f324\",\"type\":\"debug\",\"z\":\"f27157a9.390a88\",\"name\":\"Debug PC_Stability\",\"topic\":\"\",\"preserveContext\":false,\"x\":470,\"y\":180,\"wires\":[]},{\"id\":\"e3f324\",\"type\":\"function\",\"z\":\"f27157a9.390a88\",\"name\":\"Show global.PC_Stability\",\"func\":\"msg.payload = global.get('PC_Stability');\\nreturn msg;\",\"outputs\":1,\"noerr\":0,\"x\":490,\"y\":260,\"wires\":[[\"71a7b11c.e3f324\"]]},{\"id\":\"f27157a9.390a88\",\"type\":\"tab\",\"label\":\"Config Node Example\",\"disabled\":false,\"info\":\"\"}]","lang":"json","description":"This Node-RED flow demonstrates how to use the `config` node to set a global context variable ('PC_Stability') at startup, manually via node buttons, and programmatically via incoming messages. Debug nodes display the updated context value.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}