Brewometer integration

I think what’s happening is the amount of log data being returned to the mobile devices is too much for them to handle efficiently. I’ve seen similar on my mobile devices but if I wait long enough, the graph does display. I would hazard a guess that if you left the device on for 5 mins, it would eventually display the graph. This problem is the same with your desktop. I believe if you leave it long enough, the graph should display.

The solution? @Elco’s working on a new graphing mechanism which will return less data depending on the zoom level. So when you’ve got 10+ days of log data, it would only return the ‘highlights’ over the 10 days, until you zoom in on a day… Currently you will get every single datapoint over the 10 days returned.

Thanks for the reply!
You’re right, if I leave my desktop on for long enough, it will display, I guess on my phone the screen switches off before I get that far.
In any case I am very impressed with what Elco has done, as well as with the community integrating new products like the Brewometer into the software and actually sharing their efforts with the rest of us.

Beautiful work! I’m really impressed and thankful of the efforts that everyone has invested to incorporate the brewometer into the BrewPi (which in itself is amazing too).

So please pardon my newbie question, but I’ve been trying to set everything up, using just the Raspberry Pi, without the Spark or Arduino, to simply monitor my Brewometer. My question is, can the BrewPi be run without a spark or arduino (essentially without the fermentation temperature sensors and controllers) to just use it for it’s web server and graph features?

So far whenever I run the BrewPi Software, and access the WebGUI, it tells me the script is not running, and that it cannot receive LCD text from the python script. It appears that the brewpi.py script automatically checks for serial connections and stops if it finds no compatible devices.
Is there a way to get around this, so that I can still use the BrewPi WebGUI for my Brewometer, without the serial devices, until I get around to adding or buying that hardware further up the road?

I appreciate your inputs and advice.

Hi @sbowler,

Just got referred to this thread from a different discussion - I’ve done some work with Elco on building previous BrewPi mods. I was curious if you would be interested in working with me to convert this to a module that can be included with BrewPi, similar to how we do the wifichecker right now? Basically, just a config setting that, if enabled, loads up and enables your code.

I know Elco has most of his time dedicated to the new architecture, but I think there is some value to be gained from something like this in the meantime while we wait for that new architecture to come out. Any integration issues we encounter would certainly serve as lessons learned to make sure the new architecture is accommodating. Let me know if you’re interested, thanks!

-Geo

1 Like

Howdy @vanosg .

Yep I’d be very happy to help convert this into a module. Maybe PM me and we can go through the specifics there.

Hi @odezzy,

The Brewometer logging is done only through the PI, so from a hardware perspective you should be right. However, we do use the logging mechanism built into the brewpi script (brewpi.py). So if that is unable to run without a Spark/Arduino attached, then we’re in a bit of trouble. I haven’t done any investigation into the script to see if the script could be modified to work without a connected device.

My advice would be to go through the brewpi.py python code and try disabling any lines that look like they exit if the connection to the Spark is lost.

Good luck!

@odezzy have you taken a look at https://github.com/andrewerrington/fuscus it simulates the Spark attached to the Pi, so you can graph the Breometer without any ten sensors etc.

Rich

Hi @sbowler thanks for writing this integration i ordered myself a brewometer of the back of seeing this thread. It arrived yesterday and i have been messing around with the integration today. I’ve managed to get it almost working but i have now modified so many things i think that i will start from scratch. This is the first time that i’ve used git hub so apologies if this is a daft question but can i just use the green ‘Clone or Download’ tab then copy the https link and then use git clone https://github.com/sibowler/brewpi-brewometer.git ? If so which directory do i direct it to?

Will i still need to apt-get python-scipy and python-numpy? I tried earlier but it says that it is an invalid operation:

sudo apt-get python-scipy
E: Invalid operation python-scipy

I’ve got lost trying to get rid of unwanted brewometers from the web interface so that mine, yellow, isn’t hidden behind the fermentation profile by deleting lines of script which i possibly should not have done…

@beardy82
do apt-get install python-scipy

you forgot the ‘install’ :slight_smile:

Hi @beardy82,

The unwanted brewometers will automatically dissappear when you get all the modifications installed correctly. The modified beer-chart.js is responsible for hiding those entries, so it looks like it hasn’t been copied to the web directory properly. Also, the brewometer colours are missing, so that looks like the css files haven’t been copied correctly.

When you clone that repository, just do it in the /home/pi or /tmp directories. Once you’ve downloaded the modification files, you then copy from those directories into the /var/www and /home/brewpi directories, as outlined in the instructions.

Thanks @sbowler , that all makes sense, i think i’m pretty much sorted with understanding how to go about it now so will have another crack after a fresh install at the weekend.

Hi mate, I am trying to get to get this to work on my legacy system and dont have a clue what to do. I have cloned all the files into a separate directory and now I have no clue what to do. I struggled to even get brewpi working when I got it. is there anyway you can let me know what files I have to change or even give the amended files.
Cheers Stew

I believe it’s here on github. These should be the files you are looking for: https://github.com/jlvnyc/brewpi-brewometer

It’s the same code from @sbowler but with the edits to the legacy branch for arduino.

I still can not get this to work. Can anyone please advise me to what mistakes I have made.
Cheers Stew


The top error I’m not so sure about. The Brewometer modification doesn’t use anything in the device configuration area… My only guess (if this worked before you did the mod) is that you’ve accidentally changed something in the brewpi.py script that’s stopped the device config from working. Do you have the tools to do a file comparison? If not, might be best to start with a fresh brewpi.py, check that this fixes the device config, then re-apply the mod.

The bottom error suggests that you’ve got the Brewometer mod working, but it doesn’t like the format of your TEMPERATURE.black and GRAVITY.black files… Can you post the contents of each here?

Cheers,

Simon

All good working now. I just don’t have the black dots next to bo temp and sg.

Great news.

As to your other problem: The lack of colour on the dots indicates that the brewometer.css file isn’t being picked up. Is it in the css/ directory? And if so, did you copy the modified index.php file across (this has the reference to the css/brewometer.css file).

Because I am using weaved for remote access could that cause the problem.
Cheers Stew

Hi @rbpalmer i loosely followed the External Access as well. Would you mind telling me a bit more about what / where you added the extra code to the admin.php file? Did you make any alterations to the PublicBeerPanel.php file?

Would appreciate your help to save me trawling through the code looking for discrepancies.

Thanks in advance.

Hi Rich, thanks for the pointer to fuscus. I was able to get fuscus running, and that did indeed solve the problem of the brewpi script stopping all the time.
Since I don’t have any temperature sensors attached to the pi, it doesn’t show a chart, because it’s not receiving any temperature data from the virtualized “spark”. As a result it’s also not displaying any of the brewometer data.
I can see that the brewometer code is indeed pulling data from the brewometer sensor, but it isn’t making it through to the brewpi chart.
I will need to do some more troubleshooting to find out where it’s getting stuck.

Cheers,

Oliver