Panel: working with database (e.g. show sum of electricity consumption))

Free domotica! Forums How can I …? Synology NAS Panel: working with database (e.g. show sum of electricity consumption))

This topic contains 2 replies, has 2 voices, and was last updated by  djandib 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3598

    djandib
    Participant

    Problem:
    I want to see at a panel at my dashboard the sum of electricity consumption measured by my fibaro wall-plug e.g. from 01.01.2017 until today

    Background:
    I have an existing and fine working database. So the consumption datas are saved and you “just” have to work with them. Unfortunately no idea how

    Has anyone an idea or solution?

    #3599
    Miss Laura
    Miss Laura
    Moderator

    Hi,

    You can create a virtual device to store this ‘sum’ value.
    This is the device you can show in your dashboard.

    Then using blocky you can query the database using a custom php block and put the sum inside this virtual device.

    Have fun,
    Laura

    #3600

    djandib
    Participant

    OK, I understand, but how is it possible to query the database and work with it?
    Working with php I found this:
    http://stackoverflow.com/questions/5808522/get-sum-of-mysql-column-in-php?rq=1
    But as a newbie and never learned php it`s impossible for me to get a result….
    I didn`t find any documentation about this in the forum…

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.