openhab-core
openhab-core copied to clipboard
Add rules management to sitemaps
Thus far sitemaps can only manage items still It would be a good point if they could also control rules( implementing at least start/stop functions)
@lolodomo @wborn I am a newbe at openhab-core development; How to get started?I have been studying org.openhab.core.io.rest.sitemap.internal and org.openhab.core.model.rule.runtime.internal packages any tip?
There really isn't a stop for rules. There are only three operations: start, disable, and enable. Disable and enable are more admin function and not something that seems appropriate for a sitemap.
In the mean time, the standard approach is to create an Item that triggers the rule when commanded.
MainUI does have support for an action to run a rule, and you can even pass data into the rule. So there is precedence for this feature in OH.
Good points....
Also, this probably belongs in the openhab-webuis repo. I don't think there is anything required in core to support this. The REST API endpoint already exists. All the changes required should be limited to the sitemap implementation. Though there might also need to be some updates to the Android and iOS app too.
Change in core is required in case a change of sitemap syntax is expected.
What is requested is a new widget (sitemap element) to control the start of a rule?
What rendering do you imagine in UI?
Exactly! A new widget to control rules' enable/disable function as happens in the web ui
I can imagine rules widgets with the controls beside....
As already explained, enabling/ disabling a rule is an admin feature, not something that should be available in sitemap UI.
I interpreted it to mean adding the ability to run a rule instead of commanding an Item. I could see it being an enhancement to the Switch element instead of needing a whole new sitemap element. But I don't know if that's the easier or harder way to implement it.
Why was it closed ?
I thought there was no way to handle it. Do you think it is feasible? -8)
Il Mer 1 Nov 2023, 18:09 lolodomo @.***> ha scritto:
Why was it closed ?
— Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-core/issues/3855#issuecomment-1789334433, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZHU6H572C5IPD4EGCZDX3YCJ66DAVCNFSM6AAAAAA6JFRPNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBZGMZTINBTGM . You are receiving this because you modified the open/close state.Message ID: @.***>
Main concept of sitemap UIs is to interact with items. I propose to give up this feature request.