hoffmation-base 0.0.3 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/models/iTemperaturDataPoint.ts +9 -0
  2. package/models/persistence/temperaturDataPoint.ts +1 -1
  3. package/models/timeCallback.ts +2 -2
  4. package/package.json +1 -1
  5. package/server/config/private/mainConfig.json +64 -0
  6. package/server/devices/DeviceInfo.ts +1 -1
  7. package/server/devices/Heizgruppen.ts +1 -1
  8. package/server/devices/Rollos.ts +1 -1
  9. package/server/devices/deviceUpdater.ts +1 -1
  10. package/server/devices/devices.ts +8 -8
  11. package/server/devices/groups/fensterGroup.ts +1 -1
  12. package/server/devices/hmIPDevices/Fenster.ts +1 -1
  13. package/server/devices/hmIPDevices/hmIpBewegung.ts +1 -1
  14. package/server/devices/hmIPDevices/hmIpDevice.ts +1 -1
  15. package/server/devices/hmIPDevices/hmIpGriff.ts +1 -1
  16. package/server/devices/hmIPDevices/hmIpHeizgruppe.ts +5 -5
  17. package/server/devices/hmIPDevices/hmIpHeizung.ts +2 -2
  18. package/server/devices/hmIPDevices/hmIpLampe.ts +4 -4
  19. package/server/devices/hmIPDevices/hmIpPraezenz.ts +4 -4
  20. package/server/devices/hmIPDevices/hmIpRoll.ts +3 -3
  21. package/server/devices/hmIPDevices/hmIpTaste.ts +1 -1
  22. package/server/devices/hmIPDevices/hmIpTaster.ts +2 -2
  23. package/server/devices/hmIPDevices/hmIpTherm.ts +2 -2
  24. package/server/devices/hmIPDevices/hmIpTuer.ts +5 -5
  25. package/server/devices/wledDevice.ts +2 -2
  26. package/server/devices/zigbee/ZigbeeActuator.ts +7 -7
  27. package/server/devices/zigbee/zigbeeAquaraVibra.ts +5 -5
  28. package/server/devices/zigbee/zigbeeAquaraWater.ts +5 -5
  29. package/server/devices/zigbee/zigbeeBlitzShp.ts +3 -3
  30. package/server/devices/zigbee/zigbeeDevice.ts +1 -1
  31. package/server/devices/zigbee/zigbeeHeimanSmoke.ts +6 -6
  32. package/server/devices/zigbee/zigbeeIkeaSteckdose.ts +3 -3
  33. package/server/devices/zigbee/zigbeeIlluActuator.ts +3 -3
  34. package/server/devices/zigbee/zigbeeIlluDimmer.ts +5 -5
  35. package/server/devices/zigbee/zigbeeIlluLampe.ts +3 -3
  36. package/server/devices/zigbee/zigbeeIlluLedRGBCCT.ts +4 -4
  37. package/server/ioBroker/ioBroker.main.ts +5 -5
  38. package/server/services/Sonos/sonos-service.ts +5 -5
  39. package/server/services/dbo/persist.ts +1 -1
  40. package/server/services/news-service.ts +1 -1
  41. package/server/services/settings-service.ts +3 -11
  42. package/server/services/weather/weather-service.ts +1 -1
  43. package/tsconfig.json +3 -4
@@ -0,0 +1,9 @@
1
+ export interface iTemperaturDataPoint {
2
+ _id?: string;
3
+ name: string;
4
+ istTemperatur: number;
5
+ sollTemperatur: number;
6
+ level: number;
7
+ humidity: number;
8
+ date: Date;
9
+ }
@@ -1,4 +1,4 @@
1
- import { iTemperaturDataPoint } from '/imports/api/heizung';
1
+ import { iTemperaturDataPoint } from "../iTemperaturDataPoint";
2
2
 
