egctl(1)

πŸ“¦
version 0.3 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– egctl β€” the EnerGenie EG-PMS-LAN/WLAN control utility πŸ’–

okay bestie, gather round, because this is the manual page for egctl β€” that's the general commands girlie from section 1 of the manual, and she's here to make your surge protector do tricks. πŸ¦‹


✨ NAME ✨

egctl β€” EnerGenie EG-PMS-LAN/WLAN control utility. no cap, that's literally her whole job description.


🌸 SYNOPSIS 🌸

egctl NAME [S1 S2 S3 S4]

πŸ’… DESCRIPTION πŸ’…

egctl is a program that controls the state of an EnerGenie Programmable surge protector with a LAN/WLAN interface. she talks the device's native data exchange protocol, not HTTP β€” so she's speaking the device's love language directly, no middleman, no web drama. πŸ’…

the way she works is lowkey elegant: run her with only one argument and she dumps the state of the device you named. run her with all five arguments and she changes the state of the device and dumps the new state. she does both. she's an overachiever like that. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • NAME β€” the name of the device you wanna control, exactly as it is specified in the configuration file. heads up bestie: this name has no relation to the IP address or the domain name. it's just a nickname, it's giving pet name energy, it's not a network address. πŸ™ˆ
  • Sn β€” the action to perform on the n-th socket. the possible values are: on, off, toggle and left.
quick translation of the socket actions: on turns it on, off turns it off, toggle flips whatever it currently is, and left means leave it exactly as it is, don't touch, hands off. ⭐

🌈 CONFIGURATION 🌈

the configuration file is a table of devices. each device gets described on a separate line, and the fields on each line are separated by tabs or spaces. lines starting with # are comments, and blank lines are ignored. very chill of her, honestly.

here's what each field means, in order:

  • the first field β€” name of device. it's a string that gets used to address the device in the utility commands. it is not necessary to be the same as Server name in the web interface. so call it whatever, she won't judge. 🫢
  • the second field β€” protocol. the supported protocols are: pms20, pms21, and pmswlan.
  • the third field β€” IP address of device.
  • the fourth field β€” TCP port of device. (that's the Power Manager client port in the web interface, iykyk.)
  • the fifth field β€” optional plain-text password.

πŸ‘‘ SUPPORTED DEVICES πŸ‘‘

  • EG-PMS-LAN β€” protocol pms20
  • EG-PM2-LAN β€” protocol pms21
  • EG-PMS2-LAN β€” protocol pms21
  • EG-PMS-WLAN β€” protocol pmswlan

πŸ”₯ EXAMPLES πŸ”₯

okay so imagine a user has two EG-PMS-LAN devices configured like this:

  1. 192.168.0.10, port 5000, password hackme
  2. 192.168.10.10, port 5001, password hackmesoftly

in order to control them using the utility, the user needs to create a configuration file like the following:

eg1 pms20 192.168.0.10  5000 hackme
eg2 pms20 192.168.10.10 5001 hackmesoftly

now she can get the status of the devices with commands

egctl eg1
egctl eg2

and switch the state of the AC power sockets with a command like

egctl eg1 on left left off

periodt. πŸ’… that last one turns socket 1 on, leaves sockets 2 and 3 alone, and turns socket 4 off. iconic behaviour.


🧚 FILES 🧚

  • ~/.egtab β€” user's configuration file
  • /etc/egtab β€” system-wide configuration file

πŸ’€ BUGS πŸ’€

this program cannot modify the internal schedule of the device. that's it, that's the limitation, she simply does not have that power and we respect her boundaries. 😭


πŸ’œ AUTHOR πŸ’œ

written by Vitaly Sinilin <vs@kp4.ru>


⭐ TRADEMARKS ⭐

EnerGenie is a registered trademark of Gembird Holding B.V. β€” protecting the brand name, as she should. πŸ‘‘


and that's the whole vibe check, bestie πŸ’– this was egctl from 2 Jan 2023, manual page for the General Commands Manual, and honestly? she ate. go forth and toggle your sockets. πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from