Nh-holly: Difference between revisions
Categorised (removed Past/Future/Current) |
No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Description == | == Description == | ||
nh-holly is the MQTT IRC bot running on [[holly]] that is resident in #nottinghack on | nh-holly is the MQTT IRC bot running on [[holly]] that is resident in #nottinghack on Libera Chat. The bot itself does very little - only maintaining a connection to IRC and [http://mosquitto.org Mosquitto], and forwarding messages between the two. | ||
== Usage - MQTT == | == Usage - MQTT == | ||
Line 8: | Line 8: | ||
== Usage - IRC == | == Usage - IRC == | ||
At present, there are | At present, there are a few parts of the [[HackSpace Instrumentation]] project using nh-holly: | ||
* [[Gatekeeper]] - Announces every time the door is opened/closed, and | * [[Gatekeeper]] - Announces every time the door is opened/closed, and includes the handle of the member opening the door when known. GateKeeper also announces when the door bell is rang or the last-man-out switch is changed. | ||
* nh-matrix - The message on the [[LED Matrix]] display can be updated by saying "!display ''<msg>''" in #nottinghack. | * nh-matrix - The message on the [[LED Matrix]] and [[Mini-matrix]] display can be updated by saying "!display ''<msg>''" in #nottinghack. | ||
* nh-gk-if - This talks to a USB I/O board; say "!bell" in #nottinghack to ring a bell next to Holly. | * <strike> nh-gk-if - This talks to a USB I/O board; say "!bell" in #nottinghack to ring a bell next to Holly.</strike> long gone. | ||
Say "!help" to get a list of commands the bot will act on (note the responses to "!help" come from the apps that will take the action, so, for example, if nh- | * nh-irccat - there are a few scripts (stolen from London Hackspace) than can be used (prefixed with ?, unlike ! for other commands) | ||
* nh-temperature - report the temperature currently reported by various sensors in the Hackspace | |||
Say "!help" to get a list of commands the bot will act on (note the responses to "!help" come from the apps that will take the action, so, for example, if nh-matrix isn't running, "!display" would not appear on the list). | |||
== Configuration / maintenance == | == Configuration / maintenance == | ||
Line 23: | Line 27: | ||
== Source == | == Source == | ||
Source on [ | Source on [https://github.com/NottingHack/instrumentation Github]. | ||
TODO: Further details, building, configuring, etc. | TODO: Further details, building, configuring, etc. | ||
Line 29: | Line 33: | ||
[[Category:Network]] | [[Category:Network]] | ||
[[Category:Instrumentation]] | [[Category:Instrumentation]] |
Latest revision as of 11:40, 20 July 2021
Description
nh-holly is the MQTT IRC bot running on holly that is resident in #nottinghack on Libera Chat. The bot itself does very little - only maintaining a connection to IRC and Mosquitto, and forwarding messages between the two.
Usage - MQTT
All messages in the #nottinghack IRC channel are published to the MQTT topic nh/irc/rx/nottinghack/<nick>, and any PMs the bot receives are published to nh/irc/rx/pm/<nick> (yes, this means the bot won’t work correctly if it ever tried to join #pm).
Any messages published to either nh/irc/tx or nh/irc/tx/nottinghack will be output to the IRC channel; any messages published to nh/irc/tx/pm/<nick> will be sent as a private message to that IRC user.
Usage - IRC
At present, there are a few parts of the HackSpace Instrumentation project using nh-holly:
- Gatekeeper - Announces every time the door is opened/closed, and includes the handle of the member opening the door when known. GateKeeper also announces when the door bell is rang or the last-man-out switch is changed.
- nh-matrix - The message on the LED Matrix and Mini-matrix display can be updated by saying "!display <msg>" in #nottinghack.
nh-gk-if - This talks to a USB I/O board; say "!bell" in #nottinghack to ring a bell next to Holly.long gone.
- nh-irccat - there are a few scripts (stolen from London Hackspace) than can be used (prefixed with ?, unlike ! for other commands)
- nh-temperature - report the temperature currently reported by various sensors in the Hackspace
Say "!help" to get a list of commands the bot will act on (note the responses to "!help" come from the apps that will take the action, so, for example, if nh-matrix isn't running, "!display" would not appear on the list).
Configuration / maintenance
nh-holly is started at boot using an upstart script, and can be stopped/started at any time by running “stop nh-holly” or “start nh-holly” as root. nh-holly's configuration file is in "/home/instrumentation/conf/nh-irc.conf", and can be used to set the IRC server, MQTT broker address, IRC nick, etc. The log file is in "/home/instrumentation/logs/", and includes a log of all chat message in the channel, along with all MQTT messages sent/received.
Source
Source on Github.
TODO: Further details, building, configuring, etc.