Osiota is a software platform capable of running distributed IoT applications written in JavaScript to enable any kind of IoT tasks. See osiota.
This application reads input states of GPIO pins.
Properties
Name | Type | Description | Required |
---|---|---|---|
pin (Pin number) |
number |
Not GPIO number (See pin naming) |
yes |
invert (Invert Input Value) |
boolean |
e.g. for a pull down circuit |
no |
map (Actions) |
object[] |
no |
Additional Properties: not allowed
Example
{
"pin": 7,
"invert": true,
"map": [
{
"type": "press",
"node": "/my-switch"
},
{
"type": "longpress",
"node": "/my-switch-long"
}
]
}
Items: Action
Item Properties
Name | Type | Description | Required |
---|---|---|---|
type (Switch Type) |
string |
Enum: "switch" , "press" , "longpress" |
yes |
node (Node Name) |
string |
no |
Example
[
{
"type": "press",
"node": "/my-switch"
},
{
"type": "longpress",
"node": "/my-switch-long"
}
]
Add a configuration object for this application, see osiota configuration:
{
"name": "gpio",
"config": CONFIG
}
Osiota and this application are released under the MIT license.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.