@smartplant/history
v1.0.0
Published
Plugin for health history and trends analysis in SmartPlant
Readme
@smartplant/history
This plugin tracks and analyzes historical health data from sensors, generating trends and predictions. It integrates AI models (Gemini, OpenAI, Grok, Claude, Ollama) for insights, using emojis for visual trends.
Functionality
- Stores sensor data over time.
- AI analyzes trends for growth predictions.
- Model-agnostic for flexible AI usage.
- Emoji-based trend visualization (e.g., 📈 for improving).
Installation
- Install the base library:
npm install -g smartplant - Install this plugin:
npm install @smartplant/history - In your project:
const history = require('@smartplant/history'); history.init({ model: 'claude' });
Usage Example
const smartplant = require('smartplant');
const history = require('@smartplant/history');
history.init({ model: 'openai' });
const trends = await history.analyzeTrends({ period: 'week' });
console.log(trends); // e.g., { advice: 'Stable growth', emoji: '📈' }
