185 lines
4.6 KiB
TypeScript
185 lines
4.6 KiB
TypeScript
import { IotDevice, IotDeviceType } from '../types';
|
|
|
|
export const initialIotDevices: IotDevice[] = [
|
|
{
|
|
id: 'iot-1',
|
|
name: 'Sensor Suhu A-1-T1',
|
|
type: IotDeviceType.TEMPERATURE_SENSOR,
|
|
floorId: 'floor1',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 30 * 1000),
|
|
currentValue: '31.2 °C',
|
|
},
|
|
{
|
|
id: 'iot-2',
|
|
name: 'Sensor Kelembapan A-1-H1',
|
|
type: IotDeviceType.HUMIDITY_SENSOR,
|
|
floorId: 'floor1',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 60 * 1000),
|
|
currentValue: '76%',
|
|
},
|
|
{
|
|
id: 'iot-3',
|
|
name: 'Gateway Utama Jabar',
|
|
type: IotDeviceType.IOT_GATEWAY,
|
|
floorId: null,
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 10 * 1000),
|
|
currentValue: 'Connected',
|
|
},
|
|
{
|
|
id: 'iot-4',
|
|
name: 'Sensor Amonia C-2-A1',
|
|
type: IotDeviceType.AMMONIA_SENSOR,
|
|
floorId: 'floor3',
|
|
status: 'error',
|
|
lastHeartbeat: new Date(Date.now() - 5 * 60 * 1000),
|
|
currentValue: 'ERR_READ',
|
|
},
|
|
{
|
|
id: 'iot-5',
|
|
name: 'Timbangan A-2-W1',
|
|
type: IotDeviceType.WEIGHT_SCALE,
|
|
floorId: 'floor2',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 1 * 60 * 1000),
|
|
currentValue: '1583 g',
|
|
},
|
|
{
|
|
id: 'iot-6',
|
|
name: 'Sensor Suhu B-3-T1',
|
|
type: IotDeviceType.TEMPERATURE_SENSOR,
|
|
floorId: 'floor3',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 45 * 1000),
|
|
currentValue: '31.5 °C',
|
|
},
|
|
{
|
|
id: 'iot-7',
|
|
name: 'Sensor CO2 K-01-C1',
|
|
type: IotDeviceType.CO2_SENSOR,
|
|
floorId: 'floor7',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 2 * 60 * 1000),
|
|
currentValue: '450 ppm',
|
|
},
|
|
{
|
|
id: 'iot-8',
|
|
name: 'Sensor Cahaya K-01-L1',
|
|
type: IotDeviceType.LIGHT_SENSOR,
|
|
floorId: 'floor7',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 3 * 60 * 1000),
|
|
currentValue: '18 lux',
|
|
},
|
|
{
|
|
id: 'iot-9',
|
|
name: 'Sensor Suhu K-01-T1',
|
|
type: IotDeviceType.TEMPERATURE_SENSOR,
|
|
floorId: 'floor7',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 1 * 60 * 1000),
|
|
currentValue: '33.2 °C',
|
|
},
|
|
{
|
|
id: 'iot-10',
|
|
name: 'Sensor Kelembapan K-01-H1',
|
|
type: IotDeviceType.HUMIDITY_SENSOR,
|
|
floorId: 'floor7',
|
|
status: 'offline',
|
|
lastHeartbeat: new Date(Date.now() - 65 * 60 * 1000),
|
|
currentValue: '85%',
|
|
},
|
|
{
|
|
id: 'iot-11',
|
|
name: 'Gateway Kalimantan',
|
|
type: IotDeviceType.IOT_GATEWAY,
|
|
floorId: null,
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 15 * 1000),
|
|
currentValue: 'Connected',
|
|
},
|
|
{
|
|
id: 'iot-12',
|
|
name: 'Sensor Suhu K-02-T1',
|
|
type: IotDeviceType.TEMPERATURE_SENSOR,
|
|
floorId: 'floor8',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 2 * 60 * 1000),
|
|
currentValue: '32.1 °C',
|
|
},
|
|
{
|
|
id: 'iot-13',
|
|
name: 'Timbangan C-1-W1',
|
|
type: IotDeviceType.WEIGHT_SCALE,
|
|
floorId: 'floor5',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 2 * 60 * 1000),
|
|
currentValue: '1610 g',
|
|
},
|
|
{
|
|
id: 'iot-14',
|
|
name: 'Timbangan K-01-W1',
|
|
type: IotDeviceType.WEIGHT_SCALE,
|
|
floorId: 'floor7',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 3 * 60 * 1000),
|
|
currentValue: '1525 g',
|
|
},
|
|
{
|
|
id: 'iot-15',
|
|
name: 'Timbangan Percobaan-W1',
|
|
type: IotDeviceType.WEIGHT_SCALE,
|
|
floorId: 'floor4',
|
|
status: 'offline',
|
|
lastHeartbeat: new Date(Date.now() - 3 * 60 * 60 * 1000),
|
|
currentValue: '1490 g',
|
|
},
|
|
{
|
|
id: 'iot-16',
|
|
name: 'Sensor Debu A-1-D1',
|
|
type: IotDeviceType.DUST_SENSOR,
|
|
floorId: 'floor1',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 4 * 60 * 1000),
|
|
currentValue: '22 µg/m³',
|
|
},
|
|
{
|
|
id: 'iot-17',
|
|
name: 'Sensor Aliran Air C-2-WF1',
|
|
type: IotDeviceType.WATER_FLOW_SENSOR,
|
|
floorId: 'floor3',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 5 * 60 * 1000),
|
|
currentValue: '15.2 L/jam',
|
|
},
|
|
{
|
|
id: 'iot-18',
|
|
name: 'Sensor Level Pakan Silo A',
|
|
type: IotDeviceType.FEED_LEVEL_SENSOR,
|
|
floorId: 'floor1',
|
|
status: 'online',
|
|
lastHeartbeat: new Date(Date.now() - 10 * 60 * 1000),
|
|
currentValue: '85% Penuh',
|
|
},
|
|
{
|
|
id: 'iot-19',
|
|
name: 'Sensor Aliran Air K-01-WF1',
|
|
type: IotDeviceType.WATER_FLOW_SENSOR,
|
|
floorId: 'floor7',
|
|
status: 'error',
|
|
lastHeartbeat: new Date(Date.now() - 1 * 60 * 1000),
|
|
currentValue: 'ERR_CALIBRATE',
|
|
},
|
|
{
|
|
id: 'iot-20',
|
|
name: 'Sensor Level Pakan Silo B',
|
|
type: IotDeviceType.FEED_LEVEL_SENSOR,
|
|
floorId: 'floor3',
|
|
status: 'offline',
|
|
lastHeartbeat: new Date(Date.now() - 2 * 60 * 60 * 1000),
|
|
currentValue: '60% Penuh',
|
|
},
|
|
];
|