New API
Due to the current API not displaying all devices, I have been in touch with Govee support who have provided a new API URL
https://developer.govee.com/reference/get-you-devices
Could this be integrated please
I have a brief python script using this new API and I get all my devices.
(i have suppressed the MAC address on purpose)
- Device Name: Kitchen Light 1, Model: H60A1, ID: 50:39:
- Device Name: Kitchen Light 2, Model: H60A1, ID: 08:25:
- Device Name: Flat lamp, Model: H6076, ID: 6E:F6:
- Device Name: House outdoor lights, Model: H7038, ID: 3D:8A:
- Device Name: Garage light, Model: H60A1, ID: 13:DF:D0:
- Device Name: Curtain Lights, Model: H70B3, ID: 18:C0:
- Device Name: Chris wardrobe, Model: H610A, ID: 60:A6:
- Device Name: Scenic DreamView1, Model: DreamViewScenic, ID: 9
With the current API in Govee HACS script I only get 2 devices
- Device Name: Chris wardrobe, Model: H610A, ID: 60:A6:
- Device Name: Flat lamp, Model: H6076, ID: 6E:F6:
Unfortunately, I'm not skilled enough to branch this and try and address the code.
Python Code
// import requests
//# Replace with your actual API key
//API_KEY = "<API KEY HERE"
//
//# Correct Router API endpoint
//DEVICE_LIST_URL = "https://openapi.api.govee.com/router/api/v1/user/devices"
//
//def list_govee_devices():
// headers = {
// "Content-Type": "application/json",
// "Govee-API-Key": API_KEY
// }
//
// try:
// response = requests.get(DEVICE_LIST_URL, headers=headers)
//
// print(f"Status Code: {response.status_code}")
// print(f"Response Body:\n{response.text}")
//
// if response.status_code == 200:
// data = response.json()
// devices = data.get("data", [])
//
// if not devices:
// print("✅ API call successful, but no devices returned.")
// else:
// print("📋 Devices Found:")
// for i, device in enumerate(devices, start=1):
// print(f"{i}. Device Name: {device['deviceName']}, Model: {device['sku']}, ID: {device['device']}")
// else:
// print("❌ API returned an error. Check status code and key.")
//
// except Exception as e:
// print("❌ Exception occurred:", str(e))
//
//if name == "main":
// list_govee_devices()`
//
Due to the current API not displaying all devices, I have been in touch with Govee support who have provided a new API URL
https://developer.govee.com/reference/get-you-devices
Could this be integrated please
That link goes to the API that hasn't been updated for over a year. What new api URL are you talking about?
That’s what Govee told me “our new API”. At least this one returns all devices, unlike the current one.
H607C no present on API Is itt possible also to add the Dreamview device ?
I have the same issue with H7038 not showing yet it can be seen in API. I tried Python script but it didnt work. Any suggestions?