Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2023-6.0 #168

Merged
merged 31 commits into from
Jul 19, 2023
Merged

v2023-6.0 #168

merged 31 commits into from
Jul 19, 2023

Conversation

Pack3tL0ss
Copy link
Owner

  • ✨ Add full support for ser2netv4 add/change/rename via rename(rn) option in the menu, and the consolepi-addconsole.
  • ✨ Add consolepi-convert command, which will parse an existing ser2netv3 config (/etc/ser2net.conf) and create/update a ser2netv4 config (/etc/ser2net.yaml)
  • ⚡ Convert remote ConsolePi updates to async (they were already using threading)
  • ⚡ Convert remote ConsolePi updates to async (they were already using threading)
  • 🔊 Update Spinner with the name of the remote as reachability is being check for remote ConsolePis. Make failures persistent (spinner shows what failed and continues one line down.)
  • The various consolepi-services that run as daemons (for remote discovery) now display a descriptive process name (i.e. when running top and the like) vs generically python3
  • 🚧 (Requires manual setup for now see issue #119) Add ability to ssh directly to an adapter specifying adapter by name
    • i.e. ssh -t <consolepi address> -p 2202 <device name>
    • real example ssh -t consolepi4 -p 2202 r1-8360-TOP will connect to the defined udev alias /dev/r1-8360-TOP connected to remote ConsolePi ConsolePi4 (you could use ip vs hostname)

    The examples uses a predictable device name (r1-8360-TOP) vs. the default /dev/ttyUSB# Use consolepi-addconsole or the rename(rn) option in consolepi-menu to discover and apply predictable names to connected serial adapters.

    • This feature retains power-control, so if r1-8360-TOP has an outlet linked to it, connecting to the device will automatically verify the outlet is on, and turn it on if not. See Power Control Setup for more details.
    • This is a work in progress. The sshd config still needs to be automated but can be manually created. Just place the following in a new file /etc/ssh/sshd_config.d/consolepi.conf and restart ssh systemctl restart ssh
    Port 22
    Port 2202
    AddressFamily any
    ListenAddress 0.0.0.0
    
    Match LocalPort 2202
        ForceCommand /etc/ConsolePi/src/remote_launcher.py $SSH_ORIGINAL_COMMAND
    • In future release additional flags will be passed on to picocom i.e. ssh -t <consolepi address> -p 2202 <device name> [any flags picocom supports]
    • ‼️ The -t option is crucial, otherwise there is no tty which causes strange behavior in the terminal (tab completion via the connected device among other things break). Will research if there is a way to attach it on the server side.

wade ~ Pack3tL0ss added 30 commits July 7, 2023 19:26
User would just `ssh -t <consolepi address> -p 2202 <device name>`
The `-t` is key or picocom launches without a tty and tab completion
and some other things break.

`<device name>` is the name of the adapter.  Which should be an alias like
`r1-6300M-sw` but could also be `ttyUSB0`

currently extract the baud and connection settings from ser2net config.
Used for mdns_browse which never updates cloud anyway
Previous push to dev converted the remote verification
from threading to async.  Some references needed to be adjusted to call
a couroutine vs a method.  (await / asyncio.run())
Prior to this change the spin text was unpredictable given it's
set by multiple async tasks at once
Will still default to ser2netv3 file if it exists regardless of ser2net ver
In testing was always a fraction of a second.
No impactful change
Also parse any `TRACEFILE:` definitions and convert to v4 compatible
 `define` line.  These are stored in the dict key `_v4_tracefiles`.
@Pack3tL0ss Pack3tL0ss merged commit 0330921 into master Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant