I have this definition in matrics.js file:
// Mailbox
Mbox_open : { name:'MBox', regexp:/MBOX\:O/i, value:'OPENED', pin:1, graph:1, logValue:1, graphOptions:{ legendLbl:'Mailbox', lines: { show:false, fill:false }, points: { show: true, radius: 5, lineWidth:1 }, grid: { backgroundColor: {colors:['#000', '#03c', '#08c']}}, yaxis: { ticks: 0 }}},
MBox_closed : { name:'MBox', regexp:/MBOX\:C/i, value:'CLOSED', pin:1, graph:1, logValue:1, graphOptions:{ legendLbl:'Mailbox', lines: { show:false, fill:false }, points: { show: true, radius: 5, lineWidth:1 }, grid: { backgroundColor: {colors:['#000', '#03c', '#08c']}}, yaxis: { ticks: 0 }}},
For some reason OPENED event shows on graph, but CLOSED doesn't. In the status I have no problem seeing one or the other... Both definitions are virtually identical except for value. Any clue why second one doesn't graph?
I'm using V8 gateway btw.
Your logValue:1 can't be the same, i think that should fix it.
Look at the garage mote metrics (https://github.com/LowPowerLab/RaspberryPi-Gateway/blob/master/metrics.js#L47).............
Quote from: Felix on February 02, 2016, 11:35:43 PM
Your logValue:1 can't be the same, i think that should fix it.
Look at the garage mote metrics (https://github.com/LowPowerLab/RaspberryPi-Gateway/blob/master/metrics.js#L47).............
Thanks Felix! Changed one of them to logValue:1.1
That was easy :)
Works now?
Quote from: Felix on February 03, 2016, 02:52:46 PM
Works now?
Strangely no :( And it broke SMS for some reason. I'll try few things when I get home...
Use an INTEGER for value not decimal.
Quote from: Felix on February 03, 2016, 04:00:06 PM
Use an INTEGER for value not decimal.
Oops ok I'll try that :) I saw that your garage example used 1.1 and 0.5 and thought it was ok ...
It should be yes but for ease and clarity please use integers until we iron out the details.
Ok I now understand what happens.
Value is actual data value, so it shows up higher or lower on the graph. It was actually working with 1.1 as I see that value now.
Problem is that very last event is never shown on the graph at all for some reason...
Let's say MBox was opened at 20:00. I get alert and see status changed, but no dot on the graph.
Then at 20:05 Mbox closes and now I see dot for OPEN but not for close. And so on. Bug? :)
At any rate it works for me! I assigned OPEN value 2 and CLOSE value 1 so OPEN is shown as higher dot :)
Quote from: Lensdigital on February 03, 2016, 08:55:51 PM
Then at 20:05 Mbox closes and now I see dot for OPEN but not for close. And so on. Bug? :)
Yup that is actually a bug I am aware of and trying to fix. Basically some data is filtered out and it tends to be the last edge points of the graph, so your last dot in the data store would be filtered out. Annoying but as soon as more data is added that dot will show and not the newest one and so on.
On my to-fix list...
OK just FYI I think I fixed the graph bug where the last dot does not show.
I also released other changes which allow the node list to be sortable on a desktop browser - to make this work on a mobile device is possible but not without some undesirable behavior so I decided to make the list sortable on desktop browsing only. Anyway it's a bug fix and new feature release, check it out.
Thanks Felix! I updated logUtil.js, gateway.js and index.html.... After this I do see last CLOSED event, but 2 previous OPENED evens are now gone :(
I restored previous logUtil.js and OPEN evens are back... See screenshot
What happens if you zoom into the graph where your OPEN events used to be? Do they show up?
Yes I see summer older stats if I zoom out. For now I rolled back
I basically made a small change that would ensure the last point in a graph is captured in the graph.
Otherwise the bulk of the other points should be the same. Perhaps increasing the 600 points limit in logUtil.js might make a difference. This can be especially true if those 4 points are very close to each other with respect with the rest of the graph which is empty. The data is aggregated with binary search, so it will pull the closest point to a fixed unit of time.