Changes in profiles temperature

I would like change time unit on profile configuration (Set temperature mode) frame in Brewpi. What and/or where I have change to modify unit from day to minutes or hours?

Thanks,

Fabiano

I already created an issue for this:

It should be fairly easy to parse a string like “1d2h30m” to a datetime offset. Might be a fun small project for someone?

The profile is saved as: date, temperature. So this would be just parsing in JavaScript.

Look here:

Looking forward to a pull request :wink:

I added a function to your code, parseDayString(input), which should do exactly what you requested :smile:

Lukas, where and how did you added that function? Could you send me the code?

Fdamata@gmail.com

Fabiano da Mata

I added it to profile-table.js
Just sent you an email with the file

Ok, have tested it, it works :smile:

Did you commit the integration? I cannot find it.
I have commented on your pull request: https://github.com/BrewPi/brewpi-www/pull/50

I am struggling a bit with the GitHub app. I have a revised version which handles correctly the strings, plus it doesn’t break things with the “old” format.

Ok @Elco, now it should be there. I did some testing and it works well, if it doesn’t recognize the format it simply reverts to the way it used to work till now :smile:

Don’t use the GitHub app, it is shit.
I use https://www.sourcetreeapp.com/ myself.

For next time:
Create a feature branch (for example feature/timestrings) from develop, then commit your new stuff to that branch.
Then on GitHub.com, compare your feature branch to develop, and click ‘create pull request’.

I’ll try your commit later today.

Ok, thanks Elco.
I adapted to what you said and installed SourceTree. Looks good.
Is there anything else I could help with? I would be eager to help with HERMS support, if there is any need :smile:

One thing that has been on our wish list for quite a while is to log data to InfluxDB and display it with Grafana
With these two tools, it will be easy to:

  • Create flexible dashboards, with a configurable number of sensors, custom graphs
  • Create dynamic graphs that, for example, always show the last 4 hours
  • Create graphs with a sparse nr of data points, that load fast. When you zoom in, more data is fetched from the database for increased resolution.

I’ll be working on the embedded code mostly for the next weeks. One thing I’ll introduce is that you create multiple sensors and multiple PIDs and that you can dynamically couple these. Sensors will also get a name field, which makes it easy to query which ones are available, to identify them and to add them to graphs in Grafana.

This work is mostly done in the feature/pidclass branch. TempControl was a huge monolithic class and in this branch I have started to split it up into smaller modules. I introduced a fixed point class and created a re-usable PID class. This new code depends on boost for the fixed point class and boost unit tests.

But if you want to work on web interface stuff and want a big task, I think a good starting point would be to start logging data to InfluxDB. Including how to install it on the pi.
See also: FermPi - replacement for the Raspberry Pi code

This is a huge task though, but it can be developed mostly separate of the BrewPi web interface. Just add a few lines to brewpi.py that log the data to InfluxDB and use a separate webpage for Grafana to display it.

Elco, this sounds very interesting. I could either jump in and code a connection to InfluxDB (could be a good base to start a new web interface with Grafana), or help you with the low-level code on the BrewPi - but I would need to know exactly what to implement :smile: I guess you have it in your head laid out quite well already…

@Elco, one question: Can I activate some sort of demo/testing code for the brewpi? I have a virtual machine with Debian installed and the brewpi code (to simulate basically the Raspberry Part), but of course I cannot test it with the BrewPi as it is right now with my electrician. I would like to try a few things with Influx, as I am pretty sure it would not take too much work to get the logging done.

We once had the possibility to compile the firmware code into an executable that would run on windows (with mock implementations for the hardware), but it has not been used in a while and I doubt it still works.

If you think you want to help with development regularly, I can send you an extra board. I have some boards lying around that have been used for prototyping and are fully functional, but new enough to sell anymore.

@Elco I really want to help, but I am unsure if I will be of any help with the firmware right now. I could probabily help more with the scripts and www part. Still, having a testing board would be nice - I would also pay for it, no problem :smile:

I suggested a test board so you can work on the script/UI while communicating with an actual board. That way you don’t have to disturb your beer and you can flash the board with the latest firmware that I write.

If that would be ok for you, it’d be great! I have a Raspi2 lying around here to which I could hook up, and even a Photon which just arrived, so we could do quite some testing :smile: