Shubhamjain007 / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

A new widget for setting numeric values for items #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. We need a widget to set a numeric value for an item. This widget should 
display the currently set value and have "+" and "-" buttons to change this 
value. 

2. Such a widget can be used to change thermostat setpoint. There can be other 
potential use cases for this widget, so it shouldn't be thermostat dedicated.

Original issue reported on code.google.com by belovic...@gmail.com on 18 Apr 2012 at 2:35

GoogleCodeExporter commented 8 years ago
We can define such a widget type in sitemaps, how they are rendered (if with + 
and - buttons, or with a spinner or only by a text field accepting numbers) 
will be up to the UI implementation.

What properties should such a widget have? You would have to provide a lower 
and and upper bound, a step-size, the formatting of the value (number of 
fractional digits, if any) etc.

What item types can be associated with it? NumberItems for sure. What about 
DimmerItems? RollershutterItems?

Original comment by kai.openhab on 18 Apr 2012 at 2:53

GoogleCodeExporter commented 8 years ago
Don't you think all those types of input can coexist in a single sitemap cause 
they can be more or less efficient and comfortable for controlling different 
values?
Adding lower and upper bound, step-size is a good idea. Do you have any use 
case for fractional digits? I don't see any other options.
Dimmer and roller shutter controlled in steps? Isn't it too complicated? Even 
if you make a step of 10 it is going to be tricky to turn it to opposite end 
:-) But I think we can do this assosiation. No problem at all but gives certain 
flexibility, maybe somebody will use it!

Original comment by belovic...@gmail.com on 18 Apr 2012 at 3:36

GoogleCodeExporter commented 8 years ago
No, I thought of different ways of rendering such a new widget, but it should 
be enough, if every UI decides for one way of rendering it.

A use case for fractional digits could be your thermostat - I usually control 
them in 0.5°C steps - a change of 1°C might already be too much in some cases.

Dimmer with steps? Certainly, that's what the Classic UI is doing right now as 
well - the difference would be to also have the value directly editable between 
the + and - button :-)

How about supporting long-press on + and - to do several steps at once (also 
what the Classic UI is doing for Dimmers and Rollershutters already)?

Original comment by kai.openhab on 18 Apr 2012 at 4:55

GoogleCodeExporter commented 8 years ago
Ok, ok, ok. Let it be this way! Just change it to Accepted! :-)

Original comment by belovic...@gmail.com on 18 Apr 2012 at 5:21

GoogleCodeExporter commented 8 years ago
If you insist - but first you have to come up with a good name for this widget 
:-P

Original comment by kai.openhab on 18 Apr 2012 at 5:23

GoogleCodeExporter commented 8 years ago
Setpoint?

Original comment by belovic...@gmail.com on 18 Apr 2012 at 5:34

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 18 Apr 2012 at 5:36

GoogleCodeExporter commented 8 years ago
Maybe a better widget name is just "number"? "Setpoint" is too dedicated.

Original comment by mishoboss on 23 Apr 2012 at 7:52

GoogleCodeExporter commented 8 years ago
I'm afraid that 'Number' widget will be mixing up with 'Number' item :-/ If you 
don't like 'Setpoint' then we need something about 'set' (cause it is the 
nature of this widget) and about 'number' (cause that is the value type for 
this widget). Maybe 'Setnumber' ? :-)

Original comment by belovic...@gmail.com on 23 Apr 2012 at 9:20

GoogleCodeExporter commented 8 years ago
I agree with Victor, "Number" would easily be mixed up. And the main feature 
(in comparison to displaying a NumberItem in a TextWidget) is the possibility 
of user input, so I think "Setpoint" makes this quite clear.

Original comment by kai.openhab on 24 Apr 2012 at 11:11

GoogleCodeExporter commented 8 years ago
I had the same use case for OpenHab. Some time ago I bought some Zigbee 
thermostats and finally installed them a few months ago. Part of the goal was 
to make them work with OpenHab, so I implemented a binding for it and in the 
process I bumped into the issue of "what to use for the setpoint?". I 
implemented a "DialItem" (this is what I called it for a lack of a better idea 
at the time) which is really just like the NumberItem (for now). The idea was 
the same, to give it a way to have some increment and bounded range (e.g [70, 
75) ). Because I use this strange unit of temperature called Fahrenheit ;-) I'm 
good at this time with just bumping up and down in increments of 1. 

Anyway, I just thought I'd share some of my experience with OpenHab. BTW, I've 
been looking at home automation for a long time, and have looked at open source 
home automation SW for a while as well, and I decided OpenHab is what I'd like 
to build on. The code is very well written, good job! to the team putting this 
together, and thanks!

Original comment by edmund.t...@gmail.com on 2 May 2012 at 1:11

GoogleCodeExporter commented 8 years ago
Should be closed I think, as it is implemented on the server side and checked 
by UI's to be working!

Original comment by belovic...@gmail.com on 12 Jul 2012 at 5:12

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 12 Jul 2012 at 5:14