ohhandler(1)

πŸ’… ohhandler(1) β€” the OpenHPI handler-wrangling bestie

okay so you found ohhandler, the OpenHPI sample application, and honestly? she's a whole vibe. she uses the openhpi additional interfaces to control openhpi configuration β€” that means plugins can be loaded, plugin instances (handlers) created, unloaded, or their configuration displayed. like a little backstage pass to the handler green room πŸŽ€

the manual name is ohhandler, section 1, straight out of OpenHPI. let's get into it ✨


✨ SYNOPSIS ✨

 ohhandler [-D nn] [-N host[:port]] [-C <cfgfile>] [-X] command <specific arguments>
 ohhandler [--domain nn] [--host=host[:port]] [--cfgfile=file] [--debug] command <specific arguments>

 ohhandler [-D nn] [-X] list
 ohhandler [-D nn] [-X] info    <handler-id>
 ohhandler [-D nn] [-X] destroy <handler-id>
 ohhandler [-D nn] [-X] getnext <handler-id>
 ohhandler [-D nn] [-X] find    <resource-id>
 ohhandler [-D nn] [-X] retry   <handler-id>
 ohhandler [-D nn] [-X] create  plugin <plugin-name> <configuration-parameters>

like, pick a command, throw the right args at it, and she'll handle it πŸ’…


🌸 DESCRIPTION 🌸

okay so here's the tea on every command, one by one, no cap:

list β€” ohhandler list will display a list of all plugin instances (handlers) currently defined in the openhpi daemon for the specified domain. part of the output is the handler-id β€” and that's the golden ticket 🎟️, because you can use it in subsequent commands. iykyk.

info β€” ohhandler info will display specific info for the handler with the specified id. this information includes all configuration parameters of the handler as specified in the openhpi.conf file or as dynamically defined during a "ohhandler create" call. literally the receipts of that handler's whole life πŸ’–

destroy β€” ohhandler destroy will unload the specified handler and delete all its configuration information. she's gone, bestie, no notes πŸ¦‹

getnext β€” ohhandler getnext will allows to walk through all hanlers currently defined in the openhpi daemon for the specified domain. (yes, "hanlers" β€” typos happen, we don't judge πŸ‘‘). it's the little stroll through handler town.

find β€” ohhandler find will find the handler that is managing the specified resource. detective mode: activated πŸ”

retry β€” ohhandler retry allows to try again to load and initialize the specified handler. it's giving "second chances, we love to see it" energy πŸ™ˆ

create β€” ohhandler create allows to dynamically create a new handler with configuration parameters like they are specified in the openhpi.conf file. here's the checklist:

  • The type of plugin is specified with the keyword plugin
  • Configuration parameters should follow as name value pairs
  • Complex strings like entity paths must be enclosed with ""

Example, iconic behavior:

ohhandler create plugin libsimulator entity_root "{SYSTEM_CHASSIS,1}"
name sim

and then the big one, the fine print you actually need:

If no domain or host is selected, ohhandler uses the default domain as specified in the openhpiclient.conf file. πŸ“Œ

πŸ’œ OPTIONS πŸ’œ

Help Options (we love a helper)

  • -h, --help β€” Show help options. the classic "bestie pls explain" button 🫢

Application Options (the actual levers)

  • -D nn, --domain=nn β€” Select domain id nn
  • -X, --debug β€” Display debug messages. for when you need to see πŸ‘€ everything
  • -N "host[:port]", --host="host[:port]" β€” Open session to the domain served by the daemon at the specified URL (host:port). This option overrides the OPENHPI_DAEMON_HOST and OPENHPI_DAEMON_PORT environment variables. If host contains ':' (for example IPv6 address) then enclose it in square brackets. For example: "[::1]" or "[::1]:4743". brackets: not just an aesthetic ✨
  • -C "file", --cfgfile="file" β€” Use passed file as client configuration file. This option overrides the OPENHPICLIENT_CONF environment variable. your config, your rules πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, fr fr:

  • hpi_shell

and the rest of the crew:

  • hpialarms, hpifan, hpipower, hpithres
  • hpidomain, hpigensimdata, hpireset, hpitop
  • hpiel, hpiiinv, hpisensor, hpitree
  • hpievents, hpionIBMblade, hpisettime, hpiwdt
  • hpixml
  • ohdomainlist, ohparam

πŸ‘‘ AUTHORS πŸ‘‘

Authors of this man page β€” show them some love πŸ’–:

  • Ulrich Kleber (ulikleber@users.sourceforge.net)
  • Anton Pak (avpak@users.sourceforge.net)

okay that's the whole page, bestie β€” and before you go, the receipts: this is OpenHPI version 4.0.0, dated 2023-01-26, manual page ohhandler(1). slay, go wrangle some handlers πŸŽ€βœ¨πŸ’