{"id":18614,"library":"node-red-contrib-weather","title":"node-red-contrib-weather","description":"Node-RED Node for fetching weather data from Xiaomi (Mi) weather API for Chinese locations. Current stable version 0.1.2, last released 2019-12-5, no active development. Key differentiator: simple integration with Node-RED, supports latitude/longitude input within China only, outputs weather object, temperature, humidity, weather condition, AQI, sunrise/sunset. Does not use any official weather API; data source is Xiaomi's internal service. Low maintenance, bug fixes via GitHub issues/QQ group.","status":"maintenance","version":"0.1.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","Node-RED","node-red-contrib","weather"],"install":[{"cmd":"npm install node-red-contrib-weather","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-weather","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-weather","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This is a Node-RED contrib node, requires Node-RED runtime (peer dependency).","package":"node-red","optional":false}],"imports":[{"note":"Node-RED nodes are added via npm install and appear in the palette; no programmatic import.","wrong":"Cannot import in code; it's a Node-RED node, not a library.","symbol":"weather node","correct":"Install via npm: npm install -g node-red-contrib-weather (then use in Node-RED palette)"},{"note":"Only supports China region; lat/lon ranges approx 18-54 N, 73-135 E.","wrong":"Sending non-JSON payload or missing payload field; node falls back to node's configured lat/lon.","symbol":"msg.payload input","correct":"Input msg.payload must be JSON: {\"latitude\":31,\"longitude\":121}"},{"note":"Since v0.1.1, output changed from msg to msg.payload.","wrong":"Expecting msg.data or msg.weather; earlier versions (0.0.x) used msg directly.","symbol":"output msg.payload","correct":"Weather data is placed in msg.payload (object with weather fields)."}],"quickstart":{"code":"// In Node-RED flow:\n// Inject node -> weather node -> Debug node\n// Inject node payload: {\"latitude\":31,\"longitude\":121}\n// Weather node configuration: leave lat/lon empty (use input payload)\n// Debug node outputs weather object with fields: temperature, humidity, condition, AQI, sunrise, sunset, etc.","lang":"javascript","description":"Shows minimal Node-RED flow using the weather node with latitude/longitude input."},"warnings":[{"fix":"Use only within China; for global weather, use other nodes like node-red-contrib-openweathermap.","message":"Only supports Chinese locations; lat/lon outside China (approx 18-54 N, 73-135 E) will return no data or errors.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Consider switching to a more reliable weather node using an official API with API key.","message":"Unofficial Xiaomi API; may break or become unavailable without notice.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Update downstream nodes to read msg.payload instead of msg directly.","message":"Output structure changed in v0.1.1: data moved from msg to msg.payload.","severity":"breaking","affected_versions":">=0.1.1"},{"fix":"Check for newer versions or consider alternatives.","message":"No updates since 2019-12-5; no activity, may be abandoned.","severity":"deprecated","affected_versions":">=0.1.2"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure inject node is configured to send a JSON payload: {\"latitude\":31,\"longitude\":121}.","cause":"Input msg object is missing or not from a proper Node-RED inject node.","error":"TypeError: Cannot read property 'payload' of undefined"},{"fix":"Use coordinates within China (e.g., 31,121 for Shanghai). Check network connectivity.","cause":"Latitude/longitude out of China range or API temporarily unavailable.","error":"Error: No data from weather API"},{"fix":"Set input payload to valid JSON string: {\"latitude\":31,\"longitude\":121} or configure lat/lon in node properties.","cause":"Input payload not parsed as JSON; node uses default lat/lon from node config which may be empty.","error":"Weather node output is empty object {}"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}