+++4.13.19+++(4.3.2025)
Ignore when updating of libraries fails, since this indicates a corrupt Python install and nothing can be done about it.

+++4.13.18+++(4.3.2025)
Add .venv to list of folders that are not deleted by installer.

+++4.13.17+++(12.3.2024)
Fix update mechanism to correctly extract SiWIM-I v5 when upgrading.
- Hysteresis:
    * Value no_vpn_host_end is now capped at 30 in order to avoid application hanging.
- Receive (Arh):
    * Fix a bug with functionality introduced in 4.13.15. Application now works correctly if zone_name is missing/empty.

+++4.13.16+++(5.1.2024)
- Status:
    * Implement support for Teltonika firmware RUT9_R_00.07.06

+++4.13.15+++(6.12.2023)
- Status:
    * Fix a bug causing obtaining info from routers with newer Teltonika firmware to fail if GPS information is missing.
- Receive (Arh):
    * Now checks for value "trigger/zone_name/@value" and use that as lane, before trying to calculate it. Value should be formatted as "L<number>". A warning is written if the value is not found or not formatted correctly.
    * Message "Result list acquisition timeout error in arh" is now debug level and a warning is written instead. This is due to the raised exception not being properly handable in Python2.

+++4.13.14+++(24.11.2023)
- Output Client:
    * Fix a bug that caused vehicles to be buffered when the server isn't active.
- Status:
    * Implement support for Teltonika firmware RUT9_R_00.07.05. 07.02.1 no longer supported.

+++4.13.13+++(17.11.2023)
- Status:
    * Backported support for newer Teltonika firmware RUT9_R_00.07.02.1

+++4.13.12+++(19.10.2023)
- Output:
    * After consulting with the spirit of common sense it became clear that "rsync_event_path", added in 4.13.11, should be set in Output.

+++4.13.11+++(19.10.2023)
- Receive:
    * "rsync_event_path" is now added to downstream modules.

+++4.13.10+++(18.10.2023)
- Output:
    * Fix a Python2 specific bug in output modules that caused problems when saving to file if path didn't exist.

+++4.13.9+++(12.10.2023)
- Output Client:
    * Fix some issues so it actually works.

+++4.13.8+++(28.8.2023)
- Alarm:
    * Now logs whether shutdown command to SiWIM-E was successfully sent.
- Camera (Moboxix):
    * Implement adding info on which lense (left/right) took the photo.
- Add new module Output Client.

+++4.13.7+++(9.6.2023)
- Camera:
    * Add request url to warning message indicating that no photos could be received for M15 and M16.

+++4.13.6+++(10.5.2023)
- Camera:
    * Fix compatibility issues with Python3 for M10 and M12 cameras.
    * Fix a typo that prevented saving blobs when saving of photo fails.

- Communication, Hysteresis, Picture:
    * Add sleeps to fatal errors caused by connection problems or serial problems.

- CTU:
    * Add specialised handling for serial problems.

- Output:
    * Add printing of message indicating that output file is probably corrupted.

+++4.13.5+++(24.3.2023)
- Camera:
    * Fix incorrect formatting that's not compatible with Python2.

+++4.13.4+++(24.3.2023)
- Camera:
    * Fix a bug causing axis and mobotix modules to incorrectly restart when 10 vehicles pass on a lane the camera is NOT covering.

+++4.13.3+++(23.3.2023)
- Camera:
    * Add warning messages to all paths that result in no photo for mobotix cameras.

+++4.13.2+++(24.2.2023)
- Camera:
    * Add mechanism that restarts the module if 10 or more consecutive vehicles don't have a photo.

+++4.13.1+++(19.10.2022)
- Add file consts.py, which will hold global constants as well as global variables. SiWIM-I may become a class that runs everything rendering the latter obsolete.
- Receive:
    * Information on SiWIM-E version and site name is now obtained once, when cestel Receive module restarts.
