Habmin2 problem with charts

I’ve heard that charting is great in Habmin2, so I’ve installed the addon and I’m trying to create a chart

I load Habmin2 and go to Charts > Chart Editor, and I immediately see this in the upper right

At the same time, the following is logged to the javascript console

Then when I click

and select Temperature (mapped to Temperature_Outside item) like this

I then get the %%KEY_NOT_FOUND%% error again in the top right, and also this in the javascript console

Any idea what I’ve not got configured correctly?

Many thanks!

It looks like you didn’t select a persistence service (there’s a ‘null’ where the persistence name should be).

Clearly the error needs ‘improving’ :blush:.

Thanks Chris!

Can you point me in the direction of how to select the persistence service?

It’s the button on the toolbar that looks like a database icon…

Ooh - that button is missing for me - the others either side I have though…

Could there something else I need to configure?

Thanks again :smile:

Yes, persistence? :wink:.

From memory, this button is hidden if no persistence services are returned from openHAB itself. Are you sure you have at least one service enabled?

You could go to the REST API from the dashboard and see what is being returned from the REST services…

This should return the persistence services that you have enabled…

Yes definitely got persistence set up (MySQL) - I’ve verified that data is being stored in the tables. Default openhab chart provider is working fine.

I’ll look into it in a bit more detail and report back - probably missing something obvious! Thanks anyway for your help :smile:

What does the REST interface show though? Does that return the services?

I don’t have a persistence section in openHAB REST API at all!

There’s clearly something deeper going on with persistence that I don’t understand – weird as otherwise it’s definitely storing values in the mysql tables, and the default charts work just fine. There may be this as a separate question to ask on the forum…

How old is your runtime? I suspect you need to update to a newer version…

I’m on 2.0.0.b2 – should I step up to beta 3?

Only if you want it to work :wink:.

This was added quite recently, so it probably wasn’t in b2 and I suspect it will solve the problem.

haha – ok, i’ll give that a whirl :slight_smile:

definitely got that persistence API now:

I’ve done a complete refresh / cleared browser cache etc but still no DB icon:

however, when selecting the Temperature item again, I now get a different error in the JS console:

Help! :slight_smile:

One more thing, the response that came back with that 409 was

{
  "error": {
    "message": "Persistence service not found: ",
    "http-code": 409
  }
}

Actually, the selection button is only shown if there’s more than 1 service. If you only have a single persistence service, then it should just use that and not provide the selection button (since you can’t change to anything else).

Clearly that’s not working since servicename is not set - I just checked it here though with a single service, and it is working ok here (although my runtime is a week or two old, but nothing should have changed I think).

Since you’re familiar with the debugger, can you take a quick look in the network tab and see if HABmin is downloading the persistence services…

I have another thought which I’ll also look at - I need to go out later so not sure I’ll have time to look at this, but will try and resolve in the next day or two.

If you haven’t already done so, take a look in the User Preferences, and set the default persistence there. It doesn’t seem to stick (I’ll look at this) but I wonder if this might be causing a problem as it looks like it might screw up the default selection when the chart loads…

Yes, it appears that HABmin is downloading the persistence services from the API:

Ok - thanks. I think the problem is probably with the way the default service is handled. I’ve just created a new snapshot - let me know if this is any better, and if not, try setting the default persistence in the user configuration.

Ah ha! That’s done it, I’ve got a chart!! :smile:

You are right in that it doesn’t seem to stick for me either, but that doesn’t matter so much :slight_smile:

Thanks so much for your help – sorry that in the end it was a numpty user setting!