i was wondering if there is something as i described in the topic.
i would love to have a place where every1 could just go browse by manufacturer and item to rules/items/things examples and maybe essential info…
for example if you just installed a philips hue light strip, you could just go to that place and see what examples are available and copy what you need and modify it. i find myself searching in the forum here a lot and copying things from here and there …
this would make searching a lot easier and get rid of some spelling mistakes that make finding some posts pretty hard.
would be possible to realize something like that as a wiki…
or is something like that even existing and i dont know where it is ?
I’m not sure I understand totally what you mean, but if I get it right something like this is existing in the addons section of the openhab documentation.
Just go to www.openhab.org/addons, enter the technology you’re looking for in the search box and open the respective docs page.
For most bindings you should find here all the information regarding configuration of things and channels as well es items and sitemap examples, e.g. www.openhab.org/addons/bindings/kodi
Of course this is not complete talking about far more than 100 bindings. If something is missing for a specific binding feel free to file an issue for the respective docs page (link is at the bottom of each page) or even better write a PR to add what’s missing.
Examples specific to a binding are in the binding docs.
For rules, it makes no sense.
When an item is created, the rules don’t care what binding is behind the item.
For example: I have a group of lights, with different technologies, some are zigbee, some are mqtt, some are gpio.
I can send a command to the group ON and all lights will switch ON
well, in my opinion it makes sense, for example if you group more philips hue lights, you cant just create a group and control them altogether, you need to write certain functions to read the lights individually and then adjust the individual items according to a certain algorithm… this would be nice to see what other people came up with, since its quite a lot of work to program decent routines to handle grouped lights.
it would be a place to put code that is used all over the place, for example that your heating turns off, when the window is opened.
more coding examples would make it easier to figure out new possibilies, for example it took me quite some time to find out there exists the triggeringItem and other certain special things with openhab, which you only find out through extensive research.
and so on and so on, i have tons of ideas which probably loads of people already coded or could just use with almost no adjustments whatsoever…
I second what @vzorglub said. For rules it makes no sense to have this code examples in the docs for a specific binding/technology as the logic is independent from the technology. This is the great thing about openHAB. You can use for your hue lights the exact same rules as someone else uses for his milight, or knx actuator, or …
But of course you are also right. It is nice to go and see what others have done to get inspiration and use this code to not reinvent the wheel again and again.
Fortunately we already have this in place. Here in this forum. Just search the Tutorials/Examples category. Especially to “Solutions” sub-category and the great posts with the “design pattern” tag by @rlkoshak.
It does not make sense to sort by manufacturer because openHAB is intentionally built to be tech and product agnostic. You could e.g. group your Hues with Fibaro Zwave and MiLight WiFi actuators into one group as they all do color lighting at the abstract level.
That’s why what you’re looking for does not and won’t exist beyond what’s documented for the bindings.
It seems like a kind of big ask to create a whole new thing in the docs to develop and maintain to help with one problem with one of the 360+ bindings. Rules should be first and foremost technology agnostic. It shouldn’t matter 99% of the time what specific technology one is using.
And we do have a place for posting examples and tutorials of this sort in the Tutorials and Solutions category. But you will not turn up specific postings that are tagged with “Hue” because almost all Rules posted are not specific to Hue. But just because they are not specific to Hue doesn’t mean that they don’t apply.
It is a common request from new comers. They have Model XYZ or device 123 and they want a place to go to tell them what they can do with that. But the major power of OH is that it doesn’t matter that you have Model ZYX of device 123. With very few exceptions in the Rules you just have to know that some light is linked to a Color Item.
While this is more reasonable than some of the requests to build a database of supported devices, I agree with the consensus, it is an unreasonable request. It takes OH and turns it on it’s head because the major point is that we shouldn’t have to care about the device at all.
Well, it is in the docs. Any extensive research you are doing should start first and foremost with the docs. themselves.
So really it isn’t that we don’t have lots and lots of tutorials and examples posted so much as you are having trouble finding them. So my question to you would be how are you going about looking and what can we do to make it easier. I don’t think your proposed solution is feasible but perhaps there is some alternative organization that could be employed.
Thanks for posting the link but I would like to add that the Design Patterns are by design generic in the extreme. They are intended to apply in lots of situations.
oh, that showcase thingie is great. will check out more things there.
well, you are right on the manufacturer sorting point of view, that makes no sense at all, rather the topic should be then like “control multiple RGB lights in one group with one slider” or something like that, no matter which manufacturer the RGB lights come from … so i guess the showcase is the best way for me to go and search the forums as well a bit more in depth.
thx for the replies though, has already been a great help, i guess i didnt think far enough …
actually found this post, it doesnt cover the subject completely, but it is a starting point…