Skip to content

Commit 3909107

Browse files
committed
update RedMatic-HomeKit
1 parent 0e911a0 commit 3909107

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

addon_files/redmatic/var/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"node-red-contrib-time-range-switch": "0.6.1",
1313
"redmatic-led": "1.0.0",
1414
"redmatic-webapp": "0.2.1",
15-
"redmatic-homekit": "0.7.7"
15+
"redmatic-homekit": "0.7.8"
1616
}
1717
}

addon_files/redmatic/www/js/script.js

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,10 @@ $(document).ready(() => {
137137
}
138138

139139
function save() {
140-
console.log(config);
141140
$.post({
142141
url: 'setconfig.cgi' + location.search,
143142
data: JSON.stringify(config, null, ' '),
144143
success: function (data) {
145-
console.log(data);
146144
if ($.trim(data) === 'ok') {
147145
alert($alertSaved);
148146
} else {
@@ -156,7 +154,6 @@ $(document).ready(() => {
156154

157155
$.get('getconfig.cgi' + location.search, (data, success) => {
158156
config = JSON.parse(data);
159-
console.log(config, success);
160157
$loglevel.val(config.logging.ain.level);
161158
$contextStorage.val(config.contextStorage.default.module);
162159

@@ -401,5 +398,30 @@ $(document).ready(() => {
401398
});
402399
});
403400

401+
function setHeader(xhr) {
402+
xhr.setRequestHeader('accept', 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*');
403+
}
404+
405+
$.get('restart_count', data => {
406+
$('#restarts').html(data || 'keine');
407+
});
408+
409+
function download(filename, dataUrl) {
410+
411+
let link = document.createElement("a");
412+
link.download = filename;
413+
link.target = "_blank";
414+
415+
link.href = dataUrl;
416+
document.body.appendChild(link);
417+
link.click();
418+
419+
document.body.removeChild(link);
420+
}
421+
422+
$('#log').on('click', () => {
423+
download('redmatic.' + (new Date()).toISOString() + '.log', 'log.cgi' + location.search);
424+
});
425+
404426
});
405427

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"node-red-node-sqlite": "0.3.5",
2525
"redmatic-led": "1.0.0",
2626
"redmatic-webapp": "0.2.1",
27-
"redmatic-homekit": "0.7.7",
27+
"redmatic-homekit": "0.7.8",
2828
"node-red-node-email": "1.0.6",
2929
"node-red-node-rbe": "0.2.4",
3030
"node-red-node-serialport": "0.6.8"

0 commit comments

Comments
 (0)