Hello.
I’m developing plug-in for Homebridge.
For now, air purifier part is almost done.
but I can’t see reset command to hepa filter.
custom.hepaFilter in capability. but it isn’t in SmartThings document.
so, how can I find out the command of custom?
I was able to start this development thanks to SmartThigns Tutorials and document.
Thank you always.
{
"id": "custom.hepaFilter",
"version": 1,
"status": "proposed",
"name": "Hepa Filter",
"ephemeral": false,
"attributes": {
"hepaFilterCapacity": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "integer"
},
"unit": {
"type": "string",
"enum": [
"CC",
"Cycle",
"Gallon",
"Hour",
"Month"
]
}
},
"additionalProperties": false,
"required": [
"value",
"unit"
]
},
"enumCommands": []
},
"hepaFilterStatus": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"enum": [
"normal",
"replace",
"wash",
"notused"
]
}
},
"additionalProperties": false,
"required": [
"value"
]
},
"enumCommands": []
},
"hepaFilterResetType": {
"schema": {
"type": "object",
"properties": {
"value": {
"items": {
"type": "string",
"enum": [
"replaceable",
"washable",
"notresetable"
]
},
"type": "array"
}
},
"additionalProperties": false,
"required": [
"value"
]
},
"enumCommands": []
},
"hepaFilterUsageStep": {
"schema": {
"type": "object",
"properties": {
"value": {
"min": 1,
"type": "integer",
"max": 100
}
},
"additionalProperties": false,
"required": [
"value"
]
},
"enumCommands": []
},
"hepaFilterUsage": {
"schema": {
"type": "object",
"properties": {
"value": {
"min": 0,
"type": "integer",
"max": 100
}
},
"additionalProperties": false,
"required": [
"value"
]
},
"enumCommands": []
},
"hepaFilterLastResetDate": {
"schema": {
"type": "object",
"properties": {
"value": {
"pattern": "^(?:[1-9]\\d{3}-?(?:(?:0[1-9]|1[0-2])-?(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-?(?:29|30)|(?:0[13578]|1[02])-?31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-?02-?29)T(?:[01]\\d|2[0-3]):?[0-5]\\d:?[0-5]\\d(?:\\.\\d{3})?(?:Z|[+-][01]\\d(?::?[0-5]\\d)?)$",
"type": "string"
}
},
"additionalProperties": false,
"required": []
},
"enumCommands": []
}
},
"commands": {
"resetHepaFilter": {
"name": "resetHepaFilter",
"arguments": []
}
}
}
I used the SmartThings CLI for this. The command being smartthings capabilities custom.hepaFilter -j
but you can access the API directly.
For example as a curl command line it would be:
curl --header "Authorization: Bearer xxx-xxx-xxx-xxx" --header "Content-Type: application/json" https://api.smartthings.com/v1/capabilities/custom.hepaFilter/1
xxx-xxx-xxx-xxx being a Personal Access Token with capabilities scope.
3 Likes
Thanks a lot.
I didn’t know about SmartThings CLI
This is very helpful for me.
thanks again, have a nice day
1 Like