Very good question! And I would like to know the answer too.
There are limitations with some of the virtual devices it seems and I have been nagging Ezlo about this for ages. The virtual devices are created using an internal plugin called test_plugin. That was originally used for internal testing of “devices” apparently.
The problem is that these virtual devices closely represent what a “real” device would be like on the system.
For example for a real temp sensor device you would not manually set a value on that real device would you.
So currently when you add a virtual temp sensor device to the system it behaves the same way. And it does not allow you to use that virtual temp sensor device in a Meshbot rules Action, as the device is just simply missing from the device list.
I just created this virtual device on my Controller.
And when looking in a Local Meshbot’s Action that device is not present.
The reason for this, you can see in the API, that for the Item “temperature” the hasSetter = False. This means that it cannot be displayed and used in a rules action and have its temp value set as you would want.
I have asked Ezlo to change this for a long time, but they haven’t done so. I can’t see the point in have a virtual device if you cannot set its value?
Virtual Temp Sensor API Info
Device Info:
_id: "66058f6c123e4314a63100ff"
batteryPowered: true
category: "temperature"
deviceTypeId: "test"
gatewayId: "620a6b8e123e431217766a50"
info: Object {}
name: "Virtual Temp Sensor 1"
parentDeviceId: ""
persistent: false
reachable: true
ready: true
roomId: "629b65ac123e4312b6b8b878"
security: "no"
status: "idle"
subcategory: ""
type: "sensor"
Items Info:
items:
0:
_id: "66058f6c123e4314a6310100"
deviceId: "66058f6c123e4314a63100ff"
hasGetter: true
hasSetter: false <<<<--------
name: "temp"
scale: "celsius"
show: true
value: 0
valueFormatted: "0"
valueType: "temperature"
1:
_id: "66058f6c123e4314a6310101"
deviceId: "66058f6c123e4314a63100ff"
hasGetter: true
hasSetter: false
maxValue: 100
minValue: 0
name: "battery"
show: true
value: 87
valueFormatted: "87"
valueType: "int"
Only other possible way maybe? Is to use the Ezlo HTTP Server API to send a HTTP command in the rules action back to the controller to set the value on the virtual temp device ??