원클릭으로
auth-before-dedup
Never let cached-state dedup bypass session validity in cloud-backed Hubitat drivers.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Never let cached-state dedup bypass session validity in cloud-backed Hubitat drivers.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Pattern for keeping a rolling temperature-trend sample buffer in Hubitat state, computing slope over a configurable window, and classifying rising/falling/steady/unknown.
Implement Tuya Local v3.3 Groovy drivers on Hubitat using rawSocket, AES-128-ECB, queued retries, and defensive frame parsing.
Use Hubitat async HTTP plus a request queue to authenticate with Cognito, cache tokens in state, refresh proactively, and replay a single 401-failed request.
When two agents produce overlapping skills in one session, consolidate by merging unique content into the highest-confidence existing skill.
Standard guard pattern for async HTTP response callbacks in Hubitat drivers
Correct formula for converting lat/lng degree differences to miles, with pole clamp for numerical stability
SOC 직업 분류 기준
| name | auth-before-dedup |
| description | Never let cached-state dedup bypass session validity in cloud-backed Hubitat drivers. |
| domain | auth |
| confidence | low |
| source | earned |
Use this when a Hubitat driver has command handlers that compare requested values with device.currentValue(...) or cached state, but the actual auth/queue logic lives deeper in sendCommand() / executeOrQueueRequest().
Check session validity before any dedup early-return. If the session is expired, missing, or still discovering the target device, skip the dedup return and fall through to the normal command path so the request can queue itself and trigger re-auth / session setup.
private boolean ensureSession(boolean requiresDevice = true) {
if (hasUsableAccessToken() && (!requiresDevice || state.deviceId)) {
return true
}
continueSessionSetup()
return false
}
def on() {
boolean sessionReady = ensureSession()
if (sessionReady && device.currentValue("switch") == "on") {
return
}
sendCommand(action: "on")
}
A stale access token can hide behind a cache hit: if dedup returns first, the command never reaches the queue/auth layer, so the user sees a silent no-op until some non-deduped path (like refresh()) repairs the session.
if (device.currentValue("switch") == "on") { return } before any auth/session checkdrivers/gemstone-lights/gemstone-lights.groovy v0.4.17: ensureSession() gates switch/level/color/effect dedup so expired Cognito tokens still recover on the next user command.