Skip to content

Releases: Samuel1698/fakeViewport

RELEASE v2.4.3

16 Aug 21:41

Choose a tag to compare

🐛 Fixed

  • Issue #40: Updating to Debian Trixie would break concurrent.futures
  • max_retries now correctly displays the default value as Blue.

🔥 Changed

  • get_driver_path now more robustly handles cached drivers. Aims to prevent rare occurence where a script restart would not fully close the geckodriver/chromedriver and it would prevent script execution with "file busy" error message.
  • Rework how main() determines if the process crashed before it's being called again. Aims to solve edge case where a power outage and a subsequent system restart would not reset the script_start_time file.

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.4.2

22 Jun 02:31

Choose a tag to compare

🐛 Fixed

  • Issue #38: Automatically attempt to dismiss modals from Ubiquiti by clicking the closeButton
  • Remove preventDefault from tooltip mouse event handlers. It would prevent the click from sending the command on touch-enabled devices.

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.4.1

12 Jun 04:53
d981f34

Choose a tag to compare

🔥🐛 v2.4.1: Visual Fixes & Cache

🔥Changed

  • driver_path gets cached in the same script run to prevent repeated calls to get_driver_path unless the script restarts.
  • monitoring.log flask logs now less verbose.
  • config tab in dashboard now has more clear coloring and a color-guide.

🐛 Fixed

  • update.py properly logs to viewport.log instead of monitoring.log.
  • Missing meta viewport tag in login page.
  • Update button not having a pointer cursor.

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.4.0

09 Jun 22:15

Choose a tag to compare

✨💥🐛 Edgecase Bug Fix & Login Page

💥 /api/script_uptime and /api/status return "null" instead of throwing a 500 Error if the file from which we read those values is invalid or does not exist.

✨ Added

  • stale_drivers_handler function clears driver directory of stale versions to save space.
  • handle_view checks for presence of elements that indicate the account that's trying to view the cameras lost permissions to view them.

🔥Changed

  • Swap some invocations of logging.info to logging.warning.
  • get_driver_path selects old version of the driver (if available) if the new version's download gets stuck.
  • handle_fullscreen_button tries to call driver.maximize_window() before attempting to click the full-screen button.
  • conftest.py scope limited to "session". Tests run 5x faster.
  • browser_handler catches InvalidArgumentException: Binary is not a browser executable.
  • api_handler filters out ANSI and Timestamps from the captured log output.
  • Use docstrings for function comments.

🐛 Fixed

  • Issue #35: process_handler properly filters invocation of viewport.py and monitoring.py from substring matching.
  • api_handler properly checks if it's a standalone invocation of the function in order to capture log output conditionally.
  • signal_handler call for driver.quit() is now a try...except block to ignore exceptions raised during exit.
  • browser_handler correctly prints and count the retry attempt.
  • RotatingFileHandler edgecase where a restart of the script would "reset" the 24 hour counter for rotating log files. Now rotating at Midnight.
  • Accessing /login without a referrer correctly lands at / if authenticated.

Dashboard

  • Last log entry does not display timestamp or log level.
  • Coloring logs moved to a shared function for both the logs tab and last log entry.
  • Check for data?.network? instead of existence of the element.
  • Rename info section to device.
  • Login page matches style of dashboard.
  • Dashboard tabs is expanded on bigger screens to display all the information at once.
  • Logout button

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.3.0

03 Jun 03:01

Choose a tag to compare

✨💥🐛 Dashboard Overhaul

💥 If you had integrated the API endpoints into another service, you have to change them to match the new ones. All the same information is present (and way, way more), but presented differently.

✨ Added

  • Feature #27: Automatic Updates without needing to console into the machine.
  • Feature #32: Add Pause banner on live-view if the mouse moves.
  • /api/self/restart endpoint to force monitoring.py to restart itself.
  • /api/update, /api/update/apply, and /api/update/changelog endpoints.
  • viewport --pause argument toggles execution of the automatic health checks.

💥Changed

  • Reworked the Dashboard to look and function better.
    • Light and Dark theme selection.
    • Added more information from the system, network and configuration.
    • Update button pulls the changelog from the latest release and will attempt to git pull on your directory and if that fails, will fetch the minimal version of the release and unzip it in your directory.
    • Logs tab displays a maximum of 600 lines from your log-file. Default is 10.
    • Config tab fetches your config.ini and will display the value in red if it's invalid. For the logging section, it will display in orange if it's changed from the default.
  • handleElements function can take an array of css classes instead of a single one. If Ubiquiti changes an element's class it's easier to fix.
  • Hidden Cursor and Player Elements reappear on mouse movement.
  • 💥 The api endpoints have drastically changed. Check the Endpoints section of the READ.ME for the new ones.

