Use ircama/just-the-docs. Add ET-4800 printer configuration

Automatically update version when pushing a tag

Update VERSION to v5.2.14

Update VERSION to v5.2.16

Better debugging

Update VERSION to v5.2.17

Fix bugs, improve prompts and add debug console (F7)

ref #42

Improved debug console

Update VERSION to v5.3.0

Usage of the text_console module

Update VERSION to v5.3.1
This commit is contained in:
Ircama 2024-11-10 13:15:29 +01:00
parent 2d478e45e3
commit c692b22b71
9 changed files with 536 additions and 178 deletions

View file

@ -11,6 +11,24 @@ jobs:
steps: steps:
- name: Git Checkout - name: Git Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0 # Fetch all history for accurate commits and tags
- name: Update VERSION in python file ui.py; commit and push updates
run: |
$filePath = "ui.py"
$VERSION = "${{ github.ref_name }}"
if ($VERSION.StartsWith('v')) {
$VERSION = $VERSION.Substring(1)
}
(Get-Content $filePath) -replace '^VERSION = ".*"$', "VERSION = `"$VERSION`"" | Set-Content $filePath
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add $filePath
git commit -m "Update VERSION to ${{ github.ref_name }}"
git remote set-url origin https://${GITHUB_USER}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push origin main
- name: Install Python - name: Install Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
@ -27,9 +45,7 @@ jobs:
pip install -r requirements.txt pip install -r requirements.txt
- name: Run PyInstaller to create epson_print_conf.exe - name: Run PyInstaller to create epson_print_conf.exe
run: > run: python -m PyInstaller epson_print_conf.spec -- --default
python -m PyInstaller epson_print_conf.spec -- --default
--version ${{ github.ref_name }}
- name: Zip the epson_print_conf.exe asset to epson_print_conf.zip - name: Zip the epson_print_conf.exe asset to epson_print_conf.zip
run: | run: |

View file

@ -28,6 +28,10 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Convert URLs to Autolink Format
run: |
# Find all markdown files and convert URLs to <autolink> format
find . -name "*.md" -exec sed -i 's#\([^<]\)\(http[s]\?://[^\s)\]]\+\)#[\1](<\2>)#g' {} +
- name: Setup Pages - name: Setup Pages
uses: actions/configure-pages@v5 uses: actions/configure-pages@v5
- name: Build with Jekyll - name: Build with Jekyll

2
.gitignore vendored
View file

@ -162,3 +162,5 @@ devices.xml
*.toml *.toml
*.srs *.srs
*.pickle *.pickle
.console_history

View file

@ -4,46 +4,44 @@ Epson Printer Configuration tool via SNMP (TCP/IP)
## Product Overview ## Product Overview
The *Epson Printer Configuration Tool* simplifies the management of Epson printers connected via Wi-Fi over the SNMP protocol. The Epson Printer Configuration Tool provides an interface for the configuration and monitoring of Epson printers connected via Wi-Fi using the SNMP protocol. A range of features are offered for both end-users and developers.
A range of features are offered for both end-users and developers, making it easier to administer and maintain Epson printers. The software also includes a configurable printer dictionary, which can be easily extended. In addition, it is possible to import and convert external Epson printer configuration databases.
The software provides a configurable printer dictionary, which can be easily extended. In addition, it is possible to import and convert external Epson printer configuration databases.
## Key Features ## Key Features
- __SNMP Interface__: Seamlessly connect and manage Epson printers using SNMP over TCP/IP, supporting Wi-Fi connections (not USB). - __SNMP Interface__: Connect and manage Epson printers using SNMP over TCP/IP, supporting Wi-Fi connections (not USB).
Printers are queried via Simple Network Management Protocol (SNMP) with a set of Object Identifiers (OIDs) used by Epson printers. Some of them are also valid with other printer brands. SNMP is also used to manage the EEPROM and read/set specific Epson configuration. Printers are queried via Simple Network Management Protocol (SNMP) with a set of Object Identifiers (OIDs) used by Epson printers. Some of them are also valid with other printer brands. SNMP is used to manage the EEPROM and read/set specific Epson configuration.
- __Detailed Status Reporting__: Produce a comprehensive printer status report (with options to focus on specific details). - __Detailed Status Reporting__: Produce a comprehensive printer status report (with options to focus on specific details).
Epson printers produce a status response in a proprietary "new binary format" named @BDC ST2, including a data structure which is partially undocumented (such messages Epson printers produce a status response in a proprietary "new binary format" named @BDC ST2, including a data structure which is partially undocumented (such messages
start with `@BDC [SP] ST2 [CR] [LF]` ...). It is used to convey various aspects of the status of the printer, such as errors, paper status, ink and more. The element fields of this format may vary depending on the printer model. The *Epson Printer Configuration Tool* can decode all element fields found in publicly available Epson Programming Manuals of various printer models (a relevant subset of fields used by the Epson printers). start with `@BDC [SP] ST2 [CR] [LF]` ...). @BDC ST2 is used to convey various aspects of the status of the printer, such as errors, paper status, ink and more. The element fields of this format may vary depending on the printer model. The *Epson Printer Configuration Tool* can decode all element fields found in publicly available Epson Programming Manuals of various printer models (a relevant subset of fields used by the Epson printers).
- __Advanced Maintenance Functions__: - __Advanced Maintenance Functions__:
- Open the Web interface of the printer (via the default browser). - Open the Web interface of the printer (via the default browser).
- Reset the ink waste counter. - Reset the ink waste counter.
The ink waste counters track the amount of ink discarded during maintenance tasks to prevent overflow in the waste ink pads. Once the counters indicate that one of the printer pads is full, the printer will stop working to avoid potential damage or ink spills. Resetting the ink waste counter extends the printer operation while a pad maintenance or tank replacement is programmed. The ink waste counters track the amount of ink discarded during maintenance tasks to prevent overflow in the waste ink pads. Once the counters indicate that one of the printer pads is full, the printer will stop working to avoid potential damage or ink spills. Resetting the ink waste counter extends the printer operation while a pad maintenance or tank replacement is programmed (operation that shall necessarily be pefromed).
- Adjust the power-off timer (for more accurate energy efficiency). - Adjust the power-off timer (for energy efficiency).
- Change the _First TI Received Time_, - Change the _First TI Received Time_,
The *First TI Received Time* in Epson printers typically refers to the timestamp of the first transmission instruction to the printer when it was first set up. This feature tracks when the printer first operated. The *First TI Received Time* in Epson printers typically refers to the timestamp of the first transmission instruction to the printer. This feature tracks when the printer first operated.
- Change the printer WiFi MAC address and the printer serial number (typically used in specialized scenarios where specific device identifiers are required). - Change the printer WiFi MAC address and the printer serial number (typically used in specialized scenarios where specific device identifiers are required).
- Read and write to EEPROM addresses for advanced configurations. - Read and write to EEPROM addresses.
- Dump and analyze sets of EEPROM addresses. - Dump and analyze sets of EEPROM addresses.
- Detect the access key (*read_key* and *write_key*) and some attributes of the printer configuration. - Detect the access key (*read_key* and *write_key*) and some attributes of the printer configuration.
The GUI includes some features that attempt to detect the attributes of an Epson printer whose model is not included in the configuration, which can also be used with known printers, to detect additional parameters. The GUI includes some features that attempt to detect the attributes of an Epson printer whose model is not included in the configuration; such features can also be used with known printers, to detect additional parameters.
- Import and export printer configuration datasets in various formats: epson_print_conf pickle, Reinkpy XML, Reinkpy TOML. - Import and export printer configuration datasets in various formats: epson_print_conf pickle, Reinkpy XML, Reinkpy TOML.
- Access various administrative and debugging options. - Access various administrative and debugging options.
- __User-Friendly Interfaces__: - __Available Interfaces__:
- __Graphical User Interface (GUI)__: Intuitive interface with an autodiscovery function that detects printer IP addresses and model names. - __Graphical User Interface__: [Tcl/Tk](https://en.wikipedia.org/wiki/Tk_(software)) platform-independent GUI with an autodiscovery function that detects printer IP addresses and model names.
- __Command Line Tool__: For users who prefer command-line interactions, providing the full set of features. - __Command Line Tool__: For users who prefer command-line interactions, providing the full set of features.
- __Python API Interface__: For developers to integrate and automate printer management tasks. - __Python API Interface__: For developers to integrate and automate printer management tasks.
@ -59,29 +57,12 @@ cd epson_print_conf
pip install -r requirements.txt pip install -r requirements.txt
``` ```
Alternatively, install requirements via command line:
```
git clone https://github.com/Ircama/epson_print_conf
pip3 install pyyaml
pip3 install pyasn1==0.4.8
pip3 install git+https://github.com/etingof/pysnmp.git
pip3 install tkcalendar
pip3 install pyperclip
pip3 install black
pip3 install tomli
cd epson_print_conf
```
With Python 12, also: `pip3 install pyasyncore`.
Notes (at the time of writing): Notes (at the time of writing):
- [before pysnmp, install pyasn1 with version 0.4.8 and not 0.5](https://github.com/etingof/pysnmp/issues/440#issuecomment-1544341598) - [before pysnmp, install pyasn1 with version 0.4.8 and not 0.5](https://github.com/etingof/pysnmp/issues/440#issuecomment-1544341598)
- [pull pysnmp from the GitHub master branch, not from PyPI](https://stackoverflow.com/questions/54868134/snmp-reading-from-an-oid-with-three-libraries-gives-different-execution-times#comment96532761_54869361) - [pull pysnmp from the GitHub master branch, not from PyPI](https://stackoverflow.com/questions/54868134/snmp-reading-from-an-oid-with-three-libraries-gives-different-execution-times#comment96532761_54869361)
This program exploits [pysnmp](https://github.com/etingof/pysnmp), with related [documentation](https://pysnmp.readthedocs.io/). This program exploits [pysnmp](https://github.com/etingof/pysnmp), basing on the related [documentation](https://pysnmp.readthedocs.io/).
It is tested with Ubuntu / Windows Subsystem for Linux, Windows. It is tested with Ubuntu / Windows Subsystem for Linux, Windows.
@ -130,17 +111,17 @@ With the GUI, the following operations are possible (from the file menu):
- Import an XML configuration file or web URL - Import an XML configuration file or web URL
This option allows to import the XML configuration file downloaded from https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d. Alternatively, this option directly accepts the [source Web URL](https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d) of this file, incorporating the download operation into the GUI. This option allows to import the XML configuration file downloaded from <https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d>. Alternatively, this option directly accepts the [source Web URL](https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d) of this file, incorporating the download operation into the GUI.
- Import a TOML configuration file or web URL - Import a TOML configuration file or web URL
Similar to the XML import, this option allows to load the TOML configuration file downloaded from https://codeberg.org/atufi/reinkpy/raw/branch/main/reinkpy/epson.toml and also accepts the [source Web URL](https://codeberg.org/atufi/reinkpy/raw/branch/main/reinkpy/epson.toml) of this file, incorporating the download operation into the GUI. Similar to the XML import, this option allows to load the TOML configuration file downloaded from <https://codeberg.org/atufi/reinkpy/raw/branch/main/reinkpy/epson.toml> and also accepts the [source Web URL](https://codeberg.org/atufi/reinkpy/raw/branch/main/reinkpy/epson.toml) of this file, incorporating the download operation into the GUI.
Other menu options allow to filter or clean up the configuration list, as well as select a specific printer model and then save data to a PICKLE file. Other menu options allow to filter or clean up the configuration list, as well as select a specific printer model and then save data to a PICKLE file.
### How to detect parameters of an unknown printer ### How to detect parameters of an unknown printer
First press "Detect Printers". If the printer is not in the configuration, press "Detect Access Keys". If the output does not show errors, press "Detect Configuration". These commands produce a tree view and a text view, which are useful to analyze whether there is a configured model that might be close or possibly same to target one. Notice that these operations take many minutes to complete and the printer shall be kept switched on for the whole period. Temporarily disabling the auto power-off timer is suggested. First press "Detect Printers". If the printer is not in the configuration, press "Detect Access Keys". If the output does not show errors, press "Detect Configuration". These commands produce a tree view and a text view, which are useful to analyze whether there is a configured model that might be close or possibly same to target one. Use the right key of the mouse to switch between the two views. Notice that these operations take many minutes to complete and the printer shall be kept switched on for the whole period. Temporarily disabling the auto power-off timer is suggested.
### How to revert a change performed through the GUI ### How to revert a change performed through the GUI
@ -277,7 +258,7 @@ This repository includes a Windows *epson_print_conf.exe* executable file which
### parse_devices.py ### parse_devices.py
Within a [report](https://codeberg.org/atufi/reinkpy/issues/12#issue-716809) in repo https://codeberg.org/atufi/reinkpy there is an interesting [attachment](https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d) which includes an extensive XML database of Epson model features. Within a [report](https://codeberg.org/atufi/reinkpy/issues/12#issue-716809) in repo <https://codeberg.org/atufi/reinkpy> there is an interesting [attachment](https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d) which includes an extensive XML database of Epson model features.
The program *parse_devices.py* transforms this XML DB into the dictionary that *epson_print_conf.py* can use. It is also able to accept the [TOML](https://toml.io/) input format used by [reinkpy](https://codeberg.org/atufi/reinkpy) in [epson.toml](https://codeberg.org/atufi/reinkpy/src/branch/main/reinkpy/epson.toml), if the `-T` option is used. The program *parse_devices.py* transforms this XML DB into the dictionary that *epson_print_conf.py* can use. It is also able to accept the [TOML](https://toml.io/) input format used by [reinkpy](https://codeberg.org/atufi/reinkpy) in [epson.toml](https://codeberg.org/atufi/reinkpy/src/branch/main/reinkpy/epson.toml), if the `-T` option is used.
@ -694,30 +675,30 @@ snmpget -v1 -d -c public 192.168.1.87 1.3.6.1.4.1.1248.1.2.2.44.1.1.2.1.124.124.
### References ### References
epson-printer-snmp: https://github.com/Zedeldi/epson-printer-snmp (and https://github.com/Zedeldi/epson-printer-snmp/issues/1) epson-printer-snmp: <https://github.com/Zedeldi/epson-printer-snmp> (and <https://github.com/Zedeldi/epson-printer-snmp/issues/1>)
ReInkPy: https://codeberg.org/atufi/reinkpy/ ReInkPy: <https://codeberg.org/atufi/reinkpy/>
ReInk: https://github.com/lion-simba/reink (especially https://github.com/lion-simba/reink/issues/1) ReInk: <https://github.com/lion-simba/reink> (especially <https://github.com/lion-simba/reink/issues/1>)
reink-net: https://github.com/gentu/reink-net reink-net: <https://github.com/gentu/reink-net>
epson-l4160-ink-waste-resetter: https://github.com/nicootto/epson-l4160-ink-waste-resetter epson-l4160-ink-waste-resetter: <https://github.com/nicootto/epson-l4160-ink-waste-resetter>
epson-l3160-ink-waste-resetter: https://github.com/k3dt/epson-l3160-ink-waste-resetter epson-l3160-ink-waste-resetter: <https://github.com/k3dt/epson-l3160-ink-waste-resetter>
emanage x900: https://github.com/abrasive/x900-otsakupuhastajat/ emanage x900: <https://github.com/abrasive/x900-otsakupuhastajat/>
### Other programs ### Other programs
- Epson One-Time Maintenance Ink Pad Reset Utility: https://epson.com/Support/wa00369 - Epson One-Time Maintenance Ink Pad Reset Utility: <https://epson.com/Support/wa00369>
- Epson Maintenance Reset Utility: https://epson.com/epsonstorefront/orbeon/fr/us_regular_s03/us_ServiceInk_Pad_Reset/new - Epson Maintenance Reset Utility: <https://epson.com/epsonstorefront/orbeon/fr/us_regular_s03/us_ServiceInk_Pad_Reset/new>
- Epson Ink Pads Reset Utility Terms and Conditions: https://epson.com/Support/wa00370 - Epson Ink Pads Reset Utility Terms and Conditions: <https://epson.com/Support/wa00370>
- Epson Adjustment Program (developed by EPSON) - Epson Adjustment Program (developed by EPSON)
- WIC-Reset: https://www.wic.support/download/ / https://www.2manuals.com / (Use at your risk) - WIC-Reset: <https://www.wic.support/download/> / <https://www.2manuals.com/> (Use at your risk)
- PrintHelp: https://printhelp.info/ (Use at your risk) - PrintHelp: <https://printhelp.info/> (Use at your risk)
### Other resources ### Other resources
- https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d - <https://codeberg.org/attachments/147f41a3-a6ea-45f6-8c2a-25bac4495a1d>
- https://codeberg.org/atufi/reinkpy/src/branch/main/reinkpy/epson.toml - <https://codeberg.org/atufi/reinkpy/src/branch/main/reinkpy/epson.toml>

14
SECURITY.md Normal file
View file

@ -0,0 +1,14 @@
# ELM327-emulator Security Policy
*ELM327-emulator* is a testing software which is not expected to run in production environments. Considering that the dictionary allows executing user-defined commands,
it is important to revise any third-party customization to avoid that security flaws are introduced.
Security bugs will be taken seriously and,
if confirmed upon investigation, a new patch will be released within a reasonable amount of time, including a security bulletin and the credit to the discoverer.
Warning: when using the TCP/IP networking, the INET socket is bound to all interfaces.
## Reporting a Security Bug
The way to report a security bug is to open an [issue](https://github.com/Ircama/ELM327-emulator/issues) including related information
(e.g., reproduction steps, version).

View file

@ -1,12 +1,11 @@
remote_theme: bmndc/just-the-docs remote_theme: ircama/just-the-docs
# Enable or disable the site search
# Supports true (default) or false
search_enabled: false search_enabled: false
# For copy button on code
enable_copy_code_button: true enable_copy_code_button: true
heading_anchors: true
aux_links:
"epson_print_conf on GitHub":
- "https://github.com/Ircama/epson_print_conf/"
aux_links_new_tab: true
nav_enabled: false
# Table of Contents # Table of Contents
# Enable or disable the Table of Contents globally # Enable or disable the Table of Contents globally
@ -26,6 +25,54 @@ toc:
# Supports true or false (default) # Supports true or false (default)
flat_toc: false flat_toc: false
# By default, consuming the theme as a gem leaves mermaid disabled; it is opt-in
mermaid:
# Version of mermaid library
# Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/
version: "9.1.6"
# Put any additional configuration, such as setting the theme, in _includes/mermaid_config.js
# See also docs/ui-components/code
# To load mermaid from a local library, also use the `path` key to specify the location of the library; e.g.
# for (v10+):
# path: "/assets/js/mermaid.esm.min.mjs"
# for (<v10):
# path: "/assets/js/mermaid.min.js"
# Note: copy both `mermaid.esm.min.mjs` (v10+) or `mermaid.min.js` (<v10) and the associated `.map` file from the specified version of `mermaid/dist` to `/assets/js/`.
# Enable or disable heading anchors
heading_anchors: true
# Aux links for the upper right navigation
aux_links:
"epson_print_conf on GitHub":
- "https://github.com/Ircama/epson_print_conf/"
# Makes Aux links open in a new tab. Default is false
aux_links_new_tab: true
# Enable or disable the side/mobile menu globally
# Nav menu can also be selectively enabled or disabled using page variables or the minimal layout
nav_enabled: false
# Sort order for navigation links
# nav_sort: case_insensitive # default, equivalent to nil
nav_sort: case_sensitive # Capital letters sorted before lowercase
# External navigation links
nav_external_links:
- title: Just the Docs on GitHub
url: https://github.com/just-the-docs/just-the-docs
# Show navigation error report
nav_error_report: true # default is false/nil.
liquid:
error_mode: strict
strict_filters: true
# Footer content
# appears at the bottom of every page's main content
# Back to top link # Back to top link
back_to_top: true back_to_top: true
back_to_top_text: "Back to top" back_to_top_text: "Back to top"
@ -44,12 +91,40 @@ gh_edit_branch: "main" # the branch that your docs is served from
# gh_edit_source: docs # the source that your files originate from # gh_edit_source: docs # the source that your files originate from
gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately
# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define
color_scheme: nil
callouts_level: quiet # or loud
callouts:
highlight:
color: yellow
important:
title: Important
color: blue
new:
title: New
color: green
note:
title: Note
color: purple
warning:
title: Warning
color: red
# Google Analytics Tracking (optional)
# Supports a CSV of tracking ID strings (eg. "UA-1234567-89,G-1AB234CDE5")
# Note: the main Just the Docs site does *not* use Google Analytics.
# ga_tracking: UA-2709176-10,G-5FG1HLH3XQ
# ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default)
plugins: plugins:
- jekyll-autolinker - jekyll-seo-tag
- jekyll-github-metadata
- jekyll-sitemap
- jekyll-autolinks
- jekyll-remote-theme # Add if not already present - jekyll-remote-theme # Add if not already present
- jekyll-include-cache # Optional, for caching - jekyll-include-cache # Optional, for caching
kramdown: kramdown:
syntax_highlighter_opts: syntax_highlighter_opts:
block: block:
@ -63,4 +138,8 @@ compress_html:
blanklines: false blanklines: false
profile: false profile: false
# ignore: # ignore:
# envs: all
autolinks:
link_attr: 'target="_blank"'
skip_tags: ["a", "pre", "code", "kbd", "script"]

View file

@ -366,6 +366,35 @@ class EpsonPrinter:
"ET-2813", "ET-2815" "ET-2813", "ET-2815"
], ],
}, },
"ET-4800": {
"read_key": [74, 54],
"write_key": b"Maribaya",
"main_waste": {"oids": [48, 49, 47], "divider": 63.46},
"borderless_waste": {"oids": [50, 51, 47], "divider": 34.16},
"third_waste": {"oids": [252, 253, 254], "divider": 13.0},
"raw_waste_reset": {
48: 0, 49: 0, 47: 0, 52: 0, 53: 0, 54: 94, 50: 0, 51: 0,
55: 94, 28: 0, 252: 0, 253: 0, 254: 0, 255: 94
},
"stats": {
"Manual cleaning counter": [90],
"Timer cleaning counter": [89],
"Power cleaning counter": [91],
"Total print pass counter": [133, 132, 131, 130],
"Total print page counter": [776, 775, 774, 773],
"Total scan counter": [1843, 1842, 1841, 1840],
"Total scan counter % (ADF)": [1855, 1854, 1853, 1852],
"Ink replacement counter %-- Black": [554],
"Ink replacement counter %-- Cyan": [555],
"Ink replacement counter %-- Magenta": [556],
"Ink replacement counter %-- Yellow": [557],
"Maintenance required level of 1st waste ink counter": [54],
"Maintenance required level of 2nd waste ink counter": [55],
"Maintenance required level of 3rd waste ink counter": [255],
},
"serial_number": [range(793, 803), range(1604, 1614)],
"wifi_mac_address": range(1920, 1926),
},
"L3150": { "L3150": {
"alias": ["L3151", "L3160", "L3166", "L3168"], "alias": ["L3151", "L3160", "L3166", "L3168"],
"read_key": [151, 7], "read_key": [151, 7],

View file

@ -6,3 +6,4 @@ tkcalendar
pyperclip pyperclip
black black
tomli tomli
text-console

462
ui.py

File diff suppressed because it is too large Load diff