@camstack/addon-provider-reolink 1.2.251 → 1.2.253
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/CHANGELOG.md +16 -0
- package/dist/addon.js +1051 -152
- package/dist/addon.mjs +1051 -152
- package/i18n/en.json +6 -1
- package/i18n/it.json +6 -1
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -106821,7 +106821,7 @@ var ZodIssueCode = {
|
|
|
106821
106821
|
var ZodFirstPartyTypeKind;
|
|
106822
106822
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
106823
106823
|
//#endregion
|
|
106824
|
-
//#region ../types/dist/runtime-capabilities-
|
|
106824
|
+
//#region ../types/dist/runtime-capabilities-CK6y0W5U.mjs
|
|
106825
106825
|
/**
|
|
106826
106826
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
106827
106827
|
* window to float samples (D455).
|
|
@@ -124491,6 +124491,650 @@ Object.freeze({
|
|
|
124491
124491
|
}
|
|
124492
124492
|
]
|
|
124493
124493
|
});
|
|
124494
|
+
Object.freeze({
|
|
124495
|
+
"air-quality-sensor": {
|
|
124496
|
+
"aqi": "optional",
|
|
124497
|
+
"co2": "optional",
|
|
124498
|
+
"lastFetchedAt": "required",
|
|
124499
|
+
"pm10": "optional",
|
|
124500
|
+
"pm25": "optional",
|
|
124501
|
+
"voc": "optional"
|
|
124502
|
+
},
|
|
124503
|
+
"alarm-panel": {
|
|
124504
|
+
"availableModes": "required",
|
|
124505
|
+
"codeRequired": "required",
|
|
124506
|
+
"lastChangedAt": "required",
|
|
124507
|
+
"state": "required",
|
|
124508
|
+
"targetMode": "optional"
|
|
124509
|
+
},
|
|
124510
|
+
"ambient-light-sensor": {
|
|
124511
|
+
"illuminance": "required",
|
|
124512
|
+
"lastFetchedAt": "required"
|
|
124513
|
+
},
|
|
124514
|
+
"audio-metrics": {
|
|
124515
|
+
"avgDbfs": "required",
|
|
124516
|
+
"byClass": "required",
|
|
124517
|
+
"current": "required",
|
|
124518
|
+
"level": "required",
|
|
124519
|
+
"peakDbfs": "required",
|
|
124520
|
+
"ts": "required",
|
|
124521
|
+
"windowSec": "required"
|
|
124522
|
+
},
|
|
124523
|
+
"automation-control": {
|
|
124524
|
+
"enabled": "required",
|
|
124525
|
+
"isRunning": "required",
|
|
124526
|
+
"lastChangedAt": "required",
|
|
124527
|
+
"lastError": "required",
|
|
124528
|
+
"lastTriggeredAt": "required"
|
|
124529
|
+
},
|
|
124530
|
+
"battery": {
|
|
124531
|
+
"binary": "optional",
|
|
124532
|
+
"chargeState": "optional",
|
|
124533
|
+
"charging": "required",
|
|
124534
|
+
"currentMa": "optional",
|
|
124535
|
+
"lastContactAt": "optional",
|
|
124536
|
+
"lastFullRefreshAt": "optional",
|
|
124537
|
+
"lastUpdated": "required",
|
|
124538
|
+
"level": "required",
|
|
124539
|
+
"sleeping": "required",
|
|
124540
|
+
"temperatureC": "optional",
|
|
124541
|
+
"voltage": "optional"
|
|
124542
|
+
},
|
|
124543
|
+
"binary": {
|
|
124544
|
+
"lastChangedAt": "required",
|
|
124545
|
+
"on": "required"
|
|
124546
|
+
},
|
|
124547
|
+
"brightness": {
|
|
124548
|
+
"lastChangedAt": "required",
|
|
124549
|
+
"level": "required"
|
|
124550
|
+
},
|
|
124551
|
+
"camera-streams": {
|
|
124552
|
+
"lastChangedAt": "required",
|
|
124553
|
+
"online": "required",
|
|
124554
|
+
"slotErrors": "required",
|
|
124555
|
+
"slotStatuses": "required"
|
|
124556
|
+
},
|
|
124557
|
+
"carbon-monoxide": {
|
|
124558
|
+
"detected": "required",
|
|
124559
|
+
"lastChangedAt": "required"
|
|
124560
|
+
},
|
|
124561
|
+
"climate-control": {
|
|
124562
|
+
"action": "optional",
|
|
124563
|
+
"availableFanModes": "required",
|
|
124564
|
+
"availableModes": "required",
|
|
124565
|
+
"availablePresets": "required",
|
|
124566
|
+
"currentHumidity": "required",
|
|
124567
|
+
"currentTemp": "required",
|
|
124568
|
+
"fanMode": "required",
|
|
124569
|
+
"lastActiveMode": "optional",
|
|
124570
|
+
"lastFetchedAt": "required",
|
|
124571
|
+
"maxTemp": "optional",
|
|
124572
|
+
"minTemp": "optional",
|
|
124573
|
+
"mode": "required",
|
|
124574
|
+
"preset": "required",
|
|
124575
|
+
"swingHorizontal": "required",
|
|
124576
|
+
"swingVertical": "required",
|
|
124577
|
+
"target": "required",
|
|
124578
|
+
"targetHigh": "required",
|
|
124579
|
+
"targetHumidity": "required",
|
|
124580
|
+
"targetLow": "required",
|
|
124581
|
+
"tempStep": "optional"
|
|
124582
|
+
},
|
|
124583
|
+
"color": {
|
|
124584
|
+
"colorTemperature": "optional",
|
|
124585
|
+
"hsv": "optional",
|
|
124586
|
+
"lastChangedAt": "required",
|
|
124587
|
+
"mode": "required",
|
|
124588
|
+
"rgb": "optional"
|
|
124589
|
+
},
|
|
124590
|
+
"connectivity": {
|
|
124591
|
+
"connected": "required",
|
|
124592
|
+
"lastChangedAt": "required"
|
|
124593
|
+
},
|
|
124594
|
+
"consumables": {
|
|
124595
|
+
"items": "required",
|
|
124596
|
+
"lastChangedAt": "required",
|
|
124597
|
+
"lastFetchedAt": "required"
|
|
124598
|
+
},
|
|
124599
|
+
"contact": {
|
|
124600
|
+
"entryOpen": "required",
|
|
124601
|
+
"lastChangedAt": "required"
|
|
124602
|
+
},
|
|
124603
|
+
"control": {
|
|
124604
|
+
"kind": "required",
|
|
124605
|
+
"lastChangedAt": "required",
|
|
124606
|
+
"max": "optional",
|
|
124607
|
+
"min": "optional",
|
|
124608
|
+
"options": "required",
|
|
124609
|
+
"step": "optional",
|
|
124610
|
+
"value": "required"
|
|
124611
|
+
},
|
|
124612
|
+
"cover": {
|
|
124613
|
+
"lastChangedAt": "required",
|
|
124614
|
+
"position": "required",
|
|
124615
|
+
"state": "required",
|
|
124616
|
+
"tiltPosition": "required"
|
|
124617
|
+
},
|
|
124618
|
+
"day-night": {
|
|
124619
|
+
"lastFetchedAt": "required",
|
|
124620
|
+
"mode": "required",
|
|
124621
|
+
"sensitivity": "optional",
|
|
124622
|
+
"switchDelaySec": "optional"
|
|
124623
|
+
},
|
|
124624
|
+
"device-status": {
|
|
124625
|
+
"lastChangedAt": "required",
|
|
124626
|
+
"online": "required"
|
|
124627
|
+
},
|
|
124628
|
+
"dishwasher": {
|
|
124629
|
+
"activeEvents": "required",
|
|
124630
|
+
"availability": "required",
|
|
124631
|
+
"availablePrograms": "required",
|
|
124632
|
+
"childLock": "required",
|
|
124633
|
+
"delayedStart": "required",
|
|
124634
|
+
"doorLocked": "required",
|
|
124635
|
+
"doorOpen": "required",
|
|
124636
|
+
"errorCode": "required",
|
|
124637
|
+
"errorLabel": "required",
|
|
124638
|
+
"extraDry": "required",
|
|
124639
|
+
"filterCleaningDue": "required",
|
|
124640
|
+
"halfLoad": "required",
|
|
124641
|
+
"hygienePlus": "required",
|
|
124642
|
+
"intensiveZone": "required",
|
|
124643
|
+
"lastFetchedAt": "required",
|
|
124644
|
+
"localControlActive": "required",
|
|
124645
|
+
"machineCareDue": "required",
|
|
124646
|
+
"machineCareRemainingRuns": "required",
|
|
124647
|
+
"operationState": "required",
|
|
124648
|
+
"powerOn": "required",
|
|
124649
|
+
"powerState": "required",
|
|
124650
|
+
"program": "required",
|
|
124651
|
+
"progress": "required",
|
|
124652
|
+
"remaining": "required",
|
|
124653
|
+
"remoteControlActive": "required",
|
|
124654
|
+
"remoteStartAllowed": "required",
|
|
124655
|
+
"selectedProgram": "required",
|
|
124656
|
+
"state": "required",
|
|
124657
|
+
"varioSpeedPlus": "required"
|
|
124658
|
+
},
|
|
124659
|
+
"do-not-disturb": {
|
|
124660
|
+
"enabled": "required",
|
|
124661
|
+
"lastChangedAt": "required"
|
|
124662
|
+
},
|
|
124663
|
+
"doorbell": {
|
|
124664
|
+
"lastPressedAt": "required",
|
|
124665
|
+
"pressCountSinceStart": "required"
|
|
124666
|
+
},
|
|
124667
|
+
"energy-system": {
|
|
124668
|
+
"grid": "required",
|
|
124669
|
+
"heatPump": "required",
|
|
124670
|
+
"house": "required",
|
|
124671
|
+
"lastFetchedAt": "required",
|
|
124672
|
+
"solar": "required",
|
|
124673
|
+
"storage": "required"
|
|
124674
|
+
},
|
|
124675
|
+
"enum-sensor": {
|
|
124676
|
+
"lastFetchedAt": "required",
|
|
124677
|
+
"timestamp": "optional",
|
|
124678
|
+
"value": "required"
|
|
124679
|
+
},
|
|
124680
|
+
"error": {
|
|
124681
|
+
"active": "required",
|
|
124682
|
+
"code": "required",
|
|
124683
|
+
"faults": "optional",
|
|
124684
|
+
"label": "required",
|
|
124685
|
+
"lastFetchedAt": "required",
|
|
124686
|
+
"severity": "required",
|
|
124687
|
+
"since": "required"
|
|
124688
|
+
},
|
|
124689
|
+
"event-emitter": {
|
|
124690
|
+
"eventCountSinceStart": "required",
|
|
124691
|
+
"eventTypes": "required",
|
|
124692
|
+
"lastEvent": "required",
|
|
124693
|
+
"vocabulary": "optional"
|
|
124694
|
+
},
|
|
124695
|
+
"fan-control": {
|
|
124696
|
+
"availablePresets": "required",
|
|
124697
|
+
"direction": "required",
|
|
124698
|
+
"lastChangedAt": "required",
|
|
124699
|
+
"oscillating": "required",
|
|
124700
|
+
"oscillationAxes": "optional",
|
|
124701
|
+
"percentageStep": "optional",
|
|
124702
|
+
"preset": "required",
|
|
124703
|
+
"speed": "required"
|
|
124704
|
+
},
|
|
124705
|
+
"feature-probe": {
|
|
124706
|
+
"channelCount": "required",
|
|
124707
|
+
"deviceType": "required",
|
|
124708
|
+
"flags": "required",
|
|
124709
|
+
"lastFetchedAt": "required",
|
|
124710
|
+
"lastProbedAt": "required",
|
|
124711
|
+
"model": "required"
|
|
124712
|
+
},
|
|
124713
|
+
"flood": {
|
|
124714
|
+
"flooded": "required",
|
|
124715
|
+
"lastChangedAt": "required"
|
|
124716
|
+
},
|
|
124717
|
+
"gas": {
|
|
124718
|
+
"detected": "required",
|
|
124719
|
+
"lastChangedAt": "required"
|
|
124720
|
+
},
|
|
124721
|
+
"group-active": {
|
|
124722
|
+
"active": "required",
|
|
124723
|
+
"lastChangedAt": "required"
|
|
124724
|
+
},
|
|
124725
|
+
"group-commands": { "results": "required" },
|
|
124726
|
+
"group-status": {
|
|
124727
|
+
"excluded": "required",
|
|
124728
|
+
"included": "required",
|
|
124729
|
+
"total": "required"
|
|
124730
|
+
},
|
|
124731
|
+
"heat-pump-status": {
|
|
124732
|
+
"circuits": "required",
|
|
124733
|
+
"energy": "required",
|
|
124734
|
+
"lastFetchedAt": "required",
|
|
124735
|
+
"power": "required",
|
|
124736
|
+
"starts": "required",
|
|
124737
|
+
"system": "required",
|
|
124738
|
+
"temperatures": "required",
|
|
124739
|
+
"waterPressureBar": "required"
|
|
124740
|
+
},
|
|
124741
|
+
"heating-valve": {
|
|
124742
|
+
"lastFetchedAt": "required",
|
|
124743
|
+
"position": "required"
|
|
124744
|
+
},
|
|
124745
|
+
"humidifier": {
|
|
124746
|
+
"action": "required",
|
|
124747
|
+
"availableModes": "required",
|
|
124748
|
+
"currentHumidity": "required",
|
|
124749
|
+
"lastChangedAt": "required",
|
|
124750
|
+
"maxHumidity": "required",
|
|
124751
|
+
"minHumidity": "required",
|
|
124752
|
+
"mode": "required",
|
|
124753
|
+
"on": "required",
|
|
124754
|
+
"targetHumidity": "required"
|
|
124755
|
+
},
|
|
124756
|
+
"humidity-sensor": {
|
|
124757
|
+
"humidity": "required",
|
|
124758
|
+
"lastFetchedAt": "required"
|
|
124759
|
+
},
|
|
124760
|
+
"image": {
|
|
124761
|
+
"lastUpdated": "required",
|
|
124762
|
+
"url": "required"
|
|
124763
|
+
},
|
|
124764
|
+
"image-settings": {
|
|
124765
|
+
"backlightMode": "optional",
|
|
124766
|
+
"brightness": "optional",
|
|
124767
|
+
"contrast": "optional",
|
|
124768
|
+
"exposureMode": "optional",
|
|
124769
|
+
"flip": "optional",
|
|
124770
|
+
"lastFetchedAt": "required",
|
|
124771
|
+
"mirror": "optional",
|
|
124772
|
+
"rotate": "optional",
|
|
124773
|
+
"saturation": "optional",
|
|
124774
|
+
"sharpness": "optional",
|
|
124775
|
+
"warmth": "optional",
|
|
124776
|
+
"whiteBalance": "optional"
|
|
124777
|
+
},
|
|
124778
|
+
"intercom": {
|
|
124779
|
+
"ability": "required",
|
|
124780
|
+
"lastSessionAt": "required",
|
|
124781
|
+
"talking": "required"
|
|
124782
|
+
},
|
|
124783
|
+
"ir-transmitter": {
|
|
124784
|
+
"lastFetchedAt": "required",
|
|
124785
|
+
"lastLearn": "required",
|
|
124786
|
+
"lastSend": "required"
|
|
124787
|
+
},
|
|
124788
|
+
"lawn-mower-control": {
|
|
124789
|
+
"activity": "required",
|
|
124790
|
+
"batteryLevel": "required",
|
|
124791
|
+
"currentCode": "required",
|
|
124792
|
+
"currentCodeLabel": "required",
|
|
124793
|
+
"lastChangedAt": "required",
|
|
124794
|
+
"progress": "required",
|
|
124795
|
+
"severity": "required"
|
|
124796
|
+
},
|
|
124797
|
+
"lock-control": {
|
|
124798
|
+
"codeRequired": "optional",
|
|
124799
|
+
"lastChangedAt": "required",
|
|
124800
|
+
"state": "required"
|
|
124801
|
+
},
|
|
124802
|
+
"low-power-sleep": {
|
|
124803
|
+
"lastContactAt": "optional",
|
|
124804
|
+
"lastUpdated": "required",
|
|
124805
|
+
"sleeping": "required"
|
|
124806
|
+
},
|
|
124807
|
+
"media-player": {
|
|
124808
|
+
"assumedFields": "optional",
|
|
124809
|
+
"availableSources": "required",
|
|
124810
|
+
"currentMedia": "required",
|
|
124811
|
+
"declaredSources": "optional",
|
|
124812
|
+
"duration": "required",
|
|
124813
|
+
"isMuted": "required",
|
|
124814
|
+
"lastChangedAt": "required",
|
|
124815
|
+
"muteReadback": "optional",
|
|
124816
|
+
"position": "required",
|
|
124817
|
+
"positionUpdatedAt": "optional",
|
|
124818
|
+
"repeat": "required",
|
|
124819
|
+
"shuffle": "required",
|
|
124820
|
+
"source": "required",
|
|
124821
|
+
"state": "required",
|
|
124822
|
+
"stateSource": "optional",
|
|
124823
|
+
"volumeLevel": "required"
|
|
124824
|
+
},
|
|
124825
|
+
"meter": {
|
|
124826
|
+
"lastFetchedAt": "required",
|
|
124827
|
+
"value": "required"
|
|
124828
|
+
},
|
|
124829
|
+
"motion": {
|
|
124830
|
+
"autoClearAfterMs": "required",
|
|
124831
|
+
"detected": "required",
|
|
124832
|
+
"lastDetectedAt": "required"
|
|
124833
|
+
},
|
|
124834
|
+
"motion-trigger": {
|
|
124835
|
+
"enabled": "required",
|
|
124836
|
+
"lastChangedAt": "required",
|
|
124837
|
+
"lastFetchedAt": "required"
|
|
124838
|
+
},
|
|
124839
|
+
"motion-zones": {
|
|
124840
|
+
"enabled": "required",
|
|
124841
|
+
"lastFetchedAt": "required",
|
|
124842
|
+
"regions": "required",
|
|
124843
|
+
"sensitivity": "required"
|
|
124844
|
+
},
|
|
124845
|
+
"native-object-detection": {
|
|
124846
|
+
"enabled": "required",
|
|
124847
|
+
"lastByClass": "required",
|
|
124848
|
+
"lastFetchedAt": "required",
|
|
124849
|
+
"supportedClasses": "required"
|
|
124850
|
+
},
|
|
124851
|
+
"navigation": {
|
|
124852
|
+
"flash": "required",
|
|
124853
|
+
"following": "required",
|
|
124854
|
+
"lastChangedAt": "required",
|
|
124855
|
+
"lastFetchedAt": "required",
|
|
124856
|
+
"lightLevel": "required",
|
|
124857
|
+
"lightMode": "required",
|
|
124858
|
+
"mode": "required"
|
|
124859
|
+
},
|
|
124860
|
+
"network-link": {
|
|
124861
|
+
"lastUpdated": "required",
|
|
124862
|
+
"linkUp": "optional",
|
|
124863
|
+
"rssi": "optional",
|
|
124864
|
+
"signal": "required",
|
|
124865
|
+
"speedKbps": "optional",
|
|
124866
|
+
"ssid": "optional",
|
|
124867
|
+
"type": "required"
|
|
124868
|
+
},
|
|
124869
|
+
"notifier": {
|
|
124870
|
+
"lastError": "required",
|
|
124871
|
+
"lastSentAt": "required",
|
|
124872
|
+
"queueDepth": "required",
|
|
124873
|
+
"supports": "required"
|
|
124874
|
+
},
|
|
124875
|
+
"numeric-sensor": {
|
|
124876
|
+
"lastFetchedAt": "required",
|
|
124877
|
+
"value": "required"
|
|
124878
|
+
},
|
|
124879
|
+
"pet-feeder": {
|
|
124880
|
+
"batteryPower": "required",
|
|
124881
|
+
"bowlFood": "required",
|
|
124882
|
+
"childLock": "required",
|
|
124883
|
+
"desiccantLeftDays": "required",
|
|
124884
|
+
"eating": "required",
|
|
124885
|
+
"error": "required",
|
|
124886
|
+
"errorCode": "required",
|
|
124887
|
+
"feeding": "required",
|
|
124888
|
+
"feedSound": "required",
|
|
124889
|
+
"food1": "required",
|
|
124890
|
+
"food2": "required",
|
|
124891
|
+
"foodLevel": "required",
|
|
124892
|
+
"indicatorLight": "required",
|
|
124893
|
+
"isDualHopper": "required",
|
|
124894
|
+
"lastFeedGrams": "required",
|
|
124895
|
+
"lastFeedHopper1": "required",
|
|
124896
|
+
"lastFeedHopper2": "required",
|
|
124897
|
+
"lastFetchedAt": "required",
|
|
124898
|
+
"lowFood": "required",
|
|
124899
|
+
"powerSource": "required",
|
|
124900
|
+
"status": "required",
|
|
124901
|
+
"supportsMarkRefilled": "required",
|
|
124902
|
+
"volume": "required"
|
|
124903
|
+
},
|
|
124904
|
+
"pet-fountain": {
|
|
124905
|
+
"empty": "required",
|
|
124906
|
+
"error": "required",
|
|
124907
|
+
"lastFetchedAt": "required",
|
|
124908
|
+
"pumpRunning": "required",
|
|
124909
|
+
"waterLevel": "required",
|
|
124910
|
+
"waterVolume": "required"
|
|
124911
|
+
},
|
|
124912
|
+
"power-meter": {
|
|
124913
|
+
"apparentPower": "optional",
|
|
124914
|
+
"current": "optional",
|
|
124915
|
+
"deliveredPower": "optional",
|
|
124916
|
+
"energy": "optional",
|
|
124917
|
+
"lastFetchedAt": "required",
|
|
124918
|
+
"power": "optional",
|
|
124919
|
+
"powerFactor": "optional",
|
|
124920
|
+
"voltage": "optional"
|
|
124921
|
+
},
|
|
124922
|
+
"power-source": {
|
|
124923
|
+
"lastFetchedAt": "required",
|
|
124924
|
+
"offSeconds": "required",
|
|
124925
|
+
"switchOn": "required"
|
|
124926
|
+
},
|
|
124927
|
+
"presence": {
|
|
124928
|
+
"gps": "required",
|
|
124929
|
+
"lastChangedAt": "required",
|
|
124930
|
+
"location": "required",
|
|
124931
|
+
"state": "required"
|
|
124932
|
+
},
|
|
124933
|
+
"pressure-sensor": {
|
|
124934
|
+
"lastFetchedAt": "required",
|
|
124935
|
+
"pressure": "required"
|
|
124936
|
+
},
|
|
124937
|
+
"privacy-mask": {
|
|
124938
|
+
"audioEnabled": "required",
|
|
124939
|
+
"enabled": "required",
|
|
124940
|
+
"lastFetchedAt": "required",
|
|
124941
|
+
"regions": "required"
|
|
124942
|
+
},
|
|
124943
|
+
"ptz-autotrack": {
|
|
124944
|
+
"currentSettings": "required",
|
|
124945
|
+
"enabled": "required",
|
|
124946
|
+
"lastChangedAt": "required",
|
|
124947
|
+
"lastFetchedAt": "required",
|
|
124948
|
+
"supportedTargetTypes": "required"
|
|
124949
|
+
},
|
|
124950
|
+
"pump-cycle": {
|
|
124951
|
+
"enabled": "required",
|
|
124952
|
+
"lastFetchedAt": "required",
|
|
124953
|
+
"offTime": "required",
|
|
124954
|
+
"onTime": "required"
|
|
124955
|
+
},
|
|
124956
|
+
"recording-onboard": {
|
|
124957
|
+
"enabled": "required",
|
|
124958
|
+
"lastFetchedAt": "required",
|
|
124959
|
+
"overwriteWhenFull": "required",
|
|
124960
|
+
"postRecordSec": "required",
|
|
124961
|
+
"preRecordSec": "required",
|
|
124962
|
+
"primaryTrackId": "required",
|
|
124963
|
+
"recordingToNowhere": "required",
|
|
124964
|
+
"segmentMinutes": "required",
|
|
124965
|
+
"storage": "required",
|
|
124966
|
+
"tracks": "required",
|
|
124967
|
+
"unreadableWindows": "required",
|
|
124968
|
+
"windows": "required"
|
|
124969
|
+
},
|
|
124970
|
+
"recording-signal": {
|
|
124971
|
+
"active": "required",
|
|
124972
|
+
"lastChangedAt": "required",
|
|
124973
|
+
"lastFetchedAt": "required",
|
|
124974
|
+
"reason": "required"
|
|
124975
|
+
},
|
|
124976
|
+
"running-state": {
|
|
124977
|
+
"lastFetchedAt": "required",
|
|
124978
|
+
"phase": "required",
|
|
124979
|
+
"running": "required",
|
|
124980
|
+
"since": "required",
|
|
124981
|
+
"source": "required"
|
|
124982
|
+
},
|
|
124983
|
+
"scene-monitor": {
|
|
124984
|
+
"lastFetchedAt": "required",
|
|
124985
|
+
"monitors": "required"
|
|
124986
|
+
},
|
|
124987
|
+
"script-runner": {
|
|
124988
|
+
"isRunning": "required",
|
|
124989
|
+
"lastChangedAt": "required",
|
|
124990
|
+
"lastError": "required",
|
|
124991
|
+
"lastRunAt": "required",
|
|
124992
|
+
"lastRunSuccess": "required"
|
|
124993
|
+
},
|
|
124994
|
+
"siren": {
|
|
124995
|
+
"active": "required",
|
|
124996
|
+
"activeUntil": "required",
|
|
124997
|
+
"activeUntilEstimated": "optional",
|
|
124998
|
+
"durationSeconds": "required",
|
|
124999
|
+
"lastFetchedAt": "required",
|
|
125000
|
+
"lastTriggeredAt": "required",
|
|
125001
|
+
"plays": "optional"
|
|
125002
|
+
},
|
|
125003
|
+
"smoke": {
|
|
125004
|
+
"detected": "required",
|
|
125005
|
+
"lastChangedAt": "required"
|
|
125006
|
+
},
|
|
125007
|
+
"stream-catalog": {
|
|
125008
|
+
"descriptors": "required",
|
|
125009
|
+
"lastFetchedAt": "required"
|
|
125010
|
+
},
|
|
125011
|
+
"stream-params": {
|
|
125012
|
+
"ext": "optional",
|
|
125013
|
+
"lastFetchedAt": "required",
|
|
125014
|
+
"main": "optional",
|
|
125015
|
+
"sub": "optional"
|
|
125016
|
+
},
|
|
125017
|
+
"stream-signals": {
|
|
125018
|
+
"lastFetchedAt": "required",
|
|
125019
|
+
"signals": "required"
|
|
125020
|
+
},
|
|
125021
|
+
"switch": {
|
|
125022
|
+
"lastChangedAt": "required",
|
|
125023
|
+
"on": "required"
|
|
125024
|
+
},
|
|
125025
|
+
"tamper": {
|
|
125026
|
+
"lastChangedAt": "required",
|
|
125027
|
+
"tampered": "required"
|
|
125028
|
+
},
|
|
125029
|
+
"temperature-sensor": {
|
|
125030
|
+
"lastFetchedAt": "required",
|
|
125031
|
+
"temperature": "required"
|
|
125032
|
+
},
|
|
125033
|
+
"timed-run": {
|
|
125034
|
+
"activeUntil": "required",
|
|
125035
|
+
"lastFetchedAt": "required",
|
|
125036
|
+
"quickRun": "required",
|
|
125037
|
+
"requestedBy": "required"
|
|
125038
|
+
},
|
|
125039
|
+
"update": {
|
|
125040
|
+
"availableVersion": "required",
|
|
125041
|
+
"currentVersion": "required",
|
|
125042
|
+
"inProgress": "required",
|
|
125043
|
+
"state": "required",
|
|
125044
|
+
"updatable": "required"
|
|
125045
|
+
},
|
|
125046
|
+
"vacuum-control": {
|
|
125047
|
+
"availableFanSpeeds": "required",
|
|
125048
|
+
"batteryLevel": "required",
|
|
125049
|
+
"errorCode": "required",
|
|
125050
|
+
"errorLabel": "required",
|
|
125051
|
+
"fanSpeed": "required",
|
|
125052
|
+
"lastChangedAt": "required",
|
|
125053
|
+
"progress": "required",
|
|
125054
|
+
"state": "required"
|
|
125055
|
+
},
|
|
125056
|
+
"valve": {
|
|
125057
|
+
"lastChangedAt": "required",
|
|
125058
|
+
"position": "required",
|
|
125059
|
+
"state": "required"
|
|
125060
|
+
},
|
|
125061
|
+
"vibration": {
|
|
125062
|
+
"detected": "required",
|
|
125063
|
+
"lastChangedAt": "required"
|
|
125064
|
+
},
|
|
125065
|
+
"water-heater": {
|
|
125066
|
+
"availableModes": "required",
|
|
125067
|
+
"away": "required",
|
|
125068
|
+
"currentTemp": "required",
|
|
125069
|
+
"lastActiveMode": "optional",
|
|
125070
|
+
"lastChangedAt": "required",
|
|
125071
|
+
"maxTemp": "required",
|
|
125072
|
+
"minTemp": "required",
|
|
125073
|
+
"operationMode": "required",
|
|
125074
|
+
"targetTemp": "required"
|
|
125075
|
+
},
|
|
125076
|
+
"weather": {
|
|
125077
|
+
"condition": "required",
|
|
125078
|
+
"humidity": "required",
|
|
125079
|
+
"lastFetchedAt": "required",
|
|
125080
|
+
"pressure": "required",
|
|
125081
|
+
"temperature": "required",
|
|
125082
|
+
"windBearing": "required",
|
|
125083
|
+
"windSpeed": "required"
|
|
125084
|
+
},
|
|
125085
|
+
"weather-station": {
|
|
125086
|
+
"dewPoint": "optional",
|
|
125087
|
+
"feelsLike": "optional",
|
|
125088
|
+
"humidity": "optional",
|
|
125089
|
+
"lastFetchedAt": "required",
|
|
125090
|
+
"pressure": "optional",
|
|
125091
|
+
"rain24h": "optional",
|
|
125092
|
+
"rainDaily": "optional",
|
|
125093
|
+
"rainEvent": "optional",
|
|
125094
|
+
"rainMonthly": "optional",
|
|
125095
|
+
"rainRate": "optional",
|
|
125096
|
+
"rainWeekly": "optional",
|
|
125097
|
+
"rainYearly": "optional",
|
|
125098
|
+
"solarRadiation": "optional",
|
|
125099
|
+
"temperature": "optional",
|
|
125100
|
+
"uv": "optional",
|
|
125101
|
+
"vpd": "optional",
|
|
125102
|
+
"windBearing": "optional",
|
|
125103
|
+
"windBearingAvg": "optional",
|
|
125104
|
+
"windGust": "optional",
|
|
125105
|
+
"windGustMax": "optional",
|
|
125106
|
+
"windSpeed": "optional"
|
|
125107
|
+
},
|
|
125108
|
+
"workload": {
|
|
125109
|
+
"addresses": "required",
|
|
125110
|
+
"autostart": "required",
|
|
125111
|
+
"hostDeviceId": "required",
|
|
125112
|
+
"image": "required",
|
|
125113
|
+
"lastFetchedAt": "required",
|
|
125114
|
+
"os": "required",
|
|
125115
|
+
"ports": "required",
|
|
125116
|
+
"resources": "required",
|
|
125117
|
+
"since": "required",
|
|
125118
|
+
"state": "required",
|
|
125119
|
+
"updateAvailable": "required",
|
|
125120
|
+
"version": "required"
|
|
125121
|
+
},
|
|
125122
|
+
"zone-analytics": {
|
|
125123
|
+
"frame": "required",
|
|
125124
|
+
"frameHeight": "required",
|
|
125125
|
+
"frameWidth": "required",
|
|
125126
|
+
"stationaryObjects": "optional",
|
|
125127
|
+
"ts": "required",
|
|
125128
|
+
"unzoned": "required",
|
|
125129
|
+
"zones": "required"
|
|
125130
|
+
},
|
|
125131
|
+
"zone-rules": {
|
|
125132
|
+
"detection": "required",
|
|
125133
|
+
"motion": "required",
|
|
125134
|
+
"package": "required"
|
|
125135
|
+
},
|
|
125136
|
+
"zones": { "zones": "required" }
|
|
125137
|
+
});
|
|
124494
125138
|
Object.freeze({
|
|
124495
125139
|
"actions": { "run": 363e4 },
|
|
124496
125140
|
"audio-analyzer": { "classify": 3e4 },
|
|
@@ -128357,16 +129001,32 @@ var MigrationPlanSchema = object({ edits: array(discriminatedUnion("op", [
|
|
|
128357
129001
|
}),
|
|
128358
129002
|
object({
|
|
128359
129003
|
op: literal("upsertRecord"),
|
|
129004
|
+
owner: string().min(1),
|
|
128360
129005
|
kind: string().min(1),
|
|
128361
129006
|
recordKey: string().min(1),
|
|
128362
|
-
|
|
129007
|
+
deviceId: number$1().int().positive().optional(),
|
|
129008
|
+
at: number$1().int().nonnegative().optional(),
|
|
129009
|
+
value: record(string(), unknown()),
|
|
128363
129010
|
precondition: PreconditionSchema
|
|
128364
129011
|
}),
|
|
128365
129012
|
object({
|
|
128366
129013
|
op: literal("deleteRecord"),
|
|
129014
|
+
owner: string().min(1),
|
|
128367
129015
|
kind: string().min(1),
|
|
128368
129016
|
recordKey: string().min(1),
|
|
128369
129017
|
precondition: PreconditionSchema
|
|
129018
|
+
}),
|
|
129019
|
+
object({
|
|
129020
|
+
op: literal("rekeyDevice"),
|
|
129021
|
+
deviceId: number$1().int().positive(),
|
|
129022
|
+
addonId: string().min(1),
|
|
129023
|
+
stableId: string().min(1),
|
|
129024
|
+
precondition: PreconditionSchema
|
|
129025
|
+
}),
|
|
129026
|
+
object({
|
|
129027
|
+
op: literal("tombstoneDevice"),
|
|
129028
|
+
deviceId: number$1().int().positive(),
|
|
129029
|
+
precondition: PreconditionSchema
|
|
128370
129030
|
})
|
|
128371
129031
|
])) });
|
|
128372
129032
|
/** `JSON.stringify` with object keys sorted, so equal values spell the same. */
|
|
@@ -129610,6 +130270,16 @@ var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
|
129610
130270
|
* question to answer as a continuous one.
|
|
129611
130271
|
*/
|
|
129612
130272
|
var RecordingBandAudioSchema = _enum(["on", "muted"]);
|
|
130273
|
+
/**
|
|
130274
|
+
* A battery condition on a band: the band covers a charge level only when
|
|
130275
|
+
* `min <= level < max` (half-open; a missing bound is unbounded). OPTIONAL —
|
|
130276
|
+
* an absent key means "any charge", which is what every config written before
|
|
130277
|
+
* it meant. A band WITH a condition is never met while the charge is unknown.
|
|
130278
|
+
*/
|
|
130279
|
+
var RecordingBandBatterySchema = object({
|
|
130280
|
+
min: number$1().min(0).max(100).optional(),
|
|
130281
|
+
max: number$1().min(0).max(100).optional()
|
|
130282
|
+
});
|
|
129613
130283
|
var RecordingBandSchema = object({
|
|
129614
130284
|
days: array(RecordingWeekdaySchema),
|
|
129615
130285
|
start: string().regex(HHMM),
|
|
@@ -129621,6 +130291,7 @@ var RecordingBandSchema = object({
|
|
|
129621
130291
|
* missing must keep meaning what it meant. See {@link RecordingBandAudioSchema}.
|
|
129622
130292
|
*/
|
|
129623
130293
|
audio: RecordingBandAudioSchema.optional(),
|
|
130294
|
+
battery: RecordingBandBatterySchema.optional(),
|
|
129624
130295
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
129625
130296
|
/**
|
|
129626
130297
|
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
@@ -162525,7 +163196,7 @@ var HISTORY_PRIMARY = {
|
|
|
162525
163196
|
}
|
|
162526
163197
|
};
|
|
162527
163198
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
162528
|
-
var PowerSourceRefusalReasonSchema = _enum([
|
|
163199
|
+
var PowerSourceRefusalReasonSchema$1 = _enum([
|
|
162529
163200
|
"no-power-source",
|
|
162530
163201
|
"switch-missing",
|
|
162531
163202
|
"switch-offline",
|
|
@@ -162540,7 +163211,7 @@ var PowerSourceRefusalReasonSchema = _enum([
|
|
|
162540
163211
|
]);
|
|
162541
163212
|
var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
|
|
162542
163213
|
accepted: literal(false),
|
|
162543
|
-
reason: PowerSourceRefusalReasonSchema,
|
|
163214
|
+
reason: PowerSourceRefusalReasonSchema$1,
|
|
162544
163215
|
/** One line for the operator, naming the switch. */
|
|
162545
163216
|
message: string()
|
|
162546
163217
|
})]);
|
|
@@ -186825,6 +187496,7 @@ var HardwareClassIdSchema = _enum([
|
|
|
186825
187496
|
"apple-m-base",
|
|
186826
187497
|
"apple-m-pro",
|
|
186827
187498
|
"amd-phoenix",
|
|
187499
|
+
"nvidia-gpu",
|
|
186828
187500
|
"unknown"
|
|
186829
187501
|
]);
|
|
186830
187502
|
var AcceleratorKindSchema = _enum([
|
|
@@ -186832,6 +187504,7 @@ var AcceleratorKindSchema = _enum([
|
|
|
186832
187504
|
"intel-igpu",
|
|
186833
187505
|
"amd-igpu",
|
|
186834
187506
|
"amd-npu",
|
|
187507
|
+
"nvidia-gpu",
|
|
186835
187508
|
"x86-cpu",
|
|
186836
187509
|
"arm-cpu",
|
|
186837
187510
|
"apple-ane",
|
|
@@ -228571,46 +229244,6 @@ var IntercomFailureReport = class {
|
|
|
228571
229244
|
/** The process-wide instance every camera in this addon notes into. */
|
|
228572
229245
|
var intercomFailureReport = new IntercomFailureReport();
|
|
228573
229246
|
//#endregion
|
|
228574
|
-
//#region src/clips/clip-time-zone.ts
|
|
228575
|
-
function isUsableTimeZone(timeZone) {
|
|
228576
|
-
try {
|
|
228577
|
-
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
228578
|
-
return true;
|
|
228579
|
-
} catch {
|
|
228580
|
-
return false;
|
|
228581
|
-
}
|
|
228582
|
-
}
|
|
228583
|
-
/**
|
|
228584
|
-
* @param candidate the zone the process reports
|
|
228585
|
-
* @param cameraZone a zone derived from the camera's reported UTC offset, if any
|
|
228586
|
-
*/
|
|
228587
|
-
function resolveClipTimeZone(candidate, cameraZone) {
|
|
228588
|
-
if (isUsableTimeZone(candidate)) return { timeZone: candidate };
|
|
228589
|
-
if (cameraZone !== void 0 && isUsableTimeZone(cameraZone)) return {
|
|
228590
|
-
timeZone: cameraZone,
|
|
228591
|
-
rejected: candidate
|
|
228592
|
-
};
|
|
228593
|
-
return {
|
|
228594
|
-
timeZone: "UTC",
|
|
228595
|
-
rejected: candidate
|
|
228596
|
-
};
|
|
228597
|
-
}
|
|
228598
|
-
/** Resolve and, when the candidate was refused, warn ONCE per `warned` holder. */
|
|
228599
|
-
function resolveClipTimeZoneOnce(candidate, cameraZone, logger, deviceId, warned) {
|
|
228600
|
-
const res = resolveClipTimeZone(candidate, cameraZone);
|
|
228601
|
-
if (res.rejected !== void 0 && !warned.done) {
|
|
228602
|
-
warned.done = true;
|
|
228603
|
-
logger.warn("clip catalog: the process time zone is not usable, using a fallback", {
|
|
228604
|
-
tags: { deviceId },
|
|
228605
|
-
meta: {
|
|
228606
|
-
rejectedTimeZone: res.rejected,
|
|
228607
|
-
fallbackTimeZone: res.timeZone
|
|
228608
|
-
}
|
|
228609
|
-
});
|
|
228610
|
-
}
|
|
228611
|
-
return res.timeZone;
|
|
228612
|
-
}
|
|
228613
|
-
//#endregion
|
|
228614
229247
|
//#region src/baichuan-webhook-shared.ts
|
|
228615
229248
|
/** The data-plane prefix this addon serves the camera push on: `/addon/<addonId>/webhook/<stableId>`. */
|
|
228616
229249
|
var BAICHUAN_WEBHOOK_PREFIX = "webhook";
|
|
@@ -229010,6 +229643,46 @@ async function refreshSnapshotCacheOnce(input) {
|
|
|
229010
229643
|
return true;
|
|
229011
229644
|
}
|
|
229012
229645
|
//#endregion
|
|
229646
|
+
//#region src/clips/clip-time-zone.ts
|
|
229647
|
+
function isUsableTimeZone(timeZone) {
|
|
229648
|
+
try {
|
|
229649
|
+
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
229650
|
+
return true;
|
|
229651
|
+
} catch {
|
|
229652
|
+
return false;
|
|
229653
|
+
}
|
|
229654
|
+
}
|
|
229655
|
+
/**
|
|
229656
|
+
* @param candidate the zone the process reports
|
|
229657
|
+
* @param cameraZone a zone derived from the camera's reported UTC offset, if any
|
|
229658
|
+
*/
|
|
229659
|
+
function resolveClipTimeZone(candidate, cameraZone) {
|
|
229660
|
+
if (isUsableTimeZone(candidate)) return { timeZone: candidate };
|
|
229661
|
+
if (cameraZone !== void 0 && isUsableTimeZone(cameraZone)) return {
|
|
229662
|
+
timeZone: cameraZone,
|
|
229663
|
+
rejected: candidate
|
|
229664
|
+
};
|
|
229665
|
+
return {
|
|
229666
|
+
timeZone: "UTC",
|
|
229667
|
+
rejected: candidate
|
|
229668
|
+
};
|
|
229669
|
+
}
|
|
229670
|
+
/** Resolve and, when the candidate was refused, warn ONCE per `warned` holder. */
|
|
229671
|
+
function resolveClipTimeZoneOnce(candidate, cameraZone, logger, deviceId, warned) {
|
|
229672
|
+
const res = resolveClipTimeZone(candidate, cameraZone);
|
|
229673
|
+
if (res.rejected !== void 0 && !warned.done) {
|
|
229674
|
+
warned.done = true;
|
|
229675
|
+
logger.warn("clip catalog: the process time zone is not usable, using a fallback", {
|
|
229676
|
+
tags: { deviceId },
|
|
229677
|
+
meta: {
|
|
229678
|
+
rejectedTimeZone: res.rejected,
|
|
229679
|
+
fallbackTimeZone: res.timeZone
|
|
229680
|
+
}
|
|
229681
|
+
});
|
|
229682
|
+
}
|
|
229683
|
+
return res.timeZone;
|
|
229684
|
+
}
|
|
229685
|
+
//#endregion
|
|
229013
229686
|
//#region src/day-night-mapping.ts
|
|
229014
229687
|
/**
|
|
229015
229688
|
* Maps between the vendor-neutral `day-night` cap's `DayNightMode` and
|
|
@@ -229112,6 +229785,114 @@ function deriveReolinkCameraFeatures(inputs) {
|
|
|
229112
229785
|
return out;
|
|
229113
229786
|
}
|
|
229114
229787
|
//#endregion
|
|
229788
|
+
//#region src/hub-child-settings.ts
|
|
229789
|
+
/**
|
|
229790
|
+
* A camera adopted under an NVR / Home Hub dials through the integration's session: the address
|
|
229791
|
+
* and the credentials belong to the integration, never to the camera. These are the per-camera
|
|
229792
|
+
* keys a hub child must refuse to change.
|
|
229793
|
+
*/
|
|
229794
|
+
var HUB_CHILD_CONNECTION_KEYS = [
|
|
229795
|
+
"host",
|
|
229796
|
+
"port",
|
|
229797
|
+
"username",
|
|
229798
|
+
"password"
|
|
229799
|
+
];
|
|
229800
|
+
/**
|
|
229801
|
+
* Sections that act on the hub itself (no channel in the call) or on the per-camera connection,
|
|
229802
|
+
* hidden for a hub child:
|
|
229803
|
+
* - `connection`: the per-camera address and credentials (the integration owns them);
|
|
229804
|
+
* - `network-ports`: `setPortConfig` rewrites the NVR's own service ports;
|
|
229805
|
+
* - `time-ntp`: `setNtp` / `setSystemGeneral` / `setDst` rewrite the NVR's clock.
|
|
229806
|
+
*/
|
|
229807
|
+
var HUB_CHILD_HIDDEN_SECTION_IDS = [
|
|
229808
|
+
"connection",
|
|
229809
|
+
"network-ports",
|
|
229810
|
+
"time-ntp"
|
|
229811
|
+
];
|
|
229812
|
+
/** Thrown by `applySettingsPatch` for a refused hub-child patch; carries the typed reason. */
|
|
229813
|
+
var HubChildPatchRefusedError = class extends Error {
|
|
229814
|
+
refusal;
|
|
229815
|
+
constructor(refusal) {
|
|
229816
|
+
super(describeRefusal(refusal));
|
|
229817
|
+
this.refusal = refusal;
|
|
229818
|
+
this.name = "HubChildPatchRefusedError";
|
|
229819
|
+
}
|
|
229820
|
+
};
|
|
229821
|
+
function describeRefusal(refusal) {
|
|
229822
|
+
switch (refusal.reason) {
|
|
229823
|
+
case "connection-owned-by-integration": return `This camera is connected through its NVR / Home Hub integration: ${refusal.keys.join(", ")} can only be changed on the integration`;
|
|
229824
|
+
case "channel-not-an-integer": return `The hub channel must be a whole number, got ${String(refusal.value)}`;
|
|
229825
|
+
case "channel-out-of-range": return `Channel ${refusal.value} is not one of the hub's channels (${refusal.channels.join(", ")})`;
|
|
229826
|
+
}
|
|
229827
|
+
}
|
|
229828
|
+
/**
|
|
229829
|
+
* Judge a settings patch against the hub-child rules. `channels` is the hub's last good channel
|
|
229830
|
+
* list (empty when unknown — then only the integer rule applies).
|
|
229831
|
+
*/
|
|
229832
|
+
function judgeHubChildPatch(patch, channels) {
|
|
229833
|
+
const touched = HUB_CHILD_CONNECTION_KEYS.filter((k) => patch[k] !== void 0);
|
|
229834
|
+
if (touched.length > 0) return {
|
|
229835
|
+
reason: "connection-owned-by-integration",
|
|
229836
|
+
keys: touched
|
|
229837
|
+
};
|
|
229838
|
+
if (patch["channel"] === void 0) return null;
|
|
229839
|
+
const value = patch["channel"];
|
|
229840
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) return {
|
|
229841
|
+
reason: "channel-not-an-integer",
|
|
229842
|
+
value
|
|
229843
|
+
};
|
|
229844
|
+
if (channels.length > 0 && !channels.includes(value)) return {
|
|
229845
|
+
reason: "channel-out-of-range",
|
|
229846
|
+
value,
|
|
229847
|
+
channels
|
|
229848
|
+
};
|
|
229849
|
+
return null;
|
|
229850
|
+
}
|
|
229851
|
+
/** What a hub child shows before its session has read the hub's channel list. */
|
|
229852
|
+
var EMPTY_HUB_CHANNEL_SNAPSHOT = {
|
|
229853
|
+
channels: [],
|
|
229854
|
+
lastRefreshAt: null,
|
|
229855
|
+
lastError: null
|
|
229856
|
+
};
|
|
229857
|
+
/** The hub-child "Hub" section: which hub, and the one editable connection field, the channel. */
|
|
229858
|
+
function buildHubChildSection(snapshot) {
|
|
229859
|
+
return {
|
|
229860
|
+
id: "hub",
|
|
229861
|
+
tab: "general",
|
|
229862
|
+
title: "Hub",
|
|
229863
|
+
titleKey: "provider-reolink:schema.s_hub.title",
|
|
229864
|
+
description: "This camera is connected through its NVR / Home Hub. Address and credentials belong to that integration; the channel is kept in line with the hub automatically.",
|
|
229865
|
+
descriptionKey: "provider-reolink:schema.s_hub.description",
|
|
229866
|
+
columns: 2,
|
|
229867
|
+
fields: [{
|
|
229868
|
+
type: "text",
|
|
229869
|
+
key: "hubName",
|
|
229870
|
+
label: "Connected to",
|
|
229871
|
+
labelKey: "provider-reolink:schema.s_hub.hubName.label",
|
|
229872
|
+
disabled: true
|
|
229873
|
+
}, {
|
|
229874
|
+
type: "number",
|
|
229875
|
+
key: "channel",
|
|
229876
|
+
label: "Hub channel",
|
|
229877
|
+
labelKey: "provider-reolink:schema.s_hub.channel.label",
|
|
229878
|
+
min: 0,
|
|
229879
|
+
...snapshot.channels.length > 0 ? { max: Math.max(...snapshot.channels.map((c) => c.channel)) } : {},
|
|
229880
|
+
step: 1
|
|
229881
|
+
}]
|
|
229882
|
+
};
|
|
229883
|
+
}
|
|
229884
|
+
/** Replace the connection/hub-acting sections of a standalone schema with the Hub section. */
|
|
229885
|
+
function applyHubChildSections(sections, snapshot) {
|
|
229886
|
+
const kept = sections.filter((s) => !HUB_CHILD_HIDDEN_SECTION_IDS.includes(s.id));
|
|
229887
|
+
const at = kept.findIndex((s) => s.id === "driver-refresh");
|
|
229888
|
+
const hub = buildHubChildSection(snapshot);
|
|
229889
|
+
return at < 0 ? [hub, ...kept] : [
|
|
229890
|
+
...kept.slice(0, at + 1),
|
|
229891
|
+
hub,
|
|
229892
|
+
...kept.slice(at + 1)
|
|
229893
|
+
];
|
|
229894
|
+
}
|
|
229895
|
+
//#endregion
|
|
229115
229896
|
//#region src/image-settings-mapping.ts
|
|
229116
229897
|
/**
|
|
229117
229898
|
* Reolink's `InputAdvanceCfg.Exposure.mode` (Baichuan cmdId 25/26, via
|
|
@@ -230898,114 +231679,6 @@ function registerHubChildStateRefresh(target) {
|
|
|
230898
231679
|
}, { stateRefresh: hubChildRefreshPolicy(integrationId) });
|
|
230899
231680
|
}
|
|
230900
231681
|
//#endregion
|
|
230901
|
-
//#region src/hub-child-settings.ts
|
|
230902
|
-
/**
|
|
230903
|
-
* A camera adopted under an NVR / Home Hub dials through the integration's session: the address
|
|
230904
|
-
* and the credentials belong to the integration, never to the camera. These are the per-camera
|
|
230905
|
-
* keys a hub child must refuse to change.
|
|
230906
|
-
*/
|
|
230907
|
-
var HUB_CHILD_CONNECTION_KEYS = [
|
|
230908
|
-
"host",
|
|
230909
|
-
"port",
|
|
230910
|
-
"username",
|
|
230911
|
-
"password"
|
|
230912
|
-
];
|
|
230913
|
-
/**
|
|
230914
|
-
* Sections that act on the hub itself (no channel in the call) or on the per-camera connection,
|
|
230915
|
-
* hidden for a hub child:
|
|
230916
|
-
* - `connection`: the per-camera address and credentials (the integration owns them);
|
|
230917
|
-
* - `network-ports`: `setPortConfig` rewrites the NVR's own service ports;
|
|
230918
|
-
* - `time-ntp`: `setNtp` / `setSystemGeneral` / `setDst` rewrite the NVR's clock.
|
|
230919
|
-
*/
|
|
230920
|
-
var HUB_CHILD_HIDDEN_SECTION_IDS = [
|
|
230921
|
-
"connection",
|
|
230922
|
-
"network-ports",
|
|
230923
|
-
"time-ntp"
|
|
230924
|
-
];
|
|
230925
|
-
/** Thrown by `applySettingsPatch` for a refused hub-child patch; carries the typed reason. */
|
|
230926
|
-
var HubChildPatchRefusedError = class extends Error {
|
|
230927
|
-
refusal;
|
|
230928
|
-
constructor(refusal) {
|
|
230929
|
-
super(describeRefusal(refusal));
|
|
230930
|
-
this.refusal = refusal;
|
|
230931
|
-
this.name = "HubChildPatchRefusedError";
|
|
230932
|
-
}
|
|
230933
|
-
};
|
|
230934
|
-
function describeRefusal(refusal) {
|
|
230935
|
-
switch (refusal.reason) {
|
|
230936
|
-
case "connection-owned-by-integration": return `This camera is connected through its NVR / Home Hub integration: ${refusal.keys.join(", ")} can only be changed on the integration`;
|
|
230937
|
-
case "channel-not-an-integer": return `The hub channel must be a whole number, got ${String(refusal.value)}`;
|
|
230938
|
-
case "channel-out-of-range": return `Channel ${refusal.value} is not one of the hub's channels (${refusal.channels.join(", ")})`;
|
|
230939
|
-
}
|
|
230940
|
-
}
|
|
230941
|
-
/**
|
|
230942
|
-
* Judge a settings patch against the hub-child rules. `channels` is the hub's last good channel
|
|
230943
|
-
* list (empty when unknown — then only the integer rule applies).
|
|
230944
|
-
*/
|
|
230945
|
-
function judgeHubChildPatch(patch, channels) {
|
|
230946
|
-
const touched = HUB_CHILD_CONNECTION_KEYS.filter((k) => patch[k] !== void 0);
|
|
230947
|
-
if (touched.length > 0) return {
|
|
230948
|
-
reason: "connection-owned-by-integration",
|
|
230949
|
-
keys: touched
|
|
230950
|
-
};
|
|
230951
|
-
if (patch["channel"] === void 0) return null;
|
|
230952
|
-
const value = patch["channel"];
|
|
230953
|
-
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) return {
|
|
230954
|
-
reason: "channel-not-an-integer",
|
|
230955
|
-
value
|
|
230956
|
-
};
|
|
230957
|
-
if (channels.length > 0 && !channels.includes(value)) return {
|
|
230958
|
-
reason: "channel-out-of-range",
|
|
230959
|
-
value,
|
|
230960
|
-
channels
|
|
230961
|
-
};
|
|
230962
|
-
return null;
|
|
230963
|
-
}
|
|
230964
|
-
/** What a hub child shows before its session has read the hub's channel list. */
|
|
230965
|
-
var EMPTY_HUB_CHANNEL_SNAPSHOT = {
|
|
230966
|
-
channels: [],
|
|
230967
|
-
lastRefreshAt: null,
|
|
230968
|
-
lastError: null
|
|
230969
|
-
};
|
|
230970
|
-
/** The hub-child "Hub" section: which hub, and the one editable connection field, the channel. */
|
|
230971
|
-
function buildHubChildSection(snapshot) {
|
|
230972
|
-
return {
|
|
230973
|
-
id: "hub",
|
|
230974
|
-
tab: "general",
|
|
230975
|
-
title: "Hub",
|
|
230976
|
-
titleKey: "provider-reolink:schema.s_hub.title",
|
|
230977
|
-
description: "This camera is connected through its NVR / Home Hub. Address and credentials belong to that integration; the channel is kept in line with the hub automatically.",
|
|
230978
|
-
descriptionKey: "provider-reolink:schema.s_hub.description",
|
|
230979
|
-
columns: 2,
|
|
230980
|
-
fields: [{
|
|
230981
|
-
type: "text",
|
|
230982
|
-
key: "hubName",
|
|
230983
|
-
label: "Connected to",
|
|
230984
|
-
labelKey: "provider-reolink:schema.s_hub.hubName.label",
|
|
230985
|
-
disabled: true
|
|
230986
|
-
}, {
|
|
230987
|
-
type: "number",
|
|
230988
|
-
key: "channel",
|
|
230989
|
-
label: "Hub channel",
|
|
230990
|
-
labelKey: "provider-reolink:schema.s_hub.channel.label",
|
|
230991
|
-
min: 0,
|
|
230992
|
-
...snapshot.channels.length > 0 ? { max: Math.max(...snapshot.channels.map((c) => c.channel)) } : {},
|
|
230993
|
-
step: 1
|
|
230994
|
-
}]
|
|
230995
|
-
};
|
|
230996
|
-
}
|
|
230997
|
-
/** Replace the connection/hub-acting sections of a standalone schema with the Hub section. */
|
|
230998
|
-
function applyHubChildSections(sections, snapshot) {
|
|
230999
|
-
const kept = sections.filter((s) => !HUB_CHILD_HIDDEN_SECTION_IDS.includes(s.id));
|
|
231000
|
-
const at = kept.findIndex((s) => s.id === "driver-refresh");
|
|
231001
|
-
const hub = buildHubChildSection(snapshot);
|
|
231002
|
-
return at < 0 ? [hub, ...kept] : [
|
|
231003
|
-
...kept.slice(0, at + 1),
|
|
231004
|
-
hub,
|
|
231005
|
-
...kept.slice(at + 1)
|
|
231006
|
-
];
|
|
231007
|
-
}
|
|
231008
|
-
//#endregion
|
|
231009
231682
|
//#region src/sleep-state-decision.ts
|
|
231010
231683
|
/**
|
|
231011
231684
|
* Hysteresis is ASYMMETRIC, because the two directions have very different
|
|
@@ -233633,6 +234306,160 @@ function buildSupportedNativeClasses(aiDetectTypes, isSupportedClass) {
|
|
|
233633
234306
|
}
|
|
233634
234307
|
return classes;
|
|
233635
234308
|
}
|
|
234309
|
+
var PowerSourceModeSchema = _enum(["adapter", "battery"]);
|
|
234310
|
+
/** What a read says: a mode, or `unknown` when the read failed or the firmware is silent. */
|
|
234311
|
+
var PowerSourceReadingSchema = _enum([
|
|
234312
|
+
"adapter",
|
|
234313
|
+
"battery",
|
|
234314
|
+
"unknown"
|
|
234315
|
+
]);
|
|
234316
|
+
var ReadPowerSourceResultSchema = object({ source: PowerSourceReadingSchema });
|
|
234317
|
+
/** The device (or this code) declined before any real write was sent. */
|
|
234318
|
+
var PowerSourceRefusalReasonSchema = _enum(["dry-run-refused", "dry-run-failed"]);
|
|
234319
|
+
var SwitchPowerSourceResultSchema = discriminatedUnion("outcome", [
|
|
234320
|
+
object({
|
|
234321
|
+
outcome: literal("refused"),
|
|
234322
|
+
mode: PowerSourceModeSchema,
|
|
234323
|
+
reason: PowerSourceRefusalReasonSchema,
|
|
234324
|
+
before: PowerSourceReadingSchema
|
|
234325
|
+
}),
|
|
234326
|
+
object({
|
|
234327
|
+
outcome: literal("sent"),
|
|
234328
|
+
mode: PowerSourceModeSchema,
|
|
234329
|
+
/** The firmware accepted the command. NOT proof it took effect. */
|
|
234330
|
+
accepted: boolean(),
|
|
234331
|
+
before: PowerSourceReadingSchema,
|
|
234332
|
+
after: PowerSourceReadingSchema,
|
|
234333
|
+
/** True only when the read-back after the write equals the requested mode. */
|
|
234334
|
+
applied: boolean()
|
|
234335
|
+
}),
|
|
234336
|
+
object({
|
|
234337
|
+
outcome: literal("failed"),
|
|
234338
|
+
mode: PowerSourceModeSchema,
|
|
234339
|
+
/** The real write threw. It was sent once and is not retried. */
|
|
234340
|
+
error: string(),
|
|
234341
|
+
before: PowerSourceReadingSchema
|
|
234342
|
+
})
|
|
234343
|
+
]);
|
|
234344
|
+
function errorMessage(error) {
|
|
234345
|
+
return error instanceof Error ? error.message : String(error);
|
|
234346
|
+
}
|
|
234347
|
+
/** Read the power source; a failed or silent read is `unknown`. */
|
|
234348
|
+
async function readPowerSource(target) {
|
|
234349
|
+
const { api, channel, deviceId, logger } = target;
|
|
234350
|
+
try {
|
|
234351
|
+
const mode = await api.getPowerSource(channel);
|
|
234352
|
+
if (mode === void 0) {
|
|
234353
|
+
logger.info("power source: the firmware does not report it", {
|
|
234354
|
+
tags: { deviceId },
|
|
234355
|
+
meta: { channel }
|
|
234356
|
+
});
|
|
234357
|
+
return "unknown";
|
|
234358
|
+
}
|
|
234359
|
+
return mode;
|
|
234360
|
+
} catch (error) {
|
|
234361
|
+
logger.warn("power source: read failed, reporting unknown", {
|
|
234362
|
+
tags: { deviceId },
|
|
234363
|
+
meta: {
|
|
234364
|
+
channel,
|
|
234365
|
+
error: errorMessage(error)
|
|
234366
|
+
}
|
|
234367
|
+
});
|
|
234368
|
+
return "unknown";
|
|
234369
|
+
}
|
|
234370
|
+
}
|
|
234371
|
+
/**
|
|
234372
|
+
* Switch the power source: read, dry run, one real write, read back.
|
|
234373
|
+
* The write is sent at most once and never retried.
|
|
234374
|
+
*/
|
|
234375
|
+
async function switchPowerSourceTo(target, mode) {
|
|
234376
|
+
const { api, channel, deviceId, logger } = target;
|
|
234377
|
+
const before = await readPowerSource(target);
|
|
234378
|
+
logger.info("power source: switch requested", {
|
|
234379
|
+
tags: { deviceId },
|
|
234380
|
+
meta: {
|
|
234381
|
+
mode,
|
|
234382
|
+
before,
|
|
234383
|
+
channel
|
|
234384
|
+
}
|
|
234385
|
+
});
|
|
234386
|
+
let supported;
|
|
234387
|
+
try {
|
|
234388
|
+
supported = await api.probePowerSourceSwitchSupport(mode, { channel });
|
|
234389
|
+
} catch (error) {
|
|
234390
|
+
logger.warn("power source: dry run failed, no switch sent", {
|
|
234391
|
+
tags: { deviceId },
|
|
234392
|
+
meta: {
|
|
234393
|
+
mode,
|
|
234394
|
+
error: errorMessage(error)
|
|
234395
|
+
}
|
|
234396
|
+
});
|
|
234397
|
+
return {
|
|
234398
|
+
outcome: "refused",
|
|
234399
|
+
mode,
|
|
234400
|
+
reason: "dry-run-failed",
|
|
234401
|
+
before
|
|
234402
|
+
};
|
|
234403
|
+
}
|
|
234404
|
+
if (!supported) {
|
|
234405
|
+
logger.warn("power source: the device refused the dry run, no switch sent", {
|
|
234406
|
+
tags: { deviceId },
|
|
234407
|
+
meta: {
|
|
234408
|
+
mode,
|
|
234409
|
+
before
|
|
234410
|
+
}
|
|
234411
|
+
});
|
|
234412
|
+
return {
|
|
234413
|
+
outcome: "refused",
|
|
234414
|
+
mode,
|
|
234415
|
+
reason: "dry-run-refused",
|
|
234416
|
+
before
|
|
234417
|
+
};
|
|
234418
|
+
}
|
|
234419
|
+
let result;
|
|
234420
|
+
try {
|
|
234421
|
+
result = await api.switchPowerSource(mode, { channel });
|
|
234422
|
+
} catch (error) {
|
|
234423
|
+
logger.error("power source: the switch threw; it is not retried", {
|
|
234424
|
+
tags: { deviceId },
|
|
234425
|
+
meta: {
|
|
234426
|
+
mode,
|
|
234427
|
+
error: errorMessage(error)
|
|
234428
|
+
}
|
|
234429
|
+
});
|
|
234430
|
+
return {
|
|
234431
|
+
outcome: "failed",
|
|
234432
|
+
mode,
|
|
234433
|
+
error: errorMessage(error),
|
|
234434
|
+
before
|
|
234435
|
+
};
|
|
234436
|
+
}
|
|
234437
|
+
const after = await readPowerSource(target);
|
|
234438
|
+
const applied = result.accepted && after === mode;
|
|
234439
|
+
const meta = {
|
|
234440
|
+
mode,
|
|
234441
|
+
before,
|
|
234442
|
+
after,
|
|
234443
|
+
accepted: result.accepted,
|
|
234444
|
+
rspCode: result.rspCode
|
|
234445
|
+
};
|
|
234446
|
+
if (applied) logger.info("power source: switched", {
|
|
234447
|
+
tags: { deviceId },
|
|
234448
|
+
meta
|
|
234449
|
+
});
|
|
234450
|
+
else logger.warn("power source: the switch was sent but the read-back does not show it", {
|
|
234451
|
+
tags: { deviceId },
|
|
234452
|
+
meta
|
|
234453
|
+
});
|
|
234454
|
+
return {
|
|
234455
|
+
outcome: "sent",
|
|
234456
|
+
mode,
|
|
234457
|
+
accepted: result.accepted,
|
|
234458
|
+
before,
|
|
234459
|
+
after,
|
|
234460
|
+
applied
|
|
234461
|
+
};
|
|
234462
|
+
}
|
|
233636
234463
|
//#endregion
|
|
233637
234464
|
//#region src/ptz-zoom.ts
|
|
233638
234465
|
/**
|
|
@@ -234622,6 +235449,8 @@ var RefreshSettingsResultSchema = object({
|
|
|
234622
235449
|
capsWarmed: number$1(),
|
|
234623
235450
|
capsTotal: number$1()
|
|
234624
235451
|
});
|
|
235452
|
+
/** The two switch actions, one implementation each way. */
|
|
235453
|
+
var POWER_SWITCH_ACTIONS = [["switch-to-wired-power", "adapter"], ["switch-to-battery-power", "battery"]];
|
|
234625
235454
|
/** The uid out of a device's metadata bag, or nothing. Never a cast. */
|
|
234626
235455
|
function metaUid(metadata) {
|
|
234627
235456
|
if (metadata === null) return void 0;
|
|
@@ -236007,6 +236836,16 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
236007
236836
|
capsTotal
|
|
236008
236837
|
};
|
|
236009
236838
|
});
|
|
236839
|
+
if (this.isBattery) {
|
|
236840
|
+
this.registerDeviceAction("read-power-source", deviceCustomAction(unknown(), ReadPowerSourceResultSchema, { kind: "mutation" }), async () => {
|
|
236841
|
+
await this.wakeIfSleeping();
|
|
236842
|
+
return { source: await readPowerSource(await this.powerSourceTarget()) };
|
|
236843
|
+
});
|
|
236844
|
+
for (const [action, mode] of POWER_SWITCH_ACTIONS) this.registerDeviceAction(action, deviceCustomAction(unknown(), SwitchPowerSourceResultSchema, { kind: "mutation" }), async () => {
|
|
236845
|
+
await this.wakeIfSleeping();
|
|
236846
|
+
return switchPowerSourceTo(await this.powerSourceTarget(), mode);
|
|
236847
|
+
});
|
|
236848
|
+
}
|
|
236010
236849
|
this.registerDeviceAction("refresh-sessions", deviceCustomAction(unknown(), _void(), { kind: "mutation" }), async () => {
|
|
236011
236850
|
await this.refreshSessionsSnapshot();
|
|
236012
236851
|
});
|
|
@@ -236546,6 +237385,65 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
236546
237385
|
autoRefreshes: !this.isBattery
|
|
236547
237386
|
});
|
|
236548
237387
|
}
|
|
237388
|
+
/** The hub API for a child, the camera's own otherwise, plus the channel to address. */
|
|
237389
|
+
async powerSourceTarget() {
|
|
237390
|
+
return {
|
|
237391
|
+
api: await this.ensureApi(),
|
|
237392
|
+
channel: this.getChannel(),
|
|
237393
|
+
deviceId: this.id,
|
|
237394
|
+
logger: this.ctx.logger
|
|
237395
|
+
};
|
|
237396
|
+
}
|
|
237397
|
+
/**
|
|
237398
|
+
* Battery-cam power-source section (General tab): read the source, switch to
|
|
237399
|
+
* wired or back to battery. Returns `[]` for a wired-only camera. The buttons
|
|
237400
|
+
* dispatch the `read-power-source` / `switch-to-*-power` device actions.
|
|
237401
|
+
*/
|
|
237402
|
+
buildPowerSourceSection() {
|
|
237403
|
+
if (!this.isBattery) return [];
|
|
237404
|
+
const switchMessage = "Switch {outcome} · before: {before} · after: {after} · applied: {applied}";
|
|
237405
|
+
return [{
|
|
237406
|
+
id: "power-source",
|
|
237407
|
+
tab: "general",
|
|
237408
|
+
title: "Power source",
|
|
237409
|
+
titleKey: "provider-reolink:schema.s_power-source.title",
|
|
237410
|
+
description: "Only switch to wired power when the adapter meets the camera's spec.",
|
|
237411
|
+
descriptionKey: "provider-reolink:schema.s_power-source.description",
|
|
237412
|
+
columns: 1,
|
|
237413
|
+
fields: [
|
|
237414
|
+
{
|
|
237415
|
+
type: "device-action-button",
|
|
237416
|
+
key: "_readPowerSource",
|
|
237417
|
+
label: "Power source",
|
|
237418
|
+
labelKey: "provider-reolink:schema.s_power-source._readPowerSource.label",
|
|
237419
|
+
buttonLabel: "Read power source",
|
|
237420
|
+
action: "read-power-source",
|
|
237421
|
+
variant: "default",
|
|
237422
|
+
successMessage: "Power source: {source}"
|
|
237423
|
+
},
|
|
237424
|
+
{
|
|
237425
|
+
type: "device-action-button",
|
|
237426
|
+
key: "_switchToWiredPower",
|
|
237427
|
+
label: "Wired power",
|
|
237428
|
+
labelKey: "provider-reolink:schema.s_power-source._switchToWiredPower.label",
|
|
237429
|
+
buttonLabel: "Switch to wired power",
|
|
237430
|
+
action: "switch-to-wired-power",
|
|
237431
|
+
variant: "default",
|
|
237432
|
+
successMessage: switchMessage
|
|
237433
|
+
},
|
|
237434
|
+
{
|
|
237435
|
+
type: "device-action-button",
|
|
237436
|
+
key: "_switchToBatteryPower",
|
|
237437
|
+
label: "Battery power",
|
|
237438
|
+
labelKey: "provider-reolink:schema.s_power-source._switchToBatteryPower.label",
|
|
237439
|
+
buttonLabel: "Switch to battery power",
|
|
237440
|
+
action: "switch-to-battery-power",
|
|
237441
|
+
variant: "default",
|
|
237442
|
+
successMessage: switchMessage
|
|
237443
|
+
}
|
|
237444
|
+
]
|
|
237445
|
+
}];
|
|
237446
|
+
}
|
|
236549
237447
|
/**
|
|
236550
237448
|
* Battery-cam Email Push auto-configure section. Returns `[]` for any
|
|
236551
237449
|
* camera that wouldn't benefit (wired cams keep a live socket for
|
|
@@ -241458,6 +242356,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
241458
242356
|
}),
|
|
241459
242357
|
...this.buildSessionsTabSections(),
|
|
241460
242358
|
...this.buildEmailPushSection(),
|
|
242359
|
+
...this.buildPowerSourceSection(),
|
|
241461
242360
|
...this.buildEmailTabSections(),
|
|
241462
242361
|
...buildClipRefreshDeviceSection({
|
|
241463
242362
|
isHubChild: this.isHubChild(),
|