This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Official

[APP] Virtual Devices for Homey

1235»

Comments

  • Correct, it should be Yes (My typo). Indeed i tested it and it works but only if i type in the variable and device name (which of course is not what happens in real life :)). So it does seem to be with me misinterpreting these tags?
  • Oy1974Oy1974 Member
    edited June 2018
    Try using the brown "away" tag, like this
  • Alternatively you can use the "away"-device as trigger and set the card to 'pressed / changed'. Then you don't have to check the device-tag.

    Another alternative is perhaps to use the sunset or sun-up as trigger and check the away-state.
  • Is it possible to add a KWh meter for energy measurement?
    The only thing i can do now is show the actual wattage, but not the total wattage in KWh.
    I've created an issue on Github:
    https://github.com/ArjanKranenburg/virtual-devices/issues/57

    Then I'll investigate when time and priority are right. 
  • THanks all! Oy, I Will try this One when I get the chance. Indeed Arie, this is what I had used so far as alternative. The solution Oy mentioned is a bit prettier though.

    cheers all!

  • Hi,

    I'm trying to have Alexa properly turning on my Hi-fi. 

    Simple virtual device (switch) since Buttons are not supported by Alexa.

    If switch is turned on - sent command to receiver to be switched on
    If switch is turned off - sent command to receiver to be switched off

    easy. 

    Now, the Hifi can be turned on/off manually. Which results in the switch being switched off manually and if set to off by Alexa, it doesn't trigger. It was already turned off and visa versa. The virtual switch and the state of the device are no longer in sync.

    I thought, lets use my power meter to detect whether the device is actually on. But then I get into loops and all kind of issues.

    How did you guys do it?
  • How to use virtual motion sensor?
    i try to convert door\window sensor Neo Coolcam into motion sensor.
    alarm_motion true doesn't work
  • Oy1974Oy1974 Member
    iGitlin said:
    How to use virtual motion sensor?
    i try to convert door\window sensor Neo Coolcam into motion sensor.
    alarm_motion true doesn't work
    https://arjankranenburg.github.io/virtual-devices/sensor
  • quakerix said:
    Hi,

    I'm trying to have Alexa properly turning on my Hi-fi. 

    Simple virtual device (switch) since Buttons are not supported by Alexa.

    If switch is turned on - sent command to receiver to be switched on
    If switch is turned off - sent command to receiver to be switched off

    easy. 

    Now, the Hifi can be turned on/off manually. Which results in the switch being switched off manually and if set to off by Alexa, it doesn't trigger. It was already turned off and visa versa. The virtual switch and the state of the device are no longer in sync.

    I thought, lets use my power meter to detect whether the device is actually on. But then I get into loops and all kind of issues.

    How did you guys do it?
    just let them sync with a couple of extra flows? 

    Flow 1:
     IF HiFi is turned on - THEN turn VD on

    Flow 2: 
    IF VD is turned on - THEN turn HIFI on

    Flow 3& 4: similar with the "off status"

    The loop is not forever, because it only react to status changes of your devices (thus "is turned on/off"). E.g. it cannot be turned on twice..

  • quakerix said:
    Hi,

    I'm trying to have Alexa properly turning on my Hi-fi. 

    Simple virtual device (switch) since Buttons are not supported by Alexa.

    If switch is turned on - sent command to receiver to be switched on
    If switch is turned off - sent command to receiver to be switched off

    easy. 

    Now, the Hifi can be turned on/off manually. Which results in the switch being switched off manually and if set to off by Alexa, it doesn't trigger. It was already turned off and visa versa. The virtual switch and the state of the device are no longer in sync.

    I thought, lets use my power meter to detect whether the device is actually on. But then I get into loops and all kind of issues.

    How did you guys do it?
    This is exactly why you need to make your vd stateless. As long as it doesn't have a state you can always switch it on or off. 

    https://forum.athom.com/discussion/5315/stateless-virtual-device#latest
  • Hi,
    When creating a virtual device Thermostat with cool / heat/off/auto selection I would like to trigger a flow depending on the value so that I can send that to my heatingpump API. Is that possible or am I missing something. 

    Thanks!
  • Roephoed said:
    quakerix said:
    Hi,

    I'm trying to have Alexa properly turning on my Hi-fi. 

    Simple virtual device (switch) since Buttons are not supported by Alexa.

    If switch is turned on - sent command to receiver to be switched on
    If switch is turned off - sent command to receiver to be switched off

    easy. 

    Now, the Hifi can be turned on/off manually. Which results in the switch being switched off manually and if set to off by Alexa, it doesn't trigger. It was already turned off and visa versa. The virtual switch and the state of the device are no longer in sync.

    I thought, lets use my power meter to detect whether the device is actually on. But then I get into loops and all kind of issues.

    How did you guys do it?
    just let them sync with a couple of extra flows? 

    Flow 1:
     IF HiFi is turned on - THEN turn VD on

    Flow 2: 
    IF VD is turned on - THEN turn HIFI on

    Flow 3& 4: similar with the "off status"

    The loop is not forever, because it only react to status changes of your devices (thus "is turned on/off"). E.g. it cannot be turned on twice..

    So what you are saying is that the flow will end.

    Current state Hifi is Off.
    The Hifi is turned on.
    This triggers flow 1
    This triggers flow 2
    but it doesn't trigger flow 1 since its not 'turned' on. It was already on. 

    hMM. Sounds logical. I'll need to play. The fact that the trigger is 'turned' on. Its a little if statement in the trigger itself. Because it implies that the device is Off.
  • I tried to create a VIrtual Device which can be used by Heimdall, but Heimdall does not recognises the device I create.
    I tried the PIR (movment and on/off switch), both are not recognised by Heimdall as valid devices.

    Is it possible to add the alarm_motion capability to Virtual Device?



  • _Marco_ said:
    I tried to create a VIrtual Device which can be used by Heimdall, but Heimdall does not recognises the device I create.
    I tried the PIR (movment and on/off switch), both are not recognised by Heimdall as valid devices.

    Is it possible to add the alarm_motion capability to Virtual Device?



    Like this:  https://forum.athom.com/discussion/comment/74831/#Comment_74831
  • @_Marco_ I’ve made a change to Heimdall so it will also be able to use motion (and contact) sensors from non-sensor devices. It’s not yet submitted yet to the appstore but can be found on Github if you want to try it (and know how to install an app from the cli)
  • Thats awsome! Thanks. I’ll wait for the release.
  • Oy1974 said:
    iGitlin said:
    How to use virtual motion sensor?
    i try to convert door\window sensor Neo Coolcam into motion sensor.
    alarm_motion true doesn't work
    https://arjankranenburg.github.io/virtual-devices/sensor
    So what? I did not find how to properly change the state of the virtual motion sensor when changing the door sensor, in the description there is not a word that you need to register in the flow.

        1 Add the card entitled 'Set a virtual sensor value' in the Then-column of a flow.
        2 Set the technical name (see below) of the sensor-capability in the first field.
        3 Set the value in the second field. This can also be a tag from another device or card.
      The technical name card shows alarm_motion but this does not work.
  • Because its not supported?  follow the link and there are only 4 sensors supported and alarm_motion is not one of them.
    Unless its an alarm sensor from alarms and not sensors and is a different one.
    But I could be wrong.
  • Oy1974Oy1974 Member
    iGitlin said:
    Oy1974 said:
    iGitlin said:
    How to use virtual motion sensor?
    i try to convert door\window sensor Neo Coolcam into motion sensor.
    alarm_motion true doesn't work
    https://arjankranenburg.github.io/virtual-devices/sensor
    So what? I did not find how to properly change the state of the virtual motion sensor when changing the door sensor, in the description there is not a word that you need to register in the flow.

        1 Add the card entitled 'Set a virtual sensor value' in the Then-column of a flow.
        2 Set the technical name (see below) of the sensor-capability in the first field.
        3 Set the value in the second field. This can also be a tag from another device or card.
      The technical name card shows alarm_motion but this does not work.
    the link i mention, was only to let you see whats possible. But you can Always make a github request to the devolper
  • All: Sorry for the late reply. In april I will spend some spare time on Homey. I'll start with bugs and look at the enhancements later. No promises, though  ;)
     
    @quakerix: I've added a new issue to add that:
    https://github.com/ArjanKranenburg/virtual-devices/issues/47


    I'm sorry for the late late reply. Thanks for picking up my suggestion to store somehow someway the previous value. 

    But how can I pick this previous value up in a flow? Can you explain that? There's a few tags on the virtual device. But I can't figure out which one contains the previous value. 

    there are 4 tags and 1 generic tag on my multi-mode device. A tag for each mode (home,away,sleep,vacation) but they are named all the same. I need to assume that the order of the tags is equal to the statuses. 

    But still, you implemented  my awesome suggestion. I'm going on holiday so i was about to do some nice flow-building but couldn't figure how out how you implemented it. Please help.
  • Arie_LaxedArie_Laxed Member
    edited July 2018
    quakerix said:
    All: Sorry for the late reply. In april I will spend some spare time on Homey. I'll start with bugs and look at the enhancements later. No promises, though  ;)
     
    @quakerix: I've added a new issue to add that:
    https://github.com/ArjanKranenburg/virtual-devices/issues/47


    I'm sorry for the late late reply. Thanks for picking up my suggestion to store somehow someway the previous value. 

    But how can I pick this previous value up in a flow? Can you explain that? There's a few tags on the virtual device. But I can't figure out which one contains the previous value. 

    there are 4 tags and 1 generic tag on my multi-mode device. A tag for each mode (home,away,sleep,vacation) but they are named all the same. I need to assume that the order of the tags is equal to the statuses. 

    But still, you implemented  my awesome suggestion. I'm going on holiday so i was about to do some nice flow-building but couldn't figure how out how you implemented it. Please help.

    The previous state is only added for new Virtual Multi-mode devices. Did you create a new Multi-mode device?

    Then the previous value is stored in a tag called:
           "en": "Previous Multi-mode state",
            "nl": "Vorige Multimode status"
    (so it depends on your selected language).
  • quakerix said:
    All: Sorry for the late reply. In april I will spend some spare time on Homey. I'll start with bugs and look at the enhancements later. No promises, though  ;)
     
    @quakerix: I've added a new issue to add that:
    https://github.com/ArjanKranenburg/virtual-devices/issues/47


    I'm sorry for the late late reply. Thanks for picking up my suggestion to store somehow someway the previous value. 

    But how can I pick this previous value up in a flow? Can you explain that? There's a few tags on the virtual device. But I can't figure out which one contains the previous value. 

    there are 4 tags and 1 generic tag on my multi-mode device. A tag for each mode (home,away,sleep,vacation) but they are named all the same. I need to assume that the order of the tags is equal to the statuses. 

    But still, you implemented  my awesome suggestion. I'm going on holiday so i was about to do some nice flow-building but couldn't figure how out how you implemented it. Please help.

    The previous state is only added for new Virtual Multi-mode devices. Did you create a new Multi-mode device?

    Then the previous value is stored in a tag called:
           "en": "Previous Multi-mode state",
            "nl": "Vorige Multimode status"
    (so it depends on your selected language).
    Ah, I'll need to re-create my multi-mode device.

    That's a huge operation. Its used in 50+ flows and the Search is not always giving all the results. 

    But thanks! I will definitely do it. Because I want to be able to trigger things when i'm back from vacation or go on holiday etc.
  • _Marco_ said:
    Thats awsome! Thanks. I’ll wait for the release.
    You can now use Virtual Devices with the alarm_motion and alarm_contact with Heimdall:
    https://forum.athom.com/discussion/comment/75265/#Comment_75265
  • Hi @ZperX and @Arie_Laxed, if I would like to add a virtual device that supports:
    - temperature
    - luminance
    - battery

    What would be the easiest way to accomplish this? The data is coming from a MQTT device subscription. So I need to parse it in some form.
  • gijsjegijsje Member
    Would also be nice if there would be a virtual P1 and virtual selector switch
  • gijsje said:
    Would also be nice if there would be a virtual P1 and virtual selector switch
    Do you mean the P1 from the 'Slimme Meter'? What Capability(ies) would that use? Perhaps measure_power and measure_water? I guess we need a virtual sensor that can combine multiple sensitive capabilities.

    The Virtual Selector could be implemented with an enum, but then I would need the enums from all users up front.
    The only way to implement this was with a multi-mode. Would that be suitable for you?
  • gijsjegijsje Member
    Yes i do mean a slimme meter.
    I do forward the data from my domoticz install to homey and that works
    I only do not have a nice device in Homey to show the current power consumption and the total power of the meter.
    I can see the in better logic

  • gijsjegijsje Member
    The Virtual Selector could be implemented with an enum, but then I would need the enums from all users up front.
    The only way to implement this was with a multi-mode. Would that be suitable for you?
    Got it working with multi mode
  • _Marco_ said:
    Thats awsome! Thanks. I’ll wait for the release.
    You can now use Virtual Devices with the alarm_motion and alarm_contact with Heimdall:
    https://forum.athom.com/discussion/comment/75265/#Comment_75265

    I have tried this weekend to further test a Virtual PIR, but I can get it working, not with alarm_motion and not with one of the existing values like measure_temperature.

    Further the Virtual on/off type or Virtual switch is not recognised by Heimdall at all
    Made a flow with a trigger to set the Virtual PIR and switch, but Heimdall does not show anything in the log about these devices.
    The Virtual PIRr is recognised by Heimdall as a valid device, but not possible to trigger the Virtual switch is not recognised at all.

    I suspect that this needs changes in Virtual Device?


Sign In or Register to comment.