@smartplant/stress
v1.0.0
Published
Plugin for early stress detection using sensor data in SmartPlant
Readme
@smartplant/stress
This plugin detects early signs of plant stress using sensor data from light, temperature, and humidity. It leverages AI models (Gemini, OpenAI, Grok, Claude, Ollama) to analyze patterns and provide preventive advice, updating the happiness scale with emojis.
Functionality
- Real-time monitoring of environmental variations.
- AI-driven pattern detection for stress indicators.
- Customizable model selection for analysis.
- Emoji feedback for stress levels (e.g., 😟 for moderate stress).
Installation
- Install the base library:
npm install -g smartplant - Install this plugin:
npm install @smartplant/stress - In your project:
const stress = require('@smartplant/stress'); stress.init({ model: 'claude' });
Usage Example
const smartplant = require('smartplant');
const stress = require('@smartplant/stress');
stress.init({ model: 'openai' });
const detection = await stress.detectStress({ light: 'low', temperature: 30 });
console.log(detection); // e.g., { advice: 'Move to cooler area', emoji: '😟' }
