node-red-contrib-hoymiles-home 0.1.1-dev.0 → 0.1.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 (2) hide show
  1. package/README.md +115 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,115 @@
1
+ # node-red-contrib-hoymiles-home
2
+
3
+ Node-RED nodes for the **Hoymiles S-Miles Home API** — continuously polls live power data and emits a message for every new reading.
4
+
5
+ ## Nodes
6
+
7
+ ### `hoymiles-config` (config node)
8
+
9
+ Manages authentication against the Hoymiles cloud. Enter your S-Miles Home **e-mail** and **password** — the node performs the same two-step login as the S-Miles Home app (pre-inspection → Argon2ID or MD5·SHA256 password encoding → token) and shares the session with all connected watch nodes.
10
+
11
+ ### `hoymiles-watch` (input node)
12
+
13
+ Continuously polls live power data for a station and emits one message per reading.
14
+
15
+ **Configuration:**
16
+
17
+ | Field | Description |
18
+ |---|---|
19
+ | Credentials | Select a `hoymiles-config` node |
20
+ | Station ID | Numeric station ID (`sid`) — find it in the S-Miles Home app or via the Hoymiles API |
21
+ | Interval (s) | Poll interval in seconds. Leave empty to use the `dly` value from each server response (recommended — mirrors the S-Miles Home app) |
22
+
23
+ **Output `msg.payload`:**
24
+
25
+ ```json
26
+ {
27
+ "pv": 210,
28
+ "load": 340,
29
+ "grid": 130,
30
+ "bat": 0
31
+ }
32
+ ```
33
+
34
+ | Field | Description |
35
+ |---|---|
36
+ | `pv` | Solar generation (W) |
37
+ | `load` | Consumption (W) |
38
+ | `grid` | Grid exchange (W) — negative = feed-in |
39
+ | `bat` | Battery power (W) — negative = charging |
40
+
41
+ **Additional message properties:**
42
+
43
+ | Property | Value |
44
+ |---|---|
45
+ | `msg.topic` | `hoymiles/watch/{sid}` |
46
+ | `msg.sid` | Station ID |
47
+
48
+ **Status indicators:**
49
+
50
+ | Colour | Text | Meaning |
51
+ |---|---|---|
52
+ | Yellow | authenticating… | Login in progress |
53
+ | Yellow | connecting… | Fetching live URI |
54
+ | Green | watching sid=… | Polling normally |
55
+ | Yellow | reconnecting… | Refreshing expired URI |
56
+ | Red | auth failed | Login failed — check credentials |
57
+ | Red | connect error | Initial connection failed |
58
+ | Grey | stopped | Node stopped / redeployed |
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ npm install node-red-contrib-hoymiles-home
64
+ ```
65
+
66
+ Or via the Node-RED palette manager: search for **hoymiles-home**.
67
+
68
+ ## Quick start
69
+
70
+ 1. Add a **hoymiles-watch** node to your flow
71
+ 2. Open it and create a new **Hoymiles Credentials** config node
72
+ 3. Enter your S-Miles Home **e-mail** and **password**
73
+ 4. Enter your **Station ID**
74
+ 5. Connect a **debug** node and click **Deploy**
75
+
76
+ ## Local development with Docker
77
+
78
+ A Docker Compose setup is included for testing nodes without a full Node-RED installation.
79
+
80
+ ```bash
81
+ # First start — builds the image and initialises the data volume
82
+ docker compose up --build
83
+
84
+ # After changing node code — restart is enough (nodes are bind-mounted)
85
+ docker compose restart
86
+
87
+ # After changing package.json or adding dependencies — rebuild
88
+ docker compose up --build
89
+ ```
90
+
91
+ Open **http://localhost:1880** — the **Hoymiles Test** flow is pre-loaded.
92
+
93
+ ## Releasing
94
+
95
+ Versions are published to npm automatically via GitHub Actions when a tag is pushed.
96
+
97
+ ```bash
98
+ # Stable release
99
+ npm version minor # or patch / major
100
+ git push --follow-tags
101
+
102
+ # Dev release (published with npm tag "dev", not "latest")
103
+ npm version prerelease --preid=dev
104
+ git push --follow-tags
105
+ ```
106
+
107
+ Install a dev release:
108
+
109
+ ```bash
110
+ npm install node-red-contrib-hoymiles-home@dev
111
+ ```
112
+
113
+ ## License
114
+
115
+ MIT © Robin Lenz
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-hoymiles-home",
3
- "version": "0.1.1-dev.0",
3
+ "version": "0.1.1",
4
4
  "description": "Node-RED nodes for Hoymiles S-Miles Home API – live power data watch",
5
5
  "author": "Robin Lenz <pinguin45@web.de>",
6
6
  "license": "MIT",