dataMine 0.973

Thanks for the answer. Next time when I restart my Vera and if my ?data is lost? I will send debug info to you (here).

This is not a big deal for me because I know how to get it back (restart again) but it would be nice to know why…

Thanks. I agree - you may be able to get it back, but if there’s a problem, I’d really like to fix it if possible. I appreciate your help…

Cheers
Chris

Chris,

In one of the future releases, would it be possible to manually set the ‘timeout’ for when the data is truncated? Going back to our old problem with large data sets, my graph truncates the most recent data almost all the time. I’d be fine waiting longer for it (if that’s an option).

Thanks as always,

Jon

This is possible now. :slight_smile:
If you go to the dataMine plugin in UI5, “Advanced” tab, you should find a variable SetTimeoutPeriod which should be set to 12. You can set it to any value between 5 and 30 - more/less than these numbers, and it dataMine will use 5 or 30 respectively.

There is a gotcha here (somewhere) though… If you make this “too big”, then Vera will think the task has hung, and it will restart Luup. Again - this is the problem you originally had, and the timeout was basically implemented to stop this. Unfortunately I don’t know what the time is where Vera gets upset - I think it’s 20 or 30 seconds, but I’ve not tried to find it. So, feel free to increase the time, but be aware of this (and if you find a setting that fails, let me know ;)).

Cheers
Chris

Got it - thanks Chris!

Hey Chris.

I was busy due to a huge workload during the last few weekes and therefore not very active on this forum.

I don’t know if you remember my problem, which was not getting the “events” when activating the flags.

I did a complete reinstall and reconfiguration of dataMine. I installed this at least a year ago when usb mounting and stuff had to be done manually.

Basically I just wanted to let you know that events are working for me too now.

THANKS!

Hey Chixxi,
Thanks for letting me know - I’m glad to hear it’s working…

Cheers
Chris

I just installed .973 today, and I can’t seem to get it working. I’ve gotten my USB drive mouted, but none of my settings save. I double checked my lua files, and i noticed that the json file is empty for dataMine.

When I say my settings won’t save, I mean I can click on one of my devices, then set EnableLogging to true on it, click save, then click to another device, and it still shows “EnableLogging=true”. If I close the browser tab, and reopen it, the same device has reverted back to “false”.

I’v uninstalled and reinstalled multiple times.

Is there anything I can troubleshoot to see why my settings won’t save. I’ve attached the log that comes up when clicking on the dataMine debug link.

The USB mounting all looks fine - when you say the “json file is empty”, what file, and “how” empty. I assume you mean the dataMineConfig.json file, and by “empty” - do you mean 0 bytes empty, or just “no channels saved” empty?

I’d be a little surprised if it was 0 bytes long, but I suspect that this is probably what you mean? ???

It’s strange that when you click on another device it still shows EnableLogging = true. Just to confirm, when you say “click on another device”, you mean clicking on another variable - not just the device? Does the device name, service and variable name change (ie the top 3 lines of the config)?

The log file is good (thanks), but unfortunately it doesn’t really show anything useful (ie everything looks fine). Please can you go to the config tab, select a variable, change enable logging to true, hit save, then wait a few seconds and dump the debug log again… I forget if there’s anything that should be logged if everything works, but we should see either an error if there’s a problem writing the file, and/or the internal copy of the configuration logged at the end should show the new variable.

Cheers
Chris

When I go look at “Luup Files” under “Apps”->“Develop Apps”, I see a “D_DataMine1.json” with links “view” and “download”. I was clicking “view” which apparently flips the browser out, clicking download does yield a valid json file.

I’m referring to another z-wave device on my network. E.g. I click on motion sensor a, set enable logging to true, click save, then click on motion sensor b, and enable logging still shows true. When I close the dataMine browser window, and open it again, motion sensor a’s Enable logging is set back to “false”.

I’ve attached a new log file.

Thanks for your help.
Scott

