GithubHelp home page GithubHelp logo

brewpi / brewpi-www Goto Github PK

View Code? Open in Web Editor NEW
106.0 106.0 75.0 1.14 MB

This is the repository for the BrewPi web interface. The web interface will communicate with the Python script, which will in turn talk to the BrewPi Spark

Home Page: https://www.brewpi.com

PHP 16.47% CSS 4.23% JavaScript 79.30%

brewpi-www's People

Contributors

elcojacobs avatar gregatkinson avatar lukepower avatar m-mcgowan avatar vanosg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brewpi-www's Issues

viewLog should handle nonexistent log files

Right now it uses 'rb' as the mode to open the files, using rb+ would solve this, alternatively check + create file if we don't want to open the file with write permissions.

I'd be happy to do this if it's okay

New legend for beer chart

Brian (bschwinn) got started with a better legend for the chart, see:
/feature/new-beer-chart-legend/

I am not sure about hiding the legend by default. Maybe we can find a good way to show the names under the show/hide buttons on the right.

I am excited about the possiblity to show the state info (cool/waiting to cool etc) when hovering over a data point. We could possible also show annotations (now only tooltip on the annotation).

And how about YYYY/MM/DD as default date format everywhere?

error using # sign in beer name

Reported on the forum by bsquared (http://forum.brewpi.com/discussion/465/error-using-sign-in-beer-name):

Looks like there is an issue with using a pound (#) sign in the beer title. After adding a new beer with a # in the name, you will receive two JSON errors upon refresh (same error I believe both times). This happens every time you load/refresh the page.

Easy workaround is to remove the # sign and all is well. Not a big deal, but just a heads up to other users.

Customizable default graph view

Ability to configure different graph views when you first load up the web-interface.

Example: Show the last 12 or 24 hours of the brew data with a zoom out button to see the entire brew date if desired.

Optimize Brewpi base page

After beers have been running for more than a day, the data that is collected becomes large and the browser has a hard time creating and displaying the graph.

I ran Google's PageSpeed plugin and the suggestion that was made was to optimize browser caching instead of having to load everything all at once.

Leverage browser caching

Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
https://developers.google.com/speed/docs/insights/LeverageBrowserCaching#LeverageBrowserCaching

Suggestions for this page

Leverage browser caching for the following cacheable resources:
brewpi_logo.png (expiration not specified)
css/dygraph.css (expiration not specified)
ui-bg_glass_85_dfeffc_1x400.png (expiration not specified)
ui-bg_glass_95_fef1ec_1x400.png (expiration not specified)
ui-bg_gloss-wave_55_5c9ccc_500x100.png (expiration not specified)
ui-bg_inset-hard_100_f5f8f9_1x100.png (expiration not specified)
ui-bg_inset-hard_100_fcfdfd_1x100.png (expiration not specified)
ui-icons_469bdd_256x240.png (expiration not specified)
ui-icons_6da8d5_256x240.png (expiration not specified)
ui-icons_cd0a0a_256x240.png (expiration not specified)
jquery-ui-1.10.3.custom.css (expiration not specified)
css/style.css (expiration not specified)
font/5x8_lcd_hd44780u_a02-webfont.woff (expiration not specified)
js/beer-chart.js (expiration not specified)
js/control-panel.js (expiration not specified)
js/device-config.js (expiration not specified)
js/dygraph-combined.js (expiration not specified)
js/jquery-1.11.0.min.js (expiration not specified)
js/jquery-ui-1.10.3.custom.min.js (expiration not specified)
js/jquery-ui-timepicker-addon.js (expiration not specified)
js/main.js (expiration not specified)
js/maintenance-panel.js (expiration not specified)
js/profile-table.js (expiration not specified)
js/spin.js (expiration not specified)

Update logging interval in web interface

The logging interval setting selector in the maintenance panel is not received from the script and just defaults to being set to the first item, which is confusing.

In the script, we can add the interval to controlSettings, so when we receive it from the script, we can set the dropdown to the actual value that is in the script config files.

get_beer_data.php can return json files in wrong order

I run BrewPi on my Ubuntu server instead of a RPi. I ran into an issue with my graph data not displaying correctly once midnight came and went. I discovered that this file is using readdir(), which is specified in the PHP docs to return files in the order they are stored in the filesystem (i.e. what you get if you run ls -U). For whatever reason, ls -U returns the files in reverse order on my system (test-2014-08-29.json comes before test-2014-08-28.json) and this is the order readdir() is getting them, which confuses the graph. Changing the file to use scandir() instead fixed the issue for me because scandir() sorts the filenames alphabetically despite their filesystem order.

Add button to start a new beer

The interface for starting a new beer is not user friendly: going into maintenance panel, typing the beer name.

A more intuitive way should be added. I was thinking about the following:

  • The beer name becomes clickable
  • Clicking on the beer name opens a pop op menu with the following options:
    • On top: you are currently fermenting .....
    • Stop logging data button (we should have a special beer name that doesnt log any data)
    • Start a new beer
    • Continue existing beer
    • Erase data for this beer and start over
    • (Rename this beer) -> dangerous, we could leave this out for the coming release

There is not really a place for another button to open this menu. Maybe just a small icon next to the beer name is enough to make it clear that it can open a menu.

Custom logfile locations

In config.php I set the following:

    // Log files
    $stdout = '/var/log/brewpi/brewpi.log';
    $stderr = '/var/log/brewpi/brewpi-error.log';

and the web-interface still tries to find the logs in the default location.

Would be nice if we could configure custom log locations.

Support hours, minutes and seconds in the temperature profile

The temperature profile has a start date and a couple of set points with an offset from the start date in days.

Having to calculate back to days from hours is not practical, especially on shorter periods that are used when mashing.

We should support input like "1d12h10m".

document/tidy up starting a new beer

The lastest release added a feature where the current beer can be managed or a new beer started by clicking on the beer name in the UI header.

  • this feature should be documented - many users overlook it
  • the beer name in the maintenance panel no longer works. (It could be made read-only or simply removed entirely.)

Simpler way to assign devices to functions

At present, the user has to "know" which sensor they want to use for each function. If they plug all 3 (beer/fridge/ambient) in at once, then they will have to know the address of each sensor in order to correctly distinguish them.

A simple solution is to write documentation to suggest first physically labeling all sensors, and then plugging each sensor in one at a time and refreshing the device list. The new sensor that appears unassigned in the device can then be assigned to the function it was labelled with.

The UI could be developed in various ways improve this:

  • develop a wizard in the UI that asks the user to plug in each beer/fridge/ambient sensor in turn - the code detects the new sensor that was connected and assigns it to the function.
  • a proactive UI that reacts to when a new sensor is detected. "A new sensor has been found. What do you want to use this for?" With selection for beer/fridge/ambient function.
  • A more advanced UI, the sensor appears as a labelled icon on the page in a pool of unassigned devices, and the user can drag it to the relevant fridge/beer/ambient part in a systematic view of the brewpi camber/beer setup.

Feature Request - View-only mode

I love showing my friends the status of my brews, but I always have to prefix it with, '... but please don't click any buttons!' . If we could produce either a /var/www/readonly path that doesn't have any ability to mess with settings, or as I think I saw earlier, provide a login screen or some mechanism of access control, that would be awesome!

Allow negative temperatures in BrewPi to make Ice

I'm using a chest freezer with RaspberryPi. I'm trying to make some ice for brewday (cooling down the hot wort quickly). But it seems BrewPi doesn't allow me to set negative °C temperatures. This feature/profile should be added, so one can use his freezer as normal, even with Brewpi.

Feature Request: Save brew graph

Sometimes, a brew just goes weird and doesn't follow the profile you had in your head- power goes out, you change the profile mid-brew, you left the door open, the heater broke, whatever. But hey, what if that odd set of events produced the most wonderful beer you've ever tasted?

I propose some method where, after a brew finishes, you can generate a profile that uses the actual brew temps from your previous brew as a template for future brews.

Combine json files on server and optimize performance for chart loading

All json files for a beer are downloaded separately and combined in javascript.
Combining them on the server might be faster, because it does not require lots of ajax requests.

Brian got started in the feature branch optimize-beer-data-loading.

I fixed some errors in the resulting json and the branch now works correctly. (elcojacobs@11b3628).

I am now profiling the file with xdebug and webgrind.
json_decode and json_encode are the heaviest functions. The files that are loaded are already json, so I think we can avoid decoding and encoding.

image

Passing Null temp

This is a follow-on to the error we worked on earlier:
"Cannot convert temperature 'null' to float"

This error was generated when the beer profile populated the 'set temp' box with a temperature. For example, I set a beer profile and was following that. Then, I decided to set a constant beer temp, so I clicked that tab, and a temperature value was already present in that box. I hit 'apply', and after the next refresh, it did not switch to constant beer temp mode. No alert or error, it just stayed in the previous mode.

I believe this is because if something else in the program populates that text box, when you hit the apply button it is unable to read that value.

No restriction on file upload

The program_arduino.php page allow to upload a hex file in order to reprogram the duino.

There is no restriction on the uploaded file, it's possible to upload PHP file (.php or .php3 extensions).

SyntaxError: An invalid or illegal string was specified in drawing profile chart

I helped a user debug and stumbled upon this JS error:

SyntaxError: An invalid or illegal string was specified

canvas.fillText(temperature, xCoordinate - 5, yCoordinate);

happens at https://github.com/BrewPi/brewpi-www/blob/master/js/control-panel.js#L281

Profile Name:Exit 148 IPA
Start Date:12/05/2013 19:20:53
Day Temperature Date and Time
0 12/05/2013 19:20:53
1 65 12/06/2013 19:20:53
5 65 12/10/2013 19:20:53
6 68 12/11/2013 19:20:53
7 70 12/12/2013 19:20:53
8 68 12/13/2013 19:20:53
9 65 12/14/2013 19:20:53
13 65 12/18/2013 19:20:53
14 32 12/19/2013 19:20:53

Beer Profile Graph showing wrong value if viewing from different time zone

When viewing my BrewPi page from a time zone other than the time zone of the physically located BrewPi the Beer Profile graph shows the incorrect temperature value.

For example:
My BrewPi is located in EDT while I am viewing my BrewPi page from CDT (1 hour behind). The Beer Profile graph shows 58.79 degrees F as the current profile value while the Current Beer Profile value (in the upper left "LCD") shows 57.6 degrees F. The 58.79 degrees F value shown in the Beer Profile graph is the correct value but for 1 hour prior.

I believe the issue stems from this line in the master branch:
https://github.com/BrewPi/brewpi-www/blob/master/js/control-panel.js#L238

and this line in the legacy branch:
https://github.com/BrewPi/brewpi-www/blob/master/js/control-panel.js#L238

Although I'm sorry I have no expertise in how to fix it.

Feature Request: Disable devices from webui

There may be a time where you'd want to disable the heater or cooler with out actually removing the device from your configuration or pulling the wires.

A simple checkbox to enable/disable devices in the WebUI would be awesome.

Changing a "First on bus" sensor in the device manager sends an incorrect address to the Arduino

When a RevA shield is used, with sensors configured as 'first on bus', changing their settings in the device manager sends an incorrect address to the Arduino.

Device config command sent, U:{"i":"3","c":"1","b":"0","f":"5","h":"2","p":"22","a":"First on bus"}

This causes the sensor to be installed with address F2BCF87BFCFFFFFF.

The correct implementation would be to send address 0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.