The Openmotics system supports following virtual devices:
- Virtual Inputs: For example a doorbell that sends a push notification is translated in an action that switches on a light in the house
- Virtual Outputs: For example a Philips Hue light that acts as a virtual output can be switched on by a normal switch on the Openmotics system (or a virtual switch)
- Virtual Sensors: Any non-openmotics sensors like Z-wave wireless temperature, NEST thermostat temperature and humidity, third party light sensors etc can be used when the right plug-in is written
How does all the Virtual stuff work?
The master firmware (as of F3.142.1) allows you to create virtual output modules.
A Virtual Output can be used like a normal output and has for the rest the same instruction set and the same possibility as a normal output. The difference between a normal output and a virtual output is that a normal output will sent the output changes of a module to the RS485 bus to make the Openmotics output module change where the virtual module changes will be sent from the Master to the BB and the gateway will expose this changes through his IP API. With the use of the Plug-in system on the Gateway, these changes of the virtual outputs can be translated to instruction to activate other type of outputs (different kind of modules, wall plugs, turn on/off hifi, IP based dimmers etc).
The Openmotics system allows you to create Virtual Modules. Each Virtual Output module (Output or dimmer) that has been created gives you 8 Virtual Outputs. Those virtual outputs can be changed state by using all regular Basic Action and can be programmed like any normal output and can be linked to any input, can be used in any group action or other action. When a virtual output changes state, instruction "RO" and/or "OL" will sent (from the Master to the BB) depending how your Master is configured.
See Virtual Plug-in Examples for more information how to use this in combination with the plug-in system.
Virtual Outputs (Available in firmware version 3.142.1 and higher)
As of Firmware Version F3.142.1 and higher, the master allows virtual outputs. The number of virtual output modules that can be created is only limited by the system limits (maximum 240 outputs or 30 output modules). These are the type of non-virtual modules which exist as Virtual and Normal (Non-Virtual):
- "I" -> Normal Input module
- "i" -> Virtual Input module
- "T" -> Normal Sensor module
- "R" -> Normal Roller/Shutter module
- "O" -> Normal Output Module
- "C" -> CAN control output
- "o" -> Virtual Output Module
- "D" -> Normal Dimmer Module
- "d" -> Virtual Dimmer Module
As you can see, there is no virtual alternative for the Sensor module since no Virtual Sensor module exists. The Master has 32 sensors and for each sensor, you can choose whether that sensor is Virtual or Not. For more information, see Virtual Sensors
Configure Virtual outputs
A virtual output module can be created by using following CLI instruction:
add virtual module o ;Create a Virtual output module
add virtual module d ;Create a Virtual dimmer module
The created modules can be easily checked with following instruction:
error list ;Error list will indicate all modules created in the system
A virtual output module can also be created by API instruction "AV", see API Reference Guide for more details. When creating a virtual module through the API, the instruction "MI" will be sent from the Master to the BB.
When a Virtual Output state changes, the same API instruction ("RO" and/or "OL") will be sent to the BB as with a Normal Output that changes state.