homematic-manager 3.0.0-beta.2 → 3.0.0-beta.21
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.
- package/README.md +2 -1
- package/data/easymode-time-selectors.json +285 -0
- package/data/icons/106_hm-lc-sw1-dr.webp +0 -0
- package/data/icons/108_hm-rc-dis-h-x-eu.webp +0 -0
- package/data/icons/109_hm-lc-sw1-pl-ct.webp +0 -0
- package/data/icons/110_hm-es-pmsw1-dr.webp +0 -0
- package/data/icons/112_hmip-wrc2.webp +0 -0
- package/data/icons/113_hmip-psm-ch.webp +0 -0
- package/data/icons/113_hmip-psm-it.webp +0 -0
- package/data/icons/113_hmip-psm-pe.webp +0 -0
- package/data/icons/113_hmip-psm-uk.webp +0 -0
- package/data/icons/113_hmip-psm.webp +0 -0
- package/data/icons/114_hm-lc-dim1t-fm-lf_3.webp +0 -0
- package/data/icons/116_hm-rc-4-3_brc-h3.webp +0 -0
- package/data/icons/118_hmip-swdo.webp +0 -0
- package/data/icons/119_hmip-rc8.webp +0 -0
- package/data/icons/120_hmip-etrv.webp +0 -0
- package/data/icons/121_hmip-wth.webp +0 -0
- package/data/icons/123_oligo.smart.ip.hm.webp +0 -0
- package/data/icons/125_hmip-smi.webp +0 -0
- package/data/icons/130_hmip-srh.webp +0 -0
- package/data/icons/131_hmip-wrc6.webp +0 -0
- package/data/icons/132_hmip-smo.webp +0 -0
- package/data/icons/133_hmip-asir.webp +0 -0
- package/data/icons/134_hmip-fsm.webp +0 -0
- package/data/icons/135_hmip-fsm16.webp +0 -0
- package/data/icons/136_hmip-miob.webp +0 -0
- package/data/icons/137_hmip-fal-c6.webp +0 -0
- package/data/icons/138_hmip-fal-c10.webp +0 -0
- package/data/icons/140_alpha-ip-rgb.webp +0 -0
- package/data/icons/141_alpha-ip-rgba.webp +0 -0
- package/data/icons/144_hmip-wgc.webp +0 -0
- package/data/icons/145_hmip-froll_hmip-fbl.webp +0 -0
- package/data/icons/146_hmip-sth.webp +0 -0
- package/data/icons/147_hmip-sthd.webp +0 -0
- package/data/icons/148_hmip-stho.webp +0 -0
- package/data/icons/149_hmip-sam.webp +0 -0
- package/data/icons/151_hmip-pcbs-bat.webp +0 -0
- package/data/icons/152_hmip-swdo-i.webp +0 -0
- package/data/icons/153_hmip-spi.webp +0 -0
- package/data/icons/154_hmip-spdr.webp +0 -0
- package/data/icons/155_hmip-whs2.webp +0 -0
- package/data/icons/156_hmip-mod-oc8.webp +0 -0
- package/data/icons/158_hmip-etrv-uk.webp +0 -0
- package/data/icons/159_hmip-mod-rc8.webp +0 -0
- package/data/icons/160_hmipw-drs4.webp +0 -0
- package/data/icons/161_hmipw-drs8.webp +0 -0
- package/data/icons/162_hmipw-drap.webp +0 -0
- package/data/icons/163_hmipw-drbl4.webp +0 -0
- package/data/icons/164_hmipw-dri16.webp +0 -0
- package/data/icons/165_hmipw-fio6.webp +0 -0
- package/data/icons/166_hmipw-drd3.webp +0 -0
- package/data/icons/167_hmipw-dri32.webp +0 -0
- package/data/icons/168_hmip-smi55.webp +0 -0
- package/data/icons/169_hmip-swo-pr.webp +0 -0
- package/data/icons/170_hmip-swo-pl.webp +0 -0
- package/data/icons/171_hmip-swo-b.webp +0 -0
- package/data/icons/172_hmip-swd.webp +0 -0
- package/data/icons/173_hmip-bsl.webp +0 -0
- package/data/icons/174_hmip-slo.webp +0 -0
- package/data/icons/175_hmip-group-heating.webp +0 -0
- package/data/icons/177_hmip-dbb.webp +0 -0
- package/data/icons/178_hmip-etrv-b1.webp +0 -0
- package/data/icons/179_hmip-swdm-b2.webp +0 -0
- package/data/icons/180_hmip-etrv-b.webp +0 -0
- package/data/icons/181_hmip-swdm.webp +0 -0
- package/data/icons/182_hmip-fci1.webp +0 -0
- package/data/icons/183_hmip-mod-tm.webp +0 -0
- package/data/icons/184_hmip-pcbs2.webp +0 -0
- package/data/icons/185_hmip-FCI6.webp +0 -0
- package/data/icons/186_hmip-mp3p.webp +0 -0
- package/data/icons/187_hmip-rcb1.webp +0 -0
- package/data/icons/188_hmip-etrv-c.webp +0 -0
- package/data/icons/190_hmip-sci.webp +0 -0
- package/data/icons/191_hmip-mod-ho.webp +0 -0
- package/data/icons/192_hmip-asir-o.webp +0 -0
- package/data/icons/193_hmip-wt.webp +0 -0
- package/data/icons/194_hmip-wrcd.webp +0 -0
- package/data/icons/195_hmipw-smi55.webp +0 -0
- package/data/icons/196_hmip-ASIR-2.webp +0 -0
- package/data/icons/197_hmip-swdo-pl.webp +0 -0
- package/data/icons/198_hmip-falmot-c12.webp +0 -0
- package/data/icons/199_hmip-mio16-pcb.webp +0 -0
- package/data/icons/200_hmip-wth-b.webp +0 -0
- package/data/icons/201_hmip-stv.webp +0 -0
- package/data/icons/202_hmip-wrcr.webp +0 -0
- package/data/icons/203_hmip-fsi16.webp +0 -0
- package/data/icons/204_hmip-drdi3.webp +0 -0
- package/data/icons/205_hmip-drsi4.webp +0 -0
- package/data/icons/206_hmip-drbli4.webp +0 -0
- package/data/icons/207_hmip-srdo.webp +0 -0
- package/data/icons/208_hmip-dsd-pcb.webp +0 -0
- package/data/icons/209_hmip-etrv-b-uk.webp +0 -0
- package/data/icons/210_hmip-ste2-pcb.webp +0 -0
- package/data/icons/211_hmip-drg-dali.webp +0 -0
- package/data/icons/211_hmip-drsi1.webp +0 -0
- package/data/icons/212_hmip-sfd.webp +0 -0
- package/data/icons/212_hmipw-scthd.webp +0 -0
- package/data/icons/213_hmip-smo230.webp +0 -0
- package/data/icons/213_hmip-wua.webp +0 -0
- package/data/icons/214_hmip-dld.webp +0 -0
- package/data/icons/215_hmip-psm-pe-2.webp +0 -0
- package/data/icons/215_hmip-scth230.webp +0 -0
- package/data/icons/216_hmip-etrv-e.webp +0 -0
- package/data/icons/216_hmip-psm-ch-2.webp +0 -0
- package/data/icons/217_hmip-usbsm.webp +0 -0
- package/data/icons/218_hmip-dls.webp +0 -0
- package/data/icons/219_hmip-fwi.webp +0 -0
- package/data/icons/220_hmip-wsc.webp +0 -0
- package/data/icons/221_hmip-sti.webp +0 -0
- package/data/icons/221_hmip-wkp.webp +0 -0
- package/data/icons/222_hmipw-wgd.webp +0 -0
- package/data/icons/223_hmip-mod-wd-vk.webp +0 -0
- package/data/icons/224_hmip-etrv-cl.webp +0 -0
- package/data/icons/225_hmip-rgbw.webp +0 -0
- package/data/icons/226_hmip-esi.webp +0 -0
- package/data/icons/227_hmip-lsc.webp +0 -0
- package/data/icons/228_elv-sh-sw1-bat.webp +0 -0
- package/data/icons/229_elv-sh-bm-s.webp +0 -0
- package/data/icons/230_hmip-etrv-f.webp +0 -0
- package/data/icons/231_elv-sh-cth.webp +0 -0
- package/data/icons/232_elv-sh-taco.webp +0 -0
- package/data/icons/233_hmip-flc.webp +0 -0
- package/data/icons/234_hmip-etrv-3.webp +0 -0
- package/data/icons/235_hmip-psmco.webp +0 -0
- package/data/icons/236_elv-sh-sb8.webp +0 -0
- package/data/icons/237_elv-sh-ctv.webp +0 -0
- package/data/icons/238_elv-sh-cap.webp +0 -0
- package/data/icons/239_hmip-wgs-f.webp +0 -0
- package/data/icons/240_hmip-wgtc-f.webp +0 -0
- package/data/icons/241_hmip-wgt-f.webp +0 -0
- package/data/icons/242_elv-sh-smsi.webp +0 -0
- package/data/icons/243_elv-sh-crc.webp +0 -0
- package/data/icons/244_elv-sh-krco.webp +0 -0
- package/data/icons/245_hmip-falmot-c8.webp +0 -0
- package/data/icons/246_elv-sh-wsm.webp +0 -0
- package/data/icons/247_hmip-hap-2.webp +0 -0
- package/data/icons/248_hmip-dlp.webp +0 -0
- package/data/icons/249_elv-sh-psmci.webp +0 -0
- package/data/icons/250_elv-sh-sps25.webp +0 -0
- package/data/icons/252_elv-sh-pti2.webp +0 -0
- package/data/icons/253_hmip-udi-smi55.webp +0 -0
- package/data/icons/254_hmip-udi-pb2.webp +0 -0
- package/data/icons/256_ELV-SH-SMS2.webp +0 -0
- package/data/icons/257_ELV-SH-FSI.webp +0 -0
- package/data/icons/258_hmip-m-td15.webp +0 -0
- package/data/icons/259_elv-sh-dusi.webp +0 -0
- package/data/icons/260_hmip-wss.webp +0 -0
- package/data/icons/54a_lc-ddc1-pcb.webp +0 -0
- package/data/icons/72_hm-rc-brc-h.webp +0 -0
- package/data/icons/73_hm-atent.webp +0 -0
- package/data/icons/79_hm-lc-dim1pwm-cv.webp +0 -0
- package/data/icons/84_hm-rc-4-3.webp +0 -0
- package/data/icons/85_hm-rc-sec4-3.webp +0 -0
- package/data/icons/86_hm-rc-key4-3.webp +0 -0
- package/data/icons/CCU3-1-50.webp +0 -0
- package/data/icons/CCU3.webp +0 -0
- package/data/icons/hm-coupling-dim.webp +0 -0
- package/data/icons/hm-coupling-group.webp +0 -0
- package/data/icons/hm-coupling-onoff.webp +0 -0
- package/data/icons/hm-coupling-rgb-dim.webp +0 -0
- package/data/icons/hm-coupling-rgb.webp +0 -0
- package/data/icons/hm-coupling-rgbw-dim.webp +0 -0
- package/data/icons/hm-coupling-rgbw.webp +0 -0
- package/data/icons/hm-coupling-white-dim.webp +0 -0
- package/data/icons/hm-coupling-white.webp +0 -0
- package/data/icons/hm-hue_gateway.webp +0 -0
- package/data/icons/hm-lightify_gateway.webp +0 -0
- package/data/icons/hm_resc-win-pcb-sc.webp +0 -0
- package/data/icons/unknown_device.webp +0 -0
- package/data/manifest.json +7 -1
- package/data/master-metadata.json +1997 -33
- package/data/profiles/ACCESS_RECEIVER.json +26 -13
- package/data/profiles/ACOUSTIC_SIGNAL_VIRTUAL_RECEIVER.json +3270 -76
- package/data/profiles/ACTOR_SECURITY.json +90 -10
- package/data/profiles/ACTOR_WINDOW.json +580 -43
- package/data/profiles/ALARMACTUATOR.json +564 -37
- package/data/profiles/ALARM_COND_SWITCH_RECEIVER.json +36 -4
- package/data/profiles/ALARM_SWITCH_VIRTUAL_RECEIVER.json +735 -33
- package/data/profiles/ARMING.json +115 -5
- package/data/profiles/BLIND.json +1038 -49
- package/data/profiles/BLIND_VIRTUAL_RECEIVER.json +4624 -124
- package/data/profiles/CLIMATECONTROL_FLOOR_PUMP_TRANSCEIVER.json +27 -1
- package/data/profiles/DIMMER.json +2233 -71
- package/data/profiles/DIMMER_VIRTUAL_RECEIVER.json +5773 -102
- package/data/profiles/DIMMER_woLongKeyPress.json +117 -4
- package/data/profiles/DOOR_RECEIVER.json +138 -10
- package/data/profiles/DUAL_WHITE_BRIGHTNESS.json +305 -11
- package/data/profiles/DUAL_WHITE_COLOR.json +730 -23
- package/data/profiles/HEATING_KEY_RECEIVER.json +127 -10
- package/data/profiles/HMW_BLIND.json +555 -20
- package/data/profiles/HMW_DIMMER.json +1337 -47
- package/data/profiles/HMW_INPUT_OUTPUT.json +375 -20
- package/data/profiles/HMW_SWITCH.json +375 -20
- package/data/profiles/JALOUSIE.json +1320 -52
- package/data/profiles/KEYMATIC.json +120 -12
- package/data/profiles/REMOTECONTROL_RECEIVER.json +10 -2
- package/data/profiles/RGBW_AUTOMATIC.json +46 -6
- package/data/profiles/RGBW_COLOR.json +14 -4
- package/data/profiles/SERVO_VIRTUAL_RECEIVER.json +117 -3
- package/data/profiles/SHUTTER_VIRTUAL_RECEIVER.json +4263 -128
- package/data/profiles/SIGNAL_CHIME.json +195 -14
- package/data/profiles/SIGNAL_CHIMEM.json +195 -14
- package/data/profiles/SIGNAL_LED.json +195 -14
- package/data/profiles/SIGNAL_LEDM.json +195 -14
- package/data/profiles/SIMPLE_SWITCH_RECEIVER.json +113 -9
- package/data/profiles/STATUS_INDICATOR.json +1073 -45
- package/data/profiles/SWITCH.json +1412 -60
- package/data/profiles/SWITCH_PANIC.json +315 -13
- package/data/profiles/SWITCH_SENSOR.json +243 -11
- package/data/profiles/SWITCH_VIRTUAL_RECEIVER.json +3963 -131
- package/data/profiles/UNIVERSAL_ACTOR.json +4319 -90
- package/data/profiles/UNIVERSAL_LIGHT_RECEIVER_LSC.json +6094 -196
- package/data/profiles/UNIVERSAL_LIGHT_RECEIVER_PWM.json +4920 -101
- package/data/profiles/UNIVERSAL_LIGHT_RECEIVER_RGB(W).json +2353 -80
- package/data/profiles/UNIVERSAL_LIGHT_RECEIVER_RGBW_DALI.json +6116 -176
- package/data/profiles/UNIVERSAL_LIGHT_RECEIVER_TW.json +3844 -104
- package/data/profiles/VIRTUAL_DIMMER.json +305 -11
- package/data/profiles/VIRTUAL_DUAL_WHITE_COLOR.json +730 -23
- package/data/profiles/WATER_SWITCH_VIRTUAL_RECEIVER.json +3903 -128
- package/data/profiles/WINDOW_DRIVE_RECEIVER.json +220 -8
- package/data/profiles/WINMATIC.json +505 -23
- package/dist/cli.js +24 -0
- package/dist/occulite.d.ts +86 -0
- package/dist/occulite.js +140 -0
- package/dist/options.d.ts +37 -6
- package/dist/options.js +49 -6
- package/dist/server.d.ts +47 -4
- package/dist/server.js +237 -27
- package/dist/sessions.d.ts +9 -1
- package/dist/sessions.js +8 -2
- package/dist/testSupport.js +9 -2
- package/node_modules/@homematic-manager/backend/dist/api/backend.d.ts +33 -0
- package/node_modules/@homematic-manager/backend/dist/api/backend.js +558 -46
- package/node_modules/@homematic-manager/backend/dist/cache/names.d.ts +9 -0
- package/node_modules/@homematic-manager/backend/dist/cache/names.js +21 -0
- package/node_modules/@homematic-manager/backend/dist/config/defaults.js +10 -1
- package/node_modules/@homematic-manager/backend/dist/config/store.d.ts +28 -1
- package/node_modules/@homematic-manager/backend/dist/config/store.js +59 -3
- package/node_modules/@homematic-manager/backend/dist/devices/installMode.js +9 -0
- package/node_modules/@homematic-manager/backend/dist/errors.d.ts +18 -0
- package/node_modules/@homematic-manager/backend/dist/errors.js +51 -2
- package/node_modules/@homematic-manager/backend/dist/images/deviceImages.d.ts +6 -0
- package/node_modules/@homematic-manager/backend/dist/images/deviceImages.js +38 -2
- package/node_modules/@homematic-manager/backend/dist/index.d.ts +3 -1
- package/node_modules/@homematic-manager/backend/dist/index.js +4 -1
- package/node_modules/@homematic-manager/backend/dist/interfaces/manager.d.ts +70 -8
- package/node_modules/@homematic-manager/backend/dist/interfaces/manager.js +333 -44
- package/node_modules/@homematic-manager/backend/dist/meta/client.d.ts +120 -0
- package/node_modules/@homematic-manager/backend/dist/meta/client.js +307 -0
- package/node_modules/@homematic-manager/backend/dist/meta/credentials.d.ts +38 -0
- package/node_modules/@homematic-manager/backend/dist/meta/credentials.js +53 -0
- package/node_modules/@homematic-manager/backend/dist/meta/index.d.ts +12 -0
- package/node_modules/@homematic-manager/backend/dist/meta/index.js +12 -0
- package/node_modules/@homematic-manager/backend/dist/meta/localProvider.d.ts +47 -0
- package/node_modules/@homematic-manager/backend/dist/meta/localProvider.js +119 -0
- package/node_modules/@homematic-manager/backend/dist/meta/occuliteProvider.d.ts +79 -0
- package/node_modules/@homematic-manager/backend/dist/meta/occuliteProvider.js +305 -0
- package/node_modules/@homematic-manager/backend/dist/meta/provider.d.ts +68 -0
- package/node_modules/@homematic-manager/backend/dist/meta/provider.js +19 -0
- package/node_modules/@homematic-manager/backend/dist/meta/regaProvider.d.ts +84 -0
- package/node_modules/@homematic-manager/backend/dist/meta/regaProvider.js +403 -0
- package/node_modules/@homematic-manager/backend/dist/meta/service.d.ts +137 -0
- package/node_modules/@homematic-manager/backend/dist/meta/service.js +412 -0
- package/node_modules/@homematic-manager/backend/dist/rega/client.d.ts +11 -0
- package/node_modules/@homematic-manager/backend/dist/rega/client.js +13 -0
- package/node_modules/@homematic-manager/backend/dist/rega/scripts.d.ts +51 -0
- package/node_modules/@homematic-manager/backend/dist/rega/scripts.js +171 -0
- package/node_modules/@homematic-manager/backend/dist/rpc/client.d.ts +18 -5
- package/node_modules/@homematic-manager/backend/dist/rpc/client.js +11 -5
- package/node_modules/@homematic-manager/backend/dist/rpc/log.d.ts +86 -0
- package/node_modules/@homematic-manager/backend/dist/rpc/log.js +241 -0
- package/node_modules/@homematic-manager/backend/dist/rpc/origin.d.ts +30 -0
- package/node_modules/@homematic-manager/backend/dist/rpc/origin.js +35 -0
- package/node_modules/@homematic-manager/backend/dist/rpc/server.d.ts +12 -0
- package/node_modules/@homematic-manager/backend/dist/rpc/server.js +37 -5
- package/node_modules/@homematic-manager/backend/dist/util/net.d.ts +86 -1
- package/node_modules/@homematic-manager/backend/dist/util/net.js +223 -9
- package/node_modules/@homematic-manager/backend/package.json +1 -1
- package/node_modules/@homematic-manager/core/dist/api/types.d.ts +397 -10
- package/node_modules/@homematic-manager/core/dist/api/types.js +23 -2
- package/node_modules/@homematic-manager/core/dist/data/memory.d.ts +3 -1
- package/node_modules/@homematic-manager/core/dist/data/memory.js +3 -0
- package/node_modules/@homematic-manager/core/dist/data/types.d.ts +60 -0
- package/node_modules/@homematic-manager/core/dist/data/types.js +2 -0
- package/node_modules/@homematic-manager/core/dist/devices/index.d.ts +19 -0
- package/node_modules/@homematic-manager/core/dist/devices/index.js +53 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/engine.d.ts +3 -1
- package/node_modules/@homematic-manager/core/dist/easymodes/engine.js +1 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/form.d.ts +43 -0
- package/node_modules/@homematic-manager/core/dist/easymodes/form.js +84 -0
- package/node_modules/@homematic-manager/core/dist/i18n/messages.js +61 -0
- package/node_modules/@homematic-manager/core/dist/index.d.ts +3 -0
- package/node_modules/@homematic-manager/core/dist/index.js +4 -0
- package/node_modules/@homematic-manager/core/dist/interfaces/table.d.ts +23 -2
- package/node_modules/@homematic-manager/core/dist/interfaces/table.js +18 -1
- package/node_modules/@homematic-manager/core/dist/meta/document.d.ts +71 -0
- package/node_modules/@homematic-manager/core/dist/meta/document.js +260 -0
- package/node_modules/@homematic-manager/core/dist/meta/follow.d.ts +27 -0
- package/node_modules/@homematic-manager/core/dist/meta/follow.js +180 -0
- package/node_modules/@homematic-manager/core/dist/meta/index.d.ts +16 -0
- package/node_modules/@homematic-manager/core/dist/meta/index.js +16 -0
- package/node_modules/@homematic-manager/core/dist/meta/paths.d.ts +96 -0
- package/node_modules/@homematic-manager/core/dist/meta/paths.js +182 -0
- package/node_modules/@homematic-manager/core/dist/meta/slug.d.ts +22 -0
- package/node_modules/@homematic-manager/core/dist/meta/slug.js +59 -0
- package/node_modules/@homematic-manager/core/dist/meta/store.d.ts +147 -0
- package/node_modules/@homematic-manager/core/dist/meta/store.js +537 -0
- package/node_modules/@homematic-manager/core/dist/meta/tree.d.ts +19 -0
- package/node_modules/@homematic-manager/core/dist/meta/tree.js +53 -0
- package/node_modules/@homematic-manager/core/dist/meta/types.d.ts +143 -0
- package/node_modules/@homematic-manager/core/dist/meta/types.js +63 -0
- package/node_modules/@homematic-manager/core/dist/meta/view.d.ts +50 -0
- package/node_modules/@homematic-manager/core/dist/meta/view.js +103 -0
- package/node_modules/@homematic-manager/core/dist/rpc/methods.d.ts +10 -0
- package/node_modules/@homematic-manager/core/dist/rpc/methods.js +51 -1
- package/node_modules/@homematic-manager/core/dist/rpc/text.d.ts +22 -0
- package/node_modules/@homematic-manager/core/dist/rpc/text.js +46 -0
- package/node_modules/@homematic-manager/core/dist/rssi/index.d.ts +125 -13
- package/node_modules/@homematic-manager/core/dist/rssi/index.js +146 -29
- package/node_modules/@homematic-manager/core/dist/serviceMessages/index.d.ts +28 -2
- package/node_modules/@homematic-manager/core/dist/serviceMessages/index.js +44 -6
- package/node_modules/@homematic-manager/core/package.json +1 -1
- package/package.json +3 -3
- package/ui/assets/index-D-NsbBVS.css +1 -0
- package/ui/assets/index-DNUNMBbb.js +16 -0
- package/ui/favicon.ico +0 -0
- package/ui/index.html +3 -2
- package/node_modules/@homematic-manager/backend/dist/write/log.d.ts +0 -51
- package/node_modules/@homematic-manager/backend/dist/write/log.js +0 -151
- package/ui/assets/index-lB-HxsKR.js +0 -13
- package/ui/assets/index-qbhgN2pA.css +0 -1
|
@@ -11,6 +11,7 @@ import type { RpcProtocol, UserDefinedInterface } from '../interfaces/table.js';
|
|
|
11
11
|
import type { ParamsetDescription } from '../paramset/description.js';
|
|
12
12
|
import type { Paramset, ParamsetWrite, RpcWriteValue } from '../rpc/values.js';
|
|
13
13
|
import type { LanguageChoice } from '../data/types.js';
|
|
14
|
+
import type { MetaDocument, MetaEnum, MetaImportMode, MetaNodePatch } from '../meta/types.js';
|
|
14
15
|
/** Any value an interface process returns: XML-RPC / BIN-RPC scalars, arrays and structs. */
|
|
15
16
|
export type RpcValue = boolean | number | string | RpcValue[] | {
|
|
16
17
|
[key: string]: RpcValue;
|
|
@@ -37,7 +38,42 @@ export interface ConnectionConfig {
|
|
|
37
38
|
};
|
|
38
39
|
/** ReGa is optional (D-2): names come from ReGa when present, else from the local store. */
|
|
39
40
|
rega: boolean;
|
|
40
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* D-40: where names, rooms and functions come from.
|
|
43
|
+
*
|
|
44
|
+
* `auto` (the default, and what every existing profile means) probes
|
|
45
|
+
* `GET /api/meta/v1/version` on the configured host once per connect: an openccu-lite box
|
|
46
|
+
* answers and its store is used, a CCU answers 404 and nothing changes. `local` never probes
|
|
47
|
+
* and keeps everything in this profile; `occulite` insists on the box and says so when it is
|
|
48
|
+
* not there, which is what a user behind a proxy that swallows the probe needs.
|
|
49
|
+
*
|
|
50
|
+
* `rega` (task 27) is the CCU's own rooms and functions through ReGaHSS: `auto` picks it when
|
|
51
|
+
* there is no box and ReGa (switched on with `rega` above) answered, so a CCU gets the same
|
|
52
|
+
* editing UI the box has, on ReGa's own objects. A box either has ReGa or the metadata API,
|
|
53
|
+
* never both.
|
|
54
|
+
*/
|
|
55
|
+
metaProvider?: MetaProviderChoice;
|
|
56
|
+
/**
|
|
57
|
+
* The API token for the metadata store, for an installation that is **not** on the box.
|
|
58
|
+
*
|
|
59
|
+
* Created on the box's Users page (`olt_…`, role `user` reads, `admin` also writes) and stored
|
|
60
|
+
* like any other credential here. On the box itself this stays empty: the addon reads the local
|
|
61
|
+
* token from `/usr/local/etc/occulite/local-token` for reads and uses the session of whoever
|
|
62
|
+
* opened the page for writes.
|
|
63
|
+
*/
|
|
64
|
+
metaToken?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The box's base URL, when it is not `http(s)://<host>`.
|
|
67
|
+
*
|
|
68
|
+
* For a reverse proxy on another port and for the integration tests. Empty means "derive it
|
|
69
|
+
* from `host`, `tls` and `local`", which is what every real installation wants.
|
|
70
|
+
*/
|
|
71
|
+
metaUrl?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Address and ports the interface processes call back to. A port of `0` is "none configured":
|
|
74
|
+
* the host's default port where it has one (the CCU addon's fixed pair, task 35), a free port
|
|
75
|
+
* from the kernel everywhere else.
|
|
76
|
+
*/
|
|
41
77
|
callback: {
|
|
42
78
|
ip: string;
|
|
43
79
|
xmlrpcPort: number;
|
|
@@ -90,7 +126,99 @@ export interface AppConfig {
|
|
|
90
126
|
localAddresses: string[];
|
|
91
127
|
/** CCUs found by UDP discovery (host names or addresses with what answered). */
|
|
92
128
|
discovered: DiscoveredCcu[];
|
|
129
|
+
/**
|
|
130
|
+
* Task 35 (D-43): the callback ports this host takes while `connection.callback` says `0`. Only
|
|
131
|
+
* the CCU addon has them; absent, a `0` is a free port. A property of the host, never written
|
|
132
|
+
* to the profile, so the settings dialog can say what `0` means without changing what it saves.
|
|
133
|
+
*/
|
|
134
|
+
callbackDefaultPorts?: {
|
|
135
|
+
xmlrpc: number;
|
|
136
|
+
binrpc: number;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Task 38: the callback fields the host was started with (`HMM_CALLBACK_*` or `--callback-*`).
|
|
140
|
+
* Such a value wins over the profile's, the backend never saves another one over it, and the
|
|
141
|
+
* settings dialog shows it read-only with the option that set it ({@link CALLBACK_PIN_OPTIONS}).
|
|
142
|
+
* Absent where the host pins nothing.
|
|
143
|
+
*/
|
|
144
|
+
callbackPinned?: CallbackPins;
|
|
145
|
+
/**
|
|
146
|
+
* Task 38: the host runs in a container and its callback servers listen beyond the loopback,
|
|
147
|
+
* so the ports the interfaces are told only work when they are published unchanged. The
|
|
148
|
+
* interface popup says so beside each callback URL. Absent everywhere else.
|
|
149
|
+
*/
|
|
150
|
+
publishCallbackPorts?: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* B-53 (#162, #165): why the automatic callback address is the one it is.
|
|
154
|
+
*
|
|
155
|
+
* - `loopback`: the interface processes are on this machine (`local`, or a CCU at `127.x`);
|
|
156
|
+
* - `subnet`: the address of this machine in the CCU's own network;
|
|
157
|
+
* - `route`: no address shares the CCU's network, so the one the operating system sends from
|
|
158
|
+
* towards the CCU (a routed CCU, a VPN);
|
|
159
|
+
* - `first`: neither could be found out (no CCU configured, a name that does not resolve), so the
|
|
160
|
+
* first address of this machine that is not link-local - the only rule there was until beta.18.
|
|
161
|
+
*/
|
|
162
|
+
export type CallbackAutoReason = 'loopback' | 'subnet' | 'route' | 'first';
|
|
163
|
+
/** B-53: one address of this machine, as the settings dialog offers it. */
|
|
164
|
+
export interface CallbackAddressCandidate {
|
|
165
|
+
address: string;
|
|
166
|
+
/** In the CCU's network (its `address/netmask` holds the CCU); always false while the CCU's address is unknown. */
|
|
167
|
+
inSubnet: boolean;
|
|
168
|
+
/** `169.254.0.0/16`: never chosen automatically unless the CCU is there too. */
|
|
169
|
+
linkLocal?: boolean;
|
|
93
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* B-53: what `config.callbackAddresses` answers - the address the backend takes when none is set,
|
|
173
|
+
* and every address of this machine with whether it is in the CCU's network.
|
|
174
|
+
*/
|
|
175
|
+
export interface CallbackAddressInfo {
|
|
176
|
+
/** The CCU host it was worked out for. */
|
|
177
|
+
host: string;
|
|
178
|
+
/** That host's IPv4 address; absent when it could not be resolved (or no host is set). */
|
|
179
|
+
hostAddress?: string;
|
|
180
|
+
auto: {
|
|
181
|
+
address: string;
|
|
182
|
+
reason: CallbackAutoReason;
|
|
183
|
+
};
|
|
184
|
+
/** The machine's IPv4 addresses in the operating system's order, the loopback last. */
|
|
185
|
+
addresses: CallbackAddressCandidate[];
|
|
186
|
+
/**
|
|
187
|
+
* The host takes a set address as it is, even one that is not on this machine: it was set at
|
|
188
|
+
* start (task 38) or the host runs in a container, where the Docker host's address is the right
|
|
189
|
+
* one. The dialog then warns about nothing.
|
|
190
|
+
*/
|
|
191
|
+
keepsConfigured?: boolean;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* B-53: a set callback address that does not fit. `notLocal`: it is no address of this machine
|
|
195
|
+
* any more (another lease, another network), so the automatic one is used instead. `otherNetwork`:
|
|
196
|
+
* it is one, but neither in the CCU's network nor the one this machine sends from towards the CCU;
|
|
197
|
+
* it is used as set, and the CCU may well not reach it.
|
|
198
|
+
*/
|
|
199
|
+
export interface CallbackWarning {
|
|
200
|
+
address: string;
|
|
201
|
+
reason: 'notLocal' | 'otherNetwork';
|
|
202
|
+
/** The address the automatic choice would take (and, for `notLocal`, takes). */
|
|
203
|
+
auto: string;
|
|
204
|
+
}
|
|
205
|
+
/** Task 38: which of `connection.callback`'s fields the host set at start. */
|
|
206
|
+
export interface CallbackPins {
|
|
207
|
+
ip?: boolean;
|
|
208
|
+
xmlrpcPort?: boolean;
|
|
209
|
+
binrpcPort?: boolean;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Task 38: the environment variable and command-line option behind each callback field, for the
|
|
213
|
+
* settings dialog's read-only hint and the backend's log lines - one table, so the two cannot name
|
|
214
|
+
* different options.
|
|
215
|
+
*/
|
|
216
|
+
export declare const CALLBACK_PIN_OPTIONS: Readonly<Record<keyof CallbackPins, {
|
|
217
|
+
env: string;
|
|
218
|
+
cli: string;
|
|
219
|
+
}>>;
|
|
220
|
+
/** Task 38: `HMM_CALLBACK_XMLRPC_PORT / --callback-xmlrpc-port`, as the hint and the log write it. */
|
|
221
|
+
export declare function callbackPinOption(field: keyof CallbackPins): string;
|
|
94
222
|
export interface DiscoveredCcu {
|
|
95
223
|
address: string;
|
|
96
224
|
name?: string;
|
|
@@ -126,6 +254,13 @@ export interface InterfaceState {
|
|
|
126
254
|
* retrying every 15 s, and the UI shows "not present" rather than a connection error.
|
|
127
255
|
*/
|
|
128
256
|
absent?: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* B-28: the interface did not answer in time - its `init` or the port probe timed out, or its
|
|
259
|
+
* host has no route. Not the same as {@link absent}: the process may well be there, only slow or
|
|
260
|
+
* away for a moment (a CCU-Jack, a remote CUxD). It stays configured and shown, the watchdog tries
|
|
261
|
+
* it again, and the UI says "not answering" and offers to try at once. Present only when true.
|
|
262
|
+
*/
|
|
263
|
+
unreachable?: boolean;
|
|
129
264
|
/**
|
|
130
265
|
* `init` has been sent and the first `listDevices` / service-message sweep after it is still
|
|
131
266
|
* running. The UI shows "subscribing" for as long as this is true: `hmipserver` re-sends every
|
|
@@ -138,6 +273,26 @@ export interface InterfaceState {
|
|
|
138
273
|
* next session that connects subscribes again. Never set in Electron.
|
|
139
274
|
*/
|
|
140
275
|
idle?: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* Task 38: the URL this interface was told to call back on in its last `init` -
|
|
278
|
+
* `http://<callback ip>:<port>` for XML-RPC, `xmlrpc_bin://…` for BIN-RPC. Absent for an
|
|
279
|
+
* interface that takes no `init`, and while its callback server could not be opened.
|
|
280
|
+
*/
|
|
281
|
+
callbackUrl?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Task 38: the fixed callback port of this interface's protocol could not be opened, so it is
|
|
284
|
+
* not subscribed. `inUse` is the common case - another process holds the port - and there is no
|
|
285
|
+
* free port instead: a fixed port is the one that was published or opened in a firewall.
|
|
286
|
+
*/
|
|
287
|
+
callbackFailure?: {
|
|
288
|
+
port: number;
|
|
289
|
+
inUse: boolean;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* B-53: the callback address set in the settings does not fit this machine or the CCU's
|
|
293
|
+
* network. The interface popup shows it with a one-click switch to the automatic address.
|
|
294
|
+
*/
|
|
295
|
+
callbackWarning?: CallbackWarning;
|
|
141
296
|
}
|
|
142
297
|
/**
|
|
143
298
|
* Issue #26: how often a device went unreachable, kept per CCU across restarts.
|
|
@@ -191,6 +346,73 @@ export interface RegaState {
|
|
|
191
346
|
}
|
|
192
347
|
/** Friendly names: address -> name (devices and channels), from ReGa or the local store. */
|
|
193
348
|
export type NameMap = Record<string, string>;
|
|
349
|
+
/** D-40: which metadata provider a profile asks for; `rega` since task 27. */
|
|
350
|
+
export type MetaProviderChoice = 'auto' | 'local' | 'occulite' | 'rega';
|
|
351
|
+
/** The values of {@link MetaProviderChoice} as a runtime list, for validation and a select. */
|
|
352
|
+
export declare const META_PROVIDERS: readonly MetaProviderChoice[];
|
|
353
|
+
/**
|
|
354
|
+
* D-40: which store the names, rooms and functions come from, and whether it can be written.
|
|
355
|
+
*
|
|
356
|
+
* Shown next to the ReGa indicator, and for the same reason: a user has to be able to see where the
|
|
357
|
+
* name in the grid came from before they wonder why renaming it did not change anything in the
|
|
358
|
+
* other application.
|
|
359
|
+
*/
|
|
360
|
+
export interface MetaState {
|
|
361
|
+
/**
|
|
362
|
+
* `local` is this profile's own store, `occulite` an openccu-lite box, `rega` the CCU's own
|
|
363
|
+
* rooms and functions through ReGaHSS (task 27).
|
|
364
|
+
*/
|
|
365
|
+
provider: 'local' | 'occulite' | 'rega';
|
|
366
|
+
/** For `occulite` and `rega`: the other side answered. Always true for `local`. */
|
|
367
|
+
reachable: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Writes are accepted.
|
|
370
|
+
*
|
|
371
|
+
* False on a box whose credential only has the `user` role - the local token of an addon, or a
|
|
372
|
+
* read-only API token - which is a normal state and not an error: the names are shown, the
|
|
373
|
+
* rename button says why it cannot be used.
|
|
374
|
+
*/
|
|
375
|
+
writable: boolean;
|
|
376
|
+
/** The store's revision; `0` for a fresh one. */
|
|
377
|
+
revision: number;
|
|
378
|
+
/** How many devices and channels the store knows. */
|
|
379
|
+
objects: number;
|
|
380
|
+
/** `occulited 0.1.0`, from `/api/meta/v1/version`. */
|
|
381
|
+
implementation?: string;
|
|
382
|
+
/**
|
|
383
|
+
* The provider's taxonomies are flat lists: no node below another, no new taxonomy. The
|
|
384
|
+
* editing UI (task 25) hides "add below" and "move" then and says so. Absent means trees.
|
|
385
|
+
*/
|
|
386
|
+
flat?: boolean;
|
|
387
|
+
/** The base URL the provider talks to, for the settings dialog and the log. */
|
|
388
|
+
url?: string;
|
|
389
|
+
error?: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* One device or channel as the UI shows it: the name, the paths it is a member of, and those paths
|
|
393
|
+
* as the arrays of names every consumer of ReGa's rooms and functions has always been given.
|
|
394
|
+
*
|
|
395
|
+
* Keyed by **ref** (`<interface>.<address>`), not by address: the metadata store's identity is the
|
|
396
|
+
* ref, and two interfaces may in principle report the same address. `makeRef(interfaceName,
|
|
397
|
+
* address)` builds one.
|
|
398
|
+
*/
|
|
399
|
+
export interface MetaObjectView {
|
|
400
|
+
name: string;
|
|
401
|
+
/** Node paths, e.g. `room/eg/wohnzimmer`. */
|
|
402
|
+
enums: string[];
|
|
403
|
+
/** The names of the `room` nodes it belongs to, in tree order. */
|
|
404
|
+
rooms: string[];
|
|
405
|
+
/** The same for `function`. */
|
|
406
|
+
functions: string[];
|
|
407
|
+
/** The box says the address is no longer reported by any interface. */
|
|
408
|
+
orphaned?: boolean;
|
|
409
|
+
}
|
|
410
|
+
/** Everything the UI needs about the store in one answer: the state, the trees and the objects. */
|
|
411
|
+
export interface MetaSnapshot {
|
|
412
|
+
state: MetaState;
|
|
413
|
+
enums: Record<string, MetaEnum>;
|
|
414
|
+
objects: Record<string, MetaObjectView>;
|
|
415
|
+
}
|
|
194
416
|
export interface LinkRecord {
|
|
195
417
|
SENDER: string;
|
|
196
418
|
RECEIVER: string;
|
|
@@ -311,7 +533,22 @@ export interface RepairConfigResult {
|
|
|
311
533
|
/** The BidCos recovery that was called, if any. */
|
|
312
534
|
bidcosRecovery?: 'clearConfigCache' | 'restoreConfigToDevice';
|
|
313
535
|
}
|
|
314
|
-
|
|
536
|
+
/**
|
|
537
|
+
* Task 48: who asked for an RPC call. `console` is the RPC console, `ui` any other action of a
|
|
538
|
+
* user session (a tab's refresh, a paramset write, pairing), `background` the backend on its own
|
|
539
|
+
* - `init` and de-init, the keep-alive `ping`, the polls and sweeps after an event or a connect.
|
|
540
|
+
*/
|
|
541
|
+
export type RpcOrigin = 'console' | 'ui' | 'background';
|
|
542
|
+
export declare const RPC_ORIGINS: readonly RpcOrigin[];
|
|
543
|
+
/**
|
|
544
|
+
* One outgoing RPC call, as the RPC log keeps it (task 48: every call, not only the writes).
|
|
545
|
+
*
|
|
546
|
+
* The parameters are what went on the wire, verbatim - a `putParamset` in `CONFIG_PENDING` is
|
|
547
|
+
* traced from them - except the keys of `changeKey`, `setTempKey` and a whitelist, which are
|
|
548
|
+
* logged as `***`. A result over the log's size cap is kept as a preview string and `resultBytes`
|
|
549
|
+
* says how big the whole answer was.
|
|
550
|
+
*/
|
|
551
|
+
export interface RpcLogEntry {
|
|
315
552
|
id: number;
|
|
316
553
|
timestamp: number;
|
|
317
554
|
interfaceName: string;
|
|
@@ -319,8 +556,11 @@ export interface WriteLogEntry {
|
|
|
319
556
|
params: RpcValue[];
|
|
320
557
|
ok: boolean;
|
|
321
558
|
result?: RpcValue;
|
|
559
|
+
/** Set when `result` is a preview of an answer too big for the log: the size of the whole answer, in bytes. */
|
|
560
|
+
resultBytes?: number;
|
|
322
561
|
error?: string;
|
|
323
562
|
durationMs: number;
|
|
563
|
+
origin: RpcOrigin;
|
|
324
564
|
}
|
|
325
565
|
export interface InstallModeOptions {
|
|
326
566
|
/** Seconds; the interface's default when omitted. */
|
|
@@ -332,8 +572,13 @@ export interface InstallModeOptions {
|
|
|
332
572
|
sgtin: string;
|
|
333
573
|
key: string;
|
|
334
574
|
};
|
|
335
|
-
/**
|
|
336
|
-
|
|
575
|
+
/**
|
|
576
|
+
* HmIP: how the device is admitted. `KEY` whitelists the SGTIN with its key (the only way that
|
|
577
|
+
* works offline), `SGTIN` whitelists the SGTIN and takes the key from eQ-3's key server, and
|
|
578
|
+
* `ANY` (task 28) admits whatever device in factory state asks to join: `setInstallMode(true,
|
|
579
|
+
* seconds)` with exactly two arguments, `hmipKey` ignored.
|
|
580
|
+
*/
|
|
581
|
+
hmipKeyMode?: 'KEY' | 'SGTIN' | 'ANY';
|
|
337
582
|
/** BidCos: temporary key for `setTempKey`. */
|
|
338
583
|
tempKey?: string;
|
|
339
584
|
/** Restrict to a device address (BidCos `setInstallMode` with address). */
|
|
@@ -364,6 +609,19 @@ export interface SessionInfo {
|
|
|
364
609
|
/** ReGa `UserLevel()`; `0` when ReGa reported none. */
|
|
365
610
|
level: number;
|
|
366
611
|
}
|
|
612
|
+
/** What a save does besides storing the connection - `config.set`'s optional second argument. */
|
|
613
|
+
export interface ConfigSetOptions {
|
|
614
|
+
/**
|
|
615
|
+
* Task 34 (#147, D-42): the answer to the question the settings dialog asks when
|
|
616
|
+
* `autoAckStickyUnreach` is switched on - acknowledge the `STICKY_UNREACH` messages that are
|
|
617
|
+
* already in the list as well, not only the ones that appear afterwards.
|
|
618
|
+
*
|
|
619
|
+
* It counts only on the save that switches the option from off to on, and only for the CCU the
|
|
620
|
+
* list belongs to (a save that also changes the host acknowledges nothing). Each message gets
|
|
621
|
+
* exactly the write of `serviceMessages.ack`; HmIP messages are left alone.
|
|
622
|
+
*/
|
|
623
|
+
acknowledgeExisting?: boolean;
|
|
624
|
+
}
|
|
367
625
|
/**
|
|
368
626
|
* Request methods: `params` is the positional tuple the UI sends, `result` what it receives.
|
|
369
627
|
* Every method rejects with `ApiError` on failure; RPC faults keep their `faultCode`. Methods
|
|
@@ -376,7 +634,7 @@ export interface ApiMethods {
|
|
|
376
634
|
};
|
|
377
635
|
/** Persist and reconnect. */
|
|
378
636
|
'config.set': {
|
|
379
|
-
params: [connection: ConnectionConfig];
|
|
637
|
+
params: [connection: ConnectionConfig, options?: ConfigSetOptions];
|
|
380
638
|
result: AppConfig;
|
|
381
639
|
};
|
|
382
640
|
'config.discover': {
|
|
@@ -387,6 +645,14 @@ export interface ApiMethods {
|
|
|
387
645
|
params: [];
|
|
388
646
|
result: null;
|
|
389
647
|
};
|
|
648
|
+
/**
|
|
649
|
+
* B-53: the automatic callback address and this machine's addresses, worked out for `host` -
|
|
650
|
+
* the one being typed into the settings dialog - or the configured CCU when it is absent.
|
|
651
|
+
*/
|
|
652
|
+
'config.callbackAddresses': {
|
|
653
|
+
params: [host?: string];
|
|
654
|
+
result: CallbackAddressInfo;
|
|
655
|
+
};
|
|
390
656
|
'interfaces.list': {
|
|
391
657
|
params: [];
|
|
392
658
|
result: InterfaceState[];
|
|
@@ -500,6 +766,107 @@ export interface ApiMethods {
|
|
|
500
766
|
}>];
|
|
501
767
|
result: NameMap;
|
|
502
768
|
};
|
|
769
|
+
'meta.state': {
|
|
770
|
+
params: [];
|
|
771
|
+
result: MetaState;
|
|
772
|
+
};
|
|
773
|
+
/** The state, the trees and every object in one answer; what the UI asks for on connect. */
|
|
774
|
+
'meta.get': {
|
|
775
|
+
params: [];
|
|
776
|
+
result: MetaSnapshot;
|
|
777
|
+
};
|
|
778
|
+
/** Every taxonomy with its tree. */
|
|
779
|
+
'meta.enums': {
|
|
780
|
+
params: [];
|
|
781
|
+
result: Record<string, MetaEnum>;
|
|
782
|
+
};
|
|
783
|
+
/** Every device and channel the store knows, keyed by ref. */
|
|
784
|
+
'meta.objects': {
|
|
785
|
+
params: [];
|
|
786
|
+
result: Record<string, MetaObjectView>;
|
|
787
|
+
};
|
|
788
|
+
/** The membership of one object: the complete list of paths it should have afterwards. */
|
|
789
|
+
'meta.setMembership': {
|
|
790
|
+
params: [entries: Array<{
|
|
791
|
+
ref: string;
|
|
792
|
+
paths: string[];
|
|
793
|
+
}>];
|
|
794
|
+
result: null;
|
|
795
|
+
};
|
|
796
|
+
/**
|
|
797
|
+
* The interaction that matters: select rows in the grid, assign them to a room.
|
|
798
|
+
*
|
|
799
|
+
* `on: false` takes them out of it again. One revision for the whole selection, so a consumer
|
|
800
|
+
* of the change stream sees one change and not forty.
|
|
801
|
+
*/
|
|
802
|
+
'meta.assign': {
|
|
803
|
+
params: [refs: string[], path: string, on: boolean];
|
|
804
|
+
result: null;
|
|
805
|
+
};
|
|
806
|
+
/** A new taxonomy beside `room` and `function`. */
|
|
807
|
+
'meta.enum.create': {
|
|
808
|
+
params: [id: string, name: Record<string, string>];
|
|
809
|
+
result: null;
|
|
810
|
+
};
|
|
811
|
+
'meta.enum.update': {
|
|
812
|
+
params: [id: string, name: Record<string, string>];
|
|
813
|
+
result: null;
|
|
814
|
+
};
|
|
815
|
+
/** Refused while it has members unless `detach` is true; the UI lists them first. */
|
|
816
|
+
'meta.enum.delete': {
|
|
817
|
+
params: [id: string, detach?: boolean];
|
|
818
|
+
result: null;
|
|
819
|
+
};
|
|
820
|
+
/**
|
|
821
|
+
* A node - a room, a floor, a function. The id is derived from the name and is stable
|
|
822
|
+
* afterwards; the answer is the path the node got.
|
|
823
|
+
*/
|
|
824
|
+
'meta.node.create': {
|
|
825
|
+
params: [
|
|
826
|
+
enumId: string,
|
|
827
|
+
/**
|
|
828
|
+
* The parent node's path, or **absent** for a node at the root of the taxonomy.
|
|
829
|
+
*
|
|
830
|
+
* Absent and not `null`: the backend turns a `null` parameter into `undefined` because
|
|
831
|
+
* the two transports disagree about which of them an omitted argument becomes
|
|
832
|
+
* (`JSON.stringify` writes `null`, structured clone keeps `undefined`), so no method of
|
|
833
|
+
* this contract may give `null` a meaning of its own.
|
|
834
|
+
*/
|
|
835
|
+
parent: string | undefined,
|
|
836
|
+
name: string,
|
|
837
|
+
options?: {
|
|
838
|
+
icon?: string;
|
|
839
|
+
position?: number;
|
|
840
|
+
}
|
|
841
|
+
];
|
|
842
|
+
result: string;
|
|
843
|
+
};
|
|
844
|
+
'meta.node.update': {
|
|
845
|
+
params: [path: string, patch: MetaNodePatch];
|
|
846
|
+
result: null;
|
|
847
|
+
};
|
|
848
|
+
'meta.node.delete': {
|
|
849
|
+
params: [path: string, detach?: boolean];
|
|
850
|
+
result: null;
|
|
851
|
+
};
|
|
852
|
+
/**
|
|
853
|
+
* Reads the store again and answers with its state. The box has a change stream and never
|
|
854
|
+
* needs this; ReGa has none, so a room made in the WebUI shows up here only after a refresh -
|
|
855
|
+
* on connect, after every write of our own, and when the user asks (task 27).
|
|
856
|
+
*/
|
|
857
|
+
'meta.refresh': {
|
|
858
|
+
params: [];
|
|
859
|
+
result: MetaState;
|
|
860
|
+
};
|
|
861
|
+
/** The whole document, for a backup or a move between installations. */
|
|
862
|
+
'meta.export': {
|
|
863
|
+
params: [];
|
|
864
|
+
result: MetaDocument;
|
|
865
|
+
};
|
|
866
|
+
'meta.import': {
|
|
867
|
+
params: [document: unknown, mode?: MetaImportMode];
|
|
868
|
+
result: null;
|
|
869
|
+
};
|
|
503
870
|
'paramset.get': {
|
|
504
871
|
params: [interfaceName: string, address: string, paramset: string];
|
|
505
872
|
result: Paramset;
|
|
@@ -611,6 +978,18 @@ export interface ApiMethods {
|
|
|
611
978
|
params: [interfaceName?: string];
|
|
612
979
|
result: ServiceMessage[];
|
|
613
980
|
};
|
|
981
|
+
/**
|
|
982
|
+
* Issue #146: asks the interface processes again and answers with the fresh list.
|
|
983
|
+
*
|
|
984
|
+
* {@link 'serviceMessages.list'} reads the backend's cache, which is filled by the events and
|
|
985
|
+
* by a poll every five minutes - so the refresh button of the tab returned the same list it
|
|
986
|
+
* already showed and looked like a button without a function. This is the call that makes the
|
|
987
|
+
* round trip: `getServiceMessages` per BidCos interface, the `:0` sweep on HmIP.
|
|
988
|
+
*/
|
|
989
|
+
'serviceMessages.refresh': {
|
|
990
|
+
params: [interfaceName?: string];
|
|
991
|
+
result: ServiceMessage[];
|
|
992
|
+
};
|
|
614
993
|
/** Acknowledge by writing the datapoint (STICKY_UNREACH etc.). */
|
|
615
994
|
'serviceMessages.ack': {
|
|
616
995
|
params: [interfaceName: string, address: string, datapoint: string];
|
|
@@ -643,11 +1022,12 @@ export interface ApiMethods {
|
|
|
643
1022
|
params: [interfaceName?: string];
|
|
644
1023
|
result: number;
|
|
645
1024
|
};
|
|
646
|
-
|
|
1025
|
+
/** Task 48: the RPC log - every outgoing call of the session, oldest first, the newest `limit` of them. */
|
|
1026
|
+
'rpcLog.list': {
|
|
647
1027
|
params: [limit?: number];
|
|
648
|
-
result:
|
|
1028
|
+
result: RpcLogEntry[];
|
|
649
1029
|
};
|
|
650
|
-
'
|
|
1030
|
+
'rpcLog.clear': {
|
|
651
1031
|
params: [];
|
|
652
1032
|
result: null;
|
|
653
1033
|
};
|
|
@@ -680,9 +1060,16 @@ export interface ApiEvents {
|
|
|
680
1060
|
addresses: string[];
|
|
681
1061
|
};
|
|
682
1062
|
'names.changed': NameMap;
|
|
1063
|
+
/** D-40: the provider, its reachability and whether it takes writes. */
|
|
1064
|
+
'meta.changed': MetaState;
|
|
1065
|
+
/** D-40: a taxonomy or a node was created, renamed, moved or deleted. */
|
|
1066
|
+
'meta.enums.changed': Record<string, MetaEnum>;
|
|
1067
|
+
/** D-40: an object's name or membership changed - on the box, possibly by somebody else. */
|
|
1068
|
+
'meta.objects.changed': Record<string, MetaObjectView>;
|
|
683
1069
|
'rpc.event': EventRecord;
|
|
684
1070
|
'serviceMessages.changed': ServiceMessage[];
|
|
685
|
-
|
|
1071
|
+
/** Task 48: one more outgoing call is finished and in the log. */
|
|
1072
|
+
'rpcLog.appended': RpcLogEntry;
|
|
686
1073
|
/** Progress of a bulk write: done of total, last result. */
|
|
687
1074
|
'write.progress': {
|
|
688
1075
|
done: number;
|
|
@@ -738,6 +1125,6 @@ export type ApiFrame = {
|
|
|
738
1125
|
n: ApiEventName;
|
|
739
1126
|
d: unknown;
|
|
740
1127
|
};
|
|
741
|
-
/**
|
|
1128
|
+
/** Every event name of {@link ApiEvents}, in the order the contract declares them. */
|
|
742
1129
|
export declare const API_EVENT_NAMES: readonly ApiEventName[];
|
|
743
1130
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -6,6 +6,24 @@
|
|
|
6
6
|
* Rules: extend with new methods, events and optional fields; never rename or repurpose existing
|
|
7
7
|
* ones. Parameters are positional tuples so that both transports can forward them verbatim.
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* Task 38: the environment variable and command-line option behind each callback field, for the
|
|
11
|
+
* settings dialog's read-only hint and the backend's log lines - one table, so the two cannot name
|
|
12
|
+
* different options.
|
|
13
|
+
*/
|
|
14
|
+
export const CALLBACK_PIN_OPTIONS = Object.freeze({
|
|
15
|
+
ip: { env: 'HMM_CALLBACK_IP', cli: '--callback-ip' },
|
|
16
|
+
xmlrpcPort: { env: 'HMM_CALLBACK_XMLRPC_PORT', cli: '--callback-xmlrpc-port' },
|
|
17
|
+
binrpcPort: { env: 'HMM_CALLBACK_BINRPC_PORT', cli: '--callback-binrpc-port' },
|
|
18
|
+
});
|
|
19
|
+
/** Task 38: `HMM_CALLBACK_XMLRPC_PORT / --callback-xmlrpc-port`, as the hint and the log write it. */
|
|
20
|
+
export function callbackPinOption(field) {
|
|
21
|
+
const { env, cli } = CALLBACK_PIN_OPTIONS[field];
|
|
22
|
+
return `${env} / ${cli}`;
|
|
23
|
+
}
|
|
24
|
+
/** The values of {@link MetaProviderChoice} as a runtime list, for validation and a select. */
|
|
25
|
+
export const META_PROVIDERS = Object.freeze(['auto', 'local', 'occulite', 'rega']);
|
|
26
|
+
export const RPC_ORIGINS = Object.freeze(['console', 'ui', 'background']);
|
|
9
27
|
/**
|
|
10
28
|
* Every event of {@link ApiEvents} as a runtime value, because a type has none.
|
|
11
29
|
*
|
|
@@ -19,14 +37,17 @@ const API_EVENT_FLAGS = {
|
|
|
19
37
|
'rega.changed': true,
|
|
20
38
|
'devices.changed': true,
|
|
21
39
|
'names.changed': true,
|
|
40
|
+
'meta.changed': true,
|
|
41
|
+
'meta.enums.changed': true,
|
|
42
|
+
'meta.objects.changed': true,
|
|
22
43
|
'rpc.event': true,
|
|
23
44
|
'serviceMessages.changed': true,
|
|
24
|
-
'
|
|
45
|
+
'rpcLog.appended': true,
|
|
25
46
|
'write.progress': true,
|
|
26
47
|
'unreach.changed': true,
|
|
27
48
|
'config.changed': true,
|
|
28
49
|
notice: true,
|
|
29
50
|
};
|
|
30
|
-
/**
|
|
51
|
+
/** Every event name of {@link ApiEvents}, in the order the contract declares them. */
|
|
31
52
|
export const API_EVENT_NAMES = Object.freeze(Object.keys(API_EVENT_FLAGS));
|
|
32
53
|
//# sourceMappingURL=types.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The core never reads a file. Tests use this implementation, the Electron host and the web host
|
|
5
5
|
* bring their own (IPC and fetch), and the pipeline of task 9 writes the files all three read.
|
|
6
6
|
*/
|
|
7
|
-
import type { CrossValidationRule, DataManifest, DataSource, DeviceIcons, Language, MasterMetadata, OptionPreset, ReceiverProfiles, ReceiverTypeAliases, Translations } from './types.js';
|
|
7
|
+
import type { CrossValidationRule, DataManifest, DataSource, DeviceIcons, Language, MasterMetadata, OptionPreset, ReceiverProfiles, ReceiverTypeAliases, TimeSelectorOption, Translations } from './types.js';
|
|
8
8
|
/** Everything a {@link MemoryDataSource} can hold; every part is optional and defaults to empty. */
|
|
9
9
|
export interface MemoryData {
|
|
10
10
|
readonly manifest?: DataManifest;
|
|
@@ -16,6 +16,7 @@ export interface MemoryData {
|
|
|
16
16
|
readonly crossValidations?: readonly CrossValidationRule[];
|
|
17
17
|
readonly translations?: Partial<Record<Language, Translations>>;
|
|
18
18
|
readonly deviceIcons?: DeviceIcons;
|
|
19
|
+
readonly timeSelectors?: Readonly<Record<string, TimeSelectorOption[]>>;
|
|
19
20
|
}
|
|
20
21
|
/** A `DataSource` over data that is already in memory. */
|
|
21
22
|
export declare class MemoryDataSource implements DataSource {
|
|
@@ -29,5 +30,6 @@ export declare class MemoryDataSource implements DataSource {
|
|
|
29
30
|
crossValidations(): Promise<CrossValidationRule[]>;
|
|
30
31
|
translations(language: Language): Promise<Translations | undefined>;
|
|
31
32
|
deviceIcons(): Promise<DeviceIcons>;
|
|
33
|
+
timeSelectors(): Promise<Record<string, TimeSelectorOption[]>>;
|
|
32
34
|
}
|
|
33
35
|
//# sourceMappingURL=memory.d.ts.map
|