Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event data is cut off #229

Closed
inputd opened this issue Apr 6, 2020 · 2 comments
Closed

Event data is cut off #229

inputd opened this issue Apr 6, 2020 · 2 comments

Comments

@inputd
Copy link

inputd commented Apr 6, 2020

Describe the bug

When listening for event data, the full event data is not displayed. In my case, I'm listening to mobile_app_notification_action.

To Reproduce

Steps to reproduce the behavior:

  1. Create an "Events:all" node, hooked into a "debug:all msg data" node
  2. Fire a notification that's actionable
  3. Respond to the action on your android device

Expected behavior

If you listen to the event on Home Assistant, you see:

{
"event_type": "mobile_app_notification_action",
"data": {
"message": "Something happened at home!",
"action_1_title": "Title",
"action_1_key": "alarm",
"action": "alarm"
},
"origin": "REMOTE",
"time_fired": "2020-04-06T20:01:25.856135+00:00",
"context": {
"id": "verylongidstringgoeshere",
"parent_id": null,
"user_id": "verylonguserIDgoeshere"
}
}

Screenshots

Node-red's debug cuts off prior to origin and the other data that proceeds it:

object
event_type: "mobile_app_notification_action"
topic: "mobile_app_notification_action"
payload: object
event_type: "mobile_app_notification_action"
event: object
message: "Something happened at home!"
action_1_title: "Title"
action_1_key: "alarm"
action: "alarm"
_msgid: "3e0def51.4ade9"

Example Flow

Sorry, can't figure out how to export without also exporting my HA system data

Environment (please complete the following information):

  • HASS.io, node-red plugin 6.1.4

Other (please complete the following information):

  • Have you searched previous issues for duplicates?: Yes

Additional context

@zachowj
Copy link
Owner

zachowj commented Apr 7, 2020

It's not really cut off, originally it was just never added to the output of the node. The output is a custom object built from the event object sent from HA. The docs should probably be updated to reference this.

this.send({
event_type: evt.event_type,
topic: evt.event_type,
payload: evt,
});

Is this data that you would like to see in the events: all node output?

@inputd
Copy link
Author

inputd commented Apr 7, 2020

I can't say how useful it is in other applications/events, but the user_id field not included in this instance is the identifier that lets you automate based on who sent an actionable text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants