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
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The openccu-lite metadata store: the document, its enums and the errors it answers with.
|
|
3
|
+
*
|
|
4
|
+
* This is *their* format, not ours. `docs/meta-format.md` and `docs/meta-api.md` in the
|
|
5
|
+
* openccu-lite repository are normative (their D-16), two implementations exist - `occulited` in Go
|
|
6
|
+
* and this one in TypeScript - and a conformance corpus decides whether they agree
|
|
7
|
+
* (`packages/core/test/fixtures/meta/`, a copy of that repository's `fixtures/`). Nothing here may
|
|
8
|
+
* be "improved" without changing the specification and the corpus first: a divergence that the
|
|
9
|
+
* corpus does not catch is exactly the failure D-16 exists to prevent.
|
|
10
|
+
*
|
|
11
|
+
* Why it lives in `core` and not in `backend`: it is a data model with no I/O in it - trees, paths,
|
|
12
|
+
* refs, validation, revisions - and the UI needs the same tree walking the backend does. The HTTP
|
|
13
|
+
* client that talks to a box, and the provider that decides whether there is a box at all, are in
|
|
14
|
+
* `packages/backend/src/meta/`.
|
|
15
|
+
*/
|
|
16
|
+
/** The format version this implementation reads and writes. A higher one is refused. */
|
|
17
|
+
export declare const META_FORMAT = 1;
|
|
18
|
+
/** Levels of nodes below an enum. Deeper is `too-deep`. */
|
|
19
|
+
export declare const MAX_TREE_DEPTH = 8;
|
|
20
|
+
/** Longest name of an object or a node, in bytes of UTF-8. */
|
|
21
|
+
export declare const MAX_NAME_BYTES = 255;
|
|
22
|
+
/** Longest enum id, node id and `meta` namespace, in characters. */
|
|
23
|
+
export declare const MAX_ID_LENGTH = 32;
|
|
24
|
+
/** Largest `meta` block per object, serialised. */
|
|
25
|
+
export declare const MAX_META_BYTES: number;
|
|
26
|
+
/**
|
|
27
|
+
* Every error code of the metadata API, as the specification lists them.
|
|
28
|
+
*
|
|
29
|
+
* They are the contract: the corpus names them, the HTTP layer maps them to status codes, and the
|
|
30
|
+
* UI shows a message per code. A new one is a specification change.
|
|
31
|
+
*/
|
|
32
|
+
export type MetaErrorCode = 'invalid-ref' | 'invalid-name' | 'invalid-id' | 'unknown-object' | 'unknown-enum' | 'unknown-path' | 'duplicate-id' | 'duplicate-path' | 'has-members' | 'invalid-move' | 'too-deep' | 'format-unsupported' | 'revision-conflict' | 'forbidden';
|
|
33
|
+
/** A refusal from the store, carrying the code the specification names. */
|
|
34
|
+
export declare class MetaError extends Error {
|
|
35
|
+
readonly code: MetaErrorCode;
|
|
36
|
+
/** Whatever the code carries with it - `refs` for `has-members`, a location for an import. */
|
|
37
|
+
readonly detail: Record<string, unknown> | undefined;
|
|
38
|
+
constructor(code: MetaErrorCode, message?: string, detail?: Record<string, unknown>);
|
|
39
|
+
}
|
|
40
|
+
/** True for the error class of this module; a type guard that survives a `catch`. */
|
|
41
|
+
export declare function isMetaError(value: unknown): value is MetaError;
|
|
42
|
+
/**
|
|
43
|
+
* One device or channel: `<interface>.<address>`.
|
|
44
|
+
*
|
|
45
|
+
* `enums` and `meta` are always present after normalisation, `orphaned` only when it is true - the
|
|
46
|
+
* shape `occulited` serialises, so that a document written here and one written there compare
|
|
47
|
+
* equal byte for byte after `JSON.stringify` with sorted keys.
|
|
48
|
+
*/
|
|
49
|
+
export interface MetaObject {
|
|
50
|
+
readonly name: string;
|
|
51
|
+
readonly enums: readonly string[];
|
|
52
|
+
readonly meta: Readonly<Record<string, unknown>>;
|
|
53
|
+
readonly orphaned?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** A node of an enum tree. `children` is absent, not empty, when there are none. */
|
|
56
|
+
export interface MetaNode {
|
|
57
|
+
readonly id: string;
|
|
58
|
+
readonly name: string;
|
|
59
|
+
readonly icon?: string;
|
|
60
|
+
readonly children?: readonly MetaNode[];
|
|
61
|
+
}
|
|
62
|
+
/** A taxonomy: localised display names and an ordered tree. */
|
|
63
|
+
export interface MetaEnum {
|
|
64
|
+
/** BCP-47 primary tags to display names; `en` is required. */
|
|
65
|
+
readonly name: Readonly<Record<string, string>>;
|
|
66
|
+
readonly tree: readonly MetaNode[];
|
|
67
|
+
}
|
|
68
|
+
/** The whole store, as it is on disk and as `/snapshot` serves it. */
|
|
69
|
+
export interface MetaDocument {
|
|
70
|
+
readonly format: number;
|
|
71
|
+
readonly revision: number;
|
|
72
|
+
readonly objects: Readonly<Record<string, MetaObject>>;
|
|
73
|
+
readonly enums: Readonly<Record<string, MetaEnum>>;
|
|
74
|
+
}
|
|
75
|
+
/** What a `PATCH /objects/{ref}` body may say. Absent fields are left alone. */
|
|
76
|
+
export interface MetaObjectPatch {
|
|
77
|
+
readonly name?: string;
|
|
78
|
+
readonly enums?: readonly string[];
|
|
79
|
+
/** Merged per namespace; `null` removes one. */
|
|
80
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
81
|
+
/**
|
|
82
|
+
* Never accepted from a client (`forbidden`): the flag belongs to the process that owns the
|
|
83
|
+
* addresses, and a frontend that sets it would be claiming a device is gone because it cannot
|
|
84
|
+
* see it right now.
|
|
85
|
+
*/
|
|
86
|
+
readonly orphaned?: boolean;
|
|
87
|
+
}
|
|
88
|
+
/** What a `PUT /objects/{ref}` body says. Missing optional fields are reset to their defaults. */
|
|
89
|
+
export interface MetaObjectBody {
|
|
90
|
+
readonly name: string;
|
|
91
|
+
readonly enums?: readonly string[];
|
|
92
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
93
|
+
}
|
|
94
|
+
/** What a `PATCH /enums/{enum}/nodes/{path}` body may say. */
|
|
95
|
+
export interface MetaNodePatch {
|
|
96
|
+
readonly name?: string;
|
|
97
|
+
readonly icon?: string;
|
|
98
|
+
/** A move; `null` moves the node to the root of its enum. */
|
|
99
|
+
readonly parent?: string | null;
|
|
100
|
+
/** The index among the new siblings. */
|
|
101
|
+
readonly position?: number;
|
|
102
|
+
}
|
|
103
|
+
/** `replace` (the default) swaps the store; `merge` keeps what the import does not mention. */
|
|
104
|
+
export type MetaImportMode = 'replace' | 'merge';
|
|
105
|
+
/** The kinds of the change stream, as the specification lists them. */
|
|
106
|
+
export type MetaEventKind = 'object.updated' | 'object.deleted' | 'enum.created' | 'enum.updated' | 'enum.deleted' | 'node.created' | 'node.updated' | 'node.deleted' | 'node.moved' | 'import' | 'resync';
|
|
107
|
+
/**
|
|
108
|
+
* One event of the change stream.
|
|
109
|
+
*
|
|
110
|
+
* Every event carries the revision it produced, which is how a consumer notices a gap: a revision
|
|
111
|
+
* that jumped by more than one means events were missed, and the answer to that is `?since=` or a
|
|
112
|
+
* fresh snapshot. Fields beyond `kind` and `revision` depend on the kind, so they are all optional
|
|
113
|
+
* here rather than a union that every consumer would have to narrow before it can log it.
|
|
114
|
+
*/
|
|
115
|
+
export interface MetaEvent {
|
|
116
|
+
readonly revision: number;
|
|
117
|
+
readonly kind: MetaEventKind;
|
|
118
|
+
readonly ref?: string;
|
|
119
|
+
readonly value?: MetaObject | MetaEnum | MetaNode;
|
|
120
|
+
readonly enum?: string;
|
|
121
|
+
readonly path?: string;
|
|
122
|
+
readonly from?: string;
|
|
123
|
+
readonly to?: string;
|
|
124
|
+
readonly objects?: number;
|
|
125
|
+
readonly enums?: number;
|
|
126
|
+
}
|
|
127
|
+
/** What `GET /api/meta/v1/version` answers - the runtime detection of the porting kit. */
|
|
128
|
+
export interface MetaVersion {
|
|
129
|
+
readonly api: string;
|
|
130
|
+
readonly version: number;
|
|
131
|
+
readonly format: number;
|
|
132
|
+
readonly revision: number;
|
|
133
|
+
readonly implementation?: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The two enums a fresh store carries, what a CCU has: rooms and functions. They are ordinary
|
|
137
|
+
* enums; a user may delete them or add more. A floor is a room with rooms below it, so there is no
|
|
138
|
+
* default for it (a store from before 2026-09-11 may still carry a `floor` enum; it is kept).
|
|
139
|
+
*/
|
|
140
|
+
export declare const DEFAULT_ENUMS: Readonly<Record<string, MetaEnum>>;
|
|
141
|
+
/** An empty store: revision 0 and the two defaults, exactly as `occulited` creates one. */
|
|
142
|
+
export declare function emptyDocument(): MetaDocument;
|
|
143
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The openccu-lite metadata store: the document, its enums and the errors it answers with.
|
|
3
|
+
*
|
|
4
|
+
* This is *their* format, not ours. `docs/meta-format.md` and `docs/meta-api.md` in the
|
|
5
|
+
* openccu-lite repository are normative (their D-16), two implementations exist - `occulited` in Go
|
|
6
|
+
* and this one in TypeScript - and a conformance corpus decides whether they agree
|
|
7
|
+
* (`packages/core/test/fixtures/meta/`, a copy of that repository's `fixtures/`). Nothing here may
|
|
8
|
+
* be "improved" without changing the specification and the corpus first: a divergence that the
|
|
9
|
+
* corpus does not catch is exactly the failure D-16 exists to prevent.
|
|
10
|
+
*
|
|
11
|
+
* Why it lives in `core` and not in `backend`: it is a data model with no I/O in it - trees, paths,
|
|
12
|
+
* refs, validation, revisions - and the UI needs the same tree walking the backend does. The HTTP
|
|
13
|
+
* client that talks to a box, and the provider that decides whether there is a box at all, are in
|
|
14
|
+
* `packages/backend/src/meta/`.
|
|
15
|
+
*/
|
|
16
|
+
/** The format version this implementation reads and writes. A higher one is refused. */
|
|
17
|
+
export const META_FORMAT = 1;
|
|
18
|
+
/** Levels of nodes below an enum. Deeper is `too-deep`. */
|
|
19
|
+
export const MAX_TREE_DEPTH = 8;
|
|
20
|
+
/** Longest name of an object or a node, in bytes of UTF-8. */
|
|
21
|
+
export const MAX_NAME_BYTES = 255;
|
|
22
|
+
/** Longest enum id, node id and `meta` namespace, in characters. */
|
|
23
|
+
export const MAX_ID_LENGTH = 32;
|
|
24
|
+
/** Largest `meta` block per object, serialised. */
|
|
25
|
+
export const MAX_META_BYTES = 16 * 1024;
|
|
26
|
+
/** A refusal from the store, carrying the code the specification names. */
|
|
27
|
+
export class MetaError extends Error {
|
|
28
|
+
code;
|
|
29
|
+
/** Whatever the code carries with it - `refs` for `has-members`, a location for an import. */
|
|
30
|
+
detail;
|
|
31
|
+
constructor(code, message, detail) {
|
|
32
|
+
super(message ?? code);
|
|
33
|
+
this.name = 'MetaError';
|
|
34
|
+
this.code = code;
|
|
35
|
+
this.detail = detail;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** True for the error class of this module; a type guard that survives a `catch`. */
|
|
39
|
+
export function isMetaError(value) {
|
|
40
|
+
return value instanceof MetaError;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The two enums a fresh store carries, what a CCU has: rooms and functions. They are ordinary
|
|
44
|
+
* enums; a user may delete them or add more. A floor is a room with rooms below it, so there is no
|
|
45
|
+
* default for it (a store from before 2026-09-11 may still carry a `floor` enum; it is kept).
|
|
46
|
+
*/
|
|
47
|
+
export const DEFAULT_ENUMS = Object.freeze({
|
|
48
|
+
room: { name: { de: 'Räume', en: 'Rooms' }, tree: [] },
|
|
49
|
+
function: { name: { de: 'Gewerke', en: 'Functions' }, tree: [] },
|
|
50
|
+
});
|
|
51
|
+
/** An empty store: revision 0 and the two defaults, exactly as `occulited` creates one. */
|
|
52
|
+
export function emptyDocument() {
|
|
53
|
+
return {
|
|
54
|
+
format: META_FORMAT,
|
|
55
|
+
revision: 0,
|
|
56
|
+
objects: {},
|
|
57
|
+
enums: {
|
|
58
|
+
room: { name: { ...DEFAULT_ENUMS['room']?.name }, tree: [] },
|
|
59
|
+
function: { name: { ...DEFAULT_ENUMS['function']?.name }, tree: [] },
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trees to the flat things a UI and a downstream consumer show.
|
|
3
|
+
*
|
|
4
|
+
* openccu-lite's rooms and functions are trees; everything that ever consumed ReGa's rooms and
|
|
5
|
+
* functions expects **arrays of names**, and the porting rule is explicit that they stay arrays of
|
|
6
|
+
* names (invariant 3 of their porting prompt: whatever an integration publishes keeps its fields).
|
|
7
|
+
* So this is the one place where a tree becomes a list, and it is a read: nothing here writes.
|
|
8
|
+
*/
|
|
9
|
+
import { type FlatNode } from './paths.js';
|
|
10
|
+
import type { MetaDocument, MetaEnum, MetaObject } from './types.js';
|
|
11
|
+
/** The display name of an enum in a language, with English and then the id behind it. */
|
|
12
|
+
export declare function enumTitle(id: string, definition: MetaEnum | undefined, language: string): string;
|
|
13
|
+
/** The node a path addresses, or `undefined` - the lookup a grid does per membership. */
|
|
14
|
+
export declare function nodeAt(enums: Readonly<Record<string, MetaEnum>>, path: string): FlatNode | undefined;
|
|
15
|
+
/** The name of the node a path addresses; the path itself when it does not resolve. */
|
|
16
|
+
export declare function pathName(enums: Readonly<Record<string, MetaEnum>>, path: string): string;
|
|
17
|
+
export interface EnumNamesOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Also list the nodes above the ones the object is assigned to.
|
|
20
|
+
*
|
|
21
|
+
* A channel in `room/eg/wohnzimmer` *is* in `room/eg` - that is what the tree buys, and a
|
|
22
|
+
* consumer that filters "everything on the ground floor" wants to see it. A grid column wants
|
|
23
|
+
* the leaf alone, which is the default.
|
|
24
|
+
*/
|
|
25
|
+
readonly ancestors?: boolean;
|
|
26
|
+
/** Only this enum; every enum when absent. */
|
|
27
|
+
readonly enumId?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The names one object carries in one enum, in tree order and without repetition.
|
|
31
|
+
*
|
|
32
|
+
* Tree order and not assignment order: two channels in the same two rooms must produce the same
|
|
33
|
+
* two strings in the same sequence, or every consumer downstream sees a change that is not one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function enumNames(enums: Readonly<Record<string, MetaEnum>>, paths: readonly string[], options?: EnumNamesOptions): string[];
|
|
36
|
+
/** Every enum flattened once, for a select or a tree view. */
|
|
37
|
+
export declare function flattenAll(enums: Readonly<Record<string, MetaEnum>>): Record<string, FlatNode[]>;
|
|
38
|
+
/** What one object looks like to a consumer that thinks in ReGa's flat rooms and functions. */
|
|
39
|
+
export interface MetaSummary {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly rooms: readonly string[];
|
|
42
|
+
readonly functions: readonly string[];
|
|
43
|
+
readonly paths: readonly string[];
|
|
44
|
+
readonly orphaned: boolean;
|
|
45
|
+
}
|
|
46
|
+
/** One object as names: what the grid, an MQTT payload and a node output all want. */
|
|
47
|
+
export declare function summarise(enums: Readonly<Record<string, MetaEnum>>, object: MetaObject, options?: EnumNamesOptions): MetaSummary;
|
|
48
|
+
/** Every object of a document as {@link MetaSummary}, keyed by ref. */
|
|
49
|
+
export declare function summariseAll(document: MetaDocument, options?: EnumNamesOptions): Record<string, MetaSummary>;
|
|
50
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trees to the flat things a UI and a downstream consumer show.
|
|
3
|
+
*
|
|
4
|
+
* openccu-lite's rooms and functions are trees; everything that ever consumed ReGa's rooms and
|
|
5
|
+
* functions expects **arrays of names**, and the porting rule is explicit that they stay arrays of
|
|
6
|
+
* names (invariant 3 of their porting prompt: whatever an integration publishes keeps its fields).
|
|
7
|
+
* So this is the one place where a tree becomes a list, and it is a read: nothing here writes.
|
|
8
|
+
*/
|
|
9
|
+
import { findNode, flattenEnum, parsePath } from './paths.js';
|
|
10
|
+
/** The display name of an enum in a language, with English and then the id behind it. */
|
|
11
|
+
export function enumTitle(id, definition, language) {
|
|
12
|
+
return definition?.name[language] ?? definition?.name['en'] ?? id;
|
|
13
|
+
}
|
|
14
|
+
/** The node a path addresses, or `undefined` - the lookup a grid does per membership. */
|
|
15
|
+
export function nodeAt(enums, path) {
|
|
16
|
+
const parsed = parsePath(path);
|
|
17
|
+
if (!parsed || parsed.ids.length === 0) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const definition = enums[parsed.enumId];
|
|
21
|
+
if (!definition) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const node = findNode(definition.tree, parsed.ids);
|
|
25
|
+
if (!node) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const trail = [];
|
|
29
|
+
for (let depth = 1; depth <= parsed.ids.length; depth += 1) {
|
|
30
|
+
const step = findNode(definition.tree, parsed.ids.slice(0, depth));
|
|
31
|
+
if (step) {
|
|
32
|
+
trail.push(step.name);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { path, node, depth: parsed.ids.length, trail };
|
|
36
|
+
}
|
|
37
|
+
/** The name of the node a path addresses; the path itself when it does not resolve. */
|
|
38
|
+
export function pathName(enums, path) {
|
|
39
|
+
return nodeAt(enums, path)?.node.name ?? path;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The names one object carries in one enum, in tree order and without repetition.
|
|
43
|
+
*
|
|
44
|
+
* Tree order and not assignment order: two channels in the same two rooms must produce the same
|
|
45
|
+
* two strings in the same sequence, or every consumer downstream sees a change that is not one.
|
|
46
|
+
*/
|
|
47
|
+
export function enumNames(enums, paths, options = {}) {
|
|
48
|
+
const wanted = new Set();
|
|
49
|
+
for (const path of paths) {
|
|
50
|
+
const parsed = parsePath(path);
|
|
51
|
+
if (!parsed || parsed.ids.length === 0) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (options.enumId !== undefined && parsed.enumId !== options.enumId) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
wanted.add(path);
|
|
58
|
+
if (options.ancestors === true) {
|
|
59
|
+
for (let depth = 1; depth < parsed.ids.length; depth += 1) {
|
|
60
|
+
wanted.add([parsed.enumId, ...parsed.ids.slice(0, depth)].join('/'));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const names = [];
|
|
65
|
+
for (const [id, definition] of Object.entries(enums)) {
|
|
66
|
+
if (options.enumId !== undefined && id !== options.enumId) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
for (const entry of flattenEnum(id, definition)) {
|
|
70
|
+
if (wanted.has(entry.path) && !names.includes(entry.node.name)) {
|
|
71
|
+
names.push(entry.node.name);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return names;
|
|
76
|
+
}
|
|
77
|
+
/** Every enum flattened once, for a select or a tree view. */
|
|
78
|
+
export function flattenAll(enums) {
|
|
79
|
+
const flat = {};
|
|
80
|
+
for (const [id, definition] of Object.entries(enums)) {
|
|
81
|
+
flat[id] = flattenEnum(id, definition);
|
|
82
|
+
}
|
|
83
|
+
return flat;
|
|
84
|
+
}
|
|
85
|
+
/** One object as names: what the grid, an MQTT payload and a node output all want. */
|
|
86
|
+
export function summarise(enums, object, options = {}) {
|
|
87
|
+
return {
|
|
88
|
+
name: object.name,
|
|
89
|
+
rooms: enumNames(enums, object.enums, { ...options, enumId: 'room' }),
|
|
90
|
+
functions: enumNames(enums, object.enums, { ...options, enumId: 'function' }),
|
|
91
|
+
paths: object.enums,
|
|
92
|
+
orphaned: object.orphaned === true,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/** Every object of a document as {@link MetaSummary}, keyed by ref. */
|
|
96
|
+
export function summariseAll(document, options = {}) {
|
|
97
|
+
const summaries = {};
|
|
98
|
+
for (const [ref, object] of Object.entries(document.objects)) {
|
|
99
|
+
summaries[ref] = summarise(document.enums, object, options);
|
|
100
|
+
}
|
|
101
|
+
return summaries;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -39,6 +39,16 @@ export interface RpcMethod {
|
|
|
39
39
|
export declare const RPC_METHODS: Readonly<Record<string, RpcMethod>>;
|
|
40
40
|
/** The method names of the catalogue, in specification order. */
|
|
41
41
|
export declare const RPC_METHOD_NAMES: readonly string[];
|
|
42
|
+
/**
|
|
43
|
+
* Task 26 (openccu-lite 28.9): the methods of eQ-3's *Homematic IP Legacy API (XML-RPC) Addendum*
|
|
44
|
+
* that the 2.x file never had. They exist on the HmIP interface only, and they are never offered
|
|
45
|
+
* on their own: an interface has to list them in `system.listMethods` first (see {@link methodsFor}),
|
|
46
|
+
* so a BidCos console does not get calls that can only fail. What the addendum adds is the
|
|
47
|
+
* signature - without it the console drew no argument form for them at all.
|
|
48
|
+
*/
|
|
49
|
+
export declare const HMIP_ADDENDUM_METHODS: Readonly<Record<string, RpcMethod>>;
|
|
50
|
+
/** The names of the addendum, for tests and for a UI that wants to know what is HmIP-only. */
|
|
51
|
+
export declare const HMIP_ADDENDUM_METHOD_NAMES: readonly string[];
|
|
42
52
|
/** The catalogue entry of a method, or `undefined` for one nobody documented. */
|
|
43
53
|
export declare function rpcMethod(name: string): RpcMethod | undefined;
|
|
44
54
|
/** An entry for a method the catalogue does not know: no arguments, no help, name only. */
|
|
@@ -812,9 +812,59 @@ export const RPC_METHODS = {
|
|
|
812
812
|
};
|
|
813
813
|
/** The method names of the catalogue, in specification order. */
|
|
814
814
|
export const RPC_METHOD_NAMES = Object.keys(RPC_METHODS);
|
|
815
|
+
/**
|
|
816
|
+
* Task 26 (openccu-lite 28.9): the methods of eQ-3's *Homematic IP Legacy API (XML-RPC) Addendum*
|
|
817
|
+
* that the 2.x file never had. They exist on the HmIP interface only, and they are never offered
|
|
818
|
+
* on their own: an interface has to list them in `system.listMethods` first (see {@link methodsFor}),
|
|
819
|
+
* so a BidCos console does not get calls that can only fail. What the addendum adds is the
|
|
820
|
+
* signature - without it the console drew no argument form for them at all.
|
|
821
|
+
*/
|
|
822
|
+
export const HMIP_ADDENDUM_METHODS = {
|
|
823
|
+
suppressServiceMessages: {
|
|
824
|
+
name: 'suppressServiceMessages',
|
|
825
|
+
params: [
|
|
826
|
+
{
|
|
827
|
+
name: 'address',
|
|
828
|
+
type: 'channel_address',
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
name: 'parameter',
|
|
832
|
+
type: 'value_key',
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
name: 'suppress',
|
|
836
|
+
type: 'bool',
|
|
837
|
+
},
|
|
838
|
+
],
|
|
839
|
+
returns: 'void',
|
|
840
|
+
help: {
|
|
841
|
+
de: 'Unterdrückt die Servicemeldung eines Parameters mit dem Service-Flag (nur HmIP). Der Parameter address ist die Kanaladresse, parameter der Name eines Parameters mit dem Service-Flag in seiner Beschreibung oder „“ für alle Service-Parameter des Kanals. Mit suppress=true meldet die Schnittstelle einen Wert, der keine Meldung auslöst (UNREACH wird immer false); suppress=false hebt die Unterdrückung wieder auf.',
|
|
842
|
+
en: 'Suppresses the service message of a parameter with the Service flag (HmIP only). The parameter address is the channel address, parameter the name of a parameter carrying the Service flag in its description, or "" for every service parameter of the channel. With suppress=true the interface reports a value that raises no message (UNREACH is always false); suppress=false lifts the suppression again.',
|
|
843
|
+
},
|
|
844
|
+
},
|
|
845
|
+
getSuppressedServiceMessages: {
|
|
846
|
+
name: 'getSuppressedServiceMessages',
|
|
847
|
+
params: [
|
|
848
|
+
{
|
|
849
|
+
name: 'address',
|
|
850
|
+
type: 'channel_address',
|
|
851
|
+
},
|
|
852
|
+
],
|
|
853
|
+
returns: 'String[]',
|
|
854
|
+
help: {
|
|
855
|
+
de: 'Gibt die Namen der Parameter zurück, deren Servicemeldungen für den Kanal address zurzeit unterdrückt sind (nur HmIP, siehe suppressServiceMessages).',
|
|
856
|
+
en: 'Returns the names of the parameters whose service messages are currently suppressed for the channel address (HmIP only, see suppressServiceMessages).',
|
|
857
|
+
},
|
|
858
|
+
},
|
|
859
|
+
};
|
|
860
|
+
/** The names of the addendum, for tests and for a UI that wants to know what is HmIP-only. */
|
|
861
|
+
export const HMIP_ADDENDUM_METHOD_NAMES = Object.keys(HMIP_ADDENDUM_METHODS);
|
|
815
862
|
/** The catalogue entry of a method, or `undefined` for one nobody documented. */
|
|
816
863
|
export function rpcMethod(name) {
|
|
817
|
-
|
|
864
|
+
if (Object.prototype.hasOwnProperty.call(RPC_METHODS, name)) {
|
|
865
|
+
return RPC_METHODS[name];
|
|
866
|
+
}
|
|
867
|
+
return Object.prototype.hasOwnProperty.call(HMIP_ADDENDUM_METHODS, name) ? HMIP_ADDENDUM_METHODS[name] : undefined;
|
|
818
868
|
}
|
|
819
869
|
/** An entry for a method the catalogue does not know: no arguments, no help, name only. */
|
|
820
870
|
export function unknownRpcMethod(name) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free text from the interface processes that arrived with the wrong character set.
|
|
3
|
+
*
|
|
4
|
+
* Every XML-RPC client of the backend decodes answers as ISO-8859-1 (`INTERFACE_ENCODING`), which is
|
|
5
|
+
* what rfd and hmipserver send for units such as `°C`. A link's `NAME` and `DESCRIPTION` are the
|
|
6
|
+
* exception: rfd stores them as whatever bytes its writer sent and hands those bytes back, and both
|
|
7
|
+
* writers send UTF-8 - the CCU WebUI's default description "Standardverknüpfung" and every
|
|
8
|
+
* `setLinkInfo` of `homematic-xmlrpc`, which writes its requests as UTF-8. Read as ISO-8859-1, the
|
|
9
|
+
* two bytes of an "ü" become "ü" (B-23, #156).
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Undoes an ISO-8859-1 decode of UTF-8 bytes: "Standardverknüpfung" becomes "Standardverknüpfung".
|
|
13
|
+
*
|
|
14
|
+
* Only a string that *is* such a decode is changed. Every character has to fit into one byte (a
|
|
15
|
+
* string with "€" in it was not decoded as ISO-8859-1), at least one of them has to be above ASCII,
|
|
16
|
+
* and the bytes together have to be valid UTF-8. Real ISO-8859-1 text fails the last test on its
|
|
17
|
+
* own - "°C" is `B0 43` and "Küche" is `4B FC 63 68 65`, and neither `B0` nor `FC` can stand where
|
|
18
|
+
* they stand in UTF-8 - so it comes back untouched, and so does plain ASCII. The browser and Node
|
|
19
|
+
* both have `TextDecoder`, which is why this lives in the core and not next to `Buffer`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function repairMisdecodedUtf8(value: string): string;
|
|
22
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free text from the interface processes that arrived with the wrong character set.
|
|
3
|
+
*
|
|
4
|
+
* Every XML-RPC client of the backend decodes answers as ISO-8859-1 (`INTERFACE_ENCODING`), which is
|
|
5
|
+
* what rfd and hmipserver send for units such as `°C`. A link's `NAME` and `DESCRIPTION` are the
|
|
6
|
+
* exception: rfd stores them as whatever bytes its writer sent and hands those bytes back, and both
|
|
7
|
+
* writers send UTF-8 - the CCU WebUI's default description "Standardverknüpfung" and every
|
|
8
|
+
* `setLinkInfo` of `homematic-xmlrpc`, which writes its requests as UTF-8. Read as ISO-8859-1, the
|
|
9
|
+
* two bytes of an "ü" become "ü" (B-23, #156).
|
|
10
|
+
*/
|
|
11
|
+
/** Strict: a byte sequence that is not UTF-8 throws instead of turning into U+FFFD. */
|
|
12
|
+
const UTF8 = new TextDecoder('utf-8', { fatal: true });
|
|
13
|
+
/**
|
|
14
|
+
* Undoes an ISO-8859-1 decode of UTF-8 bytes: "Standardverknüpfung" becomes "Standardverknüpfung".
|
|
15
|
+
*
|
|
16
|
+
* Only a string that *is* such a decode is changed. Every character has to fit into one byte (a
|
|
17
|
+
* string with "€" in it was not decoded as ISO-8859-1), at least one of them has to be above ASCII,
|
|
18
|
+
* and the bytes together have to be valid UTF-8. Real ISO-8859-1 text fails the last test on its
|
|
19
|
+
* own - "°C" is `B0 43` and "Küche" is `4B FC 63 68 65`, and neither `B0` nor `FC` can stand where
|
|
20
|
+
* they stand in UTF-8 - so it comes back untouched, and so does plain ASCII. The browser and Node
|
|
21
|
+
* both have `TextDecoder`, which is why this lives in the core and not next to `Buffer`.
|
|
22
|
+
*/
|
|
23
|
+
export function repairMisdecodedUtf8(value) {
|
|
24
|
+
const bytes = new Uint8Array(value.length);
|
|
25
|
+
let aboveAscii = false;
|
|
26
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
27
|
+
const code = value.charCodeAt(index);
|
|
28
|
+
if (code > 0xff) {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
if (code > 0x7f) {
|
|
32
|
+
aboveAscii = true;
|
|
33
|
+
}
|
|
34
|
+
bytes[index] = code;
|
|
35
|
+
}
|
|
36
|
+
if (!aboveAscii) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
return UTF8.decode(bytes);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=text.js.map
|