Skip to content

Instantly share code, notes, and snippets.

View lizhineng's full-sized avatar
:octocat:
Happy Coding!

Li Zhineng lizhineng

:octocat:
Happy Coding!
  • Guangzhou, China
View GitHub Profile
@lizhineng
lizhineng / cleargrass.js
Last active July 19, 2023 10:48
HomeBridge MQTT Thing Codec for ClearGrass CSG1 (AIRMX VERSION)
// The threshold to determine whether the battery is low
const LOW_BATTERY_THRESHOLD = 20
// The factor to convert TVOC in ppb to μg/m3
// @see https://leeduser.buildinggreen.com/content/my-device-measures-tvoc-ppb-units-how-do-i-convert-measurements-gm3
const TVOC_CONVERSION_FACTOR = 3.767
module.exports = {
init() {
return {
@lizhineng
lizhineng / response.json
Created July 15, 2023 03:46
Get index response from SLS API, those indices are created by Alibaba Cloud by default for Function Compute.
{
"index_mode": "v2",
"keys": {
"aggPeriodSeconds": {
"doc_value": true,
"type": "long"
},
"concurrentRequests": {
"doc_value": true,
"type": "long"