Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » Profiles
Profiles [message #1775184] Wed, 25 October 2017 21:46 Go to next message
Patrick Fink is currently offline Patrick FinkFriend
Messages: 2
Registered: July 2017
Junior Member
Hi all,

at the smart home day, we had a very cool speech by Simon (sjka) regarding the newly introduced ESH profiles. I would like to open this thread, as for me the pieces of information regarding profiles are quite fragmented right now: So there are a bunch of PRs (#4108, #4204, #4374), a small ESH documentation page and (probably the best overview of the feature currently) the slides from the smart home day (that I don't have yet).

Best usage example for profiles is currently given in #4374 linked above. The implementations for profiles currently available can be found here (that would be, in my understanding, also the right place to contribute additional profiles that are not binding-specific and interesting for others).

Open Points / Questions for me:

- Examples how to use it within a binding (recommended profile for a particular channel, own profile implementation within a binding)
- What is the current overall status? Is there still something missing to use / get started already with them?
- Are there known limitations/stuff that is still WIP?
- Maybe there are more information sources than the ones mentioned above?

@Simon: Would be glad if you could share some information (maybe also your slides?) here! Can't wait to start working with profiles!


Cheers,
Patrick
Re: Profiles [message #1775322 is a reply to message #1775184] Fri, 27 October 2017 15:26 Go to previous messageGo to next message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
Hey, pretty cool you would like to join that party!

As mentioned at the Smart Home Day, the documentation has been awfully neglected so far. Mainly because things were changing all the time. And I still expect that there could be minor adaptions needed as I would like to try moving the autoupdate feature into the default master profile.

Mainly for this reason the interfaces are not yet exported, so no binding can use them right now. And hence I can't break them ;-)

The most interesting part where I really could use some help would be the "standard" (whatever that may be) trigger profiles for the system trigger channels.

I only drafted RawButtonToggleProfile.java so far.

The other system trigger channels can be found in the
DefaultSystemChannelTypeProvider.java

The DefaultProfileFactory.java then tries to guess based on the ChannelType which profile might be the most appropriate, therefore it would make sense to have a "standard" one for every system channel type. The profile itself of course might need to behave differently, depending on the type of the linked item or rather its accepted states. As you can see in the RawButtonToggleProfile.java it so far only handles OnOffType, but this obviously is not enough - I mean, why shouldn't it also be possible to operate rollershutters or dimmers with a single button, right?



So I'd suggest you start with the trigger profile implementations within the core framework and at the same time I will have a go at the autoupdate integration. If we then think we're fine with the APIs we can export it quickly to allow for bindings doing their custom stuff where it makes sense.

What do you think?

[Updated on: Fri, 27 October 2017 15:27]

Report message to a moderator

Re: Profiles [message #1775344 is a reply to message #1775322] Fri, 27 October 2017 23:54 Go to previous messageGo to next message
Patrick Fink is currently offline Patrick FinkFriend
Messages: 2
Registered: July 2017
Junior Member
Hi! My development environment is set-up and I could make a successful test with RawButtonToggleProfile. But I'm wondering if it really makes sense to add now a separate Profile for each common use case. If I would only cover basic use cases, it would be already 15 profiles / classes (5x Toggle for each common trigger event, 5x for onlyOff, 5x for onlyOn) and there are dozens more in my mind. Don't you think it would be better to offer the user a possibility to pass configuration options to a profile? Then we can make a "Toggle"-Profile which just (optionally) takes the trigger event as an argument (PRESSED, RELEASED, SHORT_PRESSED) and defaults to PRESSED (or RELEASED), a "onlyOff"-Profile which takes the same argument and so on.

I can imagine it will be a very common requirement to make a profile configurable by the user (especially when input devices get more complex. Imagine you have a wheel, then the user maybe wants to tune sensitivity, acceleration, ...).

Maybe we should pass an extra argument "profileConfig" to the profile via ItemChannelLink. The content could depend on the profile (as well as whether it's optional or not). Easy profiles like "toggle" could just take a string, more complex profiles could also take whole data structures.

[Updated on: Sat, 28 October 2017 00:17]

Report message to a moderator

Re: Profiles [message #1776029 is a reply to message #1775344] Thu, 09 November 2017 13:30 Go to previous messageGo to next message
Markus Rathgeb is currently offline Markus RathgebFriend
Messages: 100
Registered: August 2014
Senior Member

It seems a configuration for the profiles would make sense. @sjka WDYT?
Re: Profiles [message #1776056 is a reply to message #1776029] Fri, 10 November 2017 08:13 Go to previous messageGo to next message
Simon Kaufmann is currently offline Simon KaufmannFriend
Messages: 51
Registered: January 2011
Member
Yes, that's indeed a good point. I reckon it would be enough to pass the link's Configuration object to to the profile factory, do you agree?
Re: Profiles [message #1776063 is a reply to message #1776056] Fri, 10 November 2017 09:04 Go to previous message
Markus Rathgeb is currently offline Markus RathgebFriend
Messages: 100
Registered: August 2014
Senior Member

I assume "yes" but have not such a deep knowledge about the profiles at all (need to find some time, but where to look for *g*).
Previous Topic:adding channels conditionally
Next Topic:Using Threads in Profiles
Goto Forum:
  


Current Time: Thu Jun 21 01:07:11 GMT 2018

Powered by FUDForum. Page generated in 0.02279 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top