[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices

Is it possible to add the ability for a virtual thermostat to convey humidity information?

My setup: I have an Aqara temperature/humidity/pressure sensor and am using the Virtual Devices app to make a virtual thermostat so I can ask about the temperature via Google Home. I’ve gotten that working, but it’s limited to temperature only.

I have a few Tado thermostat knobs that also measure humidity, and I can ask Google about those, so I figured it might be possible for a virtual thermostat to do the same.

You can edit the capabilities of thermostat in drivers\virtual_switch\pair\capabilities.js

“thermostat”: {
“capabilities”: [
“target_temperature”,
“thermostat_mode”,
“measure_temperature”

add measure_humidity and do a CLI of the app.

Edit:i try this and works perfect

@OH2TH

Could you please explain how you have achieved this…

Thanks!

Hi!
I use Ruuvi Tags to measure and collect temperature, humidity and atmospheric pressure and I have one in our sauna. Ruuvi collector (java program from Ruuvi) gathers the data and insert them to a InfluxDB and then Grafana is used for presentation of the data.

In Homey I read the last temperature reading every minute from that database with a HTTP Request flow card:
/query?pretty=true&u=user&p=pass&db=ruuvi&q=SELECT+temperature+FROM+ruuvi_measurements+WHERE+%22name%22+%3D+%27sauna%27+GROUP+BY+%2A+ORDER+BY+DESC+LIMIT+1

The value is placed in VD “Sauna” Set a virtual sensor action card
measure_temperature sauna.temperature

Currently I set on/off state based on sauna.temperature:
turn on - if sauna.temperature above 25C and sauna.ready = false
turn off - if sauna.temperature below 55C and sauna.ready = true

sauna.ready is set true if sauna.temperature is above 60C.

This on/off detection will be replace with the sauna stoves 230Vac output (normally used to drive relay to turn off parts of house heating and/or turn on lights in the sauna). Needs some planning how to set stove status from that. Probably use on Aqara double relay/switch to detect power state. Would be more exact than based on measurements.

Lastly Homey follows the heating of sauna and displays a message when target temperature has been received. The target of 60C is not possible to set as a VD “kettle” or any other type’s target temperature since the MAX value is fixed to 50C. So now there is a “Logic” variable that has the target temperature.

If it only was possible to configure MIN and MAX from device configuration. Also I’d like to see the current temperature in the middle and target temperature smaller below in the status display of a VD device. But that is just cosmetics.

Regards,
Tapio

Thank you for the extensive explanation @OH2TH !

I’m also wondering about this…

Hi Guys,
For VD, is there any option to lockdown the switch / button, prevent user flip on/off? I just need flow to control it ON/OFF so the VD icon can just change to reflect the status ?

probably i missed any option, anyone can advice ?

Yes, currently using flow to turn ON/OFF. I’m thinking if i missed off any function.

My use case is having a slow cooker at kitchen, using a temperature sensor attached to cooker chassis, flow turn ON the VD button, when sense temp higher than preset, and flow will OFF the VD button, when chassis temperature drop to preset temperature.

I’m looking VD as indicator (bulb) for cooker to show status, but also locking it from triggering by touch button.

haha…this will make the flow in loops

If you are only using the VD to show a status. And you don’t have the necessity to switch the VD manually only through flows. So, why you don’t use a Virtual Sensor instead a VD switch?

1 Like

Yes I know, :wink: I figured as soon as I posted. I deleted my post directly.
But it takes some time.

yes, this an option too, if the sensor have the option to turn the icon to illuminate or grey will be best.

An example of a virtual contact sensor.

Contact Alarm = true

image

Contact Alarm = false

image

1 Like

Thank you! That’s a very innovative to solution to use the door open/close alarm aka contact alarm :smile: with a slow cooker svg will it perfect :grinning:

1 Like

Is one or the other better in some way? Experiment vs Virtual Devices app?

Hello Arie,

ist it possible to define a VD with a individual set of attributes?
I would like to get VD for my water softening system. I want to get some sensor attributes like water amount (capacity), salt usage, water usage. The values should come from MQTT broker.

Now I can only add a sensor device with one of each types.
It would be nice to define individual attributes (with name) and react in flows on changes (Trigger for this attribute name).
Or is it restricted by Athom, that a sensor can have only one attribut of a type?

Thanks
Ronny

Hi,

Could you make a virtual device: garage door.

So homeykit recognises it as a garage door and not screens?

So carplay will automatically display a garage door when coming home

No, Homey doesn’t have a device class for that.

Curious, what water softening system so you have? I’ve been looking for a couple of years and can’t makes up my mind. They all seem expensive for such a simple device, and seen to require frequent maintenance

Hi Ronny,

Technically it should be possible, but it would require a big change. If I’ll do that, It’ll probably be a new app (Custom Devices or so).
But lately I’m more occupied with other projects (outside Homey), so it’s not likely I will produce such an app anytime soon. If someone else wants to create such an app, you have my blessings. Feel free to rip parts of the VD app if needed.

With kind regards,
Arjan