Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


NutsManager - PHP/JSON power/gas/water overview manager
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

NutsManager - PHP/JSON power/gas/water overview manager

RaymiiRaymii Member
edited September 2012 in General

NutsManager

image

Basicly, I got a HUGE energy bill and wanted to get some insight in the usage. Excel/Libreoffice? Meh, let me code!. Uses a JSON file, requires php 5.2 (for the JSON) and creates nice graphs. Also very suitable for a LEB, since no MySQL is needed. Runs fine on a 32-MB ram OpenVZ VM for example...

Will be released when the last bugs are fixed.

DEMO

https://raymii.org/cms/content/page/task/

(Note, JSON file is not writable on purpose)

Feedback wanted, please comment

Thanked by 2klikli djvdorp

Comments

  • XeoncrossXeoncross Member
    edited September 2012

    Thanks for sharing. However, I'm having trouble finding the script source on your website. Next step is to start posting to github so people can add to your code.

  • @Xeoncross

    @Raymii said: Will be released when the last bugs are fixed.

    >

    I still have some bugs with the display and sorting of a larger dataset, and although it seems to be fixed I'm going to run some more tests to see if my code works. Then, I'll release the source.

    And, I don't like github. I run my own git servers, and if you want the source code, download the zip file when it will be released. Maybe I'll leave the .git directory intact.

  • Do you need to input the value every day?

  • @Damian No you don't, you can fill in any date as long as it is in MM-DD-YYYY format and PHP can convert it to an epoch. It fills in todays date ass default for convenience...

  • @raymii *ass = as
    Haha ;)

  • @Xeoncross Source is now on github.

  • First release

    https://github.com/RaymiiOrg/nutsmanager

    Screenshot with webpagescreenshot.info

    NutsManager is a power/gas/water usage tracker written in PHP. It uses a JSON text file for the values and the visual side is created with the excellent HTML5 Kickstart framework by Joshua Gatcke. The graphs are made with the flot framework.

    It helps me to keep track of my power usage, and shows me on which days I use a lot, and on which days I do not. That way, I know that a LAN party costs me a lot.

    Features

    • 4 different measurement units:

      • Power
      • Discount priced power
      • Gas
      • Water
    • Graph which shows the difference with the day before

    • Overview of all values
    • Average difference
    • Pretty colours

    Install

    • Download zip file: https://github.com/RaymiiOrg/nutsmanager/zipball/master and unzip to webroot (/var/www).
    • Make sure json file is writable by webserver: chown www-data:www-date power.json

      • (Or, chmod 777 power.json if you are lazy)
    • Change the price values for the power, gas and water in the functions.php file.

      • Make sure you use a dot (.) and not a comma (,), php doesn't like comma's.
    • Start adding the values every day.

    • ???
    • PROFIT!!!

    Links

    Raymii.org: https://raymii.org/cms/p_NutsManager
    HTML5 Kickstart: https://github.com/joshuagatcke/HTML-KickStart
    Flot: https://github.com/flot/flot

  • Updated the code, fixed 2 things:

    1. Stupid mistakes to use integers instead of floats, now uses floats.
    2. Changes the default output formatting of the list:

    image

    Looks nicer than that listing...

    BTW @Xeoncross @nickbudi and @Ultrabenosaurus starred it on github...

  • Fourth release

    • Fixed a few bugs
    • Multilingual

    If you are able to translate 40 lines of PHP, it would be nice :).

    https://github.com/RaymiiOrg/nutsmanager

Sign In or Register to comment.