You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[shelly] Fix initialization of BLU Motion device (openhab#17053)
* Fixesopenhab#17052 (caused by inproper initialization of the profile flags for
BLU devices in general and for BLU Motion another one)
Signed-off-by: Markus Michels <[email protected]>
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.shelly/README.md
+21-9
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,15 @@ Also check out the [Shelly Manager](doc/ShellyManager.md), which
28
28
The binding supports both hardware generations
29
29
30
30
- Generation 1: The original Shelly devices like the Shelly 1, Shelly 2.5, Shelly Flood etc.
31
-
- Generation 2: Plus / Pro series of devices
31
+
- Generation 2+3: Plus / Pro series of devices
32
32
- Shelly Plus Mini: Shelly Plus devices in compact format (Gen 2+3)
33
33
- Shelly BLU: Bluetooth based series of devices
34
34
35
35
The binding provides the same feature set across all devices as good as possible and depending on device specific features.
36
36
37
+
`Note:` Using BLU devices or the Plus/Pro Range Extender mode require some additional configuration steps.
38
+
See section [Discovery](#discovery) for details.
39
+
37
40
### Generation 1
38
41
39
42
| thing-type | Model | Vendor ID |
@@ -159,12 +162,15 @@ In this case autoCoIoT should be disabled, CoIoT events will not work, because t
159
162
160
163
## Firmware
161
164
162
-
The binding requires firmware version 1.8.2 or newer for generation 1 to enable all features, version 1.9.2+ is recommended. Generation 2 devices require 0.10.2 or newer, the Plus HT at least 0.11.0.
165
+
`Generation 1`: The binding requires firmware version 1.9.2 or newer to enable all features.
166
+
`Generation 2+3` Those Shelly devices require firmware version 1.0.0 or newer (1.10.0+ is recommended).
167
+
`Shelly BLU deries`: Use the Shelly App to update to 1.0+ version of the firmware.
168
+
163
169
Some of the features are enabled dynamically or are not available depending on device type and firmware release.
164
170
The Web UI of the Shelly device displays the current firmware version under Settings:Firmware and shows an update option when a newer version is available.
165
171
166
172
The current firmware version is reported in the Thing Properties.
167
-
A dedicated channel (device#updateAvailable) indicates the availability of a newer firmware.
173
+
A dedicated channel indicates the availability of a newer firmware (`device#updateAvailable`, not available for BLU devices).
168
174
Use the device's Web UI or the Shelly App to perform the update.
169
175
170
176
Check [Advanced Users](doc/AdvancedUsers.md) for information how to update your device.
@@ -183,7 +189,7 @@ They periodically announce their presence, which is used by the binding to find
183
189
Sometimes you need to run the manual discovery multiple times until you see all your devices.
184
190
185
191
`Important for Generation 1 Devices`:
186
-
It's recommended to enable CoIoT in the device settings for faster response times (event driven rather than polling).
192
+
It's strongly recommended to enable CoIoT in the device settings for faster response times (event driven rather than polling).
187
193
Open the device's Web UI, section "COIOT settings" and select "Enable COCIOT".
188
194
It's recommended to switch the Shelly devices to CoAP peer mode if you have only your openHAB system controlling the device.
189
195
This allows routing the CoIoT/CoAP messages across multiple IP subnets without special network setup required.
@@ -193,12 +199,12 @@ Keep Multicast mode if you have multiple hosts, which should receive the CoAP up
193
199
### Discovery of BLU Devices
194
200
195
201
The BLU devices use Bluetooth Low Energy (BLE).
196
-
The binding can't communicate directly with the device, but the Plus/Pro series with firmware 0.14.1 or newer could be used as a gateway.
197
-
The binding automatically installs a script on the Shelly Device (oh-blu-scanner), which forwards the BLU events to the binding using the WebSocket channel.
202
+
The binding can't communicate directly with the device, so a Shelly Plus/Pro device is required with enabled Bluetooth to use those devices as a hub.
203
+
The binding automatically installs a script on the Shelly Device (oh-blu-scanner.js), which forwards the BLU events to the binding.
198
204
199
205
Follow these steps to add the Shelly BLU Device to openHAB
200
206
201
-
- Make sure a Shelly is near by the BLU device, enable Bluetooh on this device (**disabling** the 'Bluetooth Gateway' mode in the Shelly app/UI is recommended)
207
+
- Make sure a Shelly is near by the BLU device, enable Bluetooh on this device (**disable the 'Bluetooth Gateway' mode** in the Shelly app/UI is recommended)
202
208
- Add this thing to openHAB, make sure thing gets online
203
209
- Enable "BLU Gateway Support" in the thing configuration of the Shelly device acting as gateway.
204
210
- Now press the button on your BLU device, this wakes up the device and the script forwards this event to the binding
@@ -207,12 +213,18 @@ Follow these steps to add the Shelly BLU Device to openHAB
207
213
- Click the device button again, the binding gets another event and creates the channels and thing changes status to ONLINE
208
214
- Finally link the channels to the equipment in the model
209
215
210
-
Note: During initialization the script 'oh-blu-scanner.js' gets installed and activated on the Shelly Gateway device.
216
+
`Note`:
217
+
218
+
- During initialization the script 'oh-blu-scanner.js' gets installed and activated on the Shelly Gateway device.
219
+
- Shelly BLU Motion: It may take some time until channels like Lux show up.
220
+
221
+
Try moving the device to force status updates.
211
222
212
223
Every time an event is received sensors#lastUpdate and channels are updated with the reported values.
213
-
device#wifiSignal indicates the Bluetooth signal strength and gets updated when the device sends an event.
224
+
`device#wifiSignal` indicates the Bluetooth signal strength and gets updated when the device sends an event.
214
225
215
226
The binding supports multiple Shelly Plus/Pro as gateway devices unless they are added as thing and are ONLINE.
227
+
In this scenario the channel `device#gatewayDevice` will report the last hub device, which forwarded a status update.
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyDeviceProfile.java
+3-2
Original file line number
Diff line number
Diff line change
@@ -236,8 +236,9 @@ public void initFromThingType(String name) {
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyBaseHandler.java
+5-3
Original file line number
Diff line number
Diff line change
@@ -293,8 +293,11 @@ public boolean initializeThing() throws ShellyApiException {
293
293
cache.clear();
294
294
resetStats();
295
295
296
-
logger.debug("{}: Start initializing for thing {}, type {}, IP address {}, Gen2: {}, CoIoT: {}", thingName,
Copy file name to clipboardexpand all lines: bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/provider/ShellyChannelDefinitions.java
+3-1
Original file line number
Diff line number
Diff line change
@@ -339,12 +339,14 @@ public static Map<String, Channel> createDeviceChannels(final Thing thing, final
0 commit comments