Skip to content

Commit

Permalink
potential fix for exception with CraftbeerPi
Browse files Browse the repository at this point in the history
  • Loading branch information
universam1 committed Oct 17, 2017
1 parent 0b855d3 commit 83ead4a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Check out *IOT DEVICE PULLS ITS WEIGHT IN HOME BREWING* at http://hackaday.com/2
## Documentation in other languages

### [English Documentation (work in progress)](docs/README_en.md) :us:
### [Nederlandse Vertaling (lopende werkzaamheden)](docs/README_nl.md) [](#lang-nl)
### [Documentação em Português (trabalho em andamento)](docs/README_pt.md) [](#lang-pt)
### [Nederlandse Vertaling (lopende werkzaamheden)](docs/README_nl.md) :nl:
### [Documentação em Português (trabalho em andamento)](docs/README_pt.md) :pt:

***

Expand All @@ -36,6 +36,7 @@ Check out *IOT DEVICE PULLS ITS WEIGHT IN HOME BREWING* at http://hackaday.com/2

## News

> 17.10.2017 Firmware 5.5.4: Various fixes for CraftBeerPi, BrewPiLess and Ubidots
> 28.09.2017 Firmware 5.5.0: Recall saved Wifi credential thus persisting over configuration changes
> 31.08.2017 iSpindle.py Version 1.3.1: genericTCP Update (local server & prep for public server); Firmware 5.4.2: Memory improvements.
> 29.08.2017 Firmware 5.4.1: Rewrite of the upload class to streamline and allow further data items. Also add iSpindel.de as data server as preset.
Expand Down
2 changes: 2 additions & 0 deletions docs/FAQ-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- ***It doesn't work, I don't see anything****
The best way to find out what the iSpindle is doing as information is to read it's log. This can be done via a serial monitor like HTerm or Arduino IDE. Connect the spindle via Micro USB, then open the Com Port with the serial monitor above and read it. Set baud rate to `115200`. It brings light into the dark.

Here is a youtube howto: https://youtu.be/6xDW5GbIbUw

- ***How get to the iSpindel - the portal***
Switch it on, press the reset button 3-4 times which sets up an access point. That means you will see a new Wifi network "iSpindel" where you connect to with your computer, smartphone or tablet. Now the browser should automatically redirect you to the page[http://192.168.4.1](http://192.168.4.1). If not, navigate there yourself.
If you are now on the portal page, under `Configuration` you can enter your token and the wifi password that you need for your network. Then click on `safe` and it will send the data to Ubidots. This means that the **iSpindel is not reachable in normal operation**, until you manually start the portal again.
Expand Down
3 changes: 2 additions & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Fragen und Antworten FAQ

- ***Es funktioniert nicht, ich sehe nichts***
Am Besten du liest mit was die Spindel als Informationen ausgiebt. Das geht über einen Serial Monitor wie HTerm oder Arduino hat das auch. Die Spindel per Micro USB anschliessen, dann den Com Port mit obigen Serial Monitor öffnen und mitlesen. Das bringt Licht ins Dunkel.
Am Besten du liest mit was die Spindel als Informationen ausgiebt. Das geht über einen Serial Monitor wie HTerm oder Arduino. Die Spindel per Micro USB anschliessen, dann den Com Port mit obigen Serial Monitor öffnen und mitlesen, Baud `115200`.
Ein Youtube HowTo: https://youtu.be/6xDW5GbIbUw

- ***Wie komme ich auf die iSpindel - das Portal***
Anschalten, 3-4 maliges drücken der Reset Taste stellt sie einen Access Point auf. D.h. du siehst ein neues WLAN "iSpindel" mit dem du dich verbindest. Jetzt wirst den Browser automatisch auf die Seite [http://192.168.4.1](http://192.168.4.1) dich weiterleiten. Falls nicht steuer sie selbst an.
Expand Down
4 changes: 2 additions & 2 deletions pio/lib/Globals/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern Ticker flasher;
// #include <stdint.h>

// defines go here
#define FIRMWAREVERSION "5.5.3"
#define FIRMWAREVERSION "5.5.4"


#define API_FHEM true
Expand All @@ -49,7 +49,7 @@ extern Ticker flasher;
#define ACCINTERVAL 200
#define MEDIANAVRG 3

#define CBP_ENDPOINT (PSTR("/api/hydrometer/v1/data"))
#define CBP_ENDPOINT "/api/hydrometer/v1/data"

#define DTUbiDots 0
#define DTThingspeak 1
Expand Down
4 changes: 2 additions & 2 deletions pio/lib/Sender/Sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bool SenderClass::send(String server, String url, uint16_t port)
msg += F(" HTTP/1.1\r\nHost: ");
msg += server;
msg += F("\r\nUser-Agent: iSpindel\r\nConnection: close\r\nContent-Type: application/json\r\nContent-Length: ");
msg += _jsonVariant.measureLength();
msg += _jsonVariant.measureLength() + 2;
msg += "\r\n";

_client.println(msg);
Expand Down Expand Up @@ -126,7 +126,7 @@ bool SenderClass::sendFHEM(String server, uint16_t port, String name)

String msg = String("GET /fhem?cmd.Test=set%20");
msg += name;

for (const auto &kv : _jsonVariant.as<JsonObject>())
{
msg += "%20";
Expand Down
7 changes: 4 additions & 3 deletions pio/src/iSpindel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,13 +883,14 @@ void setup()
if (wait > 50)
break;
}
float waited = (millis() - startedAt);
SerialOut(waited / 1000, false);
SerialOut(F(" s, result "), false);
auto waited = (millis() - startedAt);
SerialOut(waited, false);
SerialOut(F("ms, result "), false);
SerialOut(WiFi.status());

if (WiFi.status() == WL_CONNECTED)
{
SerialOut("IP: ", false);
SerialOut(WiFi.localIP());
uploadData(my_api);
delay(100); // workaround for https://github.com/esp8266/Arduino/issues/2750
Expand Down

0 comments on commit 83ead4a

Please sign in to comment.