Homey Community Forum

Heimdall - Let Homey watch over your home

Hmm that doesn’t look good, looks like settings aren’t read properly from Homey’s storage. It doesn’t show the zones on the Status page, but more importantly, the Delays are undefined.

Are you able to run the app from the Command Line Interface (CLI) like explained here: [HOW TO] CLI install method?
The Heimdall code can be found here: https://github.com/daneedk/com.uc.heimdall

Hi Danee

Nephew helped me with your requests, it was to difficult for myself.

Also what i notice by switch-on check(inschakelcontrole) check motion sensors (controleer bewegingssensoren) i cann’t switch the button on and off.

Below the log from CLI:

    ─────────────── Logging stdout & stderr ───────────────
    2019-10-24 19:28:46 [log] [Heimdall] init Heimdall 2.0.21        ----------------------
    2019-10-24 19:28:46 [log] [Heimdall] Surveillance Mode:          disarmed
    (node:32246) UnhandledPromiseRejectionWarning: Error: invalid_capability
        at Remote IPC Process

(node:32246) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:32246) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:32246) UnhandledPromiseRejectionWarning: Error: invalid_capability
    at Remote IPC Process

(node:32246) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
2019-10-24 19:29:00 [log] [Heimdall] Found Device, not ready:    SURVEILLANCE
2019-10-24 19:29:06 [log] [Heimdall] Found Alarm Button named:   ALARM
2019-10-24 19:29:06 [log] [Heimdall] Found motion sensor:        TOILET SENSOR
2019-10-24 19:29:06 [log] [Heimdall] Found contact sensor:       HAL DEUR SENSOR
2019-10-24 19:29:06 [log] [Heimdall] Found motion sensor:        KAMER SENSOR
2019-10-24 19:29:06 [log] [Heimdall] Found motion sensor:        OVERLOOP SENSOR
2019-10-24 19:29:06 [log] [Heimdall] Found motion sensor:        GARAGE  SENSOR
2019-10-24 19:29:07 [log] [Heimdall] Found motion sensor:        ZOLDER MAXX SENSOR
2019-10-24 19:29:07 [log] [Heimdall] Found motion sensor:        BADKAMER SENSOR
2019-10-24 19:29:07 [log] [Heimdall] Found motion sensor:        SERRE SENSOR
2019-10-24 19:29:07 [log] [Heimdall] Found motion sensor:        LOGEERKAMER SENSOR
2019-10-24 19:29:07 [log] [Heimdall] Found motion sensor:        BIJKEUKEN SENSOR
2019-10-24 19:29:07 [log] [Heimdall] Enumerating devices:        done.
2019-10-24 19:29:07 [log] [Heimdall] Heimdall ready for action   ----------------------
-----------------------------------------------
2019-10-24 19:29:19 [log] [Heimdall] stateChange:                KAMER SENSOR
2019-10-24 19:29:19 [log] [Heimdall] sourceDeviceFull:           true
2019-10-24 19:29:19 [log] [Heimdall] sourceDevicePartial:        true
2019-10-24 19:29:19 [log] [Heimdall] sourceDeviceLog:            false
2019-10-24 19:29:19 [log] [Heimdall] Full||Partial||Log:         Yes
2019-10-24 19:29:19 [log] [Heimdall] sensorStateReadable:        Beweging gedetecteerd
2019-10-24 19:29:19 [log] [Heimdall] Alarm is triggered:         No
2019-10-24 19:29:19 [log] [Heimdall] logArmedOnly:               false, Surveillance Mode: disarmed
2019-10-24 19:29:19 [log] [Heimdall] logTrueOnly:                false, Sensorstate: true

My nephew noticed the error messages at the start when run the app from CLI.

Below the screenshots:



Hi Ben,

Great work from your Nephew :wink:

Can you open the console in your browser (preferably Chrome) and look at the object that’s printed from settings.js:50 and post a screenshot of it here?
(should look a bit like this:)

The error in the log breaks my head, I can’t really find what causes it, it doesn’t say which capability is invalid or what line caused the error. Not sure if it causes the Surveillance Mode to be not ready or it not being ready causes it but I think they’re linked.
Surprisingly the zones are now shows for both the Status and Instellingen pages.

Hi Danee,

