Vanilla 0.9.0 Gadgets

This post is a temporary ‘home’ for a basic Gadget index, that will eventually make its way to the HouseMon Wiki.

It currently lists the Gadgets / Composite Gadgets (circuits) present within the HouseMon vanilla binary, which at time of writing was based upon code built from (with push request included to 01-May-14).

Please let me know of any corrections or modifications.

(I’ll try and get this tided up and added to the wiki by 11-may-14). Added 07-May-14 here

This information will be used through my HouseMon Tutorial posts.

(x – denotes present in this version.)

Gadget v0.9.0 vanilla Note
help x *help command
dbdump x Meant as command line interface to database
dbexport x
dbput x
dbget x
dbkeys x
dbimport x
AddTag (F) x When provided a string on .Tag, will turn an incoming message on .In into a tagged message and send on .Out. Tag messages on .In as left unchanged.
*Aggregator x Aggregates /sensor/ data. No *Stddev in this current one
Attach (J) x A Persistent iterator client for database subscriptions
BinaryFill (H) x Given feed data .Len, any messages sent to .In will be expanded to .Len with sequence 0xFF, and reemitted on .Out
CalcCrc16 (H) x Provides a CRC calculation of data sent to .In. CRC16 will be sent as a tagged message on .Out followed by the original input.
Clock (F) x Provide a Duration (e.g “1m30s”) to the .In pin and a message will be sent to .Out every time the duration elapses.
CmdLine (F) x Given specific input on .Type, turn any command line arguments into messages following the .Type instructions.
Concat3 (F) x Waits on each input pin in turn .In1, .In2, .In3 and sends any input to .Out. Messages on .In2 will NOT be processed until .In1 is closed and so forth.
Counter (F) x Counts ALL messages sent to .In and passes them to .Out. When .In is closed the total(int) message count is sent to .Out
DataSub (J) x LevelDB publisher client. Allows notification of database write events via topics specified on .In and resulting data changed sent as tagged messages on .Out. Skips need for a MQTT interface between database and write interested parties.
Delay (F) x Provide a Duration to .Delay pin (“1m30s”) and any message sent to .In will be delayed the specified amount before being sent to .Out
Dispatcher x Specialist gadget for rf12 message handling – probably need replacing with something cleaner
EnvVar (F) x Attempt to use .In contents as name of Environment variable, if found, send contents of ENVVAR to .Out, otherwise send whatever came to .In back to .Out.
FanOut (F) x Every message sent to .In is replicated to all .Out pins. .Out pins use notation .Out: (fan.Out:somename)
FbpParser (J) x Flow syntax parser – work in progress…
Forever (F) x Once started, this gadget waits until the circuit is shut down, doing nothing. Its useful to keep a circuit ‘alive’.
HTTPServer (J) x Creates a Http server. Uses .Port and .Handlers for configuration via Feeds, uses .Out to send specific messages from handlers. For example, any data rec’d from a websocket client can be emitted to .Out if the handler implements it. Note: sub-gadgets wsHead and wsTail are implemented privately within this gadget.
info x help sub-command.
IntelHexToBin (H) x convert any apparent Intel Hex format messages sent to .In to Bin format and emitted on .Out, otherwise pass message through unchanged.
JavaScript (J) x Load javascript via .Cmd, processes .In messages within script if OnIn() implemented, script communication via emitOut to .Out pin
Logger (H) x Specify log directory via .Dir from FEED, log each message sent to .In into a rotational log, when log is cycled, emit name on .Out.
LogReader (H) x Takes a pre built log file name on .Name pin, and extracts line orientated data and emits on .Out pin (.In unused!).
LogReplayer (H) x Acts as a circular buffer of log data sent to .In, re-emitting from its buffer (via .Out) any log lines matching the current time.
LevelDB (J) x A LevelDB interface Gadget, using tagged input on .In and responses via .Out
MQTTPub (J) x A MQTT Publisher client. Use .Port for MQTT broker connection parameter, any Tagged message to .In is published using Tag as Topic and message as data.
MQTTSub (J) x A MQTT Subscriber client. Use .Port for MQTT broker connection parameter, use .In as subscriber topics from circuit Feeds using a tagged message type. Any matching subscriprions will be sent as tagged messages on .Out
MQTTServer (J) x An MQTT Broker, using .Port as input configuration, which is echoed to .PortOut once the server is running.
mqttpub (J) x Meant to be used as a sub-command via CLI, but needs attention (a.Type)
mqttsub (J) x Meant to be used as a sub-command via CLI, but needs attention (a.Type)
NodeMap (H) x Configuration is via .Info pin. Any message sent to .In is matched against an internal lookup to resolve the node to location sttributes. If resolved, additional messages are added to the output pin .Out for further downstream processing.
Node-homePower (H) x RF12 message decoder used via
Node-ookDcf (H) x
Node-p1scanner (H) x
Node-radioBlip (H) x
Node-roomNode (H) x
Node-smaRelay (H) x
Node-ookRelay (H) x
Pipe (F) x Whatever is sent to .In is passed on to .Out
Printer (F) x Prints the message to console using format specified ‘%+V’
PutReadings (H) x Collect map[string]message reading data and emit as a tagged /reading/ message (used as topic/data by database/mqtt)
ReadFileJSON (F) x if .In is a string that represents a readable text file, open and send tag message . If JSON can be parsed, send files contents as next message, otherise send whatever can on .In to .Out.
ReadFileText (F) x if .In is a string, attempt opening as text file, emit tag message , then \n terminated lines, then tag message via .Out pin, otherwise if not string, pass message through unchanged. i.e if .In string represents a readable text file name emit multiple .Out messages as file contents, otherwise send what came on .In to .Out.
Readings (H) x Attempt to collect tagged messages into single map[string]message format, re emit collection on .Out.
Repeater (F) x All Messages EXCEPT Tag messages sent to .In are repeated to .Out times. Feed .Num takes integer
RpcHandler (J) x A Generic Demo RPC Handler. .In messages and handled and results sent to .Out.
SerialPort (J) x Uses .Port to specify serial port @ 57600bps, All messages sent to .From are line orientated data read from serial port using \n line terminator. The terminator is not send in the message. Any input sent to .To is forwarded to serial port after some specific preprocessing. Strings sent with added linefeed \n, byte arrays sent as-is, and integer pulses to DTR pin for milliseconds, a bool toggles RTS.
Sink (F) x Eats ANY message
Sketch-RF12demo (H) x takes expected line orientated serial data (from serial!) and performs basic first stage parsing, emitting subsequent messages on .Out with tagged message format containing node information. Additional ‘state’ information that can be used down-stream is also emitted on .Oob pin containing the overall device parameters etc. Unrecognised output is sent to .Rej
SketchType (J) x Looks for ‘[]’ within message, if found, creates a tagged message on .Out, otherwise passed on message to .Out unchanged.
SplitReadings (H) x Designed to take a ‘/reading/’ tagged message format via .In from PutReadings and split to create individual /sensor/ style tagged messages with are emitted on .Out
Timer (F) x .In takes a Duration (such as ‘1m30s’) and emits the int64 tick value on the .Out pin after the duration expires
TimeStamp (F) x for each .In message, resend the message after first injecting an additional message with the current Timestamp. This results in first sending the Timestamp message and immediately followed by the original message.
Waiter (J) x composite circuit
WebSocket-default (J) x This is a alias for ‘Pipe’
WSLiveReload (J)* x Added node.js live reloading from commandline semaphore, (included as push request)
Posted in cirget, housemon, housemon tutorials, soft-circuits
One comment on “Vanilla 0.9.0 Gadgets
  1. […] I'd also like to say a little about the 'gadget' section. Again case sensitivity is important. Gadgets have a 'type' which is specifically tied to what the gadget registers itself as. HouseMon uses a 'Registry' that holds all available gadgets. You must use the 'type' that the gadget has registered itself as. For vanilla Housemon these can be found here or my version here. […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: