How to "tail" events

Hi,

I followed the steps described here to activate a scene based on an event triggered by a zwave node (here a Fibaro Keyfob).

The automation code looks like:

- id: '1536096257102'
  alias: Test Automation
  trigger:
  - event_data:
      basic_level: 255
      entity_id: Keyfob
    event_type: zwave.node_event
    platform: event
  condition: []
  action:
  - data:
      entity_id: scene.nuit
    service: scene.turn_on

When I press to correct button on the keyfob, the zwave logs indicates:

2018-09-04 23:43:47.054 Info, Node012, Received Basic set from node 12: level=255.  Sending event notification.
2018-09-04 23:43:47.054 Detail, Node012, Notification: NodeEvent

When I manually trigger the event on Home Assistant, the scene gets activated correctly:
image

Therefore, I strongly believe that is is just a matter of setting the ids correctly.

Is there a way to “tail” the events Home Assistant receives / generates to control that?

If you use the HASS Configurator there’s an entry in the 3-dot-menu on the right labelled “Observe events”. There you can enter the data for your HASS installation, press the “Connect” button, and if everything went well all events will appear as they are happening.

Be aware, that the configurator tries to guess the correct endpoint. But depending on your setup you may have to use wss if you are using SSL, and maybe even another hostname + port. That just depends on your installation. And if you’re on 0.77.x you need to have the api_password enabled in case you haven’t done that until now.

Think your entity_id is wrong. Entity id’s will have a domain and a name. You are just using a single capitalized name.

I would expect your entity id to be something along the lines of 'sensor.keyfob'.

Also, you should verify that basic_level is an attribute passed in the event.

1 Like

you were right, the correct value was: zwave.fibaro_system_fgkf601_keyfob

Thanks for the tip. I really think that the Configurator is brilliant. It allowed me to find the correct entity_id.
However, I could not use the Oberve Events because I was unable to connect to the web socket. Even when I was copying and pasting from my configuration file (I enabled the samba share), I did get a “socket closed” message.

Finally I could not see the automations.yaml file in the configurator. I had to go edit it from the samba share.

Are you using the hassio? If you install the addon from the add-on store pretty much everything (including editing the yaml-files) should work out of the box. Only the event observer would need to point to the URL you are also using the access the HASS UI. So if for example you open HASS at https://mydomain.com, then the URL for the oberserver would be wss://mydomain.com/api/websocket.

Yes I do.
The only difference with the example you gave is that I access the server directly (without a domain name, since it is a local - aka on my private network- installation)

Then without SSL it would be something like ws://192.168.x.y:8123/api/websocket. I don’t have a hassio VM to verify this, but this should actually be working. :thinking:

I can verify that this is working

Sorry for the very late reply…
I’m moving forward and now I only get an invalid credentials error…

{"type": "auth_invalid", "message": "Invalid access token or password"}

{"type": "auth_required", "ha_version": "0.88.1"}

When my configuration.yml reads:

http:
  api_password: P@$$w0rd

(don’t worry about the password in the forum, this is a bogus value).

I strongly believe that I’m missing something basic.

I think with ha 0.88 you should be able to now see event log natively in it’s ui somewhere?

I believe you are taking about this page: /dev-event

Since Hass removed api password, I dont think this Observe Events function works anymore or am I missing something?