Heimdall - Let Homey watch over your home

That’s indeed the way to go, using a Virtual Device. I’m not familiar with the Unify app, but if it offers a condition card like motion is active or person is detected you could make an advanced flow that triggers on person detected, then wait for the desired time and check the condition. If condition is true set alarm_motion on the Virtual Device and use that device in Heimdall.

(I’m currently no where near a computer so can’t make an example screenshot, perhaps someone else can help out)

Great. If you have the chance to share that example screenshot would be perfect.
I don’t want to use a wait function since the detection can drop and come back on (experience when it sees a cat or bird). It should be some kind of timer instead. I’ll check further this evening if I can find something that helps.

Hi, thx again for this tip.
I did try to trigger a virtual camera, but I don’t seem to get to trigger it. You’ll see the error in the picture attached. Not clear to me what is meant with invalid token. Any idea you can share?
Schermafbeelding 2023-05-25 om 08.50.01

You should trigger a virtual motion alarm device. Virtual cameras does not have the alarm_motion property.

You’ll be needing a Virtual Device from the Virtual Devices app, see this post: Heimdall - Let Homey watch over your home - #8 by DaneedeKruyff

(It may look differently nowadays as the Virtual Devices app was transferred to a new developer and he rewrote it)

1 Like

I could use a camera as virtual device and could set alarm_motion to true via a flow. So that works!
Using the tag didn’t work.
Now to check how to get this delay working.

Indeed, the capability needs to be entered by text, not by tag. But you’re getting there. Should be some examples to be found on the forum for delays.

1 Like

Hi @DaneedeKruyff
On a Homey19 I get this message in timeline. It this the zone name that’s wrong on HP19 now?

Second question:
What’s the source for “last reported”? It seems that’s the last capability change. So if a window was not opened in 24h it’s reported as “not reported” even if the sensor is online and reports battery state (Aqara window sensor)?

I think “last reported” only looks at whether the sensor has triggered a state change (door open, motion detected, etc), not battery updates.
Correct me if I am wrong @DaneedeKruyff .

The zonename not being retrieved correctly can indeed occur on older Homeys. Athom made a change in the firmware for the new Homey Pro Early 2023 where the zonename is no longer a property of a device but needs te be retrieved separately through an API call. I had to adapt Heimdall for this change and Athom made the homey-api backwards compatible so it should also work on older Homeys.
Unfortunately the API call to retrieve the zonename is very expensive on older Homeys so I let Heimdall do that only once during start of the app which under certain circumstances can result in a zonename that’s undefined.
This does not happen very often and Emile told me older Homeys will get the newer firmware at some point so I decided to not try to write a workaround for it.

When determining the Last Update from a device the code cycles through all exposed capabilities and compares the reported Last Updates values to determine the most recent time regardless of which capability it is. Unfortunately this is also not always reliable on older Homeys.

I did notice Athom published a newer version of the homey-api, I will integrate it in Heimdall as soon as possible and publish a new version (after some testing). No guarantees however what this new version fixes as there’s no changelog available.

No worries, Danee. Just want to show this issue. So no problem if it takes longer.

1 Like

Well i only made it SDK3. I didn’t change anything else about Virtual Devices, it’s the same as it was.

(Well, except some minor changes in the optional min, max and step for better fine tuning)