@smartplant/lighting
v1.0.0
Published
Plugin for artificial light optimization based on sensors in SmartPlant
Readme
@smartplant/lighting
This plugin optimizes artificial lighting based on sensor data, controlling LED intensity and duration. It uses AI (Gemini, OpenAI, Grok, Claude, Ollama) for recommendations tailored to plant needs, integrating with the emoji happiness scale.
Functionality
- Adjusts light based on real-time sensor readings.
- AI predicts optimal lighting schedules.
- Supports all AI models for customization.
- Emoji indicators for light status (e.g., ☀️ for ideal).
Installation
- Install the base library:
npm install -g smartplant - Install this plugin:
npm install @smartplant/lighting - In your project:
const lighting = require('@smartplant/lighting'); lighting.init({ model: 'grok' });
Usage Example
const smartplant = require('smartplant');
const lighting = require('@smartplant/lighting');
lighting.init({ model: 'ollama' });
const optimization = await lighting.optimizeLight({ currentLight: 'medium' });
console.log(optimization); // e.g., { advice: 'Increase to high for 8 hours', emoji: '☀️' }
