Compare commits
No commits in common. "0082d4932b3b35011f0cc001cf34155acaf82812" and "d95d7f45677168592c8b7da01e58c87d88d1f465" have entirely different histories.
0082d4932b
...
d95d7f4567
|
@ -23,13 +23,6 @@ Fionera fügte HTML5 Push notifications hinzu.
|
||||||
|
|
||||||
Danach kleinere Änderungen und Erweiterungen von henne, zeus, smash.
|
Danach kleinere Änderungen und Erweiterungen von henne, zeus, smash.
|
||||||
|
|
||||||
## config via environment variablen
|
|
||||||
|
|
||||||
PING_INTERVAL_MS default 60000
|
|
||||||
MQTT_SERVER default 'mqtt://mqtt.ctdo.de
|
|
||||||
FLUKSO_URL default "/sensor/cf00e0b22230f4a8870af58f2b8719dd
|
|
||||||
FLUKSO_HOST default"flukso.raum.ctdo.de"
|
|
||||||
STATUS_POLL_HOST default "snapserv.ctdo.de"
|
|
||||||
|
|
||||||
|
|
||||||
## Entrümpelung 2022
|
## Entrümpelung 2022
|
||||||
|
@ -37,7 +30,7 @@ Danach kleinere Änderungen und Erweiterungen von henne, zeus, smash.
|
||||||
Das meiste an Funktionn wurde wiede raus geworfen weil sich die CTDO infrastruktur
|
Das meiste an Funktionn wurde wiede raus geworfen weil sich die CTDO infrastruktur
|
||||||
sehr verändert hat und einiges kaputt war.
|
sehr verändert hat und einiges kaputt war.
|
||||||
|
|
||||||
Der Status zeigt nur noch Power und Raumstatus an. Es läuft wie gehabt via ICMP Ping.
|
Der Status zeit nur noch Power und Raumstatus an. Es läuft wie gehabt via nmap-Ping.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ var IpPoll = require("./ip-poll");
|
||||||
var routes = require("./routes");
|
var routes = require("./routes");
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var mqttClient = require('mqtt');
|
var mqttClient = require('mqtt');
|
||||||
var process = require('process')
|
|
||||||
|
|
||||||
var spaceanswer = {
|
var spaceanswer = {
|
||||||
api: "0.13",
|
api: "0.13",
|
||||||
|
@ -64,20 +63,15 @@ var spaceanswer = {
|
||||||
var simpleanswer = {state: "unknown", lastchange: 0, power: 0};
|
var simpleanswer = {state: "unknown", lastchange: 0, power: 0};
|
||||||
|
|
||||||
|
|
||||||
var ippoll = new IpPoll(process.env.STATUS_POLL_HOST || "snapserv.ctdo.de");
|
var ippoll = new IpPoll("rpi3.raum.ctdo.de");
|
||||||
var flukso = new Flukso(process.env.FLUKSO_HOST || "flukso.raum.ctdo.de",
|
var flukso = new Flukso("flukso.raum.ctdo.de", "/sensor/cf00e0b22230f4a8870af58f2b8719dd");
|
||||||
process.env.FLUKSO_URL || "/sensor/cf00e0b22230f4a8870af58f2b8719dd");
|
var mqtt = mqttClient.connect('mqtt://raum.ctdo.de');
|
||||||
var mqtt = mqttClient.connect(process.env.MQTT_SERVER || 'mqtt://mqtt.ctdo.de');
|
|
||||||
var connected = false;
|
var connected = false;
|
||||||
|
|
||||||
//express js settings
|
//express js settings
|
||||||
var port = process.env.HTTP_PORT || '9911';
|
var port = '9911';
|
||||||
var address = '0.0.0.0';
|
var address = '0.0.0.0';
|
||||||
|
|
||||||
process.on('SIGINT', () => {
|
|
||||||
console.info("Interrupted")
|
|
||||||
process.exit(0)
|
|
||||||
})
|
|
||||||
|
|
||||||
ippoll.on('doneState', function (state) {
|
ippoll.on('doneState', function (state) {
|
||||||
spaceanswer.state.open = state;
|
spaceanswer.state.open = state;
|
||||||
|
@ -119,7 +113,7 @@ function work() {
|
||||||
sendSimple();
|
sendSimple();
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(work, process.env.PING_INTERVAL_MS || 60000);
|
setInterval(work, 60000);
|
||||||
work();
|
work();
|
||||||
|
|
||||||
setInterval(flukso.pollPower, 5000);
|
setInterval(flukso.pollPower, 5000);
|
||||||
|
|
Loading…
Reference in New Issue