smartplant 0.1.7 โ†’ 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +47 -20
  2. package/package.json +134 -119
  3. package/src/main.js +430 -875
package/README.md CHANGED
@@ -1,35 +1,58 @@
1
1
 
2
2
  # Smartplant by *PIGEONPOSSE*
3
3
 
4
- [![HEADER](https://github.com/pigeonposse/.github/blob/main/docs/banner-smartplant.png?raw=true)](https://github.com/pigeonposse)
5
-
4
+ [![HEADER](https://github.com/pigeonposse/smartplant/blob/main/docs/banner.png?raw=true)](https://github.com/pigeonposse)
6
5
 
7
6
  **Smartplant** is a library designed to simplify plant care through *the integration of advanced artificial intelligence models*. This technology not only researches detailed information about each type of plant but also determines the optimal conditions for their care, thereby maximizing their growth and health. Thanks to this functionality, users can efficiently monitor and manage the environment of their plants *using sensors that measure humidity, light, and temperature*.
8
7
 
9
8
  The core idea behind SmartPlant is to *pave the way for advancements in plant care technology*. It serves as a foundation for developing more sophisticated solutions and experimenting with innovative devices that meet the needs of plants. By leveraging this library, developers can contribute to the evolution of the smart plant care ecosystem.
10
9
 
11
- > [!WARNING]
12
- > Currently in phase `Beta`
10
+ ## Features
13
11
 
14
- ## AI and the future intertwine: connect with your environment.
12
+ ### ๐Ÿง  Multi-Model AI Engine
13
+ The heart of **SmartPlant** now supports the world's most powerful LLMs to analyze your plant's health:
15
14
 
16
- ## Features
15
+ * **Cloud Power:** OpenAI (GPT-4), xAI (Grok), Anthropic (Claude), and Google (Gemini).
16
+ * **Privacy First:** Full support for **Ollama** to run models locally.
17
+ * **Smart Optimization:** AI-driven care routines tailored to each specific species.
18
+
19
+ ### ๐Ÿ›  Hardware & Monitoring
20
+ * ๐Ÿ“Š **Real-Time Monitoring:** High-precision tracking of humidity, light, and temperature.
21
+ * ๐Ÿ”” **Customized Alerts:** Immediate notifications for critical environmental changes.
22
+ * ๐Ÿ“ˆ **Data History:** Trend analysis to visualize your plant's growth over time.
23
+ * ๐Ÿ”ฎ **Predictive Health:** AI forecasting to prevent stress before it happens.
24
+ * ๐Ÿ”Œ **Plugin Ecosystem:** Modular architecture with built-in tests for easy feature expansion.
25
+
26
+ ## Plugins
27
+
28
+ Extend SmartPlant's core with specialized modules for automation and AI analysis. Each plugin features a built-in test to verify performance.
29
+
30
+ * ๐Ÿ’ง **Watering**: AI predictive watering based on DHT22 data. | `@smartplant/watering`
31
+
32
+ * ๐Ÿ˜Ÿ **Stress**: Detects early signs of environmental stress. | `@smartplant/stress`
33
+
34
+ * โ˜€๏ธ **Lighting**: Optimizes LED cycles and light intensity.`@smartplant/lighting`
35
+
36
+ * ๐Ÿ“ˆ **History**: Analyzes and visualizes long-term growth trends. | `@smartplant/history`
17
37
 
18
- - ๐Ÿค– **Integrated Artificial Intelligence:** Optimizes the care of each plant.
19
- - ๐Ÿ“Š **Real-Time Monitoring:** Collects humidity, light, and temperature with sensors.
20
- - ๐Ÿ”” **Customized Alerts:** Notifications for out-of-range conditions.
21
- - ๐Ÿ’ฌ **Multilingual Support:** English, Espaรฑol, Franรงais, Deutsch, Italiano, Portuguรชs, Nederlands, ะ ัƒััะบะธะน, ไธญๆ–‡, ๆ—ฅๆœฌ่ชž.
22
- - ๐ŸŽ› **Easy Setup:** Intuitive process for Raspberry Pi or Arduino.
23
- - ๐Ÿ“ˆ **Data History:** Environmental trend analysis.
24
- - ๐Ÿ”ฎ **Critical Condition Prediction:** Prevents significant changes in plant health.
25
- - ๐ŸŒ **Open-source:** MIT licensed, available for public use and contributions.
38
+ * โš ๏ธ **Alerts**: Species-specific safety range notifications. | `@smartplant/alerts`
39
+
40
+ * ๐ŸŒฑ **Fertilizer**: Sensor-guided nutrient and feeding schedules. | `@smartplant/fertilizer`
41
+
42
+ * ๐Ÿ› **Pests**: Identifies pest risks and organic treatments. | `@smartplant/pests`
43
+
44
+ * ๐Ÿ’จ **Ventilation**: Smart airflow and condensation control. | `@smartplant/ventilation`
45
+
46
+ * ๐Ÿ“” **Diary**: Interactive logs with AI health summaries. | `@smartplant/diary`
47
+
48
+ * ๐Ÿคฉ **Simulator**: Forecasts plant reactions to environment changes. | `@smartplant/simulator``
26
49
 
27
50
  ## Installation
28
51
 
29
52
  To install the library, use npm:
30
53
 
31
- ```
32
- npm install smartplant
54
+ ```bash
55
+ npm install -g smartplant
33
56
  ```
34
57
 
35
58
  # Benefits of the emojis system
@@ -40,18 +63,21 @@ This approach with emojis provides a simplified and visually attractive user exp
40
63
 
41
64
  To make the plant monitoring more intuitive and visually accessible, we have implemented an emojis system that represents different levels of each critical parameter: moisture, light and temperature.Each emoji offers a rapid representation of the current status of the parameter, which facilitates interpretation without analyzing specific numbers.
42
65
 
43
- #### Humidity:
66
+ ### Humidity
67
+
44
68
  - ๐Ÿ‚ **Very dry:** Indicates that moisture is below the recommended minimum range.The plant is at risk of dehydration.
45
69
  - ๐ŸŒฟ **Ideal:** Moisture is within the ideal range, which means that the plant is in optimal conditions.
46
70
  - ๐Ÿ’ง **Slightly wet:** Indicates that moisture is slightly above the ideal range, but it is not yet worrisome.
47
71
  - ๐ŸŒŠ **Very humid:** Moisture is above the maximum allowed range, which could lead to saturation and problems such as waterlogging.
48
72
 
49
- #### Light:
73
+ ### Light
74
+
50
75
  - ๐ŸŒ‘ **Very little light:** points out that the plant receives less light than necessary, which could affect its growth.
51
76
  - ๐ŸŒฅ **Ideal:** The plant receives the amount of light adequate for healthy development.
52
77
  - ๐ŸŒž **Too much light:** Light exposure is excessive, which can cause burns or stress in the plant.
53
78
 
54
- #### Temperature:
79
+ ### Temperature
80
+
55
81
  - ๐ŸงŠ **Very cold:** The temperature is below the minimum range, which can slow down or damage the plant.
56
82
  - ๐ŸŒก๏ธ **Ideal:** The temperature is in the optimal range for the growth and development of the plant.
57
83
  - ๐Ÿ”ฅ **Very hot:** The temperature exceeds the maximum range, which could cause overheating and dehydration.
@@ -60,7 +86,8 @@ To make the plant monitoring more intuitive and visually accessible, we have imp
60
86
 
61
87
  In addition to the specific parameters, we have designed a system of general happiness for the plant, which is represented with caritas emojis.This system provides a global vision of the state of the plant, based on a combination of its levels of humidity, light and temperature.
62
88
 
63
- #### Happiness scale:
89
+ #### Happiness scale
90
+
64
91
  - ๐Ÿคฉ **Very happy:** The plant is in ideal conditions in all key parameters.This is the optimal state.
65
92
  - ๐Ÿ˜Š **Happy:** The plant is in good condition, although there could be slight deviations in some parameters.
66
93
  - ๐Ÿ˜ **Acceptable:** The plant is in acceptable conditions, but is far from ideal.Small adjustments may be required.
package/package.json CHANGED
@@ -1,120 +1,135 @@
1
1
  {
2
- "name": "smartplant",
3
- "version": "0.1.7",
4
- "description": "A library for managing plant care with alerts and multi-language support.",
5
- "main": "src/main.js",
6
- "bin": {
7
- "smartplant": "src/cli.js"
8
- },
9
- "type": "module",
10
- "dependencies": {
11
- "@serialport/parser-readline": "12.0.0",
12
- "chalk": "5.3.0",
13
- "enquirer": "2.4.1",
14
- "serialport": "12.0.0"
15
- },
16
- "keywords": [
17
- "plant",
18
- "care",
19
- "alerts",
20
- "multi-language",
21
- "smart",
22
- "AI",
23
- "intelligence",
24
- "npm",
25
- "library"
26
- ],
27
- "author": "Alejo Malia <alejomalia@gmail.com>",
28
- "files": [
29
- "./src"
30
- ],
31
- "publishConfig": {
32
- "access": "public",
33
- "registry": "https://registry.npmjs.org/"
34
- },
35
- "homepage": "https://github.com/pigeonposse/smartplant",
36
- "repository": {
37
- "type": "git",
38
- "url": "https://github.com/pigeonposse/smartplant"
39
- },
40
- "funding": {
41
- "type": "individual",
42
- "url": "https://pigeonposse.com/?popup=donate"
43
- },
44
- "bugs": {
45
- "url": "https://github.com/pigeonposse/smartplant/issues",
46
- "email": "dev@pigeonposse.com"
47
- },
48
- "license": "GPL-3.0",
49
- "devDependencies": {
50
- "@backan/builder": "0.0.16",
51
- "@changesets/changelog-github": "0.5.0",
52
- "@changesets/cli": "2.27.8",
53
- "@commitlint/cli": "19.5.0",
54
- "@pigeon-posse/eslint-config": "1.0.1",
55
- "@rsbuild/core": "^1.0.6",
56
- "@typescript-eslint/eslint-plugin": "8.2.0",
57
- "@typescript-eslint/parser": "8.2.0",
58
- "commitizen": "4.3.0",
59
- "commitlint-config-gitmoji": "2.3.1",
60
- "cz-customizable": "7.2.1",
61
- "cz-emoji": "1.3.2-canary.2",
62
- "eslint": "8.57.0",
63
- "eslint-plugin-align-assignments": "1.1.2",
64
- "eslint-plugin-align-import": "1.0.0",
65
- "eslint-plugin-canonical": "5.0.0",
66
- "eslint-plugin-html": "7.1.0",
67
- "eslint-plugin-import": "2.29.1",
68
- "eslint-plugin-jsdoc": "46.10.1",
69
- "eslint-plugin-json": "3.1.0",
70
- "eslint-plugin-jsonc": "2.13.0",
71
- "eslint-plugin-markdownlint": "0.5.0",
72
- "eslint-plugin-package-json": "0.12.2",
73
- "eslint-plugin-promise": "6.1.1",
74
- "eslint-plugin-yaml": "0.5.0",
75
- "git-cz": "4.9.0",
76
- "typescript": "5.6.2",
77
- "vite": "5.4.4"
78
- },
79
- "commitlint": {
80
- "extends": [
81
- "gitmoji"
82
- ],
83
- "rules": {
84
- "header-max-length": [
85
- 0,
86
- "always",
87
- 100
88
- ]
89
- }
90
- },
91
- "config": {
92
- "commitizen": {
93
- "path": "./node_modules/cz-customizable"
94
- },
95
- "cz-customizable": {
96
- "config": ".dev/cz-config.cjs"
97
- }
98
- },
99
- "extra": {
100
- "scopes": [
101
- {
102
- "name": "lib"
103
- },
104
- {
105
- "name": "env"
106
- },
107
- {
108
- "name": "all"
109
- }
110
- ]
111
- },
112
- "scripts": {
113
- "dev": "node src/cli.js",
114
- "build": "pnpm run --sequential \"/build:.*/\"",
115
- "build:bins": "rsbuild build -c .dev/build-lib.mjs && node .dev/build-bin.mjs",
116
- "update-version": "changeset && changeset version",
117
- "push": "git add . && cz && git push -f origin $@",
118
- "push:main": "pnpm push main"
119
- }
120
- }
2
+ "name": "smartplant",
3
+ "version": "0.2.1",
4
+ "description": "A library for managing plant care with alerts and multi-language support.",
5
+ "main": "src/main.js",
6
+ "bin": {
7
+ "smartplant": "src/cli.js"
8
+ },
9
+ "type": "module",
10
+ "dependencies": {
11
+ "@serialport/parser-readline": "12.0.0",
12
+ "chalk": "5.3.0",
13
+ "enquirer": "2.4.1",
14
+ "serialport": "12.0.0",
15
+ "smartplant": "^0.2.0"
16
+ },
17
+ "keywords": [
18
+ "plant",
19
+ "care",
20
+ "alerts",
21
+ "multi-language",
22
+ "smart",
23
+ "AI",
24
+ "intelligence",
25
+ "npm",
26
+ "library"
27
+ ],
28
+ "author": "Alejo Malia <alejomalia@gmail.com>",
29
+ "files": [
30
+ "./src"
31
+ ],
32
+ "packageManager": "pnpm@9.7.0",
33
+ "publishConfig": {
34
+ "access": "public",
35
+ "registry": "https://registry.npmjs.org/"
36
+ },
37
+ "homepage": "https://github.com/pigeonposse/smartplant",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/pigeonposse/smartplant"
41
+ },
42
+ "funding": {
43
+ "type": "individual",
44
+ "url": "https://pigeonposse.com/?popup=donate"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/pigeonposse/smartplant/issues",
48
+ "email": "dev@pigeonposse.com"
49
+ },
50
+ "scripts": {
51
+ "dev": "node src/cli.js",
52
+ "build": "pnpm run --sequential \"/build:.*/\"",
53
+ "build:bins": "rsbuild build -c .dev/build-lib.mjs && node .dev/build-bin.mjs",
54
+ "update-version": "changeset && changeset version",
55
+ "push": "git add . && cz && git push -f origin $@",
56
+ "push:main": "pnpm push main",
57
+ "start": "node src/main.js"
58
+ },
59
+ "license": "GPL-3.0",
60
+ "devDependencies": {
61
+ "@backan/builder": "0.0.16",
62
+ "@changesets/changelog-github": "0.5.0",
63
+ "@changesets/cli": "2.27.8",
64
+ "@commitlint/cli": "19.5.0",
65
+ "@pigeon-posse/eslint-config": "1.0.1",
66
+ "@rsbuild/core": "^1.0.6",
67
+ "@typescript-eslint/eslint-plugin": "8.2.0",
68
+ "@typescript-eslint/parser": "8.2.0",
69
+ "commitizen": "4.3.0",
70
+ "commitlint-config-gitmoji": "2.3.1",
71
+ "cz-customizable": "7.2.1",
72
+ "cz-emoji": "1.3.2-canary.2",
73
+ "eslint": "8.57.0",
74
+ "eslint-plugin-align-assignments": "1.1.2",
75
+ "eslint-plugin-align-import": "1.0.0",
76
+ "eslint-plugin-canonical": "5.0.0",
77
+ "eslint-plugin-html": "7.1.0",
78
+ "eslint-plugin-import": "2.29.1",
79
+ "eslint-plugin-jsdoc": "46.10.1",
80
+ "eslint-plugin-json": "3.1.0",
81
+ "eslint-plugin-jsonc": "2.13.0",
82
+ "eslint-plugin-markdownlint": "0.5.0",
83
+ "eslint-plugin-package-json": "0.12.2",
84
+ "eslint-plugin-promise": "6.1.1",
85
+ "eslint-plugin-yaml": "0.5.0",
86
+ "git-cz": "4.9.0",
87
+ "typescript": "5.6.2",
88
+ "vite": "5.4.4"
89
+ },
90
+ "workspaces": [
91
+ "./watering",
92
+ "./stress",
93
+ "./lighting",
94
+ "./history",
95
+ "./alerts",
96
+ "./fertilizer",
97
+ "./pests",
98
+ "./ventilation",
99
+ "./diary",
100
+ "./simulator"
101
+ ],
102
+ "commitlint": {
103
+ "extends": [
104
+ "gitmoji"
105
+ ],
106
+ "rules": {
107
+ "header-max-length": [
108
+ 0,
109
+ "always",
110
+ 100
111
+ ]
112
+ }
113
+ },
114
+ "config": {
115
+ "commitizen": {
116
+ "path": "./node_modules/cz-customizable"
117
+ },
118
+ "cz-customizable": {
119
+ "config": ".dev/cz-config.cjs"
120
+ }
121
+ },
122
+ "extra": {
123
+ "scopes": [
124
+ {
125
+ "name": "lib"
126
+ },
127
+ {
128
+ "name": "env"
129
+ },
130
+ {
131
+ "name": "all"
132
+ }
133
+ ]
134
+ }
135
+ }