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

Add support for discovery device trigger #1090

Conversation

Odyno
Copy link
Contributor

@Odyno Odyno commented Oct 14, 2021

In short

More

The MQTT Device Trigger platform uses an MQTT message payload to generate device trigger events in to home assistant, so it's not create a flag/state/etc on the device (like what produced by binary sensor) but just declare where the event will be raise and provide information about the event.

I used this feature in the auto discovery process for the RF module, so we can reactivate what has been deactivated here this PR #1026

It will also solve the problem #939 because the Device Trigger already has all the reset and event management logic, which by definition has no state.

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

@Odyno Odyno force-pushed the features/SupportDiscoveryDeviceTrigger branch 2 times, most recently from 1bda9f9 to e6b201e Compare October 15, 2021 09:08
@1technophile
Copy link
Owner

Thanks for the PR,

I used this feature in the auto-discovery process for the RF module, so we can reactivate what has been deactivated here this PR #1026

The auto-discovery process of RF has been deactivated because it was creating a lot of unnecessary entities into Home Assistant, in particular when there is a lot of RF devices in the neighborhood. Does this new method prevent this?

@Odyno
Copy link
Contributor Author

Odyno commented Oct 17, 2021

If I understand what you mean, yes I confirm that no entities appear, this is my configuration: I have 3 gateways made with the az-delivery esp32 board each one with SRX882 and STX882. In my house there are about 30 RF devices and a lot of Bluetooth devices... that's my current board on HA:
Screenshot 2021-10-17 at 15 15 56

To date I have intercepted over 350 RF signals and have none of these entities

@1technophile
Copy link
Owner

To explain better, let's suppose that a device that doesn't belong to you emit a set of RF signals, 1145896, 1458765, 3555489.
This is the weather station of your neighbor. Do you think this is going to create one entity for each signal?

@Odyno
Copy link
Contributor Author

Odyno commented Oct 17, 2021

Confirmed, no entity for each signal. In HA it is part of the triggers, more specifically the device trigger

@Odyno Odyno force-pushed the features/SupportDiscoveryDeviceTrigger branch from db57471 to fc0a742 Compare October 20, 2021 13:04
@1technophile 1technophile added this to the v0.9.9 milestone Oct 24, 2021
@1technophile 1technophile merged commit e9ce921 into 1technophile:development Oct 24, 2021
@Odyno
Copy link
Contributor Author

Odyno commented Oct 25, 2021

🥳 Time to review the code and I provider you the pr as promised!

@Odyno Odyno deleted the features/SupportDiscoveryDeviceTrigger branch October 25, 2021 14:51
nerk pushed a commit to nerk/OpenMQTTGateway that referenced this pull request Oct 27, 2021
* Add announce of DeviceTrigger +  Update doc
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

Successfully merging this pull request may close these issues.

2 participants