mcpigdoc(1) FreeBSD General Commands Manual mcpigdoc(1)

NAME

mcpigdocClient of mcpigdod

SYNOPSIS

mcpigdoc [-p port] status host

mcpigdoc [-p port] config host

DESCRIPTION

mcpigdoc is a simple client of mcpigdod(8). It allows the user to view the status of garage doors controlled by mcpigdod(8) or fetch the configuration. The following command line options are available:
-p port
Specify the TCP port on which mcpigdod(8) is listening. The default is 2121.

Commands

status host
Returns the current status of the garage doors controlled by mcpigdod(8) on the given host. The data returned is in JSON format.
config host
Returns the configuration of mcpigdod(8) on the given host in JSON format.

FILES

${HOME}/.dwmauth/id_rsa
The user's dwmauth private key file, created with dwmauth(1). This file should be owned by the user and have permissions 0600. It must contain the private part of a 2048-bit RSA key pair.
${HOME}/.dwmauth/id_rsa.pub
The user's dwmauth public key file, created with dwmauth(1). This file should be owned by the user and have permissions 0600. It must contain the public part of a 2048-bit RSA key pair.
${HOME}/.dwmauth/known_services
The user's dwmauth known services file. This file must contain the public key of mcpigdod(8) from the mcpigdod(8) host being queried.

EXAMPLES

Get the status of the doors controlled by mcpigdod(8) on host pigdo:
% mcpigdoc status pigdo 
{"garageDoorStatus":{"North":{"buttonState":"Open","closedSwitchState":"Closed","encoderState":"Stopped","name":"North","percentClosed":100,"state":"Closed"},"South":{"buttonState":"Open","closedSwitchState":"Closed","encoderState":"Stopped","name":"South","percentClosed":100,"state":"Closed"}},"location":{"latitude":42.790700000000001,"longitude":83.417699999999996},"time":"2017-07-06 18:23:31"}
Get the configuration of mcpigdod(8) from the host pigdo:
% mcpigdoc config pigdo 
{"doors":[{"closedSwitch":{"channel":26,"closedIsDoorClosed":true},"doorActivationButton":20,"doorActivationChannel":17,"encoder":{"closingClockwise":false,"device":"gpiorotenc0"},"indicator":{"greenChannel":5,"redChannel":12},"name":"North"},{"closedSwitch":{"channel":19,"closedIsDoorClosed":true},"doorActivationButton":21,"doorActivationChannel":18,"encoder":{"closingClockwise":false,"device":"gpiorotenc1"},"indicator":{"greenChannel":6,"redChannel":13},"name":"South"}],"location":{"latitude":42.790700000000001,"longitude":83.417699999999996},"logFacility":"local0","logFileLocations":true,"minimumLogPriority":"info","server":{"mcastAddr":"224.0.0.42","mcastPort":2121,"tcpPort":2121}}

SEE ALSO

mcpigdod(8), dwmauth(1)

AUTHORS

Copyright (c) 2017 Daniel W. McRobb dwm@mcplex.net
April 10, 2017 mcplex.net