Update Number item via HTTPBinding manually

139 views
Skip to first unread message

m...@ikravets.com

unread,
Feb 8, 2013, 9:26:33 AM2/8/13
to ope...@googlegroups.com
Hi,

Does presents any ways to send 'update' command to Number item that used HTTPBinding?

For example from demo.items:
Number Weather_Temperature "Outside Temperature [%.1f °C]" <temperature> (Weather_Chart) { http="<[http://weather.yahooapis.com/forecastrss?w=638242&u=c:60000:XSLT(demo_yahoo_weather.xsl)]" }

In some of case when we are manipulating via RULES then need manually update the state of  Weather_Temperature. 

Proposed variants:
openhab send Weather_Temperature update
openhab send Weather_Temperature refresh

Kai Kreuzer

unread,
Feb 11, 2013, 4:03:48 PM2/11/13
to ope...@googlegroups.com
Hi,

No, sorry, there is currently no concept like an "update" or "refresh" command to trigger a status update. I thought about that when designing openHAB, but then I dropped the idea because there are many uni-directional systems, where this simply would not have worked. And as you cannot tell from the logical item layer, what concrete binding is behind an item, I decided to rather not introduce such a command.

Regards,
Kai

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

andrea....@gmail.com

unread,
Oct 23, 2013, 5:02:56 PM10/23/13
to ope...@googlegroups.com, k...@openhab.org
Dear Kai,


I'm playing with energy/overload manager and I've to poll every xx-seconds several items.
Googling around searching for solutions I ended-up to this thread.


I do agree with your rationals, but nevertheless I think such a feature would be quite useful.

I played a while and I tried to find an implementation that could fit without screwing-up too many things.


I'm not really happy with what I have right now, but before proceeding I would like share/discuss together.


Find below a brief overview of the proposed solution:

- a new "fake" binding tag "reloadable" is used to tag items that do supports reloading

- at GenericItem level a reloadable property has been added 

- a new RefreshCommand type has been added

- instances of item classes extending GenericItem could be created with reloadable set to true or false. Instances having reloadable set to true will return a list with one more command (the RefreshCommand) compared with the not reloadable

- any binding supporting reloadable command will be changed to deal with this new command (I tried with KNX)


Waiting for your feedback.

Best Regards,
              Andrea

p.s. a partial very preliminary implementation can be found on my fork jock71/openhab
Reply all
Reply to author
Forward
0 new messages