🐛 Fixed

  • Issue #31: Fix login handler breaking if browser had saved password #31
  • Issue #33: Login page using user instead of username for the field name.

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.2.3

18 May 00:53

Choose a tag to compare

✨ Added

  • minimize.sh will delete all development and test related files, as well as all files ending in .md to declutter install folder.
    Same as downloading the minimal version from the release.
  • uninstall.sh will remove the modifications the script makes outside the install folder:
    • Removes cron job if present
    • Removes alias in bashrc/zshrc if present
    • Removes Desktop shortcut if present
    • Removes all files from the directory except .env (in case you want a fresh re-install and want to keep the credentials and url saved.)

🔥Changed

  • setup.sh optionally sets up a cronjob to automatically start the script on startup.
  • setup.sh Now has a 250ms delay between each check because I didn't like how fast it spammed the console. If a change is about to be made it prints a new line before to separate it from successful checks.

🐛 Fixed

  • Moving the restart_scheduler logic to handle_view made it so that the crash detection would erroneously trigger on a restart and override the script start time. handle_restart now writes to a temporary file api/.restart that gets checked by the crash detection logic to determined if the script restarted or not.
  • Fix execution of browser_handler last retry attempt.

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.2.2

16 May 16:07
6f37c62

Choose a tag to compare

🔥Changed

  • browser_handler can now detect if installing the driver is taking too long and properly handle it as a retry attempt. Before, it would not raise an error and silently get stuck forever.
  • browser_handler can now catch unrecognized browser and raise an error.
  • Removed restart_scheduler thread and moved that logic to handle_view to avoid the complexity of dealing with 2 separate threads interacting with one another.
  • Signal Handler uses os._exit instead of sys.exit.

🐛 Fixed

  • Issue #25: API would clutter viewport.log with Flask logs meant for monitoring.log.
  • Issue #26: Script would silently exit with bad configuration file.
  • Remove killing viewport in --restart flag to prevent inconsistency in how script start time is determined to have crashed. Let main() handle the process.
  • Scheduling Restarts at the same time that a health check would happen no longer breaks execution of the script.

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.2.1

14 May 01:42

Choose a tag to compare

✨ Added

  • viewport --diagnose argument will look at your current .env and config.ini and look for errors.
  • browser_handler can now deal with dropped/lost connection while attempting to download the ChromeDrivers/GeckoDrivers.
  • Option to take screenshot on errors (Deleted after LOG_DAYS).
  • Test coverage now at 100% with 300 tests.

🔥Changed

  • config and env validation now a separate validate_config.py file.
  • Rewrite config.ini comments for brevity.
  • restart_handler now checks if invoked from within a terminal and replaces itself, otherwise it will detach into the background. viewport --restart still detaches into the background.
  • viewport -r will only restart if there's already a script running.
  • Fully validate relevant .env variables when using the monitoring api.

🐛 Fixed

  • Argument parsing now exclusively parses expected arguments.
  • log_error bad function call with e=None now correctly uses None instead.

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.2.0

09 May 21:00

Choose a tag to compare

💥 What's Changed

💥 If you were using a previous version of config.ini, the category previously known as [Chrome] has been changed to [Browser]. Either delete the old config file and re-run ./setup.sh or edit that category manually.

  • Added Firefox support
  • Added option for Scheduled Restarts in config.ini, and display it in the --status of the script.
  • Increase testing coverage

API

  • Added new endpoints:
    /api/logs
    /api/logs?limit= Displays the last N entries in the log file

    /api/next_restart Displays the next scheduled restart

  • Added logfile button to control panel to fetch /api/logs and display the last 100 log entries

Commit Difference
CHANGELOG


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files.
The no api is the same as minimal except it also does not include monitoring.py nor the html, css, and js files to run it.

RELEASE v2.1.5

01 May 00:02
1e78540

Choose a tag to compare

What's Changed

  • Add an explicit function to check the content of the page for common messages indicating a crashed tab on top of checking for the responsiveness of driver
  • Fix a bug where an exception would lead to an infinite restart loop instead of being handled correctly
  • Improve monitoring.py at the request of an user who wanted a way to start/restart/stop the script from their phone

Full Changelog: v2.1.4...v2.1.5


The full release is a copy of the entire repo. It's the same as cloning from the terminal.
The minimal is just what's needed to run the script - no tests or development files
The no api version does not include monitoring.py nor the html, css, and js files to run it.