hubitat-by-mavrrick's People
hubitat-by-mavrrick's Issues
Hubitat : Govee - Extract Scene fails
In Hubitat : Govee integration, when I click "Extract Scene", I receive the error below. I tried with both all of my devices remote and all of them local.
(Debug level set to "Trace")
[app:7](http://192.168.0.208/logs#)2023-12-05 11:14:16.681 AM[error](http://192.168.0.208/logs#)java.lang.NullPointerException: Cannot invoke method get() on null object on line 353 (method sceneExtract) [app:7](http://192.168.0.208/logs#)2023-12-05 11:14:16.624 AM[debug](http://192.168.0.208/logs#)sceneExtract(): found Default group moving forward [app:7](http://192.168.0.208/logs#)2023-12-05 11:14:16.167 AM[debug](http://192.168.0.208/logs#)sceneExtract(): Calling HTTP server [app:7](http://192.168.0.208/logs#)2023-12-05 11:14:16.165 AM[debug](http://192.168.0.208/logs#)sceneExtract() DEVICE INFORMATION
Script
No signature of method: Script1.definition() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:Govee Integration , namespace:Mavrrick, author:CRAIG KING, ...]] on line 17
US AQI Calculation
US AQI calculation incorrectly includes TVOC. Here is reference doc:
https://www.airnow.gov/sites/default/files/2020-05/aqi-technical-assistance-document-sept2018.pdf
swap devices
Hello! I don't think this is really a bug just an issue I ran into. I recently purchased new Govee light bulbs (H6010) to replace my old ones. I realized that I couldn't just use the Swap Apps Device feature in settings, Guessing it's because Govee devices are children? No idea. So then I tried a hacky way of just changing the device IDs on their device page, which ended up failing because that new device ID isn't getting updated for its device.getDataValue("deviceId"). I've sorta fixed it, however, my background is in javascript so i gave it my best college try.
I added this to initialize
def initialize(){
if (device.getDataValue("deviceID") != device.deviceNetworkId) {
if (debugLog) {log.warn "initialize(): Detected new Device Network Id : ${device.deviceNetworkId}, Applying"}
newDeviceNetworkId = device.deviceNetworkId.toString()
updateDeviceInfo(newDeviceNetworkId)
}
and then added the code below, updateDataValue() is complaining about the following key:value pairs - commands, ctMax, and ctMin. not sure what to do about that, tried using updateSetting() but my new devices started working so I couldn't test it.
def updateDeviceInfo(newDeviceNetworkId) {
def params = [
uri: "https://developer-api.govee.com",
path: '/v1/devices',
headers: ["Govee-API-Key": device.getDataValue("apiKey"), "Content-Type": "application/json"],
]
try {
httpGet(params) { resp ->
resp.data.data.devices.each {
if (debugLog) {log.warn "checking device ${it.device}"}
deviceID = it.device
deviceModel = it.model
deviceName = it.deviceName
controllable = it.controllable
retrievable = it.retrievable
supportCmds = it.supportCmds
if (newDeviceNetworkId.contains(deviceID)) {
if (debugLog) {log.warn "found new device ${deviceID}"}
device.updateDataValue("deviceID", deviceID)
device.updateDataValue("deviceModel", deviceModel)
device.updateSetting("commands", supportCmds)
if (supportCmds.contains('colorTem') && supportCmds.contains('color')) {
ctMin = it.properties.colorTem.range.min
ctMax = it.properties.colorTem.range.max
device.updateSetting("ctMin", ctMin)
device.updateSetting("ctMax", ctMax)
} else if (supportCmds.contains('brightness')) {
device.updateSetting("ctMin", 'N/A')
device.updateSetting("ctMax", 'N/A')
}
}
}
}
} catch (groovyx.net.http.HttpResponseException e) {
log.error "Error: e.statusCode ${e.statusCode}"
log.error "${e}"
return 'unknown'
}
}
this might all be trash, but a way of swapping devices would be nice! Thanks!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.