Skip to content

Commit 329f2b7

Browse files
authored
[govee] New Govee LAN-API Binding (openhab#15696)
Signed-off-by: Stefan Höhn <[email protected]>
1 parent 0c6a80a commit 329f2b7

39 files changed

+1797
-0
lines changed

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
/bundles/org.openhab.binding.generacmobilelink/ @digitaldan
124124
/bundles/org.openhab.binding.globalcache/ @mhilbush
125125
/bundles/org.openhab.binding.goecharger/ @SamuelBrucksch
126+
/bundles/org.openhab.binding.govee/ @stefan-hoehn
126127
/bundles/org.openhab.binding.gpio/ @nils-bauer
127128
/bundles/org.openhab.binding.gpstracker/ @gbicskei
128129
/bundles/org.openhab.binding.gree/ @markus7017

bom/openhab-addons/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,11 @@
606606
<artifactId>org.openhab.binding.goecharger</artifactId>
607607
<version>${project.version}</version>
608608
</dependency>
609+
<dependency>
610+
<groupId>org.openhab.addons.bundles</groupId>
611+
<artifactId>org.openhab.binding.govee</artifactId>
612+
<version>${project.version}</version>
613+
</dependency>
609614
<dependency>
610615
<groupId>org.openhab.addons.bundles</groupId>
611616
<artifactId>org.openhab.binding.gpio</artifactId>
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
This content is produced and maintained by the openHAB project.
2+
3+
* Project home: https://www.openhab.org
4+
5+
== Declared Project Licenses
6+
7+
This program and the accompanying materials are made available under the terms
8+
of the Eclipse Public License 2.0 which is available at
9+
https://www.eclipse.org/legal/epl-2.0/.
10+
11+
== Source Code
12+
13+
https://github.com/openhab/openhab-addons
+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Govee Lan-API Binding
2+
3+
![govee](doc/govee-lights.png)
4+
5+
This binding integrates Light devices from [Govee](https://www.govee.com/).
6+
Even though these devices are widely used, they are usually only accessable via the Cloud.
7+
Another option is using Bluetooth which, due to its limitation only allows to control devices within a small range.
8+
The Bluetooth approach is supported by the openHAB Govee Binding while this binding covers the LAN interface.
9+
10+
Fortunately, there is a [LAN API](https://app-h5.govee.com/user-manual/wlan-guide) that allows to control the devices within your own network without accessing the Cloud.
11+
Note, though, that is somehow limited to a number of devices listed in the aforementioned manual.
12+
The binding is aware of all the devices that are listed in that document and even provides a product description during discovery.
13+
14+
Note: By intent the Cloud API has not been implemented (so far) as it makes controlling Govee devices dependent by Govee service itself.
15+
16+
## Supported Things
17+
18+
The things that are supported are all lights.
19+
While Govee provides probably more than a hundred different lights, only the following are supported officially by the LAN API, even though others might works as well.
20+
21+
Here is a list of the supported devices (the ones marked with * have been tested by the author)
22+
23+
- H619Z RGBIC Pro LED Strip Lights
24+
- H6046 RGBIC TV Light Bars
25+
- H6047 RGBIC Gaming Light Bars with Smart Controller
26+
- H6061 Glide Hexa LED Panels (*)
27+
- H6062 Glide Wall Light
28+
- H6065 Glide RGBIC Y Lights
29+
- H6066 Glide Hexa Pro LED Panel
30+
- H6067 Glide Triangle Light Panels (*)
31+
- H6072 RGBICWW Corner Floor Lamp
32+
- H6076 RGBICW Smart Corner Floor Lamp (*)
33+
- H6073 LED Floor Lamp
34+
- H6078 Cylinder Floor Lamp
35+
- H6087 RGBIC Smart Wall Sconces
36+
- H6173 RGBIC Outdoor Strip Lights
37+
- H619A RGBIC Strip Lights With Protective Coating 5M
38+
- H619B RGBIC LED Strip Lights With Protective Coating
39+
- H619C LED Strip Lights With Protective Coating
40+
- H619D RGBIC PRO LED Strip Lights
41+
- H619E RGBIC LED Strip Lights With Protective Coating
42+
- H61A0 RGBIC Neon Rope Light 1M
43+
- H61A1 RGBIC Neon Rope Light 2M
44+
- H61A2 RGBIC Neon Rope Light 5M
45+
- H61A3 RGBIC Neon Rope Light
46+
- H61A5 Neon LED Strip Light 10
47+
- H61A8Neon Neon Rope Light 10
48+
- H618A RGBIC Basic LED Strip Lights 5M
49+
- H618C RGBIC Basic LED Strip Lights 5M
50+
- H6117 Dream Color LED Strip Light 10M
51+
- H6159 RGB Light Strip (*)
52+
- H615E LED Strip Lights 30M
53+
- H6163 Dreamcolor LED Strip Light 5M
54+
- H610A Glide Lively Wall Lights
55+
- H610B Music Wall Lights
56+
- H6172 Outdoor LED Strip 10m
57+
- H61B2 RGBIC Neon TV Backlight
58+
- H61E1 LED Strip Light M1
59+
- H7012 Warm White Outdoor String Lights
60+
- H7013 Warm White Outdoor String Lights
61+
- H7021 RGBIC Warm White Smart Outdoor String
62+
- H7028 Lynx Dream LED-Bulb String
63+
- H7041 LED Outdoor Bulb String Lights
64+
- H7042 LED Outdoor Bulb String Lights
65+
- H705A Permanent Outdoor Lights 30M
66+
- H705B Permanent Outdoor Lights 15M
67+
- H7050 Outdoor Ground Lights 11M
68+
- H7051 Outdoor Ground Lights 15M
69+
- H7055 Pathway Light
70+
- H7060 LED Flood Lights (2-Pack)
71+
- H7061 LED Flood Lights (4-Pack)
72+
- H7062 LED Flood Lights (6-Pack)
73+
- H7065 Outdoor Spot Lights
74+
- H70C1 Govee Christmas String Lights 10m (*)
75+
- H70C2 Govee Christmas String Lights 20m (*)
76+
- H6051 Aura - Smart Table Lamp
77+
- H6056 H6056 Flow Plus
78+
- H6059 RGBWW Night Light for Kids
79+
- H618F RGBIC LED Strip Lights
80+
- H618E LED Strip Lights 22m
81+
- H6168 TV LED Backlight
82+
83+
## Discovery
84+
85+
Discovery is done by scanning the devices in the Thing section.
86+
87+
The devices _do not_ support the LAN API support out-of-the-box.
88+
To be able to use the device with the LAN API, the following needs to be done (also see the "Preparations for LAN API Control" section in the [Goveee LAN API Manual](https://app-h5.govee.com/user-manual/wlan-guide)):
89+
90+
- Start the Govee APP and add / discover the device (via Bluetooth) as described by the vendor manual
91+
Go to the settings page of the device
92+
![govee device settings](doc/device-settings.png)
93+
- Note that it may take several(!) minutes until this setting comes up.
94+
- Switch on the LAN Control setting.
95+
- Now the device can be used with openHAB.
96+
- The easiest way is then to scan the devices via the SCAN button in the thing section of that binding
97+
98+
## Thing Configuration
99+
100+
Even though binding configuration is supported via a thing file it should be noted that the IP address is required and there is no easy way to find out the IP address of the device.
101+
One possibility is to look for the MAC address in the Govee app and then looking the IP address up via:
102+
103+
```shell
104+
arp -a | grep "MAC_ADDRESS"
105+
```
106+
107+
### `govee-light` Thing Configuration
108+
109+
| Name | Type | Description | Default | Required | Advanced |
110+
|-----------------|---------|---------------------------------------|---------|----------|----------|
111+
| hostname | text | Hostname or IP address of the device | N/A | yes | no |
112+
| macAddress | text | MAC address of the device | N/A | yes | no |
113+
| deviceType | text | The product number of the device | N/A | yes | no |
114+
| refreshInterval | integer | Interval the device is polled in sec. | 5 | no | yes |
115+
116+
## Channels
117+
118+
| Channel | Type | Description | Read/Write | Description |
119+
|-----------------------|--------|---------------------------------|------------|----------------------|
120+
| color | Switch | On / Off | RW | Power On / OFF |
121+
| | Color | HSB (Hue Saturation Brightness) | RW | |
122+
| | Dimmer | Brightness Percentage | RW | |
123+
| color-temperature | Dimmer | Color Temperature Percentage | RW | |
124+
| color-temperature-abs | Dimmer | Color Temperature Absolute | RW | in 2000-9000 Kelvin |
125+
126+
Note: you may want to set Unit metadata to "K" when creating a color-temperature-abs item.
127+
128+
## UI Example for one device
129+
130+
![ui-example.png](doc/ui-example.png)
131+
132+
Thing channel setup:
133+
134+
![channel-setup1.png](doc/channel-setup1.png)
135+
![channel-setup2.png](doc/channel-setup2.png)
136+
![channel-setup3.png](doc/channel-setup3.png)
137+
138+
```java
139+
UID: govee:govee-light:33_5F_60_74_F4_08_77_21
140+
label: Govee H6159 RGB Light Strip H6159 (192.168.178.173)
141+
thingTypeUID: govee:govee-light
142+
configuration:
143+
deviceType: H6159
144+
wifiSoftwareVersion: 1.02.11
145+
hostname: 192.168.162.233
146+
macAddress: 33:5F:60:74:F4:08:66:21
147+
wifiHardwareVersion: 1.00.10
148+
refreshInterval: 5
149+
productName: H6159 RGB Light Strip
150+
channels:
151+
- id: color
152+
channelTypeUID: system:color
153+
label: Color
154+
description: Controls the color of the light
155+
configuration: {}
156+
- id: color-temperature
157+
channelTypeUID: system:color-temperature
158+
label: Color Temperature
159+
description: Controls the color temperature of the light from 0 (cold) to 100 (warm)
160+
configuration: {}
161+
- id: color-temperature-abs
162+
channelTypeUID: govee:color-temperature-abs
163+
label: Absolute Color Temperature
164+
description: Controls the color temperature of the light in Kelvin
165+
configuration: {}
166+
```
167+
168+
## Additional Information
169+
170+
Please provide any feedback regarding unlisted devices that even though not mentioned herein do work.
Loading
Loading
Loading
Loading
Loading
Loading
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>org.openhab.addons.bundles</groupId>
9+
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
10+
<version>4.1.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>org.openhab.binding.govee</artifactId>
14+
15+
<name>openHAB Add-ons :: Bundles :: Govee Binding</name>
16+
17+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<features name="org.openhab.binding.govee-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
3+
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
4+
5+
<feature name="openhab-binding-govee" description="Govee Binding" version="${project.version}">
6+
<feature>openhab-runtime-base</feature>
7+
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.govee/${project.version}</bundle>
8+
</feature>
9+
</features>

0 commit comments

Comments
 (0)