Ingo Ratsdorf
e3327d8718
adding CodeRabbit suggestion plus disconnect()
2025-09-28 19:08:38 +13:00
Ingo Ratsdorf
af986aa540
Fixes timezone issue in publishing
...
Ref: Issue https://github.com/jokob-sk/NetAlertX/issues/1204
2025-09-28 17:29:21 +13:00
Ingo Ratsdorf
06c38322ed
tweaks
2025-09-28 16:09:21 +13:00
Ingo Ratsdorf
3ece89379f
Merge branch 'jokob-sk:main' into mqtt-optimisations
2025-09-28 15:33:43 +13:00
Ingo Ratsdorf
5395524511
Make plugin loader more robust
...
Against stray folders, leftover artefacts and missing configs
2025-09-27 17:20:34 +12:00
Ingo Ratsdorf
4fef4a7dd4
make scheduler setup more robust against wrong scheduling
...
is the schedule input is incorrect, an error message is logged and the plugin will NOT run.
Creating a dummy schedule would throw the system out of balance as there's the danger of schedules running out of sync.
2025-09-27 16:52:50 +12:00
Ingo Ratsdorf
246777a290
Ubuntu 24 Installer rewrite
...
`setup.sh` and `start.sh` combined into a single script
netalertx now starts and runs via systemd unit, can be started, stopped and restarted
`systemctl start netalertx`
`systemctl stop netalertx`
`systemctl status netalertx`
etc
Logs to `journalctl` and output can be followed with `journalctl -f`
Amalgamated chmods
tuned chmods based on earlier feedback and discussion
install script accepts command line parameter:
- 'install' to continue and DELETE ALL!
- 'update' to just update from GIT (keeps your db and settings)
- 'start' to do nothing, leave install as-is (just run the start script, set up services etc)
Please have a look, comments welcome :-)
2025-09-27 13:18:43 +12:00
Ingo Ratsdorf
1823a8139b
Merge branch 'jokob-sk:main' into mqtt-optimisations
2025-09-25 19:43:09 +12:00
Ingo Ratsdorf
75ef310e9b
Merge branch 'jokob-sk:main' into mqtt-optimisations
2025-09-22 12:28:41 +12:00
Ingo Ratsdorf
1ee82f37ba
Ubuntu24 installer updates
...
Backporting Debian 13 installer updates
2025-09-21 07:14:47 +12:00
Ingo Ratsdorf
a51d0e72c7
DRY fix
...
avoiding repeat code in notification_instance.
Still a refactor would be great as the plugins_events table is getting filled in plugin.py and thus should be cleared in there.
2025-09-17 08:58:02 +12:00
Ingo Ratsdorf
8cbfd04db6
Renamed sub for readability
2025-09-16 07:49:17 +12:00
Ingo Ratsdorf
750fb33e1c
clearPluginObjects
...
added sub to be called during main loop to clear plugins_objects table
2025-09-15 15:54:51 +12:00
Ingo Ratsdorf
a20058a884
Merge branch 'jokob-sk:main' into mqtt-optimisations
2025-09-15 15:24:56 +12:00
Ingo Ratsdorf
3a4235a661
Merge branch 'installer-rework' of https://github.com/ingoratsdorf/NetAlertX into installer-rework
2025-09-13 18:25:27 +12:00
Ingo Ratsdorf
2762e8a30d
fixing out of memory issues
...
TMPFS runs out of memory, so removing size limits.
Fixing some order of execution
2025-09-13 18:25:22 +12:00
Ingo Ratsdorf
e6daa33bca
Fixes and tidy-ups
...
Some Flak8 fixes, some adjustments to logging levels, ie warnings and errors
2025-09-13 18:19:10 +12:00
Ingo Ratsdorf
8f00a28454
Numbering sequence corrected
2025-09-12 15:40:51 +12:00
Ingo Ratsdorf
e00f26658b
CodeRabbit suggestions
2025-09-12 15:16:25 +12:00
Ingo Ratsdorf
9943c98055
DOC updates
2025-09-12 14:55:30 +12:00
Ingo Ratsdorf
e0ffe8b424
Delete old Debian12 files
2025-09-11 21:11:04 +12:00
Ingo Ratsdorf
db42d7f577
Installer-rework
...
split installer structure into systems, updated non-functional Debian12 installer with some minor fixes to Ubuntu24 installer.
Updated docs.
2025-09-11 21:07:18 +12:00
Ingo Ratsdorf
786ae9305d
Merge branch 'jokob-sk:main' into db-caching
2025-09-11 16:59:31 +12:00
Ingo Ratsdorf
1874a5e641
CodeRabbit suggestionns
...
Added some of the hand picked suggestions, including some outside of the previous changes.
Some will improve documentation, some readability and some will affect performance.
2025-09-11 10:24:55 +12:00
Ingo Ratsdorf
f1e9ca2540
Merge branch 'jokob-sk:main' into db-caching
2025-09-11 07:24:18 +12:00
Ingo Ratsdorf
3390384ce3
DB functions tidyup
...
Added PRAGMAs for better DB performance on open. Integrated some Fake8 comments and eliminated some looping with more efficient pyton functions.
2025-09-10 18:22:05 +12:00
Ingo Ratsdorf
ccec89f419
Final fix
2025-09-10 12:38:33 +12:00
Ingo Ratsdorf
7f7b0a328f
Another fix to get_table_json
...
IIteration error is not a SQL error, so gotta catch generic errors, too
2025-09-10 12:32:23 +12:00
Ingo Ratsdorf
24eaf1e143
fixed get_table_json
...
This would throw a subsequent error
['[Database] - get_table_as_json ERROR:', TypeError("'NoneType' object is not iterable")]
2025-09-10 12:25:30 +12:00
Ingo Ratsdorf
99981754c9
Some more fixes
2025-09-10 11:54:05 +12:00
Ingo Ratsdorf
d31af28f08
Minor updates
...
Fixes typo in start.ubuntu.sh
Redirects output of python server to /dev/null
to avoid I/O errors if started from SSH for example
2025-09-10 11:44:41 +12:00
Ingo Ratsdorf and coderabbitai[bot]
2836996a21
Update server/db/db_helper.py
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-10 10:21:32 +12:00
Ingo Ratsdorf
db43ab9cf6
Fixes
...
Removed 'sudo' from all calls as the script already needs to run as sudo so it's pointless
2025-09-10 10:19:30 +12:00
Ingo Ratsdorf
a94c6a291e
DB result iteration fix on empty result
...
get_table_json would throw exceptions when trying to iterate over a NONE result, ie SQL query returned empty result.
2025-09-10 09:28:45 +12:00
Ingo Ratsdorf and coderabbitai[bot]
c6f0614570
Update install/ubuntu/start.ubuntu.sh
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-10 09:11:04 +12:00
Ingo Ratsdorf and coderabbitai[bot]
f64cd9ea28
Update install/ubuntu/start.ubuntu.sh
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-10 08:57:56 +12:00
Ingo Ratsdorf and coderabbitai[bot]
2482289ad6
Update install/ubuntu/start.ubuntu.sh
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-10 08:57:08 +12:00
Ingo Ratsdorf and coderabbitai[bot]
7863ab3b03
Update install/ubuntu/start.ubuntu.sh
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-10 08:52:14 +12:00
Ingo Ratsdorf and coderabbitai[bot]
b0d117c3b8
Update install/ubuntu/install.ubuntu.sh
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-10 08:49:48 +12:00
Ingo Ratsdorf
1399e3881a
Ubuntu installer
...
Adds bare metal installer for ubuntu. Tested with version 24.04. You may want to or have to change the PHPVERSION variable in the start script for other versions
2025-09-10 08:21:50 +12:00
Ingo Ratsdorf and coderabbitai[bot]
00c7bb65e1
Update server/helper.py
...
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-03 07:10:26 +12:00
Ingo Ratsdorf
9946f9affd
Merge branch 'jokob-sk:main' into contrib
2025-09-02 20:43:25 +12:00
Ingo Ratsdorf
8a003ad805
Merge branch 'jokob-sk:main' into contrib
2025-09-02 20:41:59 +12:00
Ingo Ratsdorf
5695f4f3e7
Adding secondary cache to settings
...
Caching get_setting_value independent from what backend is used.
2025-09-02 14:48:12 +12:00
Ingo Ratsdorf
36ea3e62fd
Added cache to get_settings
...
The settings file is read about 30 times per second and parsed from json. Cache function added for now.
2025-08-30 21:35:15 +12:00
Ingo Ratsdorf
8d3a4500e2
Merge branch 'jokob-sk:main' into contrib
2024-09-27 14:30:58 +12:00
Ingo Ratsdorf
b7b2e0bc65
fixes to MQTT publisher
...
This wasn't working for EMQX due to callback trigger delays it never connected. Also added a reconnect feature and a client id so it looks better in the EMQX connection dashboard. No confirmed to be working with Mosquitto and EMQX
2024-09-27 12:24:46 +12:00
Ingo Ratsdorf
9fcbd9d64e
DEFER break devicedetails page
...
Removed DEFER from ui_components as the device details page would not populate any more and the browser console would throw errors re function not found
2024-09-22 08:18:21 +12:00
Ingo Ratsdorf
c6888a79fd
Fixes CSS typo in deviceDetails
2024-09-22 08:13:09 +12:00
Ingo Ratsdorf
b7fa32f70a
Resolved issue with Paho V2 API
...
Chnaged client creation logic to V2 API as we are already using Paho2.0. Chnaged version selection from Paho version (which should not have been a user choice) to MQTT Protocol selection, which can be v3 or v5. Most modern MQQTT brokers like Mosquitta or EMQX support v5.
2024-08-17 14:00:39 +12:00
Ingo Ratsdorf
ef9aeea2d2
Fix for MQTT device tracker adding quotes to payload
2024-08-13 07:41:12 +12:00
Ingo Ratsdorf
bee84cf8b2
Fixed invalid escape sequence
...
\s is invalid in Python3 and must be \\s now
2024-08-12 22:19:04 +12:00