From 58e22e941f5ec7ea7e0b37db9ed7cfdc1cefa1eb Mon Sep 17 00:00:00 2001 From: Adrian Jagielak Date: Fri, 25 Jul 2025 01:03:58 +0200 Subject: [PATCH] Update demo mode data --- futurehome/CHANGELOG.md | 1 + futurehome/src/mqtt/demo_client.ts | 2 + futurehome/src/mqtt/demo_data/device.json | 210 ++++++++++++++++++++++ futurehome/src/mqtt/demo_data/state.json | 209 ++++++++++++++++++--- 4 files changed, 400 insertions(+), 22 deletions(-) diff --git a/futurehome/CHANGELOG.md b/futurehome/CHANGELOG.md index 75c63b8..8e55018 100644 --- a/futurehome/CHANGELOG.md +++ b/futurehome/CHANGELOG.md @@ -9,6 +9,7 @@ - Added support for 'indicator_ctrl' service (identify devices). - Added support for 'barrier_ctrl' service (devices like garage doors, barriers, and window shades). - Added support for 'water_heater' service (devices such as water boiler or a water tank). +- Updated demo mode data. # 0.1.0 (24.07.2025) diff --git a/futurehome/src/mqtt/demo_client.ts b/futurehome/src/mqtt/demo_client.ts index 0a145b7..d0f4eff 100644 --- a/futurehome/src/mqtt/demo_client.ts +++ b/futurehome/src/mqtt/demo_client.ts @@ -78,6 +78,8 @@ export class DemoFimpMqttClient implements IMqttClient { type: 'evt.pd7.response', val: { param: { state: { devices: demo_data__state } } }, }); + } else { + sendResponse({}); } }, 100); } diff --git a/futurehome/src/mqtt/demo_data/device.json b/futurehome/src/mqtt/demo_data/device.json index e452f68..078d738 100644 --- a/futurehome/src/mqtt/demo_data/device.json +++ b/futurehome/src/mqtt/demo_data/device.json @@ -1796,5 +1796,215 @@ }, "type": "appliance" } + }, + { + "client": { + "name": "Futurehome Charge" + }, + "fimp": { + "adapter": "cloud_adapter", + "address": "3", + "group": "1" + }, + "functionality": null, + "id": 96, + "lrn": true, + "model": "Cloud Adapter - Futurehome - Futurehome Charge", + "modelAlias": "Futurehome Charge", + "param": { + "energy": null, + "timestamp": null, + "wattage": null + }, + "problem": false, + "room": null, + "services": { + "chargepoint": { + "addr": "/rt:dev/rn:cloud_adapter/ad:1/sv:chargepoint/ad:3_1", + "enabled": true, + "intf": [ + "cmd.cable_lock.get_report", + "cmd.cable_lock.set", + "cmd.charge.start", + "cmd.charge.stop", + "cmd.current_session.get_report", + "cmd.current_session.set_current", + "cmd.max_current.get_report", + "cmd.max_current.set", + "cmd.state.get_report", + "evt.cable_lock.report", + "evt.current_session.report", + "evt.error.report", + "evt.max_current.report", + "evt.state.report" + ], + "props": { + "sup_max_current": 16, + "sup_states": [ + "disconnected", + "requesting", + "ready_to_charge", + "charging", + "suspended_by_evse", + "suspended_by_ev", + "finished", + "reserved", + "unavailable", + "error" + ] + } + }, + "dev_sys": { + "addr": "/rt:dev/rn:cloud_adapter/ad:1/sv:dev_sys/ad:3_1", + "enabled": true, + "intf": ["cmd.thing.reboot", "evt.error.report", "evt.success.report"], + "props": null + }, + "meter_elec": { + "addr": "/rt:dev/rn:cloud_adapter/ad:1/sv:meter_elec/ad:3_1", + "enabled": true, + "intf": [ + "cmd.meter.get_report", + "cmd.meter_ext.get_report", + "evt.error.report", + "evt.meter.report", + "evt.meter_ext.report" + ], + "props": { + "is_virtual": false, + "sup_extended_vals": ["i1", "i2", "i3", "u1", "u2", "u3"], + "sup_units": ["W", "kWh"] + } + }, + "parameters": { + "addr": "/rt:dev/rn:cloud_adapter/ad:1/sv:parameters/ad:3_1", + "enabled": true, + "intf": [ + "cmd.param.get_report", + "cmd.param.set", + "cmd.sup_params.get_report", + "evt.error.report", + "evt.param.report", + "evt.sup_params.report" + ], + "props": null + } + }, + "supports": ["clear", "poll"], + "thing": 60, + "type": { + "subtype": "car_charger", + "supported": { + "chargepoint": ["car_charger"] + }, + "type": "chargepoint" + } + }, + { + "client": { + "name": "Futurehome Boiler" + }, + "id": 223, + "model": "Hoiax - Futurehome - Futurehome Boiler", + "modelAlias": "Futurehome Boiler", + "type": { + "subtype": null, + "supported": { + "boiler": [] + }, + "type": "boiler" + }, + "locationRef": { + "id": "11", + "type": "Room" + }, + "thingRef": { + "id": "166" + }, + "origin": "056e610614c848c50b", + "services": { + "meter_elec": { + "name": "meter_elec", + "addr": "/rt:dev/rn:hoiax/ad:1/sv:meter_elec/ad:2", + "enabled": true, + "props": { + "sup_units": ["W", "kWh"] + }, + "intf": [ + "cmd.meter.get_report", + "evt.error.report", + "evt.meter.report" + ], + "metadata": null + }, + "sensor_wattemp": { + "name": "sensor_wattemp", + "addr": "/rt:dev/rn:hoiax/ad:1/sv:sensor_wattemp/ad:2", + "enabled": true, + "props": { + "sup_units": ["C"] + }, + "intf": [ + "cmd.sensor.get_report", + "evt.error.report", + "evt.sensor.report" + ], + "metadata": null + }, + "water_heater": { + "name": "water_heater", + "addr": "/rt:dev/rn:hoiax/ad:1/sv:water_heater/ad:2", + "enabled": true, + "props": { + "sup_modes": [ + "off", + "eco", + "normal", + "schedule", + "external", + "vacation", + "boost" + ], + "sup_range": { + "max": 85, + "min": 20 + }, + "sup_ranges": { + "boost": { + "max": 85, + "min": 60 + }, + "external": { + "max": 85, + "min": 20 + }, + "normal": { + "max": 85, + "min": 20 + }, + "vacation": { + "max": 60, + "min": 20 + } + }, + "sup_setpoints": ["normal", "vacation", "boost", "external"], + "sup_states": ["heat", "idle"], + "sup_step": 1 + }, + "intf": [ + "cmd.mode.get_report", + "cmd.mode.set", + "cmd.setpoint.get_report", + "cmd.setpoint.set", + "cmd.state.get_report", + "evt.error.report", + "evt.mode.report", + "evt.setpoint.report", + "evt.state.report" + ], + "metadata": null + } + }, + "metadata": null } ] diff --git a/futurehome/src/mqtt/demo_data/state.json b/futurehome/src/mqtt/demo_data/state.json index 0426bfd..5a2df1a 100644 --- a/futurehome/src/mqtt/demo_data/state.json +++ b/futurehome/src/mqtt/demo_data/state.json @@ -1072,42 +1072,57 @@ ] }, { - "id": 211, + "id": 96, "services": [ { - "addr": "/rt:dev/rn:zigbee/ad:1/sv:out_bin_switch/ad:13_2", + "addr": "/rt:dev/rn:cloud_adapter/ad:1/sv:chargepoint/ad:3_1", "attributes": [ { - "name": "binary", + "name": "cable_lock", "values": [ { "ts": "2025-07-23 19:21:49 +0200", - "val": false, + "val": true, "val_t": "bool" } ] + }, + { + "name": "current_session", + "values": [ + { + "ts": "2025-07-23 19:21:49 +0200", + "val": 6.9, + "val_t": "float" + } + ] + }, + { + "name": "max_current", + "values": [ + { + "ts": "2025-07-23 19:21:49 +0200", + "val": 16, + "val_t": "int" + } + ] + }, + { + "name": "state", + "values": [ + { + "ts": "2025-07-23 19:21:49 +0200", + "val": "charging", + "val_t": "string" + } + ] } ], - "name": "out_bin_switch" + "name": "chargepoint" }, { - "addr": "/rt:dev/rn:zigbee/ad:1/sv:meter_elec/ad:13_2", + "addr": "/rt:dev/rn:cloud_adapter/ad:1/sv:meter_elec/ad:3_1", "attributes": [ - { - "name": "meter_ext", - "values": [ - { - "ts": "2025-07-23 19:35:16 +0200", - "val": { - "i1": 0, - "p_export": 0, - "p_import": 0, - "u1": 234.13 - }, - "val_t": "float_map" - } - ] - }, { "name": "meter", "values": [ @@ -1116,7 +1131,7 @@ "unit": "kWh" }, "ts": "2025-07-23 19:21:49 +0200", - "val": 0.855, + "val": 123.4, "val_t": "float" }, { @@ -1133,5 +1148,155 @@ "name": "meter_elec" } ] + }, + { + "id": 223, + "services": [ + { + "addr": "/rt:dev/rn:hoiax/ad:1/sv:water_heater/ad:2", + "attributes": [ + { + "name": "state", + "values": [ + { + "ts": "2023-04-03 13:37:22 +0200", + "val": "idle", + "val_t": "string" + } + ] + }, + { + "name": "setpoint", + "values": [ + { + "ts": "2023-03-27 14:19:52 +0200", + "val": { + "temp": 49, + "type": "vacation", + "unit": "C" + }, + "val_t": "object" + }, + { + "ts": "2023-03-27 14:19:52 +0200", + "val": { + "temp": 60, + "type": "normal", + "unit": "C" + }, + "val_t": "object" + }, + { + "ts": "2023-12-21 09:44:28 +0100", + "val": { + "temp": 85.0, + "type": "boost", + "unit": "C" + }, + "val_t": "object" + }, + { + "ts": "2023-03-27 14:19:52 +0200", + "val": { + "temp": 60, + "type": "external", + "unit": "C" + }, + "val_t": "object" + } + ] + }, + { + "name": "error", + "values": [ + { + "props": { + "cmd_service": "water_heater", + "cmd_topic": "pt:j1/mt:cmd/rt:dev/rn:hoiax/ad:1/sv:water_heater/ad:2", + "cmd_type": "cmd.mode.get_report", + "msg": "adapter: service not found under the provided address: 2" + }, + "ts": "2023-12-17 13:17:12 +0100", + "val": "failed to process incoming message", + "val_t": "string" + } + ] + }, + { + "name": "mode", + "values": [ + { + "ts": "2023-04-05 16:08:43 +0200", + "val": "off", + "val_t": "string" + } + ] + } + ], + "name": "water_heater" + }, + { + "addr": "/rt:dev/rn:hoiax/ad:1/sv:meter_elec/ad:2", + "attributes": [ + { + "name": "meter", + "values": [ + { + "props": { + "unit": "kWh" + }, + "ts": "2023-04-06 09:46:52 +0200", + "val": 329.7, + "val_t": "float" + }, + { + "props": { + "unit": "W" + }, + "ts": "2023-04-06 09:46:52 +0200", + "val": 0, + "val_t": "float" + } + ] + }, + { + "name": "error", + "values": [ + { + "props": { + "cmd_service": "meter_elec", + "cmd_topic": "pt:j1/mt:cmd/rt:dev/rn:hoiax/ad:1/sv:meter_elec/ad:2", + "cmd_type": "cmd.meter.get_report", + "msg": "adapter: service not found under the provided address: 2" + }, + "ts": "2023-12-17 13:10:12 +0100", + "val": "failed to process incoming message", + "val_t": "string" + } + ] + } + ], + "name": "meter_elec" + }, + { + "addr": "/rt:dev/rn:hoiax/ad:1/sv:sensor_wattemp/ad:2", + "attributes": [ + { + "name": "sensor", + "values": [ + { + "props": { + "unit": "C" + }, + "ts": "2023-04-06 09:30:22 +0200", + "val": 56.9, + "val_t": "float" + } + ] + } + ], + "name": "sensor_wattemp" + } + ] } ]