3
3
  export class TemperaturDataPoint implements iTemperaturDataPoint {
4
4
  constructor(
@@ -1,6 +1,6 @@
1
1
  import { LogLevel } from './logLevel';
2
- import { ServerLogService } from '/server/services/log-service';
3
- import { SunTimeOffsets, TimeCallbackService } from '/server/services/time-callback-service';
2
+ import { ServerLogService } from '../server/services/log-service';
3
+ import { SunTimeOffsets, TimeCallbackService } from '../server/services/time-callback-service';
4
4
 
5
5
  export class TimeCallback {
6
6
  public lastDone: Date = new Date(0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hoffmation-base",
3
3
  "description": "Base Libraries and functions for own Hoffmation projects",
4
- "version": "0.0.3",
4
+ "version": "0.0.7",
5
5
  "main": "index.js",
6
6
  "repository": {
7
7
  "type": "git",
@@ -0,0 +1,64 @@
1
+ {
2
+ "ioBrokerUrl": "http://xxx.xxx.xxx.xxx:8xx4",
3
+ "timeSettings": {
4
+ "nightStart": {
5
+ "hours": 23,
6
+ "minutes": 45
7
+ },
8
+ "nightEnd": {
9
+ "hours": 6,
10
+ "minutes": 30
11
+ }
12
+ },
13
+ "roomDefault": {
14
+ "lampenBeiBewegung": true,
15
+ "lichtSonnenAufgangAus": true,
16
+ "sonnenUntergangRollos": true,
17
+ "sonnenAufgangRollos": true,
18
+ "movementResetTimer": 240,
19
+ "sonnenUntergangRolloDelay": 15,
20
+ "sonnenUntergangLampenDelay": 15,
21
+ "sonnenUntergangRolloMaxTime": {
22
+ "hours": 21,
23
+ "minutes": 30
24
+ },
25
+ "sonnenAufgangRolloMinTime": {
26
+ "hours": 7,
27
+ "minutes": 30
28
+ },
29
+ "sonnenAufgangRolloDelay": 35,
30
+ "sonnenAufgangLampenDelay": 15,
31
+ "lightIfNoWindows": false
32
+ },
33
+ "telegram": {
34
+ "logLevel": 1,
35
+ "telegramToken": "15xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXU",
36
+ "allowedIDs": [
37
+ 111111111,
38
+ 111111111
39
+ ],
40
+ "subscribedIDs": [
41
+ 111111111,
42
+ 111111111
43
+ ]
44
+ },
45
+ "mp3Server": {
46
+ "path": "//XXXXXXXXXX/XXXXX/XXXXXX/XXX/ttsMP3/"
47
+ },
48
+ "muell": {
49
+ "calendarURL": "https://xxxxxxxxxxxxxxxxxxxxx.de/abfuhrkalender?format=ical&street=xxxxxxxx&number=xx"
50
+ },
51
+ "polly": {
52
+ "mp3Path": "//xxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxx/ttsMP3/",
53
+ "region": "eu-central-1",
54
+ "signatureVersion": "v4",
55
+ "accessKeyId": "xxxxxxxxxxxxxxxxxxxx",
56
+ "secretAccessKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
57
+ "voiceID": "Vicki"
58
+ },
59
+ "weather": {
60
+ "lattitude": "xx.xxxxxx",
61
+ "longitude": "xx.xxxxx",
62
+ "appid": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
63
+ }
64
+ }
@@ -1,4 +1,4 @@
1
- import { deviceConfig } from '/models/deviceConfig';
1
+ import { deviceConfig } from '../../models/deviceConfig';
2
2
 
3
3
  export class DeviceInfo {
4
4
  public devID: string;
@@ -3,7 +3,7 @@ import { Devices } from './devices';
3
3
  import { HmIpDeviceType } from './hmIPDevices/hmIpDeviceType';
4
4
  import { HmIpHeizgruppe } from './hmIPDevices/hmIpHeizgruppe';
5
5
  import { HmIpHeizung } from './hmIPDevices/hmIpHeizung';
6
- import { TemperaturDataPoint } from '/models/persistence/temperaturDataPoint';
6
+ import { TemperaturDataPoint } from '../../models/persistence/temperaturDataPoint';
7
7
 
8
8
  export class Heizgruppen {
9
9
  public static getInfo(): string {
@@ -1,7 +1,7 @@
1
1
  import { Devices } from './devices';
2
2
  import { HmIpDeviceType } from './hmIPDevices/hmIpDeviceType';
3
3
  import { HmIpRoll } from './hmIPDevices/hmIpRoll';
4
- import { RoomBase } from '/models/rooms/RoomBase';
4
+ import { RoomBase } from '../../models/rooms/RoomBase';
5
5
 
6
6
  export class Rolladen {
7
7
  public static getRolladenPosition(): string {
@@ -1,9 +1,9 @@
1
+ import { LogLevel } from '../../models/logLevel';
1
2
  import { ServerLogService } from '../services/log-service';
2
3
  import { Devices } from './devices';
3
4
  import { HmIPDevice } from './hmIPDevices/hmIpDevice';
4
5
  import { IDeviceUpdater } from './iDeviceUpdater';
5
6
  import { ZigbeeDevice } from './zigbee/zigbeeDevice';
6
- import { LogLevel } from '/models/logLevel';
7
7
 
8
8
  export class DeviceUpdater implements IDeviceUpdater {
9
9
  private static IDENTIFIER_HOMEMATIC: string = 'hm-rpc';
@@ -1,3 +1,4 @@
1
+ import { LogLevel } from '../../models/logLevel';
1
2
  import { HmIpDeviceType } from './hmIPDevices/hmIpDeviceType';
2
3
  import { ZigbeeDeviceType } from './zigbee/zigbeeDeviceType';
3
4
  import { IOBrokerConnection } from '../ioBroker/connection';
@@ -14,20 +15,19 @@ import { HmIpTaster } from './hmIPDevices/hmIpTaster';
14
15
  import { HmIpTherm } from './hmIPDevices/hmIpTherm';
15
16
  import { HmIpTuer } from './hmIPDevices/hmIpTuer';
16
17
  import { HmIpWippe } from './hmIPDevices/hmIpWippe';
17
- import { deviceConfig } from '/models/deviceConfig';
18
- import { LogLevel } from '/models/logLevel';
18
+ import { deviceConfig } from '../../models/deviceConfig';
19
19
  import { HmIpHeizgruppe } from './hmIPDevices/hmIpHeizgruppe';
20
20
  import { HmIpBewegung } from './hmIPDevices/hmIpBewegung';
21
21
  import { ZigbeeIkeaSteckdose } from './zigbee/zigbeeIkeaSteckdose';
22
22
  import { ZigbeeIlluLedRGBCCT } from './zigbee/zigbeeIlluLedRGBCCT';
23
23
  import { ZigbeeAquaraVibra } from './zigbee/zigbeeAquaraVibra';
24
24
  import { ZigbeeIlluDimmer } from './zigbee/zigbeeIlluDimmer';
25
- import { ZigbeeHeimanSmoke } from '/server/devices/zigbee/zigbeeHeimanSmoke';
26
- import { ZigbeeAquaraWater } from '/server/devices/zigbee/zigbeeAquaraWater';
27
- import { ZigbeeBlitzShp } from '/server/devices/zigbee/zigbeeBlitzShp';
28
- import { ZigbeeIlluLampe } from '/server/devices/zigbee/zigbeeIlluLampe';
29
- import { ZigbeeIlluActuator } from '/server/devices/zigbee/zigbeeIlluActuator';
30
- import { iRoomImportEnforcer } from '/models/rooms/iRoomImportEnforcer';
25
+ import { ZigbeeHeimanSmoke } from './zigbee/zigbeeHeimanSmoke';
26
+ import { ZigbeeAquaraWater } from './zigbee/zigbeeAquaraWater';
27
+ import { ZigbeeBlitzShp } from './zigbee/zigbeeBlitzShp';
28
+ import { ZigbeeIlluLampe } from './zigbee/zigbeeIlluLampe';
29
+ import { ZigbeeIlluActuator } from './zigbee/zigbeeIlluActuator';
30
+ import { iRoomImportEnforcer } from '../../models/rooms/iRoomImportEnforcer';
31
31
 
32
32
  export class Devices {
33
33
  public static hmIP: { [id: string]: HmIPDevice } = {};
@@ -1,7 +1,7 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { Fenster } from '../hmIPDevices/Fenster';
2
3
  import { FensterPosition } from '../hmIPDevices/FensterPosition';
3
4
  import { ServerLogService } from '../../services/log-service';
4
- import { LogLevel } from '../../../models/logLevel';
5
5
  import { RoomBase } from '../../../models/rooms/RoomBase';
6
6
  import { TimeCallback, TimeCallbackType } from '../../../models/timeCallback';
7
7
  import { TimeCallbackService, TimeOfDay } from '../../services/time-callback-service';
@@ -1,8 +1,8 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { ZigbeeAquaraVibra } from '../zigbee/zigbeeAquaraVibra';
2
3
  import { FensterPosition } from './FensterPosition';
3
4
  import { HmIpGriff } from './hmIpGriff';
4
5
  import { HmIpRoll } from './hmIpRoll';
5
- import { LogLevel } from '../../../models/logLevel';
6
6
  import { ServerLogService } from '../../services/log-service';
7
7
  import { TimeCallbackService, TimeOfDay } from '../../services/time-callback-service';
8
8
  import { Utils } from '../../services/utils/utils';
@@ -1,7 +1,7 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { HmIPDevice } from './hmIpDevice';
2
3
  import { HmIpDeviceType } from './hmIpDeviceType';
3
4
  import { DeviceInfo } from '../DeviceInfo';
4
- import { LogLevel } from '../../../models/logLevel';
5
5
  import { ServerLogService } from '../../services/log-service';
6
6
  import { Persist } from '../../services/dbo/persist';
7
7
  import { CountToday } from '../../../models/persistence/todaysCount';
@@ -1,6 +1,6 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { DeviceInfo } from '../DeviceInfo';
2
3
  import { HmIpDeviceType } from './hmIpDeviceType';
3
- import { LogLevel } from '../../../models/logLevel';
4
4
  import { HmIpAddDeviceItem, HmIpRoomSettings } from '../../../models/rooms/RoomSettings/hmIPRoomSettings';
5
5
  import { ServerLogService } from '../../services/log-service';
6
6
  import { ioBrokerBaseDevice } from '../iIoBrokerDevice';
@@ -1,8 +1,8 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { FensterPosition } from './FensterPosition';
2
3
  import { HmIPDevice } from './hmIpDevice';
3
4
  import { HmIpDeviceType } from './hmIpDeviceType';
4
5
  import { DeviceInfo } from '../DeviceInfo';
5
- import { LogLevel } from '../../../models/logLevel';
6
6
  import { ServerLogService } from '../../services/log-service';
7
7
  import { TelegramService } from '../../services/Telegram/telegram-service';
8
8
  import { Utils } from '../../services/utils/utils';
@@ -1,13 +1,13 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { HmIPDevice } from './hmIpDevice';
2
3
  import { HmIpDeviceType } from './hmIpDeviceType';
3
4
  import { DeviceInfo } from '../DeviceInfo';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
6
- import { TemperaturSettings } from '/models/temperaturSettings';
7
- import { Persist } from '/server/services/dbo/persist';
5
+ import { ServerLogService } from '../../services/log-service';
6
+ import { TemperaturSettings } from '../../../models/temperaturSettings';
7
+ import { Persist } from '../../services/dbo/persist';
8
8
  import { HmIpHeizung } from './hmIpHeizung';
9
9
  import { Devices } from '../devices';
10
- import { Utils } from '/server/services/utils/utils';
10
+ import { Utils } from '../../services/utils/utils';
11
11
 
12
12
  export class HmIpHeizgruppe extends HmIPDevice {
13
13
  private _automaticMode: boolean = true;
@@ -1,8 +1,8 @@
1
+ import { LogLevel } from '../../../models/logLevel';
2
+ import { ServerLogService } from '../../services/log-service';
1
3
  import { HmIPDevice } from './hmIpDevice';
2
4
  import { HmIpDeviceType } from './hmIpDeviceType';
3
5
  import { DeviceInfo } from '../DeviceInfo';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
6
6
 
7
7
  export class HmIpHeizung extends HmIPDevice {
8
8
  private _temperatur: number = 0;
@@ -1,10 +1,10 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { HmIPDevice } from './hmIpDevice';
2
3
  import { HmIpDeviceType } from './hmIpDeviceType';
3
4
  import { DeviceInfo } from '../DeviceInfo';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
6
- import { LampSettings } from '/models/lampSettings';
7
- import { Utils } from '/server/services/utils/utils';
5
+ import { ServerLogService } from '../../services/log-service';
6
+ import { LampSettings } from '../../../models/lampSettings';
7
+ import { Utils } from '../../services/utils/utils';
8
8
 
9
9
  export class HmIpLampe extends HmIPDevice {
10
10
  public lightOn: boolean | undefined = undefined;
@@ -1,11 +1,11 @@
1
1
  import { HmIPDevice } from './hmIpDevice';
2
2
  import { HmIpDeviceType } from './hmIpDeviceType';
3
3
  import { DeviceInfo } from '../DeviceInfo';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
6
- import { Persist } from '/server/services/dbo/persist';
4
+ import { LogLevel } from '../../../models/logLevel';
5
+ import { ServerLogService } from '../../services/log-service';
6
+ import { Persist } from '../../services/dbo/persist';
7
7
  import { CountToday } from '../../../models/persistence/todaysCount';
8
- import { Utils } from '/server/services/utils/utils';
8
+ import { Utils } from '../../services/utils/utils';
9
9
 
10
10
  export class HmIpPraezenz extends HmIPDevice {
11
11
  public excludeFromNightAlarm: boolean = false;
@@ -1,11 +1,11 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { Fenster } from './Fenster';
2
3
  import { FensterPosition } from './FensterPosition';
3
4
  import { HmIPDevice } from './hmIpDevice';
4
5
  import { HmIpDeviceType } from './hmIpDeviceType';
5
6
  import { DeviceInfo } from '../DeviceInfo';
6
- import { LogLevel } from '/models/logLevel';
7
- import { ServerLogService } from '/server/services/log-service';
8
- import { Utils } from '/server/services/utils/utils';
7
+ import { ServerLogService } from '../../services/log-service';
8
+ import { Utils } from '../../services/utils/utils';
9
9
 
10
10
  export class HmIpRoll extends HmIPDevice {
11
11
  public get currentLevel(): number {
@@ -1,4 +1,4 @@
1
- import { Utils } from '/server/services/utils/utils';
1
+ import { Utils } from '../../services/utils/utils';
2
2
 
3
3
  export class HmIPTaste {
4
4
  public shortPressed: boolean = false;
@@ -2,8 +2,8 @@ import { HmIPDevice } from './hmIpDevice';
2
2
  import { HmIpDeviceType } from './hmIpDeviceType';
3
3
  import { DeviceInfo } from '../DeviceInfo';
4
4
  import { HmIPTaste } from './hmIpTaste';
5
- import { LogLevel } from '/models/logLevel';
6
- import { ServerLogService } from '/server/services/log-service';
5
+ import { LogLevel } from '../../../models/logLevel';
6
+ import { ServerLogService } from '../../services/log-service';
7
7
 
8
8
  export class HmIpTaster extends HmIPDevice {
9
9
  public tasten: {
@@ -1,8 +1,8 @@
1
1
  import { HmIPDevice } from './hmIpDevice';
2
2
  import { HmIpDeviceType } from './hmIpDeviceType';
3
3
  import { DeviceInfo } from '../DeviceInfo';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
4
+ import { LogLevel } from '../../../models/logLevel';
5
+ import { ServerLogService } from '../../services/log-service';
6
6
 
7
7
  export class HmIpTherm extends HmIPDevice {
8
8
  public constructor(pInfo: DeviceInfo) {
@@ -1,12 +1,12 @@
1
1
  import { HmIPDevice } from './hmIpDevice';
2
2
  import { HmIpDeviceType } from './hmIpDeviceType';
3
3
  import { DeviceInfo } from '../DeviceInfo';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
4
+ import { LogLevel } from '../../../models/logLevel';
5
+ import { ServerLogService } from '../../services/log-service';
6
6
  import { TuerPosition } from './TuerPosition';
7
- import { SonosService } from '/server/services/Sonos/sonos-service';
8
- import { TelegramService } from '/server/services/Telegram/telegram-service';
9
- import { Utils } from '/server/services/utils/utils';
7
+ import { SonosService } from '../../services/Sonos/sonos-service';
8
+ import { TelegramService } from '../../services/Telegram/telegram-service';
9
+ import { Utils } from '../../services/utils/utils';
10
10
 
11
11
  export class HmIpTuer extends HmIPDevice {
12
12
  public position: TuerPosition = TuerPosition.geschlossen;
@@ -1,7 +1,7 @@
1
+ import { LogLevel } from '../../models/logLevel';
2
+ import { ServerLogService } from '../services/log-service';
1
3
  import { IOBrokerConnection } from '../ioBroker/connection';
2
4
  import { DeviceInfo } from './DeviceInfo';
3
- import { LogLevel } from '/models/logLevel';
4
- import { ServerLogService } from '/server/services/log-service';
5
5
 
6
6
  export class WledDevice {
7
7
  public on: boolean = false;
@@ -1,10 +1,10 @@
1
- import { ZigbeeDevice } from '/server/devices/zigbee/zigbeeDevice';
2
- import { DeviceInfo } from '/server/devices/DeviceInfo';
3
- import { ZigbeeDeviceType } from '/server/devices/zigbee/zigbeeDeviceType';
4
- import { ServerLogService } from '/server/services/log-service';
5
- import { LogLevel } from '/models/logLevel';
6
- import { Utils } from '/server/services/utils/utils';
7
- import { LampSettings } from '/models/lampSettings';
1
+ import { LogLevel } from '../../../models/logLevel';
2
+ import { ZigbeeDevice } from './zigbeeDevice';
3
+ import { DeviceInfo } from '../DeviceInfo';
4
+ import { ZigbeeDeviceType } from './zigbeeDeviceType';
5
+ import { ServerLogService } from '../../services/log-service';
6
+ import { Utils } from '../../services/utils/utils';
7
+ import { LampSettings } from '../../../models/lampSettings';
8
8
 
9
9
  export class ZigbeeActuator extends ZigbeeDevice {
10
10
  public settings: LampSettings = new LampSettings();
@@ -1,11 +1,11 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { DeviceInfo } from '../DeviceInfo';
2
3
  import { ZigbeeDevice } from './zigbeeDevice';
3
4
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
6
- import { SonosService } from '/server/services/Sonos/sonos-service';
7
- import { Utils } from '/server/services/utils/utils';
8
- import { PollyService } from '/server/services/Sonos/polly-service';
5
+ import { ServerLogService } from '../../services/log-service';
6
+ import { SonosService } from '../../services/Sonos/sonos-service';
7
+ import { Utils } from '../../services/utils/utils';
8
+ import { PollyService } from '../../services/Sonos/polly-service';
9
9
 
10
10
  export class ZigbeeAquaraVibra extends ZigbeeDevice {
11
11
  public sensitivity: string = '';
@@ -1,11 +1,11 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { DeviceInfo } from '../DeviceInfo';
2
3
  import { ZigbeeDevice } from './zigbeeDevice';
3
4
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
6
- import { SonosService } from '/server/services/Sonos/sonos-service';
7
- import { Utils } from '/server/services/utils/utils';
8
- import { PollyService } from '/server/services/Sonos/polly-service';
5
+ import { ServerLogService } from '../../services/log-service';
6
+ import { SonosService } from '../../services/Sonos/sonos-service';
7
+ import { Utils } from '../../services/utils/utils';
8
+ import { PollyService } from '../../services/Sonos/polly-service';
9
9
 
10
10
  export class ZigbeeAquaraWater extends ZigbeeDevice {
11
11
  public water: boolean = false;
@@ -1,9 +1,9 @@
1
+ import { LogLevel } from '../../../models/logLevel';
2
+ import { ServerLogService } from '../../services/log-service';
1
3
  import { DeviceInfo } from '../DeviceInfo';
2
4
  import { ZigbeeDevice } from './zigbeeDevice';
3
5
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
4
- import { LampSettings } from '/models/lampSettings';
5
- import { LogLevel } from '/models/logLevel';
6
- import { ServerLogService } from '/server/services/log-service';
6
+ import { LampSettings } from '../../../models/lampSettings';
7
7
 
8
8
  export class ZigbeeBlitzShp extends ZigbeeDevice {
9
9
  public steckerOn: boolean = false;
@@ -1,7 +1,7 @@
1
1
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
2
2
  import { DeviceInfo } from '../DeviceInfo';
3
3
  import { LogLevel } from '../../../models/logLevel';
4
- import { ZigbeeAddDeviceItem, ZigbeeRoomSettings } from '/models/rooms/RoomSettings/zigbeeRoomSettings';
4
+ import { ZigbeeAddDeviceItem, ZigbeeRoomSettings } from '../../../models/rooms/RoomSettings/zigbeeRoomSettings';
5
5
  import { ServerLogService } from '../../services/log-service';
6
6
  import { ioBrokerBaseDevice } from '../iIoBrokerDevice';
7
7
  import { RoomBase } from '../../../models/rooms/RoomBase';
@@ -1,12 +1,12 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { DeviceInfo } from '../DeviceInfo';
2
3
  import { ZigbeeDevice } from './zigbeeDevice';
3
4
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
4
- import { LogLevel } from '/models/logLevel';
5
- import { ServerLogService } from '/server/services/log-service';
6
- import { SonosService } from '/server/services/Sonos/sonos-service';
7
- import { RoomBase } from '/models/rooms/RoomBase';
8
- import { Utils } from '/server/services/utils/utils';
9
- import { PollyService } from '/server/services/Sonos/polly-service';
5
+ import { ServerLogService } from '../../services/log-service';
6
+ import { SonosService } from '../../services/Sonos/sonos-service';
7
+ import { RoomBase } from '../../../models/rooms/RoomBase';
8
+ import { Utils } from '../../services/utils/utils';
9
+ import { PollyService } from '../../services/Sonos/polly-service';
10
10
 
11
11
  export class ZigbeeHeimanSmoke extends ZigbeeDevice {
12
12
  public smoke: boolean = false;
@@ -1,8 +1,8 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { DeviceInfo } from '../DeviceInfo';
2
3
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
3
- import { LogLevel } from '/models/logLevel';
4
- import { ServerLogService } from '/server/services/log-service';
5
- import { ZigbeeActuator } from '/server/devices/zigbee/ZigbeeActuator';
4
+ import { ServerLogService } from '../../services/log-service';
5
+ import { ZigbeeActuator } from './ZigbeeActuator';
6
6
 
7
7
  export class ZigbeeIkeaSteckdose extends ZigbeeActuator {
8
8
  public get steckerOn(): boolean {
@@ -1,8 +1,8 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { DeviceInfo } from '../DeviceInfo';
2
3
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
3
- import { LogLevel } from '/models/logLevel';
4
- import { ServerLogService } from '/server/services/log-service';
5
- import { ZigbeeActuator } from '/server/devices/zigbee/ZigbeeActuator';
4
+ import { ServerLogService } from '../../services/log-service';
5
+ import { ZigbeeActuator } from './ZigbeeActuator';
6
6
 
7
7
  export class ZigbeeIlluActuator extends ZigbeeActuator {
8
8
  public get isActuatorOn(): boolean {
@@ -1,11 +1,11 @@
1
+ import { LogLevel } from '../../../models/logLevel';
2
+ import { ServerLogService } from '../../services/log-service';
1
3
  import { DeviceInfo } from '../DeviceInfo';
2
4
  import { ZigbeeDevice } from './zigbeeDevice';
3
5
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
4
- import { DimmerSettings } from '/models/dimmerSettings';
5
- import { LogLevel } from '/models/logLevel';
6
- import { ServerLogService } from '/server/services/log-service';
7
- import { TimeOfDay } from '/server/services/time-callback-service';
8
- import { Utils } from '/server/services/utils/utils';
6
+ import { DimmerSettings } from '../../../models/dimmerSettings';
7
+ import { TimeOfDay } from '../../services/time-callback-service';
8
+ import { Utils } from '../../services/utils/utils';
9
9
 
10
10
  export class ZigbeeIlluDimmer extends ZigbeeDevice {
11
11
  public on: boolean = false;
@@ -1,8 +1,8 @@
1
+ import { LogLevel } from '../../../models/logLevel';
2
+ import { ServerLogService } from '../../services/log-service';
1
3
  import { DeviceInfo } from '../DeviceInfo';
2
4
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
3
- import { LogLevel } from '/models/logLevel';
4
- import { ServerLogService } from '/server/services/log-service';
5
- import { ZigbeeIlluActuator } from '/server/devices/zigbee/zigbeeIlluActuator';
5
+ import { ZigbeeIlluActuator } from './zigbeeIlluActuator';
6
6
 
7
7
  export class ZigbeeIlluLampe extends ZigbeeIlluActuator {
8
8
  public get lampOn(): boolean {
@@ -1,10 +1,10 @@
1
+ import { LogLevel } from '../../../models/logLevel';
2
+ import { ServerLogService } from '../../services/log-service';
1
3
  import { DeviceInfo } from '../DeviceInfo';
2
4
  import { ZigbeeDevice } from './zigbeeDevice';
3
5
  import { ZigbeeDeviceType } from './zigbeeDeviceType';
4
- import { LedSettings } from '/models/ledSettings';
5
- import { LogLevel } from '/models/logLevel';
6
- import { ServerLogService } from '/server/services/log-service';
7
- import { TimeOfDay } from '/server/services/time-callback-service';
6
+ import { LedSettings } from '../../../models/ledSettings';
7
+ import { TimeOfDay } from '../../services/time-callback-service';
8
8
 
9
9
  export class ZigbeeIlluLedRGBCCT extends ZigbeeDevice {
10
10
  public static DEFAULT_COLOR_WARM: string = '#f2b200';
@@ -1,14 +1,14 @@
1
- import { LogLevel } from '/models/logLevel';
1
+ import { LogLevel } from '../../models/logLevel';
2
2
  import { Devices } from '../devices/devices';
3
3
  import { DeviceUpdater } from '../devices/deviceUpdater';
4
4
  import { IDeviceUpdater } from '../devices/iDeviceUpdater';
5
5
  import { ServerLogService } from '../services/log-service';
6
6
  import { TimeCallbackService } from '../services/time-callback-service';
7
7
  import { IOBrokerConnection } from './connection';
8
- import { ConnectionCallbacks } from '/models/connectionCallbacks';
9
- import { RoomBase } from '/models/rooms/RoomBase';
10
- import { Utils } from '/server/services/utils/utils';
11
- import { SettingsService } from "/server/services/settings-service";
8
+ import { ConnectionCallbacks } from '../../models/connectionCallbacks';
9
+ import { RoomBase } from '../../models/rooms/RoomBase';
10
+ import { Utils } from '../services/utils/utils';
11
+ import { SettingsService } from "../services/settings-service";
12
12
 
13
13
  export class ioBrokerMain {
14
14
  private static roomConstructors: { [roomName: string]: { new (): RoomBase } } = {};
@@ -2,11 +2,11 @@ import { SonosDevice, SonosManager } from '@svrooij/sonos/lib';
2
2
  import { PlayNotificationOptions } from '@svrooij/sonos/lib/models';
3
3
  import { ServerLogService } from '../log-service';
4
4
  import { PollyService } from './polly-service';
5
- import { LogLevel } from '/models/logLevel';
6
- import { Utils } from '/server/services/utils/utils';
7
- import { TelegramService } from '/server/services/Telegram/telegram-service';
8
- import { TimeCallback, TimeCallbackType } from '/models/timeCallback';
9
- import { TimeCallbackService } from '/server/services/time-callback-service';
5
+ import { LogLevel } from '../../../models/logLevel';
6
+ import { Utils } from '../utils/utils';
7
+ import { TelegramService } from '../Telegram/telegram-service';
8
+ import { TimeCallback, TimeCallbackType } from '../../../models/timeCallback';
9
+ import { TimeCallbackService } from '../time-callback-service';
10
10
 
11
11
  export class OwnSonosDevice {
12
12
  public maxPlayOnAllVolume: number = 80;
@@ -8,8 +8,8 @@ import { HmIPDevice } from '../../devices/hmIPDevices/hmIpDevice';
8
8
  import { RoomBase } from '../../../models/rooms/RoomBase';
9
9
  import { BasicRoomInfo } from '../../../models/persistence/BasicRoomInfo';
10
10
  import { RoomDetailInfo } from '../../../models/persistence/RoomDetailInfo';
11
- import { iTemperaturDataPoint } from '/imports/api/heizung';
12
11
  import { DailyMovementCount } from '../../../models/persistence/DailyMovementCount';
12
+ import { iTemperaturDataPoint } from "../../../models/iTemperaturDataPoint";
13
13
 
14
14
  export const TemperatureHistoryCollection = new Mongo.Collection<TemperaturDataPoint>('TemperaturData');
15
15
  export const HeatGroupCollection = new Mongo.Collection<TemperaturDataPoint>('HeatGroupCollection');
@@ -6,7 +6,7 @@ import * as fs from 'fs';
6
6
  import { OwnSonosDevice, SonosService } from './Sonos/sonos-service';
7
7
  import { PollyService } from './Sonos/polly-service';
8
8
  import { Utils } from './utils/utils';
9
- import { SettingsService } from "/server/services/settings-service";
9
+ import { SettingsService } from './settings-service';
10
10
 
11
11
  export class NewsService {
12
12
  public static oneDay: number = 1000 * 60 * 60 * 24;
@@ -1,7 +1,9 @@
1
+ // @ts-ignore
2
+ import config from '/server/config/private/mainConfig.json';
1
3
  import { iConfig } from '../config/iConfig';
2
4
 
3
5
  export class SettingsService {
4
- public static settings: iConfig;
6
+ public static settings: iConfig = config as iConfig;
5
7
 
6
8
  public static get TelegramActive(): boolean {
7
9
  return this.settings.telegram !== undefined;
@@ -10,14 +12,4 @@ export class SettingsService {
10
12
  public static get Mp3Active(): boolean {
11
13
  return this.settings.mp3Server !== undefined;
12
14
  }
13
-
14
- public static initialize(config: iConfig): void {
15
- if (this.validateConfig(config)) {
16
- this.settings = config;
17
- }
18
- }
19
-
20
- private static validateConfig(config: iConfig): boolean {
21
- return true;
22
- }
23
15
  }
@@ -1,3 +1,4 @@
1
+ import { LogLevel } from '../../../models/logLevel';
1
2
  import { HTTPSService } from '../https-service';
2
3
  import { HTTPSOptions } from '../HTTPSOptions';
3
4
  import { ServerLogService } from '../log-service';
@@ -7,7 +8,6 @@ import { WeatherCurrent } from './weather-current';
7
8
  import { WeatherDaily } from './weather-daily';
8
9
  import { WeatherHourly } from './weather-hourly';
9
10
  import { WeatherMinutes } from './weather-minutes';
10
- import { LogLevel } from '../../../models/logLevel';
11
11
  import { iWeatherSettings } from '../../config/iConfig';
12
12
  import { Utils } from '../utils/utils';
13
13
 
package/tsconfig.json CHANGED
@@ -22,11 +22,10 @@
22
22
  "noFallthroughCasesInSwitch": false,
23
23
 
24
24
  /* Module Resolution Options */
25
- "baseUrl": ".",
26
25
  "paths": {
27
- /* Support absolute /imports/* with a leading '/' */
28
- "/*": ["*"]
26
+ "/server/config/private/*": ["*"]
29
27
  },
28
+ "baseUrl": ".",
30
29
  "moduleResolution": "node",
31
30
  "resolveJsonModule": true,
32
31
  "typeRoots": ["./node_modules/@types", "./types"],
@@ -41,7 +40,7 @@
41
40
  "node",
42
41
  "node-telegram-bot-api",
43
42
  "prop-types",
44
- "react",
43
+ "react",
45
44
  "react-dom",
46
45
  "react-router",
47
46
  "react-router-dom",