Skip to content

Commit

Permalink
add ip address to device settings
Browse files Browse the repository at this point in the history
  • Loading branch information
RWensveen committed Jul 14, 2018
1 parent 14d259d commit 28c35a3
Show file tree
Hide file tree
Showing 18 changed files with 358 additions and 316 deletions.
15 changes: 2 additions & 13 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,15 @@ const Homey = require('homey');
const Util = require('./../lib/util.js');


/*
.registerRunListener(( args, state, callback ) => {
// @param: args = trigger settings from app.json
// @param: state = data from trigger-event
.registerAutocompleteListener(( query, args ) => {
// @param: query = name of already selected item in flowcard
// or empty string if no selection yet
// @param: args = other args of flow (i.e. this device)
// @return: [Promise]->return list of {name,description,anything_programmer_wants}
*/


/**
* Main entry point for app.
*/
class BroadlinkApp extends Homey.App {

onInit() {

}

}

module.exports = BroadlinkApp;
250 changes: 190 additions & 60 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@
{ "id": "RcCmd18", "type": "text", "value": "", "label": { "en": "19" } },
{ "id": "RcCmd19", "type": "text", "value": "", "label": { "en": "20" } }
]
},
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
},
Expand Down Expand Up @@ -315,6 +328,19 @@
{ "id": "RcCmd28", "type": "text", "value": "", "label": { "en": "29" } },
{ "id": "RcCmd29", "type": "text", "value": "", "label": { "en": "30" } }
]
},
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
},
Expand Down Expand Up @@ -396,6 +422,19 @@
{ "id": "RcCmd18", "type": "text", "value": "", "label": { "en": "19" } },
{ "id": "RcCmd19", "type": "text", "value": "", "label": { "en": "20" } }
]
},
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
},
Expand Down Expand Up @@ -471,21 +510,40 @@
],
"settings": [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of sensor values.",
"nl": "Tijd tussen het lezen van de sensor waarden, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
"type": "group",
"label": {"en": "Timing", "nl": "Tijdschema"},
"children" : [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of sensor values.",
"nl": "Tijd tussen het lezen van de sensor waarden, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
}
]
},
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
},
Expand Down Expand Up @@ -527,6 +585,21 @@
"id": "add_devices",
"template": "add_devices"
}
],
"settings" : [
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
},
{
Expand Down Expand Up @@ -588,21 +661,40 @@
],
"settings": [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of device status.",
"nl": "Tijd tussen het lezen van de apparaatstatus, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
"type": "group",
"label": {"en": "Timing", "nl": "Tijdschema"},
"children" : [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of device status.",
"nl": "Tijd tussen het lezen van de apparaatstatus, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
}
]
},
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
},
Expand Down Expand Up @@ -665,21 +757,40 @@
],
"settings": [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of device status.",
"nl": "Tijd tussen het lezen van de apparaatstatus, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
"type": "group",
"label": {"en": "Timing", "nl": "Tijdschema"},
"children" : [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of device status.",
"nl": "Tijd tussen het lezen van de apparaatstatus, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
}
]
},
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
},
Expand Down Expand Up @@ -746,21 +857,40 @@
],
"settings": [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of device status.",
"nl": "Tijd tussen het lezen van de apparaatstatus, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
"type": "group",
"label": {"en": "Timing", "nl": "Tijdschema"},
"children" : [
{
"id": "CheckInterval",
"type": "number",
"value": 5,
"label": {
"en": "Interval",
"nl": "Interval"
},
"hint": {
"en": "Time in minutes between reading of device status.",
"nl": "Tijd tussen het lezen van de apparaatstatus, in minuten."
},
"attr": {
"min": 1,
"max": 3600
}
}
]
},
{
"type":"group",
"label": { "en": "Address", "nl": "Adres" },
"children": [
{
"type": "text",
"id": "ipAddress",
"label": { "en": "IP address", "nl": "IP adres" },
"value": "0.0.0.0",
"pattern": "^([1-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){2}([0-9]|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])$"
}
]
}
]
}
Expand Down
Loading

0 comments on commit 28c35a3

Please sign in to comment.