-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathapp.js
More file actions
31 lines (26 loc) · 702 Bytes
/
app.js
File metadata and controls
31 lines (26 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import "./shared/device-polyfill";
import { MessageBuilder } from "./shared/message";
const FS_REF_SENSORS_UPDATE_ALARM_ID = 'sensors_update_alarm_id'
const FS_REF_SENSORS_UPDATE_STATE = 'sensors_update_state'
const FS_REF_SENSORS_UPDATE_TIMESTAMP = 'sensors_update_timestamp'
const appDevicePort = 20;
const appSidePort = 0;
const appId = 391257;
const messageBuilder = new MessageBuilder({
appId,
});
hmUI.setStatusBarVisible(false);
App({
globalData: {
messageBuilder: messageBuilder,
appId: appId,
FS_REF_SENSORS_UPDATE_ALARM_ID,
FS_REF_SENSORS_UPDATE_STATE
},
onCreate() {
messageBuilder.connect();
},
onDestroy() {
messageBuilder.disConnect();
},
});