Skip to content

Commit

Permalink
Merge pull request #132 from aendue/white_led_status_25
Browse files Browse the repository at this point in the history
ptz calib added
  • Loading branch information
oelison authored Feb 4, 2025
2 parents 26cfb06 + b3a0c09 commit 7a2aa5e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ sendTo("reolink.0",{action: "snap"}, function(result){
### **WORK IN PROGRESS**
* (oelison) update disk info
* (oelison) uri enconding is switchable (helps sometimes by one special char)
* (oelison) #28 PTZ check added

### 1.1.2 (2024-09-14)
* (oelison) [#22](https://github.com/aendue/ioBroker.reolink/issues/22) password with some more special chars works now
Expand Down Expand Up @@ -166,7 +167,7 @@ sendTo("reolink.0",{action: "snap"}, function(result){
## License
MIT License

Copyright (c) 2024 Andy Grundt <[email protected]>
Copyright (c) 2025 Andy Grundt <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
23 changes: 23 additions & 0 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,29 @@
"write": true
}
},
{
"_id": "settings.ptzCheck",
"type": "state",
"common": {
"role": "state",
"name": {
"en": "PTZ check",
"de": "PTZ-Check",
"ru": "PTZ проверка",
"pt": "Verificação PTZ",
"nl": "PTZ-controle",
"fr": "Contrôle PTZ",
"it": "Controllo PTZ",
"es": "PTZ check",
"pl": "Kontrola PTZ",
"uk": "Перевірка ПТЗ",
"zh-cn": "PTZ 检查"
},
"type": "boolean",
"read": true,
"write": true
}
},
{
"_id": "settings.ptzGuardTimeout",
"type": "state",
Expand Down
20 changes: 18 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class ReoLinkCam extends utils.Adapter {
this.subscribeStates("settings.playAlarm");
this.subscribeStates("settings.getDiscData");
this.subscribeStates("settings.ptzEnableGuard");
this.subscribeStates("settings.ptzCheck");
this.subscribeStates("settings.ptzGuardTimeout");
this.subscribeStates("Command.Reboot");
}
Expand Down Expand Up @@ -729,7 +730,7 @@ class ReoLinkCam extends utils.Adapter {
}
}
async startZoomFocus(pos) {
const ptzCheckCmd = [
const startZoomCmd = [
{
cmd: "StartZoomFocus",
action: 0,
Expand All @@ -742,7 +743,19 @@ class ReoLinkCam extends utils.Adapter {
},
},
];
this.sendCmd(ptzCheckCmd, "StartZoomFocus");
this.sendCmd(startZoomCmd, "StartZoomFocus");
}
async setPtzCheck() {
const ptzCheckCmd = [
{
cmd: "PtzCheck",
action: 0,
param: {
channel: Number(this.config.cameraChannel),
},
},
];
this.sendCmd(ptzCheckCmd, "PtzCallibration");
}
async setScheduledRecording(state) {
if (state !== true && state !== false) {
Expand Down Expand Up @@ -1285,6 +1298,9 @@ class ReoLinkCam extends utils.Adapter {
if (propName === "ptzEnableGuard") {
this.setPtzGuard(state.val);
}
if (propName === "ptzCheck") {
this.setPtzCheck();
}
if (propName === "ptzGuardTimeout") {
this.setPtzGuardTimeout(state.val);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@iobroker/adapter-core": "^3.2.2",
"@iobroker/adapter-core": "^3.2.3",
"axios": "^1.7.7",
"base-64": "^1.0.0",
"https": "^1.0.0"
Expand Down

0 comments on commit 7a2aa5e

Please sign in to comment.