Sync sunrise and sunset on Dahua IP cameras.
Project description
ipc-sun-sync
Sync sunrise and sunset on Dahua IP cameras.
Usage
See config.yml.def for a starter configuration.
Example
Create config.yml
with the following content.
---
latitude: 34.0522
longitude: -118.2437
timezone: America/Los_Angeles
# IP camera defaults
username: admin
password: password
method: cgi
sunrise_offset: 00:30:00
sunset_offset: -01:20:00
# IP camera list
ipc:
- ip: 192.168.1.108
- ip: 192.168.1.109
sunset_offset: 00:20:00
method: rpc
- ip: 192.168.1.110
name: FriendlyNameForLogging
username: OverideDefaultUser
password: OverideDefaultPassword123
channel: 1
The following command will sync the cameras located at 192.168.1.108
, 192.168.1.109
, 192.168.1.110
.
ipc-sun-sync -c config.yml
Sunrise will be 30 minutes late and sunset will be 1 hour and 20 minutes early.
192.168.1.108
and 192.168.1.109
will use the credentials admin
and password
.
192.168.1.109
will interact through rpc instead of cgi and sunset will be 20 minutes late.
192.168.1.110
will have it's name
, username
, password
, and channel
overridden.
name
is used for logging. channel
is the video channel you want to apply the sun times, default is 0.
The sunrise and sunset times will be calculated using the latitude
and longitude
variables, then it will be converted to your timezone using the timezone
variable.
Check Configuration
ipc-sun-sync -c config.yml --check
Verify IPC Settings
Shows the sunrise time, sunset time, and switch mode currently on the IP cameras.
ipc-sun-sync -c config.yml --verify
Show Timezones
ipc-sun-sync -T
Show Version
ipc-sun-sync -V
Changelog
Troubleshooting
- If the program says it is successful but the sunrise and sunset times do not change,
try disablinguse rpc.Smart Codec
if it is enabled.
To Do
- Add verbose logging.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ipc-sun-sync-0.2.3.tar.gz
.
File metadata
- Download URL: ipc-sun-sync-0.2.3.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-1017-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc1f70d197ed52e9f286cca3edef097e321822e813ef8488793e4367911783ef |
|
MD5 | 4574d379e925d47201933092955c33ed |
|
BLAKE2b-256 | b21306ed6cdf7bbb2b04f1a47a4807c7d2e827378579659101a500e6eb555031 |
File details
Details for the file ipc_sun_sync-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: ipc_sun_sync-0.2.3-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-1017-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97a8117dbd10c6dc0e2abc38bb58ef7a753cb1cd3581c3259a6c340f499fe0b1 |
|
MD5 | 0a1b4638ccd7e3c0a7e8eb148c353893 |
|
BLAKE2b-256 | 63c982c85b8305a008184d596253ca89a2127d8f91f08a2d8d841995f71af58e |