Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Custom gauges added
Browse files Browse the repository at this point in the history
  • Loading branch information
goedh452 authored May 22, 2021
1 parent 8ec05b8 commit b436a53
Showing 1 changed file with 179 additions and 131 deletions.
310 changes: 179 additions & 131 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ With the config parameter `alwaysShowActions` it is possible to always display t
| `floors` | Group rooms by floor; see below for config | N/A |
| `dashboardRooms` | Array of rooms to display in the dashboard. When empty the 'rooms' parameter is used. | N/A |
| `utilities` | Show utility gauges; see below for config | N/A |
| `customGauges` | Show custom gauges; see below for config | N/A |
| `weather` | Show weather gauges; see below for config | N/A |
| `actions` | Show buttons to perform actions on Domoticz; see below for config | N/A |
| `excludedDevices` | Array of IDX's of devices that should be ignored by the module. The array expects strings. | N/A |
Expand Down Expand Up @@ -159,7 +160,7 @@ With the config parameter `alwaysShowActions` it is possible to always display t
| `deviceHeader` | Header for the specific device | N/A |
| `useHeaderSymbol` | Use a symbol of Font Awesome as header | `false` |
| `headerSymbol` | Font Awesome symbol to display | N/A |
| `dataReplaceText` | The data-field of the JSON result is used. This is a string from which the value is extracted. This is done by removing the text after the value. Specify the text that has to be removed here withoud a space (e.g. "cm" of "volt"). Find out the correct value by viewing the JSON-result: http://<domoticz-ip>:<domoticz-port>/json.htm?type=devices&rid=<idx> and find the file 'Data'. | `kWh` |
| `dataReplaceText` | The data-field of the JSON result is used. This is a string from which the value is extracted. This is done by removing the text after the value. Specify the text that has to be removed here withoud a space (e.g. "cm" or "volt"). Find out the correct value by viewing the JSON-result: http://domoticz-ip:domoticz-port/json.htm?type=devices&rid=idx and find the field 'Data'. | `kWh` |
| `lowerText` | Text to be displayed at the bottom of the gauge (e.g. Today or Voltage) | N/A |
| `gaugeMinValue` | Minimum value of the gauge; supports return for energy: negative values are allowed | `0` |
| `gaugeMaxValue` | Maximum value of the gauge | `1000` |
Expand Down Expand Up @@ -228,136 +229,183 @@ With the config parameter `alwaysShowActions` it is possible to always display t
### Extended setup
```
{
module: "MMM-Domoticz-ext",
header: "Domoticz",
position: "middle_center",
config: {
apiBase: "192.168.1.114",
apiPort: "8081",
updateInterval: 10,
displayType: "floor",
alwaysShowDashboard: true,
alwaysShowActions: true,
showButtons: true,
buttonAllLabel: "Alles",
buttonTypeLabel: "Type",
buttonRoomLabel: "Ruimte",
buttonBothLabel: "Beide",
buttonFloorLabel: "Verdieping",
buttonDashboardLabel: "Dashboard",
horizontal: true,
columnCount: 5,
dashboardColumnCount: 12,
maxTitleLength: 18,
switchLabel: "Schakelaars aan",
dimmerLabel: "Lampen aan",
contactLabel: "Ramen open",
doorContactLabel: "Deuren open",
doorLockLabel: "Sloten open",
temperatureLabel: "Gem. temp",
humidityLabel: "Gem. luchtvochtigheid",
blindsLabel: "Zonneschermen omlaag",
blindsInvertedLabel: "Luxaflex gesloten",
motionLabel: "Beweging",
luxLabel: "Gem. lichtsterke",
usageLabel: "Verbruik",
rooms: [
{ idx: "11", name: "WK-Achter" },
{ idx: "29" },
{ idx: "12" },
{ idx: "13" },
{ idx: "14", name: "WK-Voor" },
{ idx: "15" },
{ idx: "16" },
{ idx: "17" },
{ idx: "18" },
{ idx: "19" },
{ idx: "20" },
{ idx: "21" },
{ idx: "22" },
{ idx: "23" },
{ idx: "24" },
{ idx: "25" },
{ idx: "26" },
{ idx: "27" },
{ idx: "28" },
],
floors: [
{
name: "Beneden",
rooms: [ "11", "29", "12", "13", "14", "15", "16", "17", "18" ]
},
{
name: "1e verdieping",
rooms: [ "19", "20", "21", "22", "23" ]
},
{
name: "Zolder",
rooms: [ "24", "25", "26" ]
},
{
name: "Buiten",
rooms: [ "27", "28"]
},
],
utilities: {
utilityLabel: "Gas - Water - Licht",
showLabel: true,
devices: [
{
idx: "304",
deviceHeader: "Elektriciteit",
useHeaderSymbol: false,
headerSymbol: "fire",
counterTodayLabel: "Vandaag",
gaugeMinValue: -3000,
gaugeMaxValue: 3000,
gaugeAppendText: "Watt",
gaugeWidth: 200,
lineWidth: 16,
markerWidth: 16,
markerColor: "#F4D03F"
},
{
idx: "329",
deviceHeader: "Gas",
useHeaderSymbol: true,
headerSymbol: "fire",
counterTodayLabel: "Vandaag",
gaugeMaxValue: 25,
gaugeAppendText: "m³",
},
{
idx: "1614",
deviceHeader: "Water",
useHeaderSymbol: false,
headerSymbol: "water",
counterTodayLabel: "Vandaag",
gaugeMaxValue: 1500,
gaugeAppendText: "liter",
}
],
},
weather: {
devices: [ "1547", "890", "1588", "1545", "1546", "1736", "1544", "590" ],
weatherLabel: "Weersinformatie",
gaugeWidth: 200,
gaugeWindAppendText: "km/h",
rainSuffix: "mm",
},
actions: [
{
label: "Lampen aan",
url: "http://192.168.1.114:8081/json.htm?type=command&param=switchscene&idx=3&switchcmd=On"
},
{
label: "Lampen uit",
url: "http://192.168.1.114:8081/json.htm?type=command&param=switchscene&idx=1&switchcmd=On"
}
],
excludedDevices: [ "277", "1194", "1382", "1611", "1841", "1794", "1795", "886", "1345", "1590", "1140", "715", "716", "1772", "1875" ],
}
},
module: "MMM-Domoticz-ext",
header: "Domoticz",
position: "middle_center",
pages: {"Domotica": "middle_center"},
classes: "known",
config: {
apiBase: "192.168.1.114",
apiPort: "8081",
updateInterval: 15,
displayType: "floor",
alwaysShowDashboard: true,
alwaysShowActions: false,
showButtons: true,
buttonAllLabel: "Alles",
buttonTypeLabel: "Type",
buttonRoomLabel: "Ruimte",
buttonBothLabel: "Beide",
buttonFloorLabel: "Verdieping",
buttonDashboardLabel: "Dashboard",
horizontal: true,
columnCount: 4,
dashboardColumnCount: 12,
maxTitleLength: 18,
switchLabel: "Schakelaars aan",
dimmerLabel: "Lampen aan",
contactLabel: "Ramen open",
doorContactLabel: "Deuren open",
doorLockLabel: "Sloten open",
temperatureLabel: "Gem. temp",
humidityLabel: "Gem. luchtvochtigheid",
blindsLabel: "Zonneschermen omlaag",
blindsInvertedLabel: "Luxaflex gesloten",
motionLabel: "Beweging",
luxLabel: "Gem. lichtsterke",
usageLabel: "Verbruik",
rooms: [
{ idx: "11", name: "WK-Achter" },
{ idx: "29" },
{ idx: "12" },
{ idx: "13" },
{ idx: "14", name: "WK-Voor" },
{ idx: "15" },
{ idx: "16" },
{ idx: "17" },
{ idx: "18" },
{ idx: "19" },
{ idx: "20" },
{ idx: "21" },
{ idx: "22" },
{ idx: "23" },
{ idx: "24" },
{ idx: "25" },
{ idx: "26" },
{ idx: "27" },
{ idx: "28" },
],
floors: [
{
name: "Woonkamer",
rooms: [ "11", "29", "12", "13", "14" ]
},
{
name: "Hallen en toilet",
rooms: [ "15", "16", "17" ]
},
{
name: "1e verdieping",
rooms: [ "19", "20", "21", "22", "23" ]
},
{
name: "Zolder",
rooms: [ "24", "25", "26" ]
},
{
name: "Garage",
rooms: [ "18" ]
},
{
name: "Buiten",
rooms: [ "27", "28"]
},
],
utilities: {
utilityLabel: "Gas - Water - Licht",
showLabel: true,
devices: [
{
idx: "304",
deviceHeader: "Elektriciteit",
useHeaderSymbol: true,
headerSymbol: "plug",
counterTodayLabel: "Vandaag",
counterTodayAppendText: "kWh",
gaugeMinValue: -3000,
gaugeMaxValue: 3000,
gaugeAppendText: "watt",
gaugeWidth: 200,
lineWidth: 16,
markerWidth: 16,
markerColor: "#F4D03F"
},
{
idx: "1353",
deviceHeader: "Zonnepanelen",
useHeaderSymbol: true,
headerSymbol: "sun",
counterTodayLabel: "Vandaag",
counterTodayAppendText: "kWh",
gaugeMinValue: 0,
gaugeMaxValue: 3600,
gaugeAppendText: "watt",
gaugeWidth: 200,
lineWidth: 16,
markerWidth: 16,
markerColor: "#70db70"
},
{
idx: "329",
deviceHeader: "Gas",
useHeaderSymbol: true,
headerSymbol: "fire",
counterTodayLabel: "Vandaag",
gaugeMaxValue: 25,
gaugeAppendText: "m³",
},
{
idx: "1614",
deviceHeader: "Water",
useHeaderSymbol: true,
headerSymbol: "water",
counterTodayLabel: "Vandaag",
gaugeMaxValue: 1500,
gaugeAppendText: "liter",
},
],
},
customGauges: {
headerLabel: "Overige",
showLabel: true,
devices: [
{
idx: "1356",
deviceHeader: "Volt",
dataReplaceText: "V",
lowerText: "Voltage",
gaugeAppendText: "volt",
gaugeMaxValue: 250,
},
{
idx: "2057",
deviceHeader: "Afstand",
dataReplaceText: "cm",
gaugeAppendText: "cm",
gaugeMaxValue: 1000,
markerColor: "#70db70"
}
]
},
weather: {
devices: [ "1547", "1544", "590", "890", "1545", "1546", "1588", "1736" ],
weatherLabel: "Weersinformatie",
gaugeWidth: 185,
gaugeWindAppendText: "km/u",
},
actions: [
{
label: "Lampen aan",
url: "http://192.168.1.114:8081/json.htm?type=command&param=switchscene&idx=3&switchcmd=On"
},
{
label: "Lampen uit",
url: "http://192.168.1.114:8081/json.htm?type=command&param=switchscene&idx=1&switchcmd=On"
}
],
excludedDevices: [ "716", "1772", "1875", "304", "329", "1614", "1366", "1987" ],
}
},
```

## Screenshots
Expand Down

0 comments on commit b436a53

Please sign in to comment.