iobroker.agent-dvr 0.5.0 → 0.5.2

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/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "agent-dvr",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
5
5
  "news": {
6
+ "0.5.2": {
7
+ "en": "feat: rename overview DP to widget_live_overview for consistent widget naming",
8
+ "de": "feat: overview-Datenpunkt in widget_live_overview umbenannt für konsistentes Widget-Namensschema",
9
+ "ru": "feat: переименование DP overview в widget_live_overview для единообразного именования виджетов",
10
+ "pt": "feat: renomear DP overview para widget_live_overview para nomenclatura consistente de widgets",
11
+ "nl": "feat: overview-DP hernoemd naar widget_live_overview voor consistente widgetnaamgeving",
12
+ "fr": "feat: renommage du DP overview en widget_live_overview pour une nomenclature cohérente des widgets",
13
+ "it": "feat: rinominare DP overview in widget_live_overview per nomenclatura widget coerente",
14
+ "es": "feat: renombrar DP overview a widget_live_overview para nomenclatura consistente de widgets",
15
+ "pl": "feat: zmiana nazwy DP overview na widget_live_overview dla spójnego nazewnictwa widżetów",
16
+ "uk": "feat: перейменування DP overview на widget_live_overview для узгодженого іменування віджетів",
17
+ "zh-cn": "feat: 将overview数据点重命名为widget_live_overview以保持一致的小部件命名"
18
+ },
19
+ "0.5.1": {
20
+ "en": "feat: per-instance URL routing (agent-dvr.0/, agent-dvr.1/, …); rename per-camera widget DP to widget_recordings; add widget_live DP with single-camera live tile",
21
+ "de": "feat: instanzeigenes URL-Routing (agent-dvr.0/, agent-dvr.1/, …); Aufnahme-Widget-Datenpunkt pro Kamera in widget_recordings umbenannt; neuer widget_live-Datenpunkt mit Live-Einzelkachel der Kamera",
22
+ "ru": "feat: маршрутизация URL для каждого экземпляра (agent-dvr.0/, agent-dvr.1/, …); переименование DP виджета записей камеры в widget_recordings; добавление DP widget_live с живой плиткой одной камеры",
23
+ "pt": "feat: roteamento de URL por instância (agent-dvr.0/, agent-dvr.1/, …); renomear DP do widget de gravações por câmera para widget_recordings; adicionar DP widget_live com tile ao vivo de câmera única",
24
+ "nl": "feat: URL-routing per instantie (agent-dvr.0/, agent-dvr.1/, …); hernoem per-camera opname-widget-DP naar widget_recordings; voeg widget_live-DP toe met live-tegel voor één camera",
25
+ "fr": "feat: routage d'URL par instance (agent-dvr.0/, agent-dvr.1/, …); renommage du DP widget d'enregistrement par caméra en widget_recordings; ajout du DP widget_live avec vignette en direct d'une seule caméra",
26
+ "it": "feat: routing URL per istanza (agent-dvr.0/, agent-dvr.1/, …); rinominare DP widget registrazioni per telecamera in widget_recordings; aggiunto DP widget_live con tile live a singola telecamera",
27
+ "es": "feat: enrutamiento de URL por instancia (agent-dvr.0/, agent-dvr.1/, …); renombrar DP de widget de grabaciones por cámara a widget_recordings; agregar DP widget_live con tile en vivo de cámara única",
28
+ "pl": "feat: routing URL dla każdej instancji (agent-dvr.0/, agent-dvr.1/, …); zmiana nazwy DP widgetu nagrań kamery na widget_recordings; dodanie DP widget_live z kafelkiem podglądu na żywo pojedynczej kamery",
29
+ "uk": "feat: маршрутизація URL для кожного екземпляра (agent-dvr.0/, agent-dvr.1/, …); перейменування DP віджета записів камери на widget_recordings; додано DP widget_live з живою плиткою однієї камери",
30
+ "zh-cn": "feat: 每实例URL路由 (agent-dvr.0/, agent-dvr.1/, …);将每摄像头录像小部件DP重命名为widget_recordings;新增widget_live DP,显示单摄像头直播磁贴"
31
+ },
6
32
  "0.5.0": {
7
33
  "en": "feat: camera filter popover with sort order drag & drop, new-recordings badge, recording display settings, webhook trigger, PTZ presets, event log, bulk-delete, camera color, status bar extensions, reset-colors button; multiple dashboard fixes",
8
34
  "de": "feat: Kamera-Filter-Popover mit Sortierfunktion, Neue-Aufnahmen-Badge, Aufnahmen-Anzeigeeinstellungen, Webhook-Trigger, PTZ-Presets, Ereignisprotokoll, Mehrfach-Löschen, Kamerafarbe, Statuszeilen-Erweiterungen, Farben-Reset-Schaltfläche; diverse Dashboard-Korrekturen",
@@ -67,32 +93,6 @@
67
93
  "pl": "Opcjonalny proxy strumieni MJPEG i migawek przez ioBroker",
68
94
  "zh-cn": "可选的 MJPEG 和快照流代理(通过 ioBroker)",
69
95
  "uk": "Опціональний проксі потоків MJPEG і знімків через ioBroker"
70
- },
71
- "0.3.0": {
72
- "en": "New control buttons (scheduleOn/Off, detectorOn/Off, sensitivityMin/Max/Gain), audio URL states for microphones, native browser fullscreen in dashboard, collapsible tag filter, auto-hide header",
73
- "de": "Neue Steuertasten (scheduleOn/Off, detectorOn/Off, Empfindlichkeit), Audio-URL-Zustände für Mikrofone, nativer Browser-Vollbild im Dashboard, ausklappbarer Tag-Filter, Auto-Hide-Header",
74
- "ru": "Новые кнопки управления (расписание, детектор, чувствительность), URL-состояния для микрофонов, нативный полноэкранный режим, сворачиваемый фильтр меток",
75
- "pt": "Novos botões de controlo (schedule, detector, sensibilidade), URLs de áudio para microfones, tela cheia nativa, filtro de etiquetas recolhível",
76
- "nl": "Nieuwe besturingsknoppen (schema, detector, gevoeligheid), audio-URL-staten voor microfoons, native browserfullscreen, inklapbaar labelfilter",
77
- "fr": "Nouveaux boutons de commande (planification, détecteur, sensibilité), états URL audio pour microphones, plein écran natif, filtre d'étiquettes rétractable",
78
- "it": "Nuovi pulsanti di controllo (pianificazione, rilevatore, sensibilità), stati URL audio per microfoni, schermo intero nativo, filtro etichette comprimibile",
79
- "es": "Nuevos botones de control (programación, detector, sensibilidad), estados de URL de audio para micrófonos, pantalla completa nativa, filtro de etiquetas plegable",
80
- "pl": "Nowe przyciski sterowania (harmonogram, detektor, czułość), stany URL audio dla mikrofonów, natywny pełny ekran, zwijany filtr etykiet",
81
- "zh-cn": "新增控制按钮(计划、检测器、灵敏度),麦克风音频URL状态,本地浏览器全屏,可折叠标签过滤器",
82
- "uk": "Нові кнопки керування (розклад, детектор, чутливість), стани URL аудіо для мікрофонів, нативний повноекранний режим, згортуваний фільтр міток"
83
- },
84
- "0.2.2": {
85
- "en": "fix: translate remaining German strings in DashboardPanel to English via I18n.t()\nfix: add i18n keys loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn, reload in all 11 languages\nchore: replace POSIX mv with cross-platform node rename in src-admin build script",
86
- "de": "Behebung: Die verbleibenden deutschen Zeichenketten im DashboardPanel werden mithilfe von I18n.t() ins Englische übersetzt.\nBehebung: Hinzufügen der i18n-Schlüssel loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn und reload in allen 11 Sprachen\nAufgabe: Ersetzen Sie POSIX mv durch plattformübergreifendes Node-Rename im src-admin-Build-Skript.",
87
- "ru": "Исправление: перевести оставшиеся немецкие строки в DashboardPanel на английский язык с помощью I18n.t()\nИсправление: добавлены ключи интернационализации loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn, reload для всех 11 языков.\nЗадача: заменить POSIX mv на кроссплатформенное переименование узла в скрипте сборки src-admin.",
88
- "pt": "Correção: traduzir as strings alemãs restantes no DashboardPanel para inglês usando I18n.t().\nCorreção: adicionar as chaves i18n loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn e reload em todos os 11 idiomas.\nTarefa: substituir POSIX mv por renomear nó multiplataforma no script de compilação do src-admin",
89
- "nl": "fix: vertaal de resterende Duitse strings in DashboardPanel naar het Engels via I18n.t()\nOplossing: voeg i18n-sleutels toe voor loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn en reload in alle 11 talen.\nTaak: vervang POSIX mv door platformonafhankelijke node rename in het src-admin buildscript",
90
- "fr": "Correction : traduire les chaînes de caractères allemandes restantes dans DashboardPanel en anglais via I18n.t()\nCorrection : ajout des clés i18n loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn et reload dans les 11 langues.\nTâche : remplacer la commande POSIX mv par une commande de renommage de nœud multiplateforme dans le script de compilation src-admin",
91
- "it": "correzione: tradurre le stringhe tedesche rimanenti in DashboardPanel in inglese tramite I18n.t()\nCorrezione: aggiungi le chiavi i18n loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn, ricarica in tutte le 11 lingue\ncompito: sostituire POSIX mv con rename multipiattaforma node nello script di build src-admin",
92
- "es": "Corrección: traducir las cadenas de texto alemanas restantes en DashboardPanel al inglés mediante I18n.t().\nCorrección: agregar las claves i18n loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn, reload en los 11 idiomas.\nTarea: reemplazar POSIX mv con node rename multiplataforma en el script de compilación de src-admin",
93
- "pl": "naprawiono: przetłumacz pozostałe niemieckie ciągi znaków w DashboardPanel na angielski za pomocą I18n.t()\npoprawka: dodaj klucze i18n loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn, przeładuj we wszystkich 11 językach\nzadanie: zastąp POSIX mv zmianą nazwy węzła międzyplatformowego w skrypcie kompilacji src-admin",
94
- "uk": "виправлення: перекладіть решту німецьких рядків у DashboardPanel на англійську мову через I18n.t()\nвиправлення: додано ключі i18n loadingCamerasAndStreams, cfgCameraColumn, cfgStreamSourceColumn, перезавантаження всіма 11 мовами\nзавдання: замінити POSIX mv на кросплатформне перейменування вузлів у скрипті збірки src-admin",
95
- "zh-cn": "修复:使用 I18n.t() 将 DashboardPanel 中剩余的德语字符串翻译成英语\n修复:在所有 11 种语言中添加 i18n 键 loadingCamerasAndStreams、cfgCameraColumn、cfgStreamSourceColumn 和 reload\n任务:在 src-admin 构建脚本中,将 POSIX mv 替换为跨平台的节点重命名。"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -143,7 +143,7 @@
143
143
  "mode": "daemon",
144
144
  "type": "alarm",
145
145
  "localLinks": {
146
- "_default": "%web_protocol%://%ip%:%web_port%/agent-dvr/"
146
+ "_default": "%web_protocol%://%ip%:%web_port%/agent-dvr.%instance%/"
147
147
  },
148
148
  "messagebox": true,
149
149
  "compact": true,
package/lib/web.js CHANGED
@@ -17,8 +17,7 @@ const MIME = {
17
17
  '.json': 'application/json',
18
18
  };
19
19
 
20
- const WWW = path.join(__dirname, '..', 'www');
21
- const ROUTE = 'agent-dvr';
20
+ const WWW = path.join(__dirname, '..', 'www');
22
21
 
23
22
  class AgentDvrWeb {
24
23
  constructor(server, webSettings, adapter, instanceSettings, app) {
@@ -26,6 +25,8 @@ class AgentDvrWeb {
26
25
  this.adapter = adapter;
27
26
 
28
27
  const ns = instanceSettings ? instanceSettings._id.replace('system.adapter.', '') : 'agent-dvr.0';
28
+ const ROUTE = ns;
29
+ this._route = ns;
29
30
  const native = (instanceSettings && instanceSettings.native) ? instanceSettings.native : {};
30
31
 
31
32
  // Keep native in sync — iobroker.web caches it at startup, so when the
@@ -637,7 +638,7 @@ class AgentDvrWeb {
637
638
 
638
639
  welcomePage() {
639
640
  return {
640
- link: ROUTE + '/',
641
+ link: this._route + '/',
641
642
  name: 'AgentDVR',
642
643
  img: 'adapter/agent-dvr/agent-dvr.png',
643
644
  color: '#2196f3',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.agent-dvr",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Connects ioBroker to AgentDVR: auto-discovers cameras, mirrors all device values as data points, delivers real-time triggers on new recordings, and generates a responsive HTML gallery with optional search and tag filtering.",
5
5
  "author": {
6
6
  "name": "ipod86",
package/www/index.html CHANGED
@@ -8781,6 +8781,7 @@ function applyDashTranslations() {
8781
8781
  }
8782
8782
 
8783
8783
  /* ─────────────────────────── State ─────────────────────────── */
8784
+ const _API = '/' + (location.pathname.split('/').filter(Boolean)[0] || 'agent-dvr');
8784
8785
  let INST = 'agent-dvr.0', BASE = '', cameras = {}, hasPtz = false;
8785
8786
  let hidden = new Set(JSON.parse(localStorage.getItem('advr_hidden') || '[]'));
8786
8787
  let recAllItems = [];
@@ -8824,7 +8825,7 @@ function camStype(key) {
8824
8825
  function flvStreamUrl(oid, aspect) {
8825
8826
  const p = (aspect || '').split('/').map(Number);
8826
8827
  const size = (p.length === 2 && p[0] >= 100 && p[1] >= 100) ? '&size=' + p[0] + 'x' + p[1] : '';
8827
- return '/agent-dvr/api/stream?oid=' + oid + size;
8828
+ return _API+'/api/stream?oid=' + oid + size;
8828
8829
  }
8829
8830
  function flvShowStatus(vid, msg) {
8830
8831
  const p = vid.parentElement; if (!p) return;
@@ -8896,7 +8897,7 @@ const DASH_CSS_VARS = {
8896
8897
  };
8897
8898
  async function loadConfig() {
8898
8899
  try {
8899
- const r = await fetch('/agent-dvr/api/config', { signal: AbortSignal.timeout(5000) });
8900
+ const r = await fetch(_API+'/api/config', { signal: AbortSignal.timeout(5000) });
8900
8901
  if (r.ok) Object.assign(CFG, await r.json());
8901
8902
  } catch (_) {}
8902
8903
  const recEnabled = CFG.dashEnableRecordings !== false;
@@ -8931,7 +8932,7 @@ async function loadData() {
8931
8932
  if (!Object.keys(cameras).length) sbar(t('loadingCameras'));
8932
8933
  // Fetch AgentDVR cameras and go2rtc streams in parallel
8933
8934
  const [camRes] = await Promise.allSettled([
8934
- fetch('/agent-dvr/api/cameras', { signal: AbortSignal.timeout(8000) }),
8935
+ fetch(_API+'/api/cameras', { signal: AbortSignal.timeout(8000) }),
8935
8936
  loadGo2rtcStreams(), // populates go2rtcStreams, calls syncGrid when done
8936
8937
  ]);
8937
8938
 
@@ -9020,7 +9021,7 @@ function trySocket() {
9020
9021
  let _sysStats = {};
9021
9022
  async function loadSysStats() {
9022
9023
  try {
9023
- const r = await fetch('/agent-dvr/api/systemstats', { signal: AbortSignal.timeout(5000) });
9024
+ const r = await fetch(_API+'/api/systemstats', { signal: AbortSignal.timeout(5000) });
9024
9025
  const d = await r.json().catch(() => ({}));
9025
9026
  if (d && !d.error) _sysStats = d;
9026
9027
  } catch (_) {}
@@ -9255,7 +9256,7 @@ function syncGrid() {
9255
9256
  /* ─────────────────────────── go2rtc streams laden ──────────── */
9256
9257
  async function loadGo2rtcStreams() {
9257
9258
  try {
9258
- const r = await fetch('/agent-dvr/api/go2rtc/streams', { signal: AbortSignal.timeout(5000) });
9259
+ const r = await fetch(_API+'/api/go2rtc/streams', { signal: AbortSignal.timeout(5000) });
9259
9260
  if (!r.ok) throw new Error('HTTP ' + r.status);
9260
9261
  const d = await r.json();
9261
9262
  go2rtcStreams = (d.streams || []).sort();
@@ -9356,7 +9357,7 @@ function makeTile(key, cam) {
9356
9357
  tile.append(mediaEl, bottom);
9357
9358
  if (stype === 'mp4' && cam.oid) {
9358
9359
  const _el = mediaEl, _oid = cam.oid, _key = key, _size = sizeParam;
9359
- setTimeout(() => createFlvPlayer(_el, '/agent-dvr/api/stream?oid=' + _oid + _size, _key), 0);
9360
+ setTimeout(() => createFlvPlayer(_el, _API+'/api/stream?oid=' + _oid + _size, _key), 0);
9360
9361
  }
9361
9362
 
9362
9363
  return tile;
@@ -9455,7 +9456,7 @@ function togglePtz(tile, camKey) {
9455
9456
 
9456
9457
  async function ptzSend(camKey, dir, val) {
9457
9458
  try {
9458
- await fetch(`/agent-dvr/api/ptz?camKey=${encodeURIComponent(camKey)}&dir=${dir}&val=${val?1:0}`);
9459
+ await fetch(`${_API}/api/ptz?camKey=${encodeURIComponent(camKey)}&dir=${dir}&val=${val?1:0}`);
9459
9460
  } catch (_) {}
9460
9461
  }
9461
9462
 
@@ -9465,7 +9466,7 @@ async function ptzLoadPresets(camKey, container) {
9465
9466
  if (!oid) return;
9466
9467
  container.dataset.loaded = '1';
9467
9468
  try {
9468
- const r = await fetch('/agent-dvr/api/ptzpresets?oid=' + encodeURIComponent(oid),
9469
+ const r = await fetch(_API+'/api/ptzpresets?oid=' + encodeURIComponent(oid),
9469
9470
  { signal: AbortSignal.timeout(5000) });
9470
9471
  const data = await r.json().catch(() => ({}));
9471
9472
  const presets = Array.isArray(data.presets) ? data.presets : [];
@@ -9490,7 +9491,7 @@ async function ptzGoPreset(camKey, name, btn, container) {
9490
9491
  const oid = cam?.oid != null ? String(cam.oid) : '';
9491
9492
  if (!oid) return;
9492
9493
  try {
9493
- const r = await fetch('/agent-dvr/api/ptzpreset?oid=' + encodeURIComponent(oid) +
9494
+ const r = await fetch(_API+'/api/ptzpreset?oid=' + encodeURIComponent(oid) +
9494
9495
  '&preset=' + encodeURIComponent(name),
9495
9496
  { signal: AbortSignal.timeout(5000) });
9496
9497
  const data = await r.json().catch(() => ({}));
@@ -9610,7 +9611,7 @@ function toggleMute(video, btn, key) {
9610
9611
  }
9611
9612
  function toggleRec(key, btn, tile) {
9612
9613
  const isRec = btn.classList.contains('active');
9613
- fetch('/agent-dvr/api/record?camKey=' + encodeURIComponent(key) + '&action=' + (isRec ? 'stop' : 'start'))
9614
+ fetch(_API+'/api/record?camKey=' + encodeURIComponent(key) + '&action=' + (isRec ? 'stop' : 'start'))
9614
9615
  .then(r => { if (r.ok) setTileRecording(tile, btn, !isRec); })
9615
9616
  .catch(() => {});
9616
9617
  }
@@ -9866,7 +9867,7 @@ async function loadAndFilterRec(silent = false) {
9866
9867
 
9867
9868
  try {
9868
9869
  const results = await Promise.all(keys.map(async key => {
9869
- const r = await fetch('/agent-dvr/api/recordings?camKey=' + encodeURIComponent(key),
9870
+ const r = await fetch(_API+'/api/recordings?camKey=' + encodeURIComponent(key),
9870
9871
  { signal: AbortSignal.timeout(8000) });
9871
9872
  if (!r.ok) throw new Error('HTTP ' + r.status);
9872
9873
  const data = await r.json();
@@ -10310,7 +10311,7 @@ async function confirmDelete() {
10310
10311
  closeVideo();
10311
10312
  renderRec();
10312
10313
  resetDelBtn();
10313
- fetch('/agent-dvr/api/deleterecording?oid=' + encodeURIComponent(oid) + '&fn=' + encodeURIComponent(fn) + '&camKey=' + encodeURIComponent(rec._camKey || ''),
10314
+ fetch(_API+'/api/deleterecording?oid=' + encodeURIComponent(oid) + '&fn=' + encodeURIComponent(fn) + '&camKey=' + encodeURIComponent(rec._camKey || ''),
10314
10315
  { signal: AbortSignal.timeout(10000) })
10315
10316
  .then(r => r.json().catch(() => ({})).then(data => {
10316
10317
  if (!r.ok || (data.status && data.status !== 'ok') || data.error) {
@@ -10373,7 +10374,7 @@ async function deleteSelectedRecs() {
10373
10374
  const fn = rec.fn ? String(rec.fn) : '';
10374
10375
  if (!oid || !fn) return;
10375
10376
  try {
10376
- const r = await fetch('/agent-dvr/api/deleterecording?oid=' + encodeURIComponent(oid) + '&fn=' + encodeURIComponent(fn) + '&camKey=' + encodeURIComponent(rec._camKey || ''),
10377
+ const r = await fetch(_API+'/api/deleterecording?oid=' + encodeURIComponent(oid) + '&fn=' + encodeURIComponent(fn) + '&camKey=' + encodeURIComponent(rec._camKey || ''),
10377
10378
  { signal: AbortSignal.timeout(10000) });
10378
10379
  const data = await r.json().catch(() => ({}));
10379
10380
  if (!r.ok || (data.status && data.status !== 'ok') || data.error) failedRecs.push(rec);
@@ -10489,7 +10490,7 @@ function connectWebRTC(vid, baseUrl, streamName) {
10489
10490
  const codecReq = 'video/mp4; codecs="' + supported.join(',') + '"';
10490
10491
 
10491
10492
  const wsProto = location.protocol === 'https:' ? 'wss:' : 'ws:';
10492
- const wsUrl = wsProto + '//' + location.host + '/agent-dvr/api/ws?src=' + encodeURIComponent(streamName);
10493
+ const wsUrl = wsProto + '//' + location.host + _API+'/api/ws?src=' + encodeURIComponent(streamName);
10493
10494
  const ws = new WebSocket(wsUrl);
10494
10495
  ws.binaryType = 'arraybuffer';
10495
10496
  vid._rtcWs = ws;