openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
214 stars 235 forks source link

HabPanel + Influx v2. #1628

Open servim opened 3 years ago

servim commented 3 years ago

In the HabPanel, I use a timeline widget, which should display the state of an item of type OnOff for a period. In chrome browser developer tools i am getting errors when updating widget. request:

http://192.168.215.231:8080/rest/persistence/items/Box_HeaterIR?boundary=true&starttime=2020-12-26T02:21:23.189Z&serviceId=influxdb

result:

"{\"error\":{\"message\":\"error in building plan while starting program: cannot query an empty range\",\"http-code\":500,\"exception\":{\"class\":\"com.influxdb.exceptions.BadRequestException\",\"message\":\"error in building plan while starting program: cannot query an empty range\",\"localized-message\":\"error in building plan while starting program: cannot query an empty range\"}}}"

if you exclude the parameter in the request - boundary=true

http://192.168.215.231:8080/rest/persistence/items/Box_HeaterIR?starttime=2020-12-26T02:21:23.189Z&serviceId=influxdb

then the result will be like this:

{"name":"Box_HeaterIR","datapoints":"11","data":[{"time":1608976150615,"state":"OFF"},{"time":1609032596100,"state":"OFF"},{"time":1609032596100,"state":"ON"},{"time":1609063184354,"state":"ON"},{"time":1609063184354,"state":"OFF"},{"time":1609121546486,"state":"OFF"},{"time":1609121546486,"state":"ON"},{"time":1609148710583,"state":"ON"},{"time":1609148710583,"state":"OFF"},{"time":1609199316786,"state":"OFF"},{"time":1609199316786,"state":"ON"}]}

Thanks!

openhab-bot commented 3 years ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/timeline-widget-doesnt-show-correct-history/118061/4

lsiepel commented 1 year ago

@kaikreuzer Can you transfer this issue to https://github.com/openhab/openhab-webui issues.