• Ahh, ok yes thats what I meant. ok I'll have to take a second look at that. I must have done something wrong, as using 16 got me no or weird results (cant remember) and 32 got me a big number. Checking again now, 32 gets me 69702, and 16 gets me 9254. So now its giving me a value. I'll go with 16 then, as you know more about it than me, who knows what typo I made before.

    ok, I 'think' I follow what you're saying there for the storage. If thats the case, then yes maybe I do want to follow the same logic in the firebase data structure.

    I was starting along the lines of this: https://jsfiddle.net/redfox05/7Lpmvbkz/2­7/

    var min = d.getMinutes();
    switch ( true ) {
        case min <= 15: console.log('segment1', min); break;
        case min <= 30: console.log('segment2', min); break;
        case min <= 45: console.log('segment3', min); break;
        default: console.log('segment4', min);
    }
    

    Trying to break each hour into 4 segments of 15 minutes, as perhaps doing it per minute would not be accurate enough / lead to errors given its tighter points.
    From what I understand, each pulse flash is 1000th of a kWh, so 1000 counts in 1 kWh.

    So ideally, I would like to get to a point where we know how many kWh or fraction thereof are used for every 15 min block.
    The datastore needs to be able to be queried per 15, per hour, per day, month etc, so I'll keep thinking on that one.

    Be really cool if I could expand this to then do prediction stuff. Im pretty sure Google/AWS has some clever tools for this.

About

Avatar for redfox @redfox started