-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 Channel as a trigger for rules #7161
Comments
What about adding a new way for using these single field values of the JSONs as rule triggers? Now, the output JSON for state and tele have:
and as we know from previous PRs, changing those to So, what about adding a new way of using these single field values as triggers as:
what do you think? |
Good idea but... This will need a rewrite of the rule JSON validator as currently it looks for POWER1#STATE where POWER1 is the name of a field which has subfields like STATE. It must be possible but as said it will need a rethinking of the rule JSON handler. |
@ascillato any idea how to update the knx state then w/o this change? Maybe I'll resort to a timer then. |
As channel is not a trigger, you can't use it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hello. I'd like to implement a use case that could potentially be solved with this feature:
To implement this, I need access to the current channel value within a rule. One option would be to make it accessible via special variables. I could also implement it, using a channel#state trigger to store the value as var. What do you think? Edit: There are 2 doors and one additional ambient stripe, so I cannot do it with dimmer. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Final support added by 89b130b |
Great, thanks a million @arendst and @ascillato. |
@pfisterer Am trying to use this feature, would it be possible for you to add a sample to this issue that shows how to use this feature? |
@NorthernMan54 No, sorry. I haven’t used this feature until now. I’m still working on other issues. Maybe @ascillato has an example. |
Example: Rule to publish a mqtt message with the value of the channel number 1: Rule1 1
Rule1 on channel[1] do publish stat/chan1 %value% endon The docs have been updated. If you need more information about rule's usage, please check https://tasmota.github.io/docs/Rules/ Thanks. |
@ascillato Some days you have Homer Simpson moments, when you have tried ever possible option but the basic one. That works very well. Thank you |
@ascillato there is no update in the wiki Rule1 1 Can you give a correct example.
|
This is old and closed |
I did not find this feature in documentation too. The example usage is not working because of wrong syntax. So for anyone searching for trigger based on Rule1
ON Channel1 DO publish stat/chan1 %value% ENDON
ON Channel1>50 DO var1 %value% ENDON
Rule1 1 I also realized that Hope this helps. |
Thanks very much for your correction. Very appreciated !!!!! Please, help us. Can you add this example to https://tasmota.github.io/docs/Rules ? In the top right there is an icon with a pen and page to propose changes. Thank you very much in advance!!!!! |
As the rule docs are now, the case of picking JSON fields like |
Have you looked for this feature in other issues and in the wiki?
Yes.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
The underlying problem has been described in #7160 but after discussing in Tasmota's support chat, @blakadder and User Adrian discussed this issue and concluded that this is not an issue but should be a feature request. For future reference, see the chat transcript below.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Add Channel as a trigger for rules. The following setup should trigger a rule:
19:00:40 SRC: WebGui from 192.168.178.67
and19:00:40 CMD: Group 0, Index 1, Command "CHANNEL", Data "55"
Rule1 ON Channel#data do publish cmnd/test %value% endon
should trigger on a change.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Periodically sending the value to the KNX bus - however, this adds a lot of overhead in terms of traffic and increases the latency until a change is visible.
Additional context
Add any other context or screenshots about the feature request here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: