Commit Graph

12 Commits

Author SHA1 Message Date
Isaac Connor
f02bc29c0d feat: add Indicator LED control capability with session keepalive refs #4875
Add a CanIndicatorLight capability and status-aware Indicator toggle button. The indicator LED on the ASH21-B, ADC2W and ASH42-B is controlled via the LightGlobal config (configManager get/setConfig); add indicatorLightOn/Off/Status to Dahua_RPC and a model-specific 'Amcrest ASH42-B RPC' Controls row, with the capability also enabled on the ASH21-B/ADC2W/generic rows. Migration zm_update-1.39.13.sql adds the column.

Add Dahua_RPC keepAlive (global.keepAlive) wired into a 30s zmcontrol idle tick, plus session-expiry re-login retry in set_config and the status queries, so the long-running control daemon does not silently fail after the ~60s session timeout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:00:00 -04:00
Isaac Connor
fd83672a11 feat: add status-aware Light control capability and control-command response path refs #4869
Add a CanLight control capability rendering a single status-aware Light toggle button. The ADC2W white light is driven via CoaxialControlIO.control (Type 1, numeric IO); the button queries live state and reflects it (amber when on).

To get device state to the browser, add an opt-in two-way response path to the control protocol: zmcontrol writes a JSON result back only when a request sets wants_response (fire-and-forget commands unchanged, SIGPIPE-safe); Monitor::sendControlCommandWithResponse and ajax/control.php return it.

Also adds get_config/set_config/probe to Dahua_RPC for characterising cameras, the CanLight column (migration zm_update-1.39.12.sql), edit-UI checkbox, and a config unit test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 19:00:00 -04:00
adhamiamirhossein
27977acdd4 fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Isaac Connor
d42e9beddc Add warnings when the type of movement is not selected 2020-01-02 17:03:52 -05:00
Isaac Connor
4c206c2e9a Upgrade Control Object to extend ZM\Object. Add commands function from skin specific control functions 2019-09-19 14:55:17 -04:00
Isaac Connor
8a90176a2c Add CanReboot to Controls 2019-04-02 09:25:50 -04:00
Isaac Connor
bd5c9b5b20 add Control to ZM namespace 2019-03-24 09:58:50 -04:00
Isaac Connor
b0c555599c Merge updated objects from sa. Implements caching of objects and fixes logged errors when using the default storage group. Fixes #2209 2018-09-15 09:42:59 -04:00
Isaac Connor
dfdac2ed70 make find and find_one functions consistent across Objects 2018-09-07 16:31:11 -04:00
Roman Dissertori
48b91c5544 Bugfix in Control and added new Camera (#2171)
* fixed control typos

missing word "s" for "Controls" Table for database queries

* added Dericam P2 camera Control

* fixed missing CanReset column

* Update DericamP2.pm

* added some more missing controls

CanSleep, CanWake

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update zm_create.sql.in
2018-07-28 09:26:02 -04:00
Isaac Connor
2864876d28 fix spacing, add code comment 2018-03-03 09:25:04 -08:00
Isaac Connor
c6f632325e create an object for Controls entries, with appropriate defaults 2018-02-26 07:31:22 -08:00