- Status:
    * Incorrect messages about failing to obtain SiWIM-E info and VPN status on a secondary Status module that doesn't have access to COM1 port have been removed.

+++4.13.0+++(8.9.2022)
- Implement command reboot in communication module, which reboots the device.
- Fix a bug causing application to crash when version can't be read (shouldn't happen unless someone manually messes with .version file).
- Fix a bug causing another --update argument to be added when updating fails.

+++4.12.3+++(23.8.2022)
- General:
    * Merge fix from 4.11.7 into this branch (without additional error handling because it's not Python2 compatible).
- Hysteresis:
    * Clarify why module is restarting when VPN IP is unreachable.

+++4.12.2+++(8.8.2022)
- Efoy:
    * If connection to module times out, application will send a request once per minute until it gets a response.
    * Fix an oversight causing application to hang for up to an hour when restarting.

+++4.12.1+++(5.8.2022)
- General:
    * Remove --memory argument, since memory related issues are more easily tracked with Zabbix.
    * Replace getopt with argparse for parameter parsing.
- Efoy:
    * Refactor module to work as intended (one query per hour).

+++4.12.0+++(8.7.2022)
- General:
    * .version file generated with cestel_helpers.version is now used to obtain application version (previous way used as fallback for now).
    * Hashes of all files are checked and a warning printed if any of them don't match.
- Camera:
    * Change warning message for when photo isn't matched in allotted time.

+++4.11.7+++(23.8.2022)
- Camera (axis):
    * Axis and ffgroup will now correctly resolve situations when there's no photo.
    * Add additional error handling to ffgroup that stores raw data if conversion to image fails (probably redundant).
    * Move message "Saving image" to DEBUG level.
    * Modify message that is logged when there's no photo to include name.

+++4.11.6+++(2.8.2022)
- Efoy:
    * Hotfix preventing obtaining of fuel level from failing.

+++4.11.5+++(8.7.2022)
- Application now attempts to update missing libraries automatically on startup.
- Camera:
    * Fix a bug causing M14 and M15 to not work on MK3 systems.

+++4.11.4+++(7.7.2022)
- Efoy:
    * A warning is now printed when connection times out.

+++4.11.3+++(6.7.2022)
- Hist:
    * Fix an oversight causing an incorrect error message when port is not set to auto.

+++4.11.2+++(6.7.2022)
- Conf:
    * New global parameter e_path which can be used when path to SiWIM-E is non-standard.
- Camera and Picture:
    * Various stability fixes aimed primarily at MK3 systems.
    * Fix some oversights that could cause application to hang.
- Hist:
    * Linux compatibility fixes.

+++4.11.1+++(21.6.2022)
- Fix for Vidar lane determination not working correctly on MK3.
- Efoy:
    * Now (again) works on MK3.
    * An info message is logged when connection to EDGAR is established.

+++4.11.0+++(16.6.2022)
- General:
    * Limited Linux compatibility. Most functionality should work.
    * Irrelevant message "Provider load failure." is no longer printed on MK3 machines.
    * Update of backup_script.py is only launched on Win10.
    * Minor logging overhaul. Logs between MK3 and MK4 should now be more consistent. No longer using deprecated log and log_exception functions.
    * Project reformatted for PEP8 compliance.
    * Remove cestel_exceptions.py, since they weren't used.
    * Use packaging library to simplify how versions are compared. Any number of digits are now supported.
    * Disable updating to v5 for Python2 in preparation for it.
- Aggregation:
    * No longer setting 0x01 flag, since mp are blurred anyways.
- Receive:
    * Add saving of speed in arh.
- Dependencies:
    * cestel-helpers==0.3.0
    * packaging==21.3 (20.9 for Python2)
    * py-logging==2.1.0

+++4.10.38+++(17.5.2022)
- Added orange flag (mp_mode).
- Fix an oversight causing checking whether system is Windows to fail in several places in status module.
- Fix an error that occurs regarding LED functionality when there's more than one status module.

+++4.10.37+++(16.5.2022)
- Add functionality for turning on leds connected on COM1 for purpose of checking if device is in VPN and if siwim_mcp.exe is running.
- Fuel levels are now saved to efoy folder (was can).

+++4.10.34+++(18.1.2022)
- Efoy module (fuel levels) added.
- Technix receiver rehabilitated.
- Hist module will now stop communicating with hysteresis if VPN (or any other) server isn't accessible (configurable).
- ARH receiver bugfix.
- Comm module logging and conf backuping rework.

+++4.10.33+++(15.12.2021)
- Fixed a bug introduced in 4.10.31, where we introduced a new way of conf parsing.

+++4.10.32+++(13.12.2021)
- Got Papago up to speed with the other temperature modules.

+++4.10.31+++(24.11.2021)
- ARH-Vidar acquisition drivers.
- Cypher support.
- The Return of the Papago.

+++4.10.30+++(5.10.2021)
- Multiple ADMP support.
- An experimental feature of reclassifying buses that (according to ffgroup) aren't actually buses. Or vice-versa.
- An updater bug fix (very smol).
- Bug fix in photo lookup (that I introduced not too long ago).

+++4.10.28+++(29.7.2021)
- Fix bug with COM port autodetection not working on Windows XP because it uses an older version of PySerial.

+++4.10.27+++(28.7.2021)
- Hysteresys module; COM port auto-detection
- Hysteresys module; there was a bug causing the module to not transition into "dead" state when finished (preventing proper SiWIM-I restarts)
- Life event logging capacity removed until further notice; have to rethink the strategy
- Status module; a less hungry way of determining SiWIM-E's version (RAM usage should now be considerably lower)
- Picture module; there was a bug occurring while trying to locate license plate photos. Solved.
- Updater; updater will now attempt to clear redundant files in siwim_i/ folder. 

+++4.10.26+++(8.6.2021)
- Fixed an issue that would occasionally crash i due to an empty sys_diagnostics files
- Added an optional "protocol" parameter for SiWIM-I update checking (http/https; https by default), update_protocol tag
- Removed extra separator from temp log
- Extra optional arguments for can (mk address)

+++4.10.25+++(29.4.2021)
- Heartbeat message added to output_module.

+++4.10.24+++(8.4.2021)
- Some code cleaning.
- SiWIM-E resets are now being logged explicitly.
- "Life event logging" -> i_reset, e_reset counts-per-measurement are now logged in log/sys_diagnostics.xml.
- Site name is no longer transmitted from siwim receive downwards, but is instead determined by runner and then broadcasted to all modules. 
- Hysteresis now also logs amperage.

+++4.10.22+++(17.3.2021)
- Managed to introduce som bugs in previous ver. Aggr mechanism for clearing old data was erroneous.
- Fixed a bug causing 2.7-3.8 incompatibility (axis camera).
- Comark receiver now considers actual data as a "heartbeat" as well.

+++4.10.21+++(15.3.2021)
- Saving aggregated data to disk moved to output.
- Output filtering.
- Old non-boss data no longer deleted (instead it's forwarded to output).

+++4.10.20+++(22.2.2021)
- SiWIM-I now has the capacity to reset SiWIM-E at no traffic alarm trigger time.
- FFgroup lp photos are now created via whole frame crop and are no longer downloaded directly. This is due to the (too short) lifespan of FFgroup's LP photo links.
- Explicit shutdown-close socket terminations in receive (in hopes of avoiding weird stuff)

+++4.10.19+++(16.2.2021)
- Removed CaMMRa's ability to save to disk in one of the previous revisions now. Reverting this.

+++4.10.18+++(16.2.2021)
- Some siwim receiver tinkering; it shouldn't enter purgatory, induced by improperly terminated connection on the other side, anymore.

+++4.10.17+++(12.2.2021)
- Finally solved conf message handling properly.  

+++4.10.16+++(9.2.2021)
- Mobotix camera model should now fail "properly".
- Fixed a bug in siwim_i that would prevent i from updating. 

+++4.10.15+++(5.2.2021)
- Cleaned up camera a little
- Added country code and confidence to FFgroup
- Added defaults to (runner) conf parsing, where I thought them senseful
- Added vpn status to "status"
- Tried to clean up can a little, so there's less clutter in the network
- A hack for FFgroup ANPR photos

+++4.10.14+++(2.2.2021)
- Added can uptime logging
- Added all "receivable" fw versions to status

+++4.10.13+++(2.2.2021)
- Some minor optimisations to communication (shouldn't effect anything, just seemed cleaner)
- Actual photo timestamps added to jpegs

+++4.10.12+++(21.1.2021)
- Mobotix cross-compatibility (Py2-Py3)

+++4.10.11+++(17.12.2020)
- Aggregation module optimisation (matching_timeout, deleting old entries ...).
- Max client threads is now a settable parameter for output and picture (max_client_threads).
- "Custom" conf path is now settable via --conf= optional parameter.

+++4.10.10+++(11.12.2020)
- Some further tweaking to FFGroup receive (and camera) methods. There were some Mk3 incompatibilities.

+++4.10.9+++(12.11.2020)
- Receive and aggregation module's save_to_file methods should now be a bit more robust (they should even be able to handle some minor xml glitches, caused by shutting down I abruptly). 

+++4.10.8+++(3.11.2020)
- FFgroup module will now add location (front/end) tag to its anpr elements.
- It will also do its best to map ROIs to actual driving lanes.

+++4.10.7+++(30.10.2020)
- Restarting is now done using module's self.end variable rather than raising an exception.

+++4.10.6+++(29.10.2020)
- Output and picture modules are now restarted once the thread limit is reached.

+++4.10.5+++(29.10.2020)
- Add thread limit to output and picture modules.

+++4.10.4+++(22.10.2020)
- FFgroup ROI-lane mapping.
- Extended picture request parsing (request can now contain exact (or partial) picture location).

+++4.10.3+++(20.10.2020)
- Added exception handling for restarting dead modules.

+++4.10.2+++(8.10.2020)
- Fix a bug causing router information from old Sierra routers to not be forwarded correctly.
- Add default value for IMSI back.

+++4.10.1+++(8.10.2020)
- Had to add fake voltage. Relevant only on Ravbarkomanda as there is no ctu/hyst module in i (the systems there are somwhere in between mk3 and mk4). Might also be relevant once we try asimilating ird.

+++4.10.0+++(7.10.2020)
- New release.

+++4.9.35+++(29.9.2020)
- Support for adding cam info to status.

+++4.9.34+++(25.9.2020)
- Had to make some changes to receive and camera in order to accommodate ffgroup's licence plate photos.

+++4.9.33+++(14.9.2020)
Add update channel information to startup message.
Fix bug which ignored the --debug flag.
Add --memory flag for obtaining basic information about memory usage.

+++4.9.32+++(11.9.2020)
Removed one explicit exception declaration (ConnectionResetError) from picture module. Was causing issues.
Disable QuickEdit mode on Windows 10 machines which should fix the resetting issue.

+++4.9.31+++(9.9.2020)
Change system version to no longer contain 'MK'.

+++4.9.30+++(8.9.2020)
Add updating backup.py to I's update procedure.

+++4.9.29+++(3.9.2020)
Sierra bug fix.

+++4.9.28+++(3.9.2020)
Fix obtaining of USB information to work on MK3.

+++4.9.27+++(2.9.2020)
Fix auto-updates to work on MK3.
Add flags for update and debug mode. Run application with -h for details.
Libraries are now checked/downloaded only if the application is run with update flag. The flag is applied automatically when a new version of I is downloaded. If correct libraries are already installed, nothing is downloaded.

+++4.9.26+++(1.9.2020)
Add upgrading of pip to checking for package upgrades routine.

+++4.9.25+++(31.8.2020)
Trying to do something about SiWIM-I reset-related issues. May or may not work. 

+++4.9.24+++(28.8.2020)
Fix error handling to no longer write exceptions that occur when getting usb info into main console.

+++4.9.23+++(28.8.2020)
Add a missing package to requirements.

+++4.9.22+++(28.8.2020)
Implement automatic installation of missing libraries.

+++4.9.21+++(26.8.2020)
Fix a bug with ConfigParser failing when there's a duplicate entry (makes branch 4.9.6.1 redundant)
Add usb information to status (MK3 only)

+++4.9.20+++(26.8.2020)
Change ConnectionRefusedError exception to blanket exception, as it's not defined in Python2

+++4.9.19+++(25.8.2020)
- Temperature/voltage is now being saved to ext (exact location is pushed to status)
- Can-received voltages (digital/analogue) added to status

+++4.9.18+++(21.8.2020)
- Add error catching for the case when connected client drops connection before receiving error message

+++4.9.17+++(20.8.2020)
- Some changes to cammra receiver (and aggregation)
- Added another parameter to receive module; vehicle_end, can be 1 or 0; it determines whether we're interested in vehicle start or vehicle end when calculating offsets
- Added another message type to communication module; download_swmstat

+++4.9.16+++(18.8.2020)
- Change siwim version to use arabic numbers.
- Prefix router data regarding gsm with 'gsm_'

+++4.9.15+++(17.8.2020)
- Add imei, frequency band and signal quality to statistics obtained from router

+++4.9.14+++(11.8.2020)
- Added Comark retransmission server to receive_module.py.
- A small bug fix in camera module; wait_for_future was waiting for too long

+++4.9.13+++
- Move cestel_logging.py to submodule.
- Add error catching for connection refused error when resetting.

+++4.9.12+++
- Remove ImageArray from json string received by cammra type cameras.

+++4.9.11+++
- Remove logging of the whole data block when an error occurs in the receive module.

+++4.9.10+++
- Fix an error causing an infinite logging loop when exception is caught.

+++4.9.9+++
- Add exception logging for exceptions in receive module when cammra fails.

+++4.9.8+++
- Changed default comm port to 8173 (from 50004)
- Multiple photo types support

+++4.9.7+++
- Implement obtaining EMSI and router location for available routers.

+++4.9.6+++(1.7.2020)
- Reimplement the project to be Python2.7 and Python3.8 compatible.
- Replace urllib and http.client with requests.
- Reimplement obtaining E information with pefile.
- Reimplement obtaining disk information with psutil.
- Revamp logging.
- Remove papago module.
- Add siwim_version to status.
- Add ports info to status.
- Added support for Tim's axis api.

+++4.9.5+++(8.5.2020)
- Replaced the previously added cant_module with can_module. It has some extra features that are in accordance with the (not-so) recent can changes. 

+++4.9.4+++(17.4.2020)
- Exception logging revamp
- Fix to daily aggregation XMLs (xml and swd versions were missing)
- FFgroup interface photos
- Added cant module (can temperature)

+++4.9.3+++(30.3.2020)
- Fixed photo story.

+++4.9.2+++(27.3.2020)
- i_updater.py was being copied to siwim_i root directory during update; fixed that issue

+++4.9.1+++(25.3.2020)
- bug fixes (threading-related)

+++4.9.0+++(18.3.2020)
- extended versioning
- changelog
- bug fixes
- photo locations (from "+01" to "p01" for stories; middle image is now "p00")
- linux support
- by-lane integration
- support for macq (ANPR provider) photos
- added reset, alive and download_log message handlers (ife communication)
- VPN connection is now being checked via ping (instead of socket probing)
- support for full-story picture get (also updated vehiclephotos2jpg executable for that same purpose)
- support for macq, cammra and vaxtor (ANPR providers -- vaxtor also required an ugly hack for ADR) data
- data flow control for papago, hist and ctu _modules 
