fermentrack
fermentrack copied to clipboard
Replace "Try restarting brewpi-script." error message with something meaningful
Hi. I keep seeing messages about restarting brewpi-script, but I can't find anywhere that says how to do that. Could the text link to where it can be done, if it can be done via the UI? Or link to some documentation that says how to do it, if it's via the command line?
Maybe related? http://docs.fermentrack.com/en/master/develop/architecture.html?highlight=brewpi-script#fermentrack-architecture
This is actually one of the vestigial remnants of the way the BrewPi-script integration was first built. Fermentrack didn't bundle Circus, which meant that launching/managing brewpi-script fell to processes outside of its control. Now, when this message is seen it generally indicates a problem with the connection between BrewPi-script and the controller.
What do you see in the stderr log for the controller you're having issues with?
I was trying out Ubuntu on the Pi. I wonder if the issues were related to that. I've since reinstalled on RasPi OS, and haven't seen a brewpi-script
-related message.
It would be cool if those error messages could be updated to link to the error log for the controller or something.
I've been seeing this message a lot too when I've trying to assign.
Failed to write the configuration to the controller. If this continues, try resetting the EEPROM on the controller.
I think that should link directly to error log too. And a link to the section where you can reset the EEPROM? What do you think?
Something like:
Failed to write the configuration to the controller. Check the error log. If this continues, try resetting the EEPROM on the controller.
FYI, with the 64bit version of Ubuntu, Fermentrack won't install. It can't find the right containers. On the 32bit version it appears to install and run correctly (not including whatever may have been happening above).
I don't know if supporting other host OSes would be worth your while. Maybe not.
That's interesting - I support (and test for) the 64 bit version of Ubuntu on x64 chips -- do you mean that you are testing it with 64-bit Ubuntu on an RPi?
Yeah. They link to a bunch of different operating systems on the Raspberry Pi website now. I just thought I would give it a go.
https://www.raspberrypi.org/software/operating-systems/ https://ubuntu.com/download/raspberry-pi
Yeah. They link to a bunch of different operating systems on the Raspberry Pi website now. I just thought I would give it a go.
https://www.raspberrypi.org/software/operating-systems/ https://ubuntu.com/download/raspberry-pi
OK cool - I just wanted to be sure.
The 64-bit packages that I have right now are targeted towards x64 architecture rather than the ARM64 used by the RPi. At the moment, the targeted platforms are amd_x64 (ie. traditional 64-bit Intel/AMD Processor), i386/i686 (a 32 bit processor, such as certain NAS's), and ARMv7 (RPi 2/3/4/400 running a 32 bit OS), but all it would take to add ARM64 is getting the necessary wheels compiled and adding it to the GitHub build action.
I've added this as a separate issue - #638
It would be cool if those error messages could be updated to link to the error log for the controller or something.
I've been seeing this message a lot too when I've trying to assign.
Failed to write the configuration to the controller. If this continues, try resetting the EEPROM on the controller.
I think that should link directly to error log too. And a link to the section where you can reset the EEPROM? What do you think?
Something like:
Failed to write the configuration to the controller. Check the error log. If this continues, try resetting the EEPROM on the controller.
Yep, definitely - that's what I'm going to use this issue to track against.
What do you reckon to adding links directly in the error message? I think it's great for usability, but it kind of means you're mixing HTML or routing or something in with your Python code. Unless there's a nice way to do that in Django, which there may well be.
messages.error(request, "Failed to write the configuration to the controller. If this continues, try "
"resetting the EEPROM on the controller.")
What do you reckon to adding links directly in the error message? I think it's great for usability, but it kind of means you're mixing HTML or routing or something in with your Python code. Unless there's a nice way to do that in Django, which there may well be.
messages.error(request, "Failed to write the configuration to the controller. If this continues, try " "resetting the EEPROM on the controller.")
There is. It's slightly more painful if I'm internationalizing - but I'm not. This is the code, I think (UNTESTED!):
reset_url = reverse('device_eeprom_reset', kwargs={'device_id': sensor_to_adjust.controller.id})
messages.error(request, "Failed to write the configuration to the controller. If this continues, try "
f"<a href=\"{reset_url}\">resetting the EEPROM</a> on the controller.")
As a side note, if anyone out there wants to internationalize my apps, hit me up. I'm a monoglot, unfortunately (and my English skills barely qualify me as that!).
As a side note, if anyone out there wants to internationalize my apps, hit me up. I'm a monoglot, unfortunately (and my English skills barely qualify me as that!).
For anyone who might catch this, BrewFlasher is now available in 5 languages, and I'm working on internationalizing BrewPi-ESP (or at least its web interface!) now. If anyone is interested in seeing any of my projects in their language, let me know. ;)
Separately: I updated the error messages in a commit that will be merged shortly. Once it is merged, this issue will get closed out.