I still had contact with my cousin. “According to my cousin we walked through the house and that’s the only thing we got to see. Couldn’t produce anything else but this.” I hope this is enough for you to continue with this. For me it is all acadabra so far because I have no knowledge of this.

Sure no problem.

i believe this is what you wanted to see.

We played with the settings, and if we turn off the speach settings, it’s possible to disable the setting. So this part is solved. Only the logs of the sensors when not armed remaines( blue lines). When armed it is registered in the log( light red).

1 Like

Yes, that’s the settings, thanks.
They do look ok, I wonder why Delays showed up as undefined earlier, somehow the settings couldn’t be read at that point in time and may have caused the problems with not being able to change settings. I think that’s an isolated problem and seems to be not appearing anymore.

About the invalid_capability error at the beginning of the log, I’ve been able to reproduce that on my ‘production’ Homey that runs 2.5.2 (my dev runs 3.0.0) and I think that comes from a device who’s app has been updated to 3.0 and uses the new energy feature. The error is returned when calling the athom-api but I can’t find out which device but also found out it causes no issues so I’ll ignore it because the error is not thrown on 3.0.0 (which I expect to be released :soon:)

So, the remaining problem, not logging for devices that should log… I’m gonna dive into that part of the code again, I must be overlooking something…

I’ll keep you posted on progress!

(It could help if you could post a part of the log here when you run Heimdall from the cli and activate a sensor that should log, basically the part you posted earlier starting with the line of dashes just before stateChange)

@2Be thank you very much, I really appreciate it!

1 Like

Ben

1

1d

Hi Danee,

I still had contact with my cousin. “According to my cousin we walked through the house and that’s the only thing we got to see. Couldn’t produce anything else but this.” I hope this is enough for you to continue with this. For me it is all acadabra so far because I have no knowledge of this.

No problem, I think I can do without the log.

@Ben found it!
Must have read over it a hundred times :astonished:
With this release I commented out a lot of lines that log to the console, mistakenly I’ve also commented out the line that writes to the Heimdall log. :man_facepalming:

The fix will be in the next release.

Nice that you fixet the problem . Thanks. I will wait for the nex release.

New version is submitted, waiting for Athom to approve it.

2 Likes

New version is approved and published

Version 2.0.22

  • Fixed bug, introduced in 2.0.21, that caused devices to not log
  • Added condition flowcard to check if a device is logged
  • Added action flowcard to add logging to device
  • Added action flowcard to remove logging from device

In this version the bug introduced in 2.0.21 that caused devices to not log is fixed. Thanks to @Ben for reporting and providing information to help me fix the bug.

With this new update you can add or remove the Log setting from a device from a flow.
For example, remove the Log setting when the first person gets home:


and add it when the last person leaves home:

This way you can have a device write to the Log when no one is home, and not log when someone is home.

There is also a condition card to check what the current Log setting on a device is:

That’s phase 2 of the changes that brings dynamic configuration of device settings in Heimdall through flows.
Next up is phase 3, which will enable you to set the Full and Partial settings on devices. Stay tuned!

2 Likes

Hi Danee,
Thanks. Everything works as before. Only the honor belongs not only to me but to @Jurgen_Heine and of course not to forget you. Thank you again

1 Like

When the alarm is triggered, I want all my (hue) lights (± 20 lights) in the entire house to blink at full brightness (100%), at the same color and at the same speed (so on off on off etc) until the alarm is disarmed. I have Hue switches attached to the wall, so I want the lights to continue blinking even if someone presses the “off” button on the switch, but that’s quite easy to fix.

Does anyone have an idea how to create this? Any help is much appreciated!

You can make 2 flows that will loop one each other with condition “while alarm activated”. But be aware that it can be load to network to control 20 light at once on/off continuously.
Once alarm will be disarmed/canceled, flows will stop and you add another flow to turn off all lights or other condition.

I did a quick search, but nothing popped up. But I can’t imagine that no one has asked this: does Heimdall support smoke and CO-sensors? I can’t find it in the app, but it would be a great addition.

It was discussed before, on the old forum: https://forum.athom.com/discussion/comment/65997/#Comment_65997

Hi. I created the flows for arming and disarming. Somehow i dont know why it keeps on arming and disarming on its own multiple times and stucks the flow. Can you address this please thanks