Automatic Reporting

A number of HomeVisionXL plug-ins present information in one form or another based on the value of Homevision objects, like variables, X-10 modules, or input ports. To be able to give accurate information, these plug-ins need to be informed about any relevant changes to the value of the objects as soon as possible. For this, the plug-ins rely on the automatic reporting feature of the Homevision controller.

Basic configuration

To configure the automatic reporting feature, open up the Controller Settings screen (accessible from the Configure menu) and select the Comm tab. On this tab make sure you select at least the following options:
  • Enable automatic reporting
  • Select serial ports to send reports to: Port 1
  • The object types you would like to use in any of the plug-ins
Comm tab
After configuring these options, the schedule has to be reloaded for the changes to take effect.

Note: The HVAC status report, the Security status report, and the Custom lights update report are only available for a HV-Pro controller with a recent PROM (3.44 betas or higher).

Fine tuning

Once the serial ports to send reports to have been configured and downloaded into the controller, the other options on the Comm tab can be dynamically changed in a running schedule using the following commands from the controller commands control screen:
  • Enable automatic reporting
  • Disable automatic reporting
  • Enable auto reporting of controller status
  • Disable auto reporting of controller status
  • Enable auto reporting of X-10 modules
  • Disable auto reporting of X-10 modules
  • Enable auto reporting of flags
  • Disable auto reporting of flags
  • Enable auto reporting of variables
  • Disable auto reporting of variables
  • Enable auto reporting of input ports
  • Disable auto reporting of input ports
  • Enable auto reporting of output ports
  • Disable auto reporting of output ports
  • Enable auto reporting of analog ports
  • Disable auto reporting of analog ports
  • Enable auto reporting of temperature sensors
  • Disable auto reporting of temperature sensors
When you have figured out the best settings for your schedule, don't forget to copy them to the Comm tab of the Controller Settings screen. That way the settings will still be correct after the next download of the schedule.

Special situations

Some schedules may contain very frequently changing objects, like a variable that is used in a periodic event running every loop to store some temporary value. Even if that value is the same almost every time, it will still trigger a VARUPDATE report every loop. Transmitting a VARUPDATE report with around 100 variables at 19200 baud takes more than 100 ms. Normally a loop takes only 20 ms, so the serial transmit buffer will fill up quickly and the controller will have to slow down allow the data to be transmitted. (This is the reason for the "use with caution!" warning.)

Clearly the situation described above is not desired. So, if frequent updates of certain object types cannot be avoided, automatic reporting of that object type will have to be disabled. To still allow plug-ins to track changes of interesting objects of a type for which automatic reporting has been switched off, you can use one or more of the following commands at appropriate places in your schedule:

  • Controller command: Report status of all X10 modules
  • Controller command: Report status of all flags
  • Controller command: Report status of all variables
  • Controller command: Report status of all input ports
  • Controller command: Report status of all output ports
  • Controller command: Report status of all analog ports
  • Controller command: Report status of all digital temperature sensors
  • Controller command: Report status of all HVAC zones
  • Controller command: Report status of all security zones
  • Controller command: Report status of all custom lights
An appropriate place would be inside each action that changes the interesting object, or perhaps in a timer that runs every couple of seconds.

When one of the above commands is encountered in a schedule, the report is not created immediately. Instead all requests for reports are collected and processed at the end of the event loop. A report for each object type will only be generated at most once per loop. So you don't need to write complicated code to prevent multiple reports. If you have an action with two if's that may each modify a different variable, you can just add the report command in both if bodies. Also, if an action calls a macro that changes a variable, it is fine if both the initial action and the macro contain a report command for variables.

Last modified: 2 March 2009, 21:41 CET