-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firmware 0.5.5 renders JSON with syntax error (unclosed quote). #86
Comments
That looks like a line was cut off prematurely, not just a missing quote. What device runs your BrewPi script? I need more info, because this is probably due to USB buffers on Spark or server or perhaps even WiFi buffers/package length. |
Thanks for the very fast response @elcojacobs! Here are the complete lines from stderr:
I merely truncated the little example line since it appears to be the same problem repeating and always around the property name in question.
Raspbian, not NOOBs edition (since I just use terminal anyway). Also reinstalled today, used to be the NOOBs edition. All scripts have been updated around two hours ago which is also when I upgraded the firmware. I had to manually change the installer to change Connected currently via USB since I had problems with WiFi stability. I updated the firmware just today and the same brewpi installation that had worked began to exhibit this. It happens when I attempt to read the list of devices (with or without sensor values) and it does indeed also happen on I did not do any special network tuning or other. |
I will switch to the NOOBs installation just to check if there are any differences perhaps in default networking options. I should have more info in around half an hour. |
Raspbian should be fine. Should be much easier and quicker. |
Another option is a crappy USB cable, try replacing it. |
Great tip about the USB cable - but unfortunately that doesn't seem to be it. Same cable now that I used for flashing it initially. Reinstalled Raspbian Desktop from scratch, did nothing but set up keyboard then cloned the tools repository and did the install. Started it up, waited for the script to start and the same thing happens (when I view devices - it can collect temps for the probes I managed to assign earlier!). Error log now contains, starting from blank file:
I have a 40A SSR and four temperature probes attached. Same setup used earlier. Does the fact that it happens around character 130 every time give us any hints? |
Other views cause other errors - at other positions.
Earlier I had a similar |
Workaround found, issue still not solved or completely identified. Temporary update - I've worked around this issue by connecting over WiFi again, which seems to avoid the problem. Actually, WiFi is my preferred connection and I was only switching to USB due to the stability issues. So I'm hoping that the 0.5.5 firmware is stable on WiFi and I won't have a reason to struggle with the USB issues again. You can give this issue low priority if you don't have other people experiencing it. And if you need me to provide more debugging information (or an SSH or VNC to a running system that does this live) just let me know! I also maintain open source projects so I'm quite happy to help ;) Thanks for a nice and geeky product btw., I'm looking very much forward to maybe a stable WiFi so I can focus on geeking it up instead of making it run. One last question, sorry for the Off-topic but I couldn't really find this in the docs: Is there a way to interact with the controller, I assume with HTTP exchanging JSON, directly to the controller and if so is there a resource I could study to learn the API? I'd like to write small CLI tools to set temps, toggle actuators, read values and so on; nothing too complex. |
It really does sound like a communication error on USB. All the lines that error are a combination of a truncated string concatenated with the next one. It would be a good test to see if you get the same errors when you run BrewPi inside a docker container as described on the wiki. That's the new recommended install method, without the brewpi-tools repo. Regarding the API: we're working hard on a next version that will have a REST API on everything. On the current version, it would be more of a hack and I recommend you don't waste your time on something that would be irrelevant in 2-3 months. |
Hi guys,
Firmware 0.5.5 seems to render JSON with a syntax error which causes brewpi-www and others to be unable to read device lists or, when a list can be read, cause unexpected crashes in parsing of values.
The culprit:
"Log2TempT
I'm going to attempt reverting to the firmware just before this one - but I think you should make this a high priority issue since automatic firmware upgrades appear to receive 0.5.5 when you perform them today (May 20th 2018).
EDIT: please note that there is another occurrence of the same quoting error later in the example string above. It's where the property name
Log2TempT
gets rendered a second time.The text was updated successfully, but these errors were encountered: