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

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

Dit onderwerp bevat 2 reacties, heeft 2 stemmen, en is het laatst gewijzigd door  djandib 2 jaren, 3 maanden geleden.

3 berichten aan het bekijken - 1 tot 3 (van in totaal 3)
  • Auteur
    Berichten
  • #3598

    djandib
    Bijdrager

    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
    Bijdrager

    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…

3 berichten aan het bekijken - 1 tot 3 (van in totaal 3)

Je moet ingelogd zijn om een reactie op dit onderwerp te kunnen geven.