Skip to content

Commit

Permalink
socket io 4 and deps updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tagyoureit committed Apr 11, 2021
1 parent 98e7369 commit 9f5d0d6
Show file tree
Hide file tree
Showing 12 changed files with 2,170 additions and 1,253 deletions.
2 changes: 1 addition & 1 deletion app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function stopAsync(): Promise<void> {
config.update();
await logger.stopAsync();
// RKS: Uncomment below to see the shutdown process
//await new Promise((resolve, reject) => { setTimeout(() => { resolve(); }, 10000); });
//await new Promise<void>((resolve, reject) => { setTimeout(() => { resolve(); }, 10000); });
}
catch (err) {
console.error(`Error stopping processes: ${ err.message }`);
Expand Down
300 changes: 300 additions & 0 deletions config copy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
{
"controller": {
"comms": {
"enabled": true,
"rs485Port": "/dev/ttyUSB0",
"mockPort": false,
"netConnect": true,
"netHost": "10.0.0.170",
"netPort": 9801,
"inactivityRetry": 10,
"portSettings": {
"baudRate": 9600,
"dataBits": 8,
"parity": "none",
"stopBits": 1,
"flowControl": false,
"autoOpen": false,
"lock": false
}
}
},
"web": {
"servers": {
"http2": {
"enabled": false,
"uuid": "2365fe2f-97e9-4353-95d4-9ccd71e0ce94"
},
"http": {
"enabled": true,
"ip": "0.0.0.0",
"port": 4200,
"httpsRedirect": false,
"authentication": "none",
"authFile": "/users.htpasswd",
"uuid": "4ff21da9-8ba5-49e6-8c87-20e1c988ef9d"
},
"https": {
"enabled": false,
"ip": "0.0.0.0",
"port": 4201,
"authentication": "none",
"authFile": "/users.htpasswd",
"sslKeyFile": "",
"sslCertFile": "",
"uuid": "fb7e9f5e-d662-4000-b1ca-c01e17f2fc49"
},
"mdns": {
"enabled": false,
"uuid": "1e7bd3d0-f1d0-4dc5-95d4-f0bd0ceb2d76"
},
"ssdp": {
"enabled": true,
"uuid": "4fd33942-66c9-46a7-8a5a-9e50fc0f315f"
}
},
"services": {},
"interfaces": {
"smartThings": {
"name": "SmartThings",
"enabled": false,
"fileName": "smartThings-Hubitat.json",
"globals": {},
"options": {
"host": "0.0.0.0",
"port": 39500
},
"uuid": "95b47bcc-fb46-47c2-a44a-cd9aaa867ccc"
},
"hubitat": {
"name": "Hubitat",
"enabled": false,
"fileName": "smartThings-Hubitat.json",
"globals": {},
"options": {
"host": "0.0.0.0",
"port": 39501
},
"uuid": "4573370e-5ae1-40a5-bda3-9597b17e4050"
},
"vera": {
"name": "Vera",
"enabled": false,
"fileName": "vera.json",
"vars": {
"deviceId": 0
},
"options": {
"host": "",
"port": 3480
},
"uuid": "bc256cd7-af18-41f3-a94d-43397c835165"
},
"valveRelay": {
"name": "Valve Relays",
"enabled": false,
"fileName": "valveRelays.json",
"vars": {
"valveIds": []
},
"options": {
"host": "0.0.0.0",
"port": 8081
},
"uuid": "415c5cbd-01e0-43bb-99c9-15a003febe0c"
},
"influxDB": {
"name": "InfluxDB",
"type": "influx",
"enabled": false,
"fileName": "influxDB.json",
"options": {
"protocol": "http",
"host": "192.168.0.1",
"port": 32770,
"username": "",
"password": "",
"database": "pool",
"retentionPolicy": "autogen"
},
"uuid": "7e7875c8-0161-448b-b9fa-c818f0d3d49f"
},
"mqtt": {
"name": "MQTT",
"type": "mqtt",
"enabled": false,
"fileName": "mqtt.json",
"globals": {},
"options": {
"protocol": "mqtt://",
"host": "192.168.0.1",
"port": 1883,
"username": "",
"password": "",
"rootTopic": "@bind=(state.equipment.model).replace(' ','-').replace('/','').toLowerCase();",
"retain": true,
"qos": 0,
"changesOnly": true
},
"uuid": "dec40fe7-70d5-48d1-8f57-0e1a474838e6"
},
"mqttAlt": {
"name": "MQTTAlt",
"type": "mqtt",
"enabled": false,
"fileName": "mqttAlt.json",
"globals": {},
"options": {
"protocol": "mqtt://",
"host": "192.168.0.1",
"port": 1883,
"username": "",
"password": "",
"rootTopic": "@bind=(state.equipment.model).replace(' ','-').replace('/','').toLowerCase();Alt",
"retain": true,
"qos": 0,
"changesOnly": true
},
"uuid": "b8b0e719-a81f-4085-b69e-5df3adfa990c"
},
"rem": {
"name": "Relay Equipment Manager",
"type": "rem",
"enabled": true,
"options": {
"protocol": "http://",
"host": "10.0.0.98",
"port": "8080",
"headers": {
"content-type": "application/json"
}
},
"socket": {
"transports": [
"websocket"
],
"upgrade": false,
"reconnectionDelay": 2000,
"reconnection": true,
"reconnectionDelayMax": 20000
},
"uuid": "af4c8252-0715-4edd-872f-9eeda8f18754"
},
"rem2": {
"name": "Relay Equipment Manager2",
"type": "rem",
"enabled": false,
"options": {
"protocol": "http://",
"host": "raspberrypi3",
"port": "8080",
"headers": {
"content-type": "application/json"
}
},
"socket": {
"transports": [
"websocket"
],
"upgrade": false,
"reconnectionDelay": 2000,
"reconnection": true,
"reconnectionDelayMax": 20000
},
"uuid": "9346f2a7-734d-475b-a90e-2b43f6131a4c"
},
"rulesManager": {
"name": "Rules Manager",
"type": "http",
"enabled": false,
"fileName": "rulesManager.json",
"globals": {},
"options": {
"host": "localhost",
"port": 4200
},
"uuid": "65ee2581-e652-427e-99c6-17c6aa02a6e3"
}
}
},
"log": {
"packet": {
"enabled": true,
"logToConsole": true,
"logToFile": false,
"filename": "packetLog",
"invalid": false,
"broadcast": {
"enabled": true,
"includeActions": [
23,
24,
152,
155,
215,
216
],
"includeSource": [],
"includeDest": [],
"excludeActions": [],
"excludeSource": [],
"excludeDest": []
},
"pump": {
"enabled": false,
"includeActions": [],
"includeSource": [],
"includeDest": [],
"excludeActions": [],
"excludeSource": [],
"excludeDest": []
},
"chlorinator": {
"enabled": false,
"includeSource": [],
"includeDest": [],
"excludeSource": [],
"excludeDest": []
},
"intellichem": {
"enabled": false,
"includeActions": [],
"excludeActions": [],
"includeSource": [],
"includeDest": [],
"excludeSource": [],
"excludeDest": []
},
"intellivalve": {
"enabled": false,
"includeActions": [],
"excludeActions": [],
"includeSource": [],
"includeDest": [],
"excludeSource": [],
"excludeDest": []
},
"unidentified": {
"enabled": true,
"includeSource": [],
"includeDest": [],
"excludeSource": [],
"excludeDest": []
},
"unknown": {
"enabled": true,
"includeSource": [],
"includeDest": [],
"excludeSource": [],
"excludeDest": []
}
},
"app": {
"enabled": true,
"level": "verbose",
"captureForReplay": false,
"logToFile": false
}
},
"appVersion": "6.5.2"
}
6 changes: 3 additions & 3 deletions controller/boards/EasyTouchBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ export enum GetTouchConfigCategories {
}
class TouchSystemCommands extends SystemCommands {
public async cancelDelay() {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
let out = Outbound.create({
action: 131,
payload: [0],
Expand All @@ -762,7 +762,7 @@ class TouchSystemCommands extends SystemCommands {
});
}
public async setDateTimeAsync(obj: any): Promise<any> {
return new Promise((resolve, reject) => {
return new Promise<any>((resolve, reject) => {
let dst = sys.general.options.adjustDST ? 1 : 0;
if (typeof obj.dst !== 'undefined') utils.makeBool(obj.dst) ? dst = 1 : dst = 0;
let { hour = state.time.hours,
Expand Down Expand Up @@ -1040,7 +1040,7 @@ class TouchCircuitCommands extends CircuitCommands {
return this.setCircuitStateAsync(id, !cstate.isOn);
}
private createLightGroupMessages(group: LightGroup) {
let packets: Promise<any>[] = [];
let packets: Promise<void>[] = [];
// intellibrites can come with 8 settings (1 packet) or 10 settings (2 packets)
if (sys.equipment.maxIntelliBrites === 8) {
// Easytouch
Expand Down
Loading

0 comments on commit 9f5d0d6

Please sign in to comment.