Adding node-red-contrib-amazondash to HassIO with dependencies

Hello,

I am trying to add node-red-contrib-amazondash to HassIO 0.93.1 , however it requires libpcap-dev dependency.

Being still learning the ropes, I dont know how to install this dependency to make the NodeRed addon work.

I do have the Dasshio addon installed and working fine, however was trying to explore more flexible automations using NodeRed.

Can someone guide me how to make it work.

If you have the dashio add-on, then the device is already integrated with Home Assistant. You don’t need the node-red node for that. You grab the states from Home Assistant.

But the states are for entities, when using the Dasshio add on , no new entities are created so I can query their states.

All processing presumably for the pressed dash button happens internally within the dasshio addon.

Any ideas.

So create them?

Based on the documentation, it seems like you could create them quite easily in your HA, and have the dasshio add-on toggle that entity…

You just need to think about this differently. The button doesn’t have a state. It’s essentially a momentary switch.

Ok thanks for the directions, just for clarity, these entities are to be created as input_booleans which can toggle/switch states ?. Or is there any other entity type which i need to create for these momentary switches (Dash Buttons).

Onwards I guess the workflow would be

  1. Use dasshio to call HA service to toggle input sensor switch on each press.
  2. Use Node-Red events: state node to query the toggle switch state and do the desired action(s).

Is this the direction of thought you are referring to ?

Thanks

I don’t think there is any momentary switches in HA. At the end of the automation though, you could reset the state of the switch (boolean, or mqtt switch)

Yes. The node palette you were looking at adding accomplishes the same exact thing as the dasshio add-on. You can even have the dasshio add-on talk directly to your node-red instance…but it wasn’t going to give you anything different than what you can accomplish on your own.

Ok giving it a try now, will post the result, or will keep bugging you for guidance wherever needed.

Thanks.

Alright, mission accomplished,

  1. Created an input boolean entity for Dash Button to read toggle states. Added the following to configuration yaml.

boolean inputs for Node Red automations

input_boolean :
  amazon_dash_sensor:
    name: "Amazon Cheezit Button"
    initial: off
    icon: mdi:light-switch
  1. Added the boolean switch to a group using groups.yaml only for organizing the UI

groups.yaml

  Presence:
    name: "Presence Detection"
    entities: # Add all entities here that should be part of the widget
      - input_boolean.amazon_dash_sensor

image

  1. Adjusted the Dasshio configuration to trigger input boolean toggle service on each press.

  1. Created the flow in node-red to check events state for the input boolean entity created for Amazon Dash Button.

image

image

This concludes setting up a basic light on/off automation using node-red and amazon dash buttons using input booleans without using Node-Red nodes specifically for dash button (which require libpcap and tcpdump dependencies - apparently not so easy to install on a running HassIO installation).

I guess the possibilities are endless now. Will keep on doing the experiments and will post again.

Thanks for all the help @flamingm0e

2 Likes

Glad you were able to get that working.

I try to only use Node Red for the automation pieces, and HA holds all the states and devices. So I don’t have my Home Automation strung across several different services and dependencies.