homebridge-navimow 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LeiterConsulting
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,171 @@
1
+ # Navimow for Homebridge
2
+
3
+ ![Navimow icon](https://raw.githubusercontent.com/LeiterConsulting/navimowhb/main/homebridge-ui/public/navimow-icon.svg)
4
+
5
+ Monitor and control Navimow robotic mowers from HomeKit through Homebridge.
6
+
7
+ This repository ships a Homebridge platform plugin backed by a small Python bridge that talks to the Navimow cloud and MQTT services.
8
+
9
+ ## Features
10
+
11
+ ### Mower control
12
+
13
+ Control each mower from HomeKit with:
14
+
15
+ * `Mowing` switch for start, pause, and resume
16
+ * `Dock` switch for return-to-base
17
+ * `Stop` switch for immediate stop
18
+
19
+ ### Device monitoring
20
+
21
+ Track live mower telemetry through Homebridge:
22
+
23
+ * real-time mower status
24
+ * battery level in HomeKit
25
+ * command confirmation in the plugin UI
26
+ * richer diagnostics and mower metadata in the custom Homebridge page
27
+
28
+ ### Runtime design
29
+
30
+ The plugin uses a split runtime:
31
+
32
+ * TypeScript Homebridge dynamic platform in `src/`
33
+ * Python bridge in `bridge/navimow_bridge.py`
34
+ * local OAuth callback hosted on the Homebridge machine
35
+ * MQTT push updates with HTTP fallback when the live feed goes stale
36
+
37
+ ## Requirements
38
+
39
+ * Homebridge 1.8 or newer
40
+ * Node.js version supported by Homebridge: 18, 20, 22, or 24
41
+ * Python 3.11 or newer
42
+ * Python packages `navimow-sdk` and `aiohttp` installed in the configured interpreter
43
+ * A Navimow account that can sign in to the official mobile app
44
+
45
+ ## Install For Development
46
+
47
+ Install Node dependencies:
48
+
49
+ ```bash
50
+ npm install
51
+ ```
52
+
53
+ Install Python bridge dependencies into the interpreter Homebridge will use:
54
+
55
+ ```bash
56
+ python3 -m pip install navimow-sdk aiohttp
57
+ ```
58
+
59
+ Build the plugin:
60
+
61
+ ```bash
62
+ npm run build
63
+ ```
64
+
65
+ Package it for installation into another Homebridge host:
66
+
67
+ ```bash
68
+ npm pack
69
+ ```
70
+
71
+ Prepare and validate an npm release locally:
72
+
73
+ ```bash
74
+ npm publish --dry-run
75
+ ```
76
+
77
+ ## Project Links
78
+
79
+ * Repository: https://github.com/LeiterConsulting/navimowhb
80
+ * Issues: https://github.com/LeiterConsulting/navimowhb/issues
81
+ * Release checklist: `PUBLISHING.md`
82
+
83
+ ## Homebridge Configuration
84
+
85
+ The plugin includes both a Homebridge config schema and a custom setup UI, so most setups can be completed from the Homebridge web interface.
86
+
87
+ Example `config.json` platform entry:
88
+
89
+ ```json
90
+ {
91
+ "platform": "NavimowPlatform",
92
+ "name": "Navimow",
93
+ "pythonPath": "/absolute/path/to/python3",
94
+ "authCallbackPort": 47129,
95
+ "authCallbackHost": "192.168.1.71",
96
+ "mqttStaleSeconds": 300,
97
+ "httpFallbackMinIntervalSeconds": 3600,
98
+ "updateIntervalSeconds": 30
99
+ }
100
+ ```
101
+
102
+ Configuration fields:
103
+
104
+ * `pythonPath`: Python interpreter with `navimow-sdk` and `aiohttp` installed
105
+ * `pythonBridgePath`: optional override for the bridge script path
106
+ * `authCallbackPort`: local HTTP port used for the OAuth callback
107
+ * `authCallbackHost`: optional LAN hostname or IP used instead of `127.0.0.1`
108
+ * `authCallbackBaseUrl`: optional full callback base URL override
109
+ * `tokenStoragePath`: optional override for persisted OAuth tokens
110
+ * `mqttStaleSeconds`: how long MQTT state may remain unchanged before HTTP refresh becomes eligible
111
+ * `httpFallbackMinIntervalSeconds`: minimum delay between HTTP fallback refreshes
112
+ * `updateIntervalSeconds`: polling interval used alongside push updates
113
+
114
+ ## First Login
115
+
116
+ On first launch, the plugin logs a Navimow login URL.
117
+
118
+ 1. Open the login URL from the Homebridge log.
119
+ 2. Sign in with your Navimow account.
120
+ 3. Allow the browser to redirect back to the callback URL on the Homebridge host.
121
+ 4. The plugin stores the returned tokens and begins mower discovery.
122
+
123
+ If the callback URL is not reachable from your browser, authentication will not complete.
124
+
125
+ ## HomeKit Mapping
126
+
127
+ Each discovered mower is exposed as:
128
+
129
+ * `Mowing` switch
130
+ * `Dock` switch
131
+ * `Stop` switch
132
+ * HomeKit battery service
133
+
134
+ Command behavior:
135
+
136
+ * turning `Mowing` on sends `start` or `resume`
137
+ * turning `Mowing` off sends `pause`
138
+ * turning `Dock` on sends `dock` and then resets the switch
139
+ * turning `Stop` on sends `stop` and then resets the switch
140
+
141
+ The custom Homebridge UI also shows richer telemetry than the Home app, including last plugin command, command status, bridge source, battery details, signal strength, and mower metrics when Navimow reports them.
142
+
143
+ ## Repository Layout
144
+
145
+ Key paths in this repository:
146
+
147
+ * `src/`: Homebridge platform, accessories, and bridge client
148
+ * `bridge/navimow_bridge.py`: Python runtime for OAuth, cloud API access, MQTT, and command execution
149
+ * `homebridge-ui/`: custom Homebridge plugin UI
150
+ * `config.schema.json`: Homebridge form schema
151
+
152
+ ## Troubleshooting
153
+
154
+ Check the Homebridge logs first. Most failures come from one of these conditions:
155
+
156
+ * the configured Python interpreter does not have `navimow-sdk` installed
157
+ * the callback URL points to an address the browser cannot reach
158
+ * the OAuth response differs from the bridge expectations
159
+ * the host is running a Node.js version unsupported by Homebridge
160
+
161
+ Useful log lines to capture when diagnosing issues:
162
+
163
+ * login URL and callback result
164
+ * bridge startup messages
165
+ * command failures
166
+ * MQTT disconnects
167
+ * HTTP fallback warnings
168
+
169
+ ## Notes
170
+
171
+ This plugin is under active development. The current implementation focuses on reliable authentication, discovery, state updates, command execution, and a better Homebridge operator experience.