When I go look at “Luup Files” under “Apps”->“Develop Apps”, I see a “D_DataMine1.json” with links “view” and “download”. I was clicking “view” which apparently flips the browser out, clicking download does yield a valid json file.[/quote]
Ok - this isn’t what I was thinking, and I assume what you’re seeing is the same as in the picture I’ve attached. If so, this is ok - it’s a “feature” of Vera. While it says the file is empty, it’s really just a display issue and if you look at the page source, you should find it’s ok.
This file must be correct or you wouldn’t see the debug link in the dataMine app.

I’m referring to another z-wave device on my network. E.g. I click on motion sensor a, set enable logging to true, click save, then click on motion sensor b, and enable logging still shows true. When I close the dataMine browser window, and open it again, motion sensor a’s Enable logging is set back to “false”.[/quote]
I’m wondering if you’re doing the right thing here. You need to either double click on the device, or click on the little + icon to get down to the variables. Each device has many variables (dozens in some cases) and dataMine allows selection of these individually. Take a look at figure 15 in the manual and see if that’s what you’re doing. If you don’t go down to the variable name, then this won’t work and I can’t see any indication in the log that any variables are being saved - ie there’s nothing at all coming in from the GUI, but everything else looks ok in the log.

[quote=“Chris, post:29, topic:174587”]Thanks for your help.
Scott[/quote]
No problem.

Cheers
Chris

That was it. I wasn’t going deep enough in the tree. I was trying to configure my multi sensors, and just hadn’t gone low enough.

Thanks for your time.

That’s great - I’m glad it’s working…

Cheers
Chris

Chris,

In case it’s helpful, with mine the timeout limit seems to be sub-20. When I had it at 20, 25 or 30, rather than give a graceful “data truncated” message, it gives an error code 0.

I’m currently setting the timeout at 15. The downside of this is that the most data I can view (for the power consumption that I track) is a week’s worth. If there’s any smart way in a future version to allow these large data sets to be processed/displayed more quickly, that would of course be huge… but I understand the limitations.

Thanks,

Jon

Also, one minor thing: for displaying day or night, for longer time periods it essentially shows as all grey.

That may be accurate if the night cut-offs are so close together, but it looks a little odd…

[quote=“JonLove, post:35, topic:174587”]Also, one minor thing: for displaying day or night, for longer time periods it essentially shows as all grey.

That may be accurate if the night cut-offs are so close together, but it looks a little odd…[/quote]
Can you attach a picture of what you mean? How long is a “longer time period”. I just did a plot of a months data (see attached) and it looks fine. Given that this feature has only been in for a few days, you shouldn’t have built up enough data to show more than a few days…

There are a couple of “gotchas” with the day/nights. Firstly, if you’re unlucky and your Vera resets during a sunrise/sunset time, then it won’t log this, and you’ll miss a day (or night). Second, I was planning to restrict this for long times, but hadn’t added this yet as I didn’t think it would be an issue (yet). But there’s always someone out there to prove me wrong :wink:

Cheers
Chris

Hmmm - I’ll have a look as there may be another timeout at play here. There’s a timeout in the GUI as well - I thought this was set to 50 seconds, but somethings niggling in my mind, so this might be able to be increased.

Yes - there are things to do. My original intention was to use historical data. I’ve not worked on this for a few weeks (or more) as I’ve had other things on, but this is still the best way forward. It’s largely working, so I just need to finish it. In this way, it would use hourly/daily data for very long timeframes (given that you can really only plot out up to 1000 points). Then when you zoom, the idea is to change to the higher temporal resolution data…

Just need to do it…

Cheers
Chris

Here’s what mine looks like when I move from showing a graph to showing a week of data…

PS Excited about the new approach to longer time periods =)

Thanks for the screenshot. I think this is an artifact of your first day/night entry being a sunrise - so the graphing sets everything before this as night. Where mine is the opposite, so I get day… (it’s as clear as day and night ! :D). I’ll have a think about doing something about this…

Cheers
Chris

Ah, got it =)

Is it easier (although less accurate) to just shade 6PM to 6AM? I’m not sure if anyone needs the specific sunrise/sunset granularity? =)