Posting here as well after I seem to have been chasing the wrong repo.
After my first issue https://github.com/jokob-sk/Pi.Alert/issues/56 was resolved by manually adding a db file I ran into another issue right away when when trying to change some details of a device. The UI reported that the DB is read only. After playing around with groups and user rights for a while I gave up on Docker and went for a native install on my PiHole (DietPi OS)
First observation, the detailed installation link points to the wrong package: curl -LO https://github.com/leiweibau/Pi.Alert/Pi.Alert/raw/main/tar/pialert_latest.tar Pucherot, insteat of leiweibau.
I didn't notice and it did install nevertheless but I obviously got the version without your new maintenance screen. This version also showed the "DB is read only error"?
After I noticed that I got the wrong link I started all over with the links from your main page https://github.com/jokob-sk/Pi.Alert
Given that I am already running PiHole I went with the second link which worked, answered all the questions but then the installation stopped with
…
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.lastuseddate#PS'
- Deleting downloaded tar file...
- Settting Pi.Alert config file
sed: can't read /home/thomas/pialert/config/pialert.conf: No such file or directory
…
The error is correct because somehow the installer didn't install the directories in /home/thomas/pialert but in ~ (/home/thomas)
I tried to launch a second time from within a manually created ~/pialert folder which didn't work because the folder was already there.
So I moved all folders manually to ~/pialert and updated the pialert directory in the config file manualy followed by running one of the cron commands:
python3 ~/pialert/back/pialert.py 1
This time it was complaining about a table "Online_History"
sqlite3.OperationalError: table Online_History has no column named Archived_Devices
So I went ahead and moved the template DB I used yesterday over the newly created database, but this one doesn't seem to have the table Online_History at all?
python3 ~/pialert/back/pialert.py 1
sqlite3.OperationalError: no such table: Online_History
I then discovered the pialert_patch_DB.sh script which adds the missing table, but after running that one I am stuck with
sqlite3.OperationalError: table Online_History has no column named ScanCycle
Here's a screenshot of the "DB read only" error I got on the Docker install as well as now on my PiHole:
There's another DB related issue when trying to create a backup (both on Docker and PiHole), after confirming that I am sure I want to create a backup I get the following error(?)
Lastly, I read somewhere that using 'SCAN_SUBNETS = '--localnet --interface=eth0' speeds up operation of the arp scan. Seems like this is not working though.
When I use the interface option I run into a Python error.
Section 1 below shows the active setting, section 2 the error an section 3 a manual run of arp-scan with the interface option.
thomas in pihole in ~ took 2s
% cat pialert/config/pialert.conf | grep SCAN_SUBNETS
# SCAN_SUBNETS = '--localnet'
# SCAN_SUBNETS = '192.168.11.0/24 192.168.144.0/24'
SCAN_SUBNETS = '--localnet --interface=eth0'
#SCAN_SUBNETS = '--localnet'
% python3 ~/pialert/back/pialert.py 1
Pi.Alert 3.5_leiweibau (2022-07-07)
---------------------------------------------------------
Scan Devices
ScanCycle: 1
Timestamp: 2022-08-01 15:59:00
Scanning...
arp-scan Method...
arp-scan: unrecognized option '--localnet --interface=eth0'
Traceback (most recent call last):
File "/home/thomas/pialert/back/pialert.py", line 1576, in <module>
sys.exit(main())
File "/home/thomas/pialert/back/pialert.py", line 88, in main
res = scan_network()
File "/home/thomas/pialert/back/pialert.py", line 366, in scan_network
arpscan_devices = execute_arpscan (arpscan_retries)
File "/home/thomas/pialert/back/pialert.py", line 474, in execute_arpscan
arpscan_output = subprocess.check_output (arpscan_args, universal_newlines=True)
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sudo', 'arp-scan', '--ignoredups', '--bandwidth=512k', '--retry=3', '--localnet --interface=eth0']' returned non-zero exit status 1.
thomas in pihole in ~
1 % sudo arp-scan --localnet --interface=eth0
Interface: eth0, type: EN10MB, MAC: dc:a6:32:42:99:ca, IPv4: 175.0.0.5
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
175.0.0.1 2c:91:ab:97:98:e4 (Unknown)
…
18 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 2.242 seconds (114.18 hosts/sec). 17 responded