Skip to content

Commit

Permalink
v4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien-B committed Aug 8, 2023
1 parent 4d805b8 commit adebd92
Show file tree
Hide file tree
Showing 19 changed files with 198 additions and 7,073 deletions.
Binary file added .metals/metals.mv.db
Binary file not shown.
38 changes: 35 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ As now it support different devices :
* analog inputs (ipx, x-thl)
2. ipx v4
* relays
* gradual (x-dimmer, x4Vr) without state update
* analog inputs (ipx, x-thl)


This is heavily based on the hombridge plateform template it may let you control your ipx800 relays.
Expand All @@ -40,7 +42,7 @@ sudo npm install -g typescript rimraf
# build and link plugin
npm run build
npm run link #or sudo npm run link
npm link #or sudo npm link
#(re)start homebridge if not done already
Expand All @@ -65,8 +67,9 @@ See the following json snippet exemple: 
```

### Configure v5 devices
Than add all your devices (relays, dimmer, inputs).
See the following json snippet exemple: 
See the following json snippet exemple for v5: 
```
"relays": [
{
Expand Down Expand Up @@ -107,4 +110,33 @@ See the following json snippet exemple: 
"index": 42
}
],
```
```


### Configure v4 devices


"relays": [
{
"displayName": "chambre",
"type": "light",
"index": "r2"
},
{
"displayName": "ventilation",
"type": "fan",
"index": "r3"
}
],
"analogInputs": [
{
"displayName": "séjour",
"type": "temperature",
"index": "THL1-TEMP"
},
{
"displayName": "extérieur",
"type": "temperature",
"index": "THL2-LUM"
}
],
51 changes: 25 additions & 26 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
"type": "string",
"default": "light",
"oneOf": [
{ "title": "light (fr:lumière)", "enum": ["light"] },
{ "title": "outlet (fr:prise)", "enum": ["outlet"] },
{ "title": "fan (fr:ventilation)", "enum": ["fan"] },
{ "title": "switch (fr:interrupteur)", "enum": ["switch"] },
{ "title": "button (fr:poussoir)", "enum": ["bswitch"] },
{ "title": "light", "enum": ["light"] },
{ "title": "outlet", "enum": ["outlet"] },
{ "title": "fan", "enum": ["fan"] },
{ "title": "switch", "enum": ["switch"] },
{ "title": "button", "enum": ["bswitch"] },
{ "title": "valve", "enum": ["valve"]}
],
"required": true
},
"index": {
"type": "number"
"type": "string"
}
}
}
Expand All @@ -62,19 +62,18 @@
"oneOf": [
{ "title": "light (fr:lumière)", "enum": ["light"] },
{ "title": "fan (fr:ventilation)", "enum": ["fan"] },
{ "title": "x4fp", "enum": ["x4fp"] },
{ "title": "window covering (fr:volet/rideau)", "enum": ["covering"] }
{ "title": "window covering", "enum": ["covering"] }
],
"required": true
},
"index": {
"type": "number"
"type": "string"
},
"anaIndex": {
"condition": {
"functionBody": "return model.api.version && model.api.version!=='v4'"
},
"type": "number"
"type": "string"
}
}
}
Expand All @@ -91,14 +90,14 @@
"type": "string",
"default": "temperature",
"oneOf": [
{ "title": "humidity sensor (fr:capteur d’humidity)", "enum": ["humidity"] },
{ "title": "light sensor (fr:capteur de luminosité)", "enum": ["light"] },
{ "title": "temperature sensor (fr:thermomètre)", "enum": ["temperature"] }
{ "title": "humidity sensor", "enum": ["humidity"] },
{ "title": "light sensor", "enum": ["light"] },
{ "title": "temperature sensor", "enum": ["temperature"] }
],
"required": true
},
"index": {
"type": "number"
"type": "string"
}
}
}
Expand All @@ -115,14 +114,14 @@
"type": "string",
"default": "switch",
"oneOf": [
{ "title": "mouvement sensor (fr:détecteur de mouvement)", "enum": ["motion"] },
{ "title": "switch (fr:interrupteur)", "enum": ["switch"] } ,
{ "title": "contact sensor (fr:contacteur)", "enum": ["contact"] }
{ "title": "mouvement sensor", "enum": ["motion"] },
{ "title": "switch", "enum": ["switch"] } ,
{ "title": "contact sensor", "enum": ["contact"] }
],
"required": true
},
"index": {
"type": "number"
"type": "string"
}
}
}
Expand Down Expand Up @@ -150,9 +149,9 @@
"orderable": true,
"buttonText": "Add relay",
"items": [
{"key":"relays[].displayName", "title": "displayed name (fr: nom affiché)"},
{"key":"relays[].displayName", "title": "displayed name"},
{"key":"relays[].type"},
{"key":"relays[].index", "description": "api number on V4, io index on V5"}
{"key":"relays[].index", "description": "api name (ex R1) on V4, io index on V5"}
]
},
{
Expand All @@ -163,10 +162,10 @@
"orderable": true,
"buttonText": "Add graduals",
"items": [
{"key":"graduals[].displayName", "title": "displayed name (fr: nom affiché)"},
{"key":"graduals[].displayName", "title": "displayed name"},
{"key":"graduals[].type"},
{"key":"graduals[].index", "description": "api number on V4, io index on V5"},
{"key":"graduals[].anaIndex", "title": "ana/consigne index", "description": "consigne index on V5, to get brightness level"}
{"key":"graduals[].index", "description": "api number on V4 (G1 for first light x-dimmer, VR5 for first chanel of 2nd X-VR), io index on V5"},
{"key":"graduals[].anaIndex", "title": "dimmer-channel on V4 (), ana/consigne index on V5", "description": "consigne index on V5, to get brightness level"}
]
},
{
Expand All @@ -177,7 +176,7 @@
"orderable": true,
"buttonText": "Add inputs/sensors",
"items": [
{"key":"inputs[].displayName", "title": "displayed name (fr: nom affiché)"},
{"key":"inputs[].displayName", "title": "displayed name"},
{"key":"inputs[].type"},
{"key":"inputs[].index", "description": "api number on V4, io index on V5"}
]
Expand All @@ -190,9 +189,9 @@
"orderable": true,
"buttonText": "Add xthl and analog sensors",
"items": [
{"key":"analogInputs[].displayName", "title": "displayed name (fr: nom affiché)"},
{"key":"analogInputs[].displayName", "title": "displayed name"},
{"key":"analogInputs[].type"},
{"key":"analogInputs[].index", "description": "api number on V4, io index on V5"}
{"key":"analogInputs[].index", "description": "api number on V4 (ex : THL1-TEMP, THL2-HUM), io index on V5"}
]
}
]
Expand Down
Loading

0 comments on commit adebd92

Please sign in to comment.