Open 3rwww1 opened 6 years ago
For the configuration i think take json name is better
@3rwww1 First draft new single Json :
{
"general": {
"logInterval": 600,
"ledActive":true,
"ireneActive": true,
"jetpackActive": true,
"externalSensorsActive": true,
"sleepActive": false,
"mqttServer": "mqtts.lacoolboard.io"
},
"metrics": {
"builtIns": {
"BME280": {
"temperature": true,
"humidity": true,
"pressure": true
},
"SI114X": {
"visible": true,
"ir": true,
"uv": true
},
"vbat": true,
"soilMoisture": true,
"wallMoisture": false
},
"irene3000": {
"waterTemp": {
"active":1,
"gain":16
},
"phProbe": {
"active":1,
"gain":16
},
"adc2": {
"active":0,
"gain":16,
"type":"voltage"
}
},
"externals": [
{
"reference":"SDS011",
"type":"PM",
"address":13,
"kind0":"PM10",
"kind1":"PM2.5"
},
{
"reference":"NDIR_I2C",
"type":"CO2",
"address":77
},
{
"reference": "SHT1x",
"type": "SHT1x",
"kind0": "SHT1x_Humidity",
"kind1": "SHT1x_TempC"
}
],
"jetpack": [
{
"actif": false,
"type": "time",
"sensor": "",
"inverted": false,
"temporal": false,
"low": {
"range": 0,
"time": 5000,
"hour": 0,
"minute": 0
},
"high": {
"range":0,
"time": 5000,
"hour": 0,
"minute": 0
}
},
{
"actif":true,
"type": "hour",
"sensor": "",
"inverted":true,
"temporal":true,
"low": {
"range": 0,
"time": 0,
"hour": 20,
"minute": 0
},
"high": {
"range": 0,
"time": 0,
"hour": 7,
"minute": 0
}
},
{
"actif":true,
"type":"hour",
"sensor":"",
"inverted":true,
"temporal":true,
"low": {
"range": 0,
"time": 0,
"hour": 23,
"minute": 0
},
"high": {
"range": 0,
"time": 0,
"hour": 6,
"minute": 0
}
},
{
"actif":true,
"type":"time",
"sensor":"",
"inverted":false,
"temporal":true,
"low": {
"range": 0,
"time": 600000,
"hour": 0,
"minute": 0
},
"high": {
"range": 0,
"time": 600000,
"hour": 0,
"minute": 0
}
},
{
"actif":true,
"type":"time",
"sensor":"",
"inverted":false,
"temporal":true,
"low": {
"range": 0,
"time": 600000,
"hour": 0,
"minute": 0
},
"high": {
"range": 0,
"time": 600000,
"hour": 0,
"minute": 0
}
},
{
"actif":true,
"type":"time",
"sensor":"",
"inverted":false,
"temporal":true,
"low": {
"range": 0,
"time": 600000,
"hour": 0,
"minute": 0
},
"high": {
"range": 0,
"time": 600000,
"hour": 0,
"minute": 0
}
},
{
"actif":true,
"type":"range",
"sensor":"CO2",
"inverted":false,
"temporal":true,
"low": {
"range": 1500,
"time": 0,
"hour": 0,
"minute": 0
},
"high": {
"range": 1500,
"time": 0,
"hour": 0,
"minute": 0
}
},
{
"actif":false,
"type":"range",
"sensor":"Temperature",
"inverted":false,
"temporal":false,
"low": {
"range": 27,
"time": 0,
"hour": 0,
"minute": 0
},
"high": {
"range": 33,
"time": 0,
"hour": 0,
"minute": 0
}
},
{
"actif":false,
"type":"hour",
"sensor":"",
"inverted":true,
"temporal":false,
"low": {
"range": 0,
"time": 0,
"hour": 6,
"minute": 0
},
"high": {
"range": 0,
"time": 0,
"hour": 18,
"minute": 0
}
}
]
Currently, the JSON API has a lot of issues
true
orfalse
, sometimes as0
or1
, which is a big no-noactif
instead ofactive
)arrays
that should beobjects
All in all,
We need to move to a software engineering perspective on doing things:
target format, as we discussed with @simon-lacool and @baltoche