Hardware

Hardware: JMX Functionality


The hardware DeviceManager registers a fairly simple JMX MBean that performs the following operations. These can be accessed using any JMX-compliant client, such as the JConsole that comes with the Java Virtual Machine. It is primarily intended for low-level debugging of messaging traffic and should only be accessed from the physical machine that the PowerLinc is attached to.

Remotely enabling JMX is left as an exercise... and not one that is endorsed: remotely enabling this MBean is NOT necessarily a very secure or wise (in our opinion) practice.

Operations

enableNotifications
Turns on and off notifications (registers and unregisters as an event listener).
enableNotifyEvents
Turns on and off notification of events. Not valid unless notifications are enabled.
enableNotifyTxPackets
Turns on and off notification of "transmission packets" (DUPE messages). Not valid unless notifications are enabled.
readMemory
Returns a formatted string of hex bytes. Takes three parameters: String insteonId (formatted "11.11.11"), String address (4 hex digits), and int length (number of bytes to read). The controller (e.g. PLC) can also be access through this operation.
writeMemory
Writes bytes to the designated device's memory. Takes three parameters: String insteonId (formatted "11.11.11"), String address (4 hex digits), and String data (bytes as space-separated hex digits - "0A 43 F1"). The controller (e.g. PLC) can also be access through this operation.

Screenshots

These images were captured from the JConsole application that is available from the JDK installation.

Read memory Notifications
Read memory operation Showing notifications
(InsteonTM Messages)

Monitor Application

This library also contains a fairly easy to use stand-alone application that uses the MXBean, rather than using the JConsole application.

To run it, you will need to invoke it thusly: (the \ character indicates "continued on next line")

    *nix: java -cp oohome-hardware.jar:oohome-common.jar:${JAVA_HOME}/lib/tools.jar \
            oohome.hardware.tools.monitor.OOHomeJMXMonitor
    Windows: java -cp oohome-hardware.jar;oohome-common.jar:%JAVA_HOME%\lib\tools.jar \
            oohome.hardware.tools.monitor.OOHomeJMXMonitor

Screenshots

Notifications Read Memory Write Memory Link Records
Notifications
(InsteonTM Messages)
(Read db links command)
Reading memory (Peek) Writing memory (Poke) Links in memory

StableFord Software SourceForge.net Logo