BrewPiLess

Software Installation

1.Install Arduino IDE 1.6.8 or above (I am using1.6.9)
2.Install ESP8266/Arduino Board
Open “Arduino/Preferences” menu, input the following link at “extra board manager link”
Under “Tool” menu, select “Manage Board” in board selection menu. search esp8266, and install that board setup.
You should have NodeMcu1.0(ESP-12E module) option available under board selection menu. Select that, and choose 4M(3M SPIFFS) as Flash size.
Select the correct Serial port.
3.Install Library
 The following libraries are needed. Some of them can be found under “Sketch/Import library/Library Management”. The following links are for reference, please use the archives on GitHub.
!! Please use the libraries on GitHub. Some of them are modified, while some of them might be updated and incompatible to BrewPiLess.!!!
 If you can’t find the library, you have to find the Arduino Library directory, which usually locates at [User directory]/Documents/Arduino/libraries/ on Mac.
Arduino IDE requires the source be in specific path, usually it is
 [User directory]/Documents/Arduino/BrewPiLess
5.[Optional]Upload data files to ESP8266
If you plan to write some pages of Javascript/HTML yourself, you can do this. It’s better to turn on “DEVELOPMENT_FILEMANAGER” option in espconyfig.h to enable management of files from web interface.
Hardware Setup(Reference)
Requirement
  1. NodeMcu 1.0 Board, ESP-12E or D1 mini is possible for those good at these things.
  2. Two way Relay Board
  3. Two DS18B20 sensors
  4. 4.7K resistor.
  5. [Optional] 20×4 I2C LCD
  6. [Optional] KY-040 Rotary Encoder module Don’t use it.
  7. Power supply to ESP8266. (I use a USB adapter)
brewpiless
** If this photo contains your working and infringe your copyright, please notice me to remove it.
Check the following link for reference, where I got the DS18B20 pictures.
http://www.homebrewtalk.com/attachment.php?attachmentid=217946&d=1408145422
** Note:You need a IO expender to use Rotary Encoder.
 
Usage:
  1. On the first time use or when the network disappears, you have to setup the WiFi. ESP8266 will create a WiFi network named “brewpi”, Use your phone or computer to connect to that WiFi AP. There will be a WiFi setup page popping up. If your phone or computer doesn’t open the setup page automatically, open your browser(Chrome, or Safari), and try to browse to any site, like google.com.
    Please reference the following link for network setup:https://github.com/tzapu/WiFiManager
    New: After three minutes, ESP8266 will enter AP mode.
  2. If you are lucky enough to use Apple’s products, you can use URL like “http://brwepi.local”. Otherwise, you have to figure out the IP address by looking up from your router. The main page is the LCD like:
    lcd
  3. Touch or Click the LCD, a menu will pop up. Select “Device Setup” is to setup the sensors and actuators. When prompted for username and password, input “brewpi” for both. The interface mimics original BrewPi. You can find the the manual of BrewPi for your reference. Basically, you have to “Refresh Device List” to list sensors and PINs, select the setting and “Apply”.
    device setup
  4. “Temperature Management” is used to control the temperature. Select “Beer Const.”, “Fridge Const.”, or “Off”, input the temperature desired, and “Apply”. That’s it.
    temperature control
    To use “Beer profile”, you have to edit and save the profile first. The interface mimics original BrewPi again. Please check BrewPi manual for detail instruction.
    **Internet connection is necessary for Beer Profile.**
  5. Temperature logging.
    BrewPiLess can log data to clouds or other servers. The “Data Log” menu is for this. ESP8266 will invoke the specified URL with the temperature values at specified period. Because of limitation of resource, HTTPS is not supported. If you want to log data to GoogleSheet, you need to do it indirectly. Please check Github for detail instruction.
    logsettting
    I have tried “thingspeak.com”, which does not require https. You can put data to it direct from ESP8266.
    thingspeak
    Here is the result of my testing:
    https://thingspeak.com/channels/139809
  6. “System Config” is used to setup the system related setting.
    configuration
    Host/Network Name: The hostname for mDNS.
    User Name & Password:trivial. All pages except the LCD page require authorization.
    Always need password:If this option is not set(checked), the access to the “main page”(LCD display) will not require authorization.

不用RPI的BrewPi安裝教學

軟體安裝

可預先下載預先編譯好的bin檔: https://github.com/vitotai/BrewPiLess/tree/master/bins

下載nodemcu-flasher: https://github.com/nodemcu/nodemcu-flasher

用 nodemci-flasher燒錄bin檔即完成。

硬體配置

需求
  1. NodeMcu 1.0 板子一塊或D1 mini,比較厲害的可以找ESP-12E。
  2. 二路Relay Board一塊,可以同時控制冷熱,一路沒有便宜多少,買兩路就好。
  3. 二條DS18B20測溫線,一條只能用冰箱定溫,三條可以順便量室溫,兩條最常用。
  4. 4.7K電阻一顆。
  5. 20×4 I2C LCD,不接也可以,只是要看溫度都要用網路看。也可以用 OLED Lcd
  6. 電源供應;我是直接接一個小的usb充電器。
  7. 電線插頭及杜邦線。
接線圖:(參考配置,電源的部分可以再考慮一下)
 brewpiless
** If this photo contains your working and infringe your copyright, please notice me to remove it.
接插座的部分,可以參考下面這個連結(我的DS18B20圖從這裡來的):
http://www.homebrewtalk.com/attachment.php?attachmentid=217946&d=1408145422

設定使用

****** 不支援Microsoft IE& Edge,請愛用Chrome ******
  1. 第一次使用或之前使用的網路消失時,需要設定網路。用手機或電腦連上名為brewpiless的無線網路。然後應該會跳出一個設定網路的網頁,如果沒有,打開chrome,隨意前往任何網站,就會出現設定網路的網頁。
    參考:https://github.com/tzapu/WiFiManager
  2. 連線網路成功後,就可以開始使用。如果你是用apple產品,可以用http://brwepiless.local 網址,否則,請想辦法從你的router知道ESP8266的IP。連進去即是LCD顯示的畫面。第一次連進去應該沒有溫度顯示,必須先設定溫度感測器。
  3. 選”Device Setup”做設定,輸入使用者名稱和密碼都是”brewpiless”。出現的畫面和Brewpi幾乎一樣,操作也差不多。請參考brewpi的設定。操作就是先Refresh Device List,列出所有的溫度sensor及可用的PIN,選一個當Beer Temp,選一個空的沒在用的Device Slot後,APPLY; 接下來第二個sensor選Chamber Temp,也是選一個空的沒在用的Device Slot後,APPLY。如果照上面的接線,把D3設成Chamber Cooler,D0設成Chamber heater。(這張圖沒有D0是舊的設定。)
    device setup
  4. 設定完成後就可以開始使用,在LCD顯示的部分應該可以看到溫度。接下來設定溫控,選”Temperature Management”。Beer Const. Fridge Const.都是輸入想要的溫度,按Apply即可。不想溫控,則選Off按Apply。
    temperature control
    溫度行程的必須先編行程,Save後Apply。這部分的設定也都和BrewPi一樣。不過,我當初有點看不懂,還是看了程式碼才看懂。稍微解釋一下,如果你和我一樣笨,就可以參考一下:
    a.想像有一個圖(原版的BrewPi有圖),橫座標是時間,緃座標是溫度。這個表就是列出整個溫度曲線。例如,以這個例子來說,第0天是21度,第0.25天也是21度,第0.5天是12度,表示0-0.25天維持21度,在0.25天開始降溫,在0.5天降到12度,中間的時間溫度會用內插法自動算出來。第三行的Date & TIme就是對應的真實時間。
    b.Start Date通常是從現在開始,按Now就會設成現在時間。但也可以設成過去時間,溫度行程就是照著什麼時間溫度應該是幾度去控制的。如果設成”未來”時間,那麼在Start Date時間還沒到之前,不會做有動作;如果之前是調定BeerConst,還是會維持設定的溫度,直到行程時間開始。
    **要使用定時溫控,必須能連到internet,因為需要從網路取得時間**
  5. 溫度記錄。BrewPiLess只能把溫度記錄到雲端或另外的主機。選Data Log可以設定。這個運作方式就是在設定時間間隔時,ESP8266會呼叫設定的URL,把資料傳送過去 。因為資源不夠,ESP8266無法在運作其他功能時使用HTTPS,所以如果要把資料傳到Google Sheet,需要另一台主機協助。github上有詳細的說明。
    logsettting
    網路上有些免費的IOT資料儲存服務,thingspeak.com就是一個例子,thinkspeak.com可以不需要https,所以可以直接上傳:
    thingspeak
    結果大約像這樣:
    https://thingspeak.com/channels/139809
  6. 系統設定,選單的System Config可以做一些系統設定。
    configuration
    Host/Network Name: APPLE產品及部分Android有支援mDNS,可以直接用類似http://brwpi.local的方式,這個就是用來設定名稱的。
    User Name & Password:在所有的設定都必須有認證。可以在這裡修改,預設兩個都是brewpi。
    Always need password:指的是看LCD畫面需不需要密碼,因為其他的頁面都需要。

 

 

進階安裝

1.安裝Arduino IDE 1.6.8以上,我是用1.6.9
2.安裝ESP8266/Arduino板子環境
打開Arduino的Preferences(偏好設定),在”額外的板子管理員網址”欄,輸入
在”工具”, 選擇板子選單”選”板子管理員”,尋找esp8266,然後安裝。
安裝後,板子選擇 NodeMcu1.0,Flash Size選擇 4M(3M SPIFFS)。如果己經把板子插上usb,serial選擇對應的序列埠。
3.安裝Library
找到你的Arduino Library目錄,通常是在 [使用者目錄]/文件/Arduion/libraries/,試著在”䓍稿碼”/”匯入程式庫”/”管理程式庫”中搜尋並安裝,如果沒找到,就手動下載後放在libraries目錄。
整包下載所有程式庫:https://github.com/vitotai/BrewPiLess/tree/master/libs
 (有時候,這些程式庫可能會有更新,導致其他問題,建議使用這個下載包)
4.下載 https://github.com/vitotai/BrewPiLess ,試著編譯及上傳(如果有接上板子的話)。