Yes, although it’s intended for development rather than production use. Updates will not be as smooth as on the pi, and some aspects like the regular scheduling of tasks aren’t part of this setup, since for development, these things aren’t needed or are managed by hand.
(It’s already possible to run brewpi on Windows for development, this was just my notes after moving the system over to OS X.)
@akalars - these notes are intentionally rough - they are for developers wanting to run brewpi on OS X. I just sketched out the notes as I made progress.
Brewpi for regular use should run on a raspberry pi. You’ll find much fuller instructions for how to do that at Software Install Guide
From somewhere I got the idea that I would be fine if I had a spare machine to run the web server, but apparently I was wrong. I guess I just have to look the other way and pull the visa card to get a raspberry pi.
You can run brewpi on OS X/Windows but it’s mainly aimed at expert users since there’s a lot of setup to be done. If you can find your way around the system then it’s possible.
For the smoothest and simplest experience, the RPi is the best choice since the installation/update process and operation have been optimized for that.
Here is what I did to get the site working on my Mavericks iMac. I tried running install.sh and quickly found it is pi specific, so I did most of this by just adapting the cmds and using the built in Apache before finding this thread. I plan to do some development, so hopefully I can update this when I can get scripts scheduled and communication with the Spark.
PHP is already installed for you in OS X 10.9 Mavericks. It’s as simple as modifying the httpd.conf file again.
On line 118, uncomment the LoadModule for PHP:
LoadModule php5_module libexec/apache2/libphp5.so
On line 231, add index.php as a default document if a directory is requested:
DirectoryIndex index.html index.php
Lastly, we need to tell Apache to use the PHP handler when requesting files that end in .php or .phps. Append the following code to the end of your httpd.conf file.
<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
cd settings
mv config.cfg.example config.cfg
edit these lines: scriptPath = ~/home/brewpi/ wwwPath = /Library/WebServer/Documents
cd /Library/WebServer/Documents/brewpi
sudo mv config_user.php.example config_user.php
sudo vi config_user.php
edit these lines: $scriptPath = '/Users/guh/home/brewpi';
Maybe a silly question, but is there any way to mock the arduino or spark when running the python script? I’m trying to play around with the web app for development purposes but don’t actually have a brewpi at the moment and was wondering if there is some kind of test harness for this.
The web app seems to work fine locally otherwise but it would be nice to have some fake communication happening.
We used to have a simulator build which compiled the firmware to an executable. I’ve not looked at it for some time, but we should probably resurrect it at some point.