{"id":18608,"library":"node-red-contrib-industrial-machine-forecast","title":"node-red-contrib-industrial-machine-forecast","description":"Node-RED custom node for time-series forecasting and anomaly detection using exponential smoothing. Current version 1.0.2, stable release. It forecasts the next value in a time series based on a configurable smoothing factor (alpha) and detects anomalies (sudden spikes/drops) using a running estimate of forecast error variance and a threshold in standard deviations. Offers an adaptive mode that adjusts alpha based on data volatility. Unlike general statistical libraries, this is specifically designed as a Node-RED node with status indicator and configurable settings, intended for predictive maintenance and real-time monitoring. Released under GPL-3.0.","status":"active","version":"1.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/hj91/node-red-contrib-industrial-machine-forecast","tags":["javascript","node-red","forecast","exponential smoothing","anomaly detection"],"install":[{"cmd":"npm install node-red-contrib-industrial-machine-forecast","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-industrial-machine-forecast","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-industrial-machine-forecast","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a Node-RED custom node; you install it as a package via npm, then drag the node from the palette in the Node-RED editor. There is no programmatic import in typical JS/TS code.","symbol":"default (node)","correct":"Install via npm and then use in Node-RED flow; no direct import in JavaScript/TypeScript."}],"quickstart":{"code":"// This package is a Node-RED node, not a library for programmatic use.\n// To use it, install Node-RED first, then:\n// npm install node-red-contrib-industrial-machine-forecast\n// Then in Node-RED flow editor, add it from the palette.\n// Input: msg.payload = numeric observation\n// Output: msg.payload = { value: number, status: \"Normal\" | \"Anomaly - Sudden Spike\" | \"Anomaly - Sudden Drop\" }","lang":"javascript","description":"Node-RED node usage: install via npm, configure alpha and threshold, pass numeric payload to detect anomalies."},"warnings":[{"fix":"Ensure msg.payload is a number before sending to the node (e.g., use a Change node to convert).","message":"Node expects numeric payload; non-numeric values cause silent failure or errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Be aware that the node uses in-memory state; redeploying the flow resets the state. For persistent state, consider using a context store.","message":"Node maintains state between messages; adapter mode changes alpha over time, which may cause inconsistent behavior if node is restarted or deployed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Tune the Std Devs threshold based on expected data variability. Start with 2-3 standard deviations and adjust.","message":"Anomaly detection threshold is static unless adaptive mode modifies alpha; variance estimate can be affected by sequence length.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use a Change node to set msg.payload to a number, e.g., msg.payload = Number(msg.payload).","cause":"msg.payload is not a numeric value (e.g., string, null).","error":"Error: [node-red-contrib-industrial-machine-forecast] Invalid payload: must be a number"},{"fix":"Ensure the first message sent to the node is a valid numeric payload. The node will initialize its state from the first message.","cause":"Node is missing initial state (e.g., first message after deploy without prior data).","error":"TypeError: Cannot read properties of undefined (reading 'at')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}