homematic-manager 3.0.0-beta.2 → 3.0.0-beta.20
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/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/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/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/i18n/messages.js +61 -0
- package/node_modules/@homematic-manager/core/dist/index.d.ts +2 -0
- package/node_modules/@homematic-manager/core/dist/index.js +3 -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-BQpPoLG-.css +1 -0
- package/ui/assets/index-CjI_OM3F.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
package/README.md
CHANGED
|
@@ -63,8 +63,9 @@ hard-coding it.
|
|
|
63
63
|
| `--issue-cookie` | loopback binds only | hand the token to the browser on the page load |
|
|
64
64
|
| `-a, --ccu` | - | CCU address; written to the configuration when it differs |
|
|
65
65
|
| `--local` | - | we run on the CCU itself: talk to the interface processes directly |
|
|
66
|
-
| `--callback-ip` | auto | address the interfaces call back to; needed where this host cannot see it (Docker) |
|
|
66
|
+
| `--callback-ip` | auto | address the interfaces call back to; needed where this host cannot see it (Docker). Auto is this host's address in the CCU's network, else the one on the route to the CCU |
|
|
67
67
|
| `--callback-xmlrpc-port`, `--callback-binrpc-port` | free ports | fixed callback ports, so a container can publish them |
|
|
68
|
+
| `--callback-xmlrpc-default-port`, `--callback-binrpc-default-port` | - | callback ports while the configured ones are 0, a free port when one is taken (the CCU addon: 2031, 2032; never written to the configuration) |
|
|
68
69
|
| `--demo` | off | serve the UI on its demo fixture and start no backend |
|
|
69
70
|
| `--log-level` | `info` | `error`, `warn`, `info`, `debug` |
|
|
70
71
|
| `--install` / `--uninstall` | - | systemd service; `--purge` also deletes the state |
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/cli.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { realpathSync } from 'node:fs';
|
|
12
12
|
import { pathToFileURL } from 'node:url';
|
|
13
|
+
import { isLoopbackHost } from './auth.js';
|
|
13
14
|
import { createWebHost } from './server.js';
|
|
14
15
|
import { installService, uninstallService } from './install.js';
|
|
15
16
|
import { createLogger } from './log.js';
|
|
@@ -93,11 +94,26 @@ export async function runCli(options = {}) {
|
|
|
93
94
|
log.debug(`token ${host.token}`);
|
|
94
95
|
}
|
|
95
96
|
log.debug(`a client without a cookie can use ${host.url}?token=${host.token}`);
|
|
97
|
+
if (host.token !== undefined && host.issueCookie && !isLoopbackHost(parsed.host)) {
|
|
98
|
+
// D-41: the Docker image binds 0.0.0.0 and issues the cookie so that the UI works out of
|
|
99
|
+
// the box - which means whoever reaches the port is in. Said once, at start, with the ways
|
|
100
|
+
// out; the host cannot see a proxy or TLS in front of it, so it says this whenever it is
|
|
101
|
+
// in that position
|
|
102
|
+
log.warn(`the token cookie is handed to every browser that loads the page on ${parsed.host}: whoever reaches this port is in;` +
|
|
103
|
+
' put a proxy with authentication and TLS in front, publish the port on the loopback only,' +
|
|
104
|
+
' or set HMM_ISSUE_COOKIE=false and open the UI once with ?token=');
|
|
105
|
+
}
|
|
96
106
|
if (parsed.authMode === 'rega') {
|
|
97
107
|
// D-32: the token still works and `settings.cgi` still hands it out - the login is a second
|
|
98
108
|
// door, not a replacement, and saying so keeps the addon's two paths straight in the log
|
|
99
109
|
log.info(`login: CCU credentials required (ReGa), sessions last ${String(Math.round(parsed.sessionTtlMs / 3_600_000))} h of inactivity; the token cookie of settings.cgi is still accepted`);
|
|
100
110
|
}
|
|
111
|
+
if (parsed.authMode === 'occulite') {
|
|
112
|
+
// D-40: no form, no CCU users - the box decides who may in, and this host only checks that
|
|
113
|
+
// the session it was handed is one the box still knows
|
|
114
|
+
log.info(`login: the session openccu-lite hands over is checked against ${parsed.occuliteUrl ?? 'http://127.0.0.1'};` +
|
|
115
|
+
' the token cookie of settings.cgi is still accepted');
|
|
116
|
+
}
|
|
101
117
|
if (parsed.uiDevServer !== undefined) {
|
|
102
118
|
log.info(`development mode: everything but the api is proxied to ${parsed.uiDevServer}`);
|
|
103
119
|
}
|
|
@@ -147,11 +163,19 @@ function startHost(values, log, version) {
|
|
|
147
163
|
...(values.issueCookie === undefined ? {} : { issueCookie: values.issueCookie }),
|
|
148
164
|
authMode: values.authMode,
|
|
149
165
|
sessionTtlMs: values.sessionTtlMs,
|
|
166
|
+
...(values.occuliteUrl === undefined ? {} : { occuliteUrl: values.occuliteUrl }),
|
|
150
167
|
...(values.ccu === undefined ? {} : { ccu: values.ccu }),
|
|
151
168
|
...(values.local === undefined ? {} : { local: values.local }),
|
|
152
169
|
...(values.callbackIp === undefined ? {} : { callbackIp: values.callbackIp }),
|
|
153
170
|
...(values.callbackXmlrpcPort === undefined ? {} : { callbackXmlrpcPort: values.callbackXmlrpcPort }),
|
|
154
171
|
...(values.callbackBinrpcPort === undefined ? {} : { callbackBinrpcPort: values.callbackBinrpcPort }),
|
|
172
|
+
...(values.inContainer ? { inContainer: true } : {}),
|
|
173
|
+
...(values.callbackXmlrpcDefaultPort === undefined
|
|
174
|
+
? {}
|
|
175
|
+
: { callbackXmlrpcDefaultPort: values.callbackXmlrpcDefaultPort }),
|
|
176
|
+
...(values.callbackBinrpcDefaultPort === undefined
|
|
177
|
+
? {}
|
|
178
|
+
: { callbackBinrpcDefaultPort: values.callbackBinrpcDefaultPort }),
|
|
155
179
|
idleUnsubscribeMs: values.idleUnsubscribeMs,
|
|
156
180
|
});
|
|
157
181
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D-40: the login of the addon when it runs on openccu-lite.
|
|
3
|
+
*
|
|
4
|
+
* The CCU case (D-32, task 18) is unchanged and untouched: a user name and a password, checked
|
|
5
|
+
* against ReGa's user list and the CCU's authentication daemon on UDP 1998, both loopback-only.
|
|
6
|
+
* openccu-lite has neither - there is no ReGaHSS, and its own users live in `occulited` - so the
|
|
7
|
+
* question is a different one, and so is the answer.
|
|
8
|
+
*
|
|
9
|
+
* On openccu-lite nobody logs in *here*. The box's shell has already done it, lighttpd's gate has
|
|
10
|
+
* already refused everyone who has no session (their D-28), and the shell opens an addon page with
|
|
11
|
+
* the session on the URL: `?sid=@xxxxxxxxxx@`, the CCU convention. On an image from before their
|
|
12
|
+
* task 125 that session id **is** a valid credential for the box's own APIs, so the check is one
|
|
13
|
+
* request (on a newer image the shell sends the gate's `X-Occulite-Session` instead, see below):
|
|
14
|
+
*
|
|
15
|
+
* ```
|
|
16
|
+
* GET /api/meta/v1/enums Authorization: Bearer <sid> -> 200 valid, 401 not
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* and nothing else is believed. The name of the user behind it comes from `/api/auth/v1/state`
|
|
20
|
+
* afterwards, best effort, only so that the UI can show who is logged in - a box that answers the
|
|
21
|
+
* first call and not the second still lets the session in.
|
|
22
|
+
*
|
|
23
|
+
* The metadata API and not the auth API for the decision, on purpose: it is the one openccu-lite
|
|
24
|
+
* declares normative (their D-16), it is the API this application depends on anyway, and a session
|
|
25
|
+
* that cannot read the metadata store is of no use to a device manager whatever else it can do.
|
|
26
|
+
*/
|
|
27
|
+
/** What the check answers with: who it is, in the shape the rest of the host already speaks. */
|
|
28
|
+
export interface OcculiteSession {
|
|
29
|
+
readonly name: string;
|
|
30
|
+
/**
|
|
31
|
+
* ReGa's `UserLevel()`, so that `SessionInfo` keeps one meaning across the two boxes: 8 for an
|
|
32
|
+
* administrator, 2 for a user. openccu-lite has exactly those two roles.
|
|
33
|
+
*/
|
|
34
|
+
readonly level: number;
|
|
35
|
+
/** The session id, which is also the credential every write to the box goes out with. */
|
|
36
|
+
readonly sid: string;
|
|
37
|
+
}
|
|
38
|
+
export interface OcculiteAuthOptions {
|
|
39
|
+
/** `http://127.0.0.1` on the box; a test points it at its own server. */
|
|
40
|
+
readonly baseUrl: string;
|
|
41
|
+
readonly timeoutMs?: number;
|
|
42
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
43
|
+
readonly onNotice?: (level: 'info' | 'warn' | 'error', message: string) => void;
|
|
44
|
+
}
|
|
45
|
+
export declare const OCCULITE_TIMEOUT_MS = 5000;
|
|
46
|
+
/**
|
|
47
|
+
* B-94, D-65: the header openccu-lite's lighttpd gate sets on every request it lets through under
|
|
48
|
+
* `/addons/`, to the bare id of the session it found (from either session cookie or `?sid=`). The
|
|
49
|
+
* gate removes a copy the client sent first. A CCU has no gate and passes a client's header through,
|
|
50
|
+
* an older openccu-lite image does the same, and the backend's port is open to every process on the
|
|
51
|
+
* box - so the header is only a claim, and the box is asked about it like about any other session.
|
|
52
|
+
*/
|
|
53
|
+
export declare const OCCULITE_SESSION_HEADER = "x-occulite-session";
|
|
54
|
+
export interface OcculiteCheckOptions {
|
|
55
|
+
/**
|
|
56
|
+
* The addon contract's validation (openccu-lite `docs/PORTING-PROMPT.md`): the session only
|
|
57
|
+
* counts when `GET /api/auth/v1/state` confirms it. The `?sid=` hand-over keeps the D-40 check,
|
|
58
|
+
* where that second answer only supplies the name.
|
|
59
|
+
*/
|
|
60
|
+
readonly requireState?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/** A session id as the shell or the gate hands it over, `@…@` and all, or `undefined` when it is not one. */
|
|
63
|
+
export declare function parseSid(value: string | null | undefined): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* B-36: can the `?sid=` of a request be a session of the box whose gate named `gate`?
|
|
66
|
+
*
|
|
67
|
+
* A gate header of the 26-character shape says the box issues session ids of that shape (task 125),
|
|
68
|
+
* so a `?sid=` of any other shape there is the session's legacy alias, which the box's API refuses:
|
|
69
|
+
* the answer is known without asking. Without such a header - a CCU, an image from before the header,
|
|
70
|
+
* a ten-character header - nothing can be concluded, and the box decides as before. This only ever
|
|
71
|
+
* *refuses*: a `true` still has to be confirmed by the box.
|
|
72
|
+
*/
|
|
73
|
+
export declare function sidCanBeSession(sid: string, gate: string | undefined): boolean;
|
|
74
|
+
/** Checks a session id against the box that issued it. */
|
|
75
|
+
export declare class OcculiteAuthenticator {
|
|
76
|
+
#private;
|
|
77
|
+
constructor(options: OcculiteAuthOptions);
|
|
78
|
+
get baseUrl(): string;
|
|
79
|
+
/**
|
|
80
|
+
* The session, or `undefined` - which is the answer for an unknown id, an expired one and a box
|
|
81
|
+
* that cannot be asked alike. A caller cannot tell them apart, and therefore cannot use this to
|
|
82
|
+
* find out whether a session exists.
|
|
83
|
+
*/
|
|
84
|
+
check(rawSid: string | null | undefined, options?: OcculiteCheckOptions): Promise<OcculiteSession | undefined>;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=occulite.d.ts.map
|