Replacement firmware for iSpindel (GravityMon)

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I assumed the temperature corrected gravity would be sent with the key ${corr-gravity-sg} so I pushed both that and ${gravity-sg} to BrewBlox and displayed them on a graph. ${corr-gravity-sg} did supply the temperature corrected value based on the ${gravity-sg} and temp values sent. I double checked the result using the same equation in a spreadsheet (which includes the conversion of C to F) and got the same corrected value.

I didn't actually test ${gravity} to see if the corrected value is sent but I see that for the other services being pushed to, that is what is used. Presumably some services define whether it has to be in SG or Plato and I see with Brewfgather, ${gravity-unit} is also sent so either can be used. Is the logic then:

${gravity-SG} - always uncorrected SG
${corr-gravity-SG} - always temperature corrected SG
${gravity} - whatever unit (SG or Plato) is set in the configuration mode, uncorrected if the temp correction flag isn't set and corrected if it is?

Apology in advance for the query, have been quite busy so haven't had time to look at the code to confirm. It this is the case however, seems like a good approach. When I get a chance, I'll add ${gravity} to what is sent to BB and see what I get.

Cheers
On the first point you are correct, if you use the {corr-gravity} formats is always the corrected value independant if the feature is enabled or not.

You are right on the second point as well. The {gravity} format should change dependant if the feature is enabled or not. The intention was to make it easy for users to just toggle the function on/off without the need for changing the format template. This was not happening, so this is a bug, it was always sending the uncorrected value over push (it worked on the web ui).
 
Pushed {gravity}, {gravity-SG}, and {corr-gravity-SG} to BrewBlox. iSpindel configured to SG with temp correction enabled. {gravity} and {gravity-SG} read the same, {corr-gravity-SG} result is temp corrected. Because I want the option of displaying either (or both) SG and Plato, I haven't been using the {gravity} field in the push format so hadn't checked this previously. So bug confirmed on my system as well.
 
I have several Jeffery 2.69 iSpindels all with the ispindel firmware v.6.5.1 which are working fine.
But I wanted to test GravityMon on one of my ispindels unfortunately I could not get it working.
I followed the steps in the documentation and after setting up the Wifi I could connect to the webserver but I could not continue
because it kept on loading.
1657870883855.png

I check the error log and this says:

1657870931849.png


When I checked the serial monitor I was getting these messages:

09:42:45.406 -> 142920 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:45.545 -> 143041 E: MAIN: No gyro value found, the device might be moving.
09:42:46.378 -> 143907 I: GYRO: Movement detected (500) 625 160 68.
09:42:46.378 -> 143908 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:46.424 -> 143908 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:46.517 -> 144042 E: MAIN: No gyro value found, the device might be moving.
09:42:47.400 -> 144913 I: GYRO: Movement detected (500) 625 161 69.
09:42:47.400 -> 144914 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:47.400 -> 144915 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:47.540 -> 145043 E: MAIN: No gyro value found, the device might be moving.
09:42:48.417 -> 145920 I: GYRO: Movement detected (500) 625 160 68.
09:42:48.417 -> 145921 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:48.417 -> 145921 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:48.509 -> 146044 E: MAIN: No gyro value found, the device might be moving.
09:42:49.394 -> 146908 I: GYRO: Movement detected (500) 625 161 68.
09:42:49.394 -> 146909 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:49.394 -> 146909 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:49.532 -> 147045 E: MAIN: No gyro value found, the device might be moving.
09:42:50.419 -> 147915 I: GYRO: Movement detected (500) 625 162 67.
09:42:50.419 -> 147916 I: MAIN: Missing calibration data, so forcing webserver to be active.


What am I doing wrong here?
My ispindel lies flat on my desk and does not move.

After all these steps I uploaded the ispindel firmware 7.1.4 (with Brewflasher), configured it to upload to Brewfather and the ispindel was working again perfectly. So I don't think its a hardware problem.
 
Last edited:
I have several Jeffery 2.69 iSpindels all with the ispindel firmware v.6.5.1 which are working fine.
But I wanted to test GravityMon on one of my ispindels unfortunately I could not get it working.
I followed the steps in the documentation and after setting up the Wifi I could connect to the webserver but I could not continue
because it kept on loading.
View attachment 774935
I check the error log and this says:

View attachment 774936

When I checked the serial monitor I was getting these messages:

09:42:45.406 -> 142920 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:45.545 -> 143041 E: MAIN: No gyro value found, the device might be moving.
09:42:46.378 -> 143907 I: GYRO: Movement detected (500) 625 160 68.
09:42:46.378 -> 143908 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:46.424 -> 143908 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:46.517 -> 144042 E: MAIN: No gyro value found, the device might be moving.
09:42:47.400 -> 144913 I: GYRO: Movement detected (500) 625 161 69.
09:42:47.400 -> 144914 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:47.400 -> 144915 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:47.540 -> 145043 E: MAIN: No gyro value found, the device might be moving.
09:42:48.417 -> 145920 I: GYRO: Movement detected (500) 625 160 68.
09:42:48.417 -> 145921 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:48.417 -> 145921 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:48.509 -> 146044 E: MAIN: No gyro value found, the device might be moving.
09:42:49.394 -> 146908 I: GYRO: Movement detected (500) 625 161 68.
09:42:49.394 -> 146909 I: MAIN: Missing calibration data, so forcing webserver to be active.
09:42:49.394 -> 146909 I: MAIN: run mode CONFIG (angle=0.00 volt=3.98).
09:42:49.532 -> 147045 E: MAIN: No gyro value found, the device might be moving.
09:42:50.419 -> 147915 I: GYRO: Movement detected (500) 625 162 67.
09:42:50.419 -> 147916 I: MAIN: Missing calibration data, so forcing webserver to be active.


What am I doing wrong here?
My ispindel lies flat on my desk and does not move.

After all these steps I uploaded the ispindel firmware 7.1.4 (with Brewflasher), configured it to upload to Brewfather and the ispindel was working again perfectly. So I don't think its a hardware problem.
I dont think that you did anything wrong, but there are probably two issues, 1) Loading, 2) Gyro read but I dont really know if they are related yet so lets try to start with the Gyro read.

This software reads the gyro in a different way compared to iSpindle but both are using the same library to communicate with the gyro. Both software reads the gyro around 50 times and uses the average. However gravitymon checks that the min/max values are not to far apart, this is why you get the gyro moving error. In the printout the second value (625) indicates that the X axis might be moving since this is over the threashold of 500.

There is no check or validation in the iSpindle so you would not notice if there is a hardware issue with the gyro but the angle might vary more between the readings.

In gravitymon the threashold can be changed under advanced settings (on the config tab) and as a start change this value to 1000 just skip that check for now. You can also reduce the number of gyro reads from 50 to 30 to see if this makes a difference.

Let me know if this gets you any further and we can then tackle the next issues.
 
No this does not work! I tried these advanced settings:

1657877082197.png

And when I click on the save button I get a white page with the message: 'Invalide ID.'
 
I do have a spare Gyro so I can try to replace it but then I probably need to remove the batery holder first so I will take some time.
 
No this does not work! I tried these advanced settings:

View attachment 774937
And when I click on the save button I get a white page with the message: 'Invalide ID.'
I suspect that the other problem blocks you from storing the settings. It does not really look like it has been able to get data from the device to populate the setting page correctly.

What result do you get if you enter this URL in the web browser?

http://<adress to your device/api/status

I suspect something goes wrong during the startup phase. Can you hook up the serial monitor again and do a reset to capture the startup steps to see if there is something strange there... Just remove any of the secrets like password for wifi before posting it...
 
Sorry but I replaced the Gyro already in the meantime and you could be right that there was a problem with the Gyro because now I geting a step further but not that much. I'm still having the loading ... issue. So I can not save any setting.
This is from the serial monitor:

12:25:53.589 -> 84 I: Main: Started setup for f8ce5.
12:25:53.589 -> 84 I: Build options: 1.0.0 (..2d7ad4) LOGLEVEL 4 EMBED_HTML OTA
12:25:53.589 -> 92 I: CFG : Filesystem mounted.
12:25:53.589 -> 101 I: CFG : Size of configuration file=915 bytes.
12:25:53.635 -> 115 I: CFG : Configuration file /gravitymon.json loaded.
12:25:53.635 -> 118 W: CFG : Configuration file does not exist /hardware.json.
12:25:53.635 -> 138 I: GYRO: Connected to MPU6050 (gyro).
12:25:53.681 -> 149 E: GYRO: No valid calibration values, please calibrate the device.
12:25:54.604 -> 1114 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:25:54.650 -> 1115 I: MAIN: run mode CONFIG (angle=89.46 volt=3.96).
12:25:54.650 -> 1117 I: WIFI: Connecting to wifi (0) using stored settings network-????.
12:25:54.835 -> .........
12:25:55.659 -> 2126 I: WIFI: Connected to wifi network-???? ip=192.168.?.???.
12:25:55.659 -> 2127 I: WIFI: Using mDNS name gravitymon0f8ce5.
12:25:55.659 -> 2162 I: TSEN: Found 1 temperature sensor(s). Using 9 resolution
12:25:55.659 -> 2165 I: Main: Activating web server.
12:25:55.704 -> 2166 E: WIFI: OTA error checking version.json, response=-1
12:25:55.704 -> 2169 I: WEB : Configuring web server.
12:25:55.704 -> 2181 I: WEB : File system Total=1024000, Used=32768.
12:25:55.704 -> 2189 I: WEB : File=drd.dat, 4 bytes
12:25:55.704 -> 2190 I: WEB : File=error.log, 362 bytes
12:25:55.704 -> 2193 I: WEB : File=gravitymon.json, 915 bytes
12:25:55.704 -> 2217 I: WEB : Web server started.
12:25:55.751 -> 2217 I: Main: Setup completed.
12:25:57.139 -> 3634 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:25:57.139 -> 3634 I: MAIN: run mode CONFIG (angle=89.43 volt=3.95).
12:25:59.592 -> 6081 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:25:59.592 -> 6082 I: MAIN: run mode CONFIG (angle=89.43 volt=3.95).
12:26:01.116 -> 7611 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:01.116 -> 7611 I: MAIN: run mode CONFIG (angle=89.42 volt=3.96).
12:26:02.644 -> 9140 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:02.644 -> 9141 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:04.218 -> 10688 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:04.218 -> 10688 I: MAIN: run mode CONFIG (angle=89.42 volt=3.95).
12:26:05.740 -> 12217 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:05.740 -> 12218 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:07.267 -> 13747 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:07.267 -> 13748 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:08.778 -> 15277 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:08.778 -> 15277 I: MAIN: run mode CONFIG (angle=89.45 volt=3.96).
12:26:10.356 -> 16824 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:10.356 -> 16825 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:11.888 -> 18354 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:11.888 -> 18354 I: MAIN: run mode CONFIG (angle=89.44 volt=3.96).
12:26:13.411 -> 19883 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:13.411 -> 19884 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).


And this is what I get from .../api/status

1657881559601.png
 
Sorry but I replaced the Gyro already in the meantime and you could be right that there was a problem with the Gyro because now I geting a step further but not that much. I'm still having the loading ... issue. So I can not save any setting.
This is from the serial monitor:

12:25:53.589 -> 84 I: Main: Started setup for f8ce5.
12:25:53.589 -> 84 I: Build options: 1.0.0 (..2d7ad4) LOGLEVEL 4 EMBED_HTML OTA
12:25:53.589 -> 92 I: CFG : Filesystem mounted.
12:25:53.589 -> 101 I: CFG : Size of configuration file=915 bytes.
12:25:53.635 -> 115 I: CFG : Configuration file /gravitymon.json loaded.
12:25:53.635 -> 118 W: CFG : Configuration file does not exist /hardware.json.
12:25:53.635 -> 138 I: GYRO: Connected to MPU6050 (gyro).
12:25:53.681 -> 149 E: GYRO: No valid calibration values, please calibrate the device.
12:25:54.604 -> 1114 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:25:54.650 -> 1115 I: MAIN: run mode CONFIG (angle=89.46 volt=3.96).
12:25:54.650 -> 1117 I: WIFI: Connecting to wifi (0) using stored settings network-????.
12:25:54.835 -> .........
12:25:55.659 -> 2126 I: WIFI: Connected to wifi network-???? ip=192.168.?.???.
12:25:55.659 -> 2127 I: WIFI: Using mDNS name gravitymon0f8ce5.
12:25:55.659 -> 2162 I: TSEN: Found 1 temperature sensor(s). Using 9 resolution
12:25:55.659 -> 2165 I: Main: Activating web server.
12:25:55.704 -> 2166 E: WIFI: OTA error checking version.json, response=-1
12:25:55.704 -> 2169 I: WEB : Configuring web server.
12:25:55.704 -> 2181 I: WEB : File system Total=1024000, Used=32768.
12:25:55.704 -> 2189 I: WEB : File=drd.dat, 4 bytes
12:25:55.704 -> 2190 I: WEB : File=error.log, 362 bytes
12:25:55.704 -> 2193 I: WEB : File=gravitymon.json, 915 bytes
12:25:55.704 -> 2217 I: WEB : Web server started.
12:25:55.751 -> 2217 I: Main: Setup completed.
12:25:57.139 -> 3634 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:25:57.139 -> 3634 I: MAIN: run mode CONFIG (angle=89.43 volt=3.95).
12:25:59.592 -> 6081 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:25:59.592 -> 6082 I: MAIN: run mode CONFIG (angle=89.43 volt=3.95).
12:26:01.116 -> 7611 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:01.116 -> 7611 I: MAIN: run mode CONFIG (angle=89.42 volt=3.96).
12:26:02.644 -> 9140 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:02.644 -> 9141 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:04.218 -> 10688 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:04.218 -> 10688 I: MAIN: run mode CONFIG (angle=89.42 volt=3.95).
12:26:05.740 -> 12217 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:05.740 -> 12218 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:07.267 -> 13747 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:07.267 -> 13748 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:08.778 -> 15277 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:08.778 -> 15277 I: MAIN: run mode CONFIG (angle=89.45 volt=3.96).
12:26:10.356 -> 16824 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:10.356 -> 16825 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).
12:26:11.888 -> 18354 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:11.888 -> 18354 I: MAIN: run mode CONFIG (angle=89.44 volt=3.96).
12:26:13.411 -> 19883 I: MAIN: Missing calibration data, so forcing webserver to be active.
12:26:13.411 -> 19884 I: MAIN: run mode CONFIG (angle=89.43 volt=3.96).


And this is what I get from .../api/status

View attachment 774938
This looks correct, and now there is an angle as well, so is it working now ?

Next step would be to do the calibration which is done under the configuration tab / device. Lay the device flat and press the calibrate button.
 
OK Sorry I used Firefox as browser but now it seems to work fine with Google Chrome.
I can continue now with the setup. So it was the Gyro probably that was broken?
I do need to say that I was no longer using this ispindel because I had my doubts about the readings.
That was one of the reasons why I wanted to try this firmware.
I will try it out any keep you posted.

Thanks for the quick respons and all the work that you have put into this great project.
 
OK Sorry I used Firefox as browser but now it seems to work fine with Google Chrome.
I can continue now with the setup. So it was the Gyro probably that was broken?
I do need to say that I was no longer using this ispindel because I had my doubts about the readings.
That was one of the reasons why I wanted to try this firmware.
I will try it out any keep you posted.

Thanks for the quick respons and all the work that you have put into this great project.
I've not tested it in firefox, I'm using Edge/Safari. I will do some testing in firefox and chrome to see that they work as expected. It's probably some issues with the javascript code that fails under firefox. '

Good to see that it works now.
 
I use Firefox with ad and popup blockers. I just have to allow jsdelivr.net plus another similar service I forget (and of course the iSpindel IP address) and it works fine. It is probably a default security feature in Firefox or a plugin like one of the ones I use. I'm away from my brewery for an extended period so can't test for you but I would check there as a possibility as I got the same 'loading' messages until these were enabled. I don't remember the iSpindel firmware requiring this so the web server appears to have been developed a little differently. regardless, works fine on my Win 10 system with firefox's latest version.
 
@mper Ok I did some tests and it seems to work fine and I also tried the calibration methode which also works fine but after entering the calculated formula I have an SG of 1.004 in pure water.
I'm still using the version 1.0 so I didn't thought that this version does a temperature correctly or am I wrong?
Due to the extreme high temperature here in europe my test water is about 24 °C instead of 20°C. Could this be the explanation for the 4 points difference?

@nzm Thanks for the info but since I'm using Chrome now it also works fine, maybe I will try your tips later.
 
If you calibrated at 20C and then measure at 24C, the change in water density alone will cause an uncorrected device (e.g., hydrometer, iSpindel without temp correction working) to read ~1C low. As the temp in water increases, the density decreases so a hydrometer will sink a bit more (lower reading on the scale) and the angle of an iSpindel or Tilt will decrease a bit. And you are correct that the temp correction feature isn't currently working but @mper has a fix in the works. Once implemented, it would add ~0.9 gravity points to the reading (i.e., 1.0000 as calculated by the angle and calibration curve would be increased to 1.0009). Note, if you both calibrated and then read at 24C, there will be no correction.

What you describe appears to be the opposite however. A few thoughts:
  • Did your calibration include a pure water calibration point?
  • Did you double check your calibration equation? It is very easy to make an error (been there).
  • You can calibrate with as few as 3 data points but more is better. I typically use 7 (1.000 - 1.060 in 10 gravity point increments).
  • Actually knowing the SG of your calibration solutions is quite tricky. The easiest way is to do the cal using degrees Plato and then convert to SG to generate the curve. Plato is simply the ratio of sugar in the solution by mass. So 300g of sugar dissolved in 2700ml of water provides 10.000 Plato (300/(300+2700)) and 1.0400 SG. I use a spreadsheet because the typical way of calibrating (except for the pure water point) is to start at the highest gravity point and then dilute for each new point. This is best done using a scale and not relying on the ml markings on the container.
  • The calibration on a flat surface can also be slightly off (not a great impact). Just below the cap, the iSpindel cylinder has a ridge that has a larger diameter than the cylinder. I calibrate mine raised with a small notepad and the ridge over the side and not touching the table.
Having said all this, these kind of devices are only good for tracking fermentation progress and not for determining actual SG (or Plato). Krausen, hop debris from dry hopping, and CO2 buildup on the iSpindel cylinder all impact the tilt angle and therefore the reading, sometimes by quite a bit. So you might find your existing calibration is fine for this purpose if it is close. My methods are a bit more fiddly than most users want to implement but then I usually calibrate 4 at a time (have built several for friends and relatives).

Edit:
Another quick thought, assuming you did have a pure water calibration point, you can compare the angle when you are reading 1.004 with the angle you obtained during the cal to see if the equation is incorrect or something else has changed.
 
@nzm
you are absolutely right and I am not a novice when it comes to ispindels. I have been using them for several years and know very well how to calibrate them. Maybe I did not explain it enough but my test liquid was always at 24°C (so I also know that this will not give the right result in a fermentation).
The meaning of my test was to find out how Gravitymon work and provide some feedback about my findings.
What I realy meant is that a find out that there is a difference in the data in Brewfather (4 points difference) compared to the data from the ispindel (angle + SG) are correct see screenshots below.

Status pure water.JPG


BF ispindel002.JPG

And the Offset values in BF are empty.

But I notice on Github that there is already a bug reported about not sending the correct value to defined endpoint maybe this is it?

I'd also like to say that I'm really starting to like GravityMon, especially the option to bring it into configuration mode by simply placing it horizontal. :thumbsup:
 
Last edited:
@mper Ok I did some tests and it seems to work fine and I also tried the calibration methode which also works fine but after entering the calculated formula I have an SG of 1.004 in pure water.
I'm still using the version 1.0 so I didn't thought that this version does a temperature correctly or am I wrong?
Due to the extreme high temperature here in europe my test water is about 24 °C instead of 20°C. Could this be the explanation for the 4 points difference?

@nzm Thanks for the info but since I'm using Chrome now it also works fine, maybe I will try your tips later.
The temperature correction feature does not work correctly in v1.0, im currently testing the v1.1 in a brew and hopefully it will be released within 2 weeks.
 
@nzm
you are absolutely right and I am not a novice when it comes to ispindels. I have been using them for several years and know very well how to calibrate them. Maybe I did not explain it enough but my test liquid was always at 24°C (so I also know that this will not give the right result in a fermentation).
The meaning of my test was to find out how Gravitymon work and provide some feedback about my findings.
What I realy meant is that a find out that there is a difference in the data in Brewfather (4 points difference) compared to the data from the ispindel (angle + SG) are correct see screenshots below.

View attachment 775608

View attachment 775609
And the Offset values in BF are empty.

But I notice on Github that there is already a bug reported about not sending the correct value to defined endpoint maybe this is it?

I'd also like to say that I'm really starting to like GravityMon, especially the option to bring it into configuration mode by simply placing it horizontal. :thumbsup:
You are correct that there is a bug, the value presented on the web interface is corrected but not the value sent over push. I'll fix that bug once I have tested the latest beta on my current brew. I've updated quite a lot of dependant libraries so I want to check that everything works as expected.
 
I use Firefox with ad and popup blockers. I just have to allow jsdelivr.net plus another similar service I forget (and of course the iSpindel IP address) and it works fine. It is probably a default security feature in Firefox or a plugin like one of the ones I use. I'm away from my brewery for an extended period so can't test for you but I would check there as a possibility as I got the same 'loading' messages until these were enabled. I don't remember the iSpindel firmware requiring this so the web server appears to have been developed a little differently. regardless, works fine on my Win 10 system with firefox's latest version.
The interface in GravityMon is built based on ajax & bootstrap 4.x/5.x and since I these would eat up all the memory in the device I download these from the internet. The iSpindle does not have these dependencies since it does not have internet access when showing the UI.

These are the dependecies needed by gravitymon;
https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.csshttps://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"https://code.jquery.com/jquery-3.6.0.min.js
 
The interface in GravityMon is built based on ajax & bootstrap 4.x/5.x and since I these would eat up all the memory in the device I download these from the internet. The iSpindle does not have these dependencies since it does not have internet access when showing the UI.

These are the dependecies needed by gravitymon;
https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.csshttps://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"https://code.jquery.com/jquery-3.6.0.min.js
Ah, jquery, yes that is the other one I couldn't remember. Makes sense, thanks. When I enable these, it works fine in firefox.
 
@nzm
you are absolutely right and I am not a novice when it comes to ispindels. I have been using them for several years and know very well how to calibrate them. Maybe I did not explain it enough but my test liquid was always at 24°C (so I also know that this will not give the right result in a fermentation).
The meaning of my test was to find out how Gravitymon work and provide some feedback about my findings.
What I realy meant is that a find out that there is a difference in the data in Brewfather (4 points difference) compared to the data from the ispindel (angle + SG) are correct see screenshots below.

View attachment 775608

View attachment 775609
And the Offset values in BF are empty.

But I notice on Github that there is already a bug reported about not sending the correct value to defined endpoint maybe this is it?

I'd also like to say that I'm really starting to like GravityMon, especially the option to bring it into configuration mode by simply placing it horizontal. :thumbsup:
I really like GravityMon as well, definitely better for my use case. And apologies, I definitely hadn't understood your query completely.

I am aware that supported services handle the iSpindel data differently however. Fermentrack for example only uses the angle and disregards the SG and Plato sends. It does the gravity calculation from within the app using whatever calibration file you enter. If you enter the same calibration data as in GravityMon, it produces a slightly different result because it generates a 3rd order polynomial calibration file rather than the 2nd order in GravityMon when you use the auto generate feature. Entering the exact same calibration equation however does give the same results - as expected.

I see for BrewFather, they use the plato value and then calculate SG where GravityMon uses SG and calculates Plato from that. Depending on the equations used, this could account for a slight difference but I don't think rounding errors will account for 4 gravity points difference. I see you don't have SG in your iSpindel name, had seen this previously and found it again just now:

"Make sure your iSpindel reports gravity in Plato (it will be converted to SG) and temperature in Celcius. Add [SG] to the name of your iSpindel if you use SG based formula. If the gravity is displaying 1.004 in Brewfather you are using the wrong formula, use the fomula that reports in Plato or use the tag above." iSpindel - Brewfather - docs

Looks like this may be the culprit.
 
I really like GravityMon as well, definitely better for my use case. And apologies, I definitely hadn't understood your query completely.

I am aware that supported services handle the iSpindel data differently however. Fermentrack for example only uses the angle and disregards the SG and Plato sends. It does the gravity calculation from within the app using whatever calibration file you enter. If you enter the same calibration data as in GravityMon, it produces a slightly different result because it generates a 3rd order polynomial calibration file rather than the 2nd order in GravityMon when you use the auto generate feature. Entering the exact same calibration equation however does give the same results - as expected.

I see for BrewFather, they use the plato value and then calculate SG where GravityMon uses SG and calculates Plato from that. Depending on the equations used, this could account for a slight difference but I don't think rounding errors will account for 4 gravity points difference. I see you don't have SG in your iSpindel name, had seen this previously and found it again just now:

"Make sure your iSpindel reports gravity in Plato (it will be converted to SG) and temperature in Celcius. Add [SG] to the name of your iSpindel if you use SG based formula. If the gravity is displaying 1.004 in Brewfather you are using the wrong formula, use the fomula that reports in Plato or use the tag above." iSpindel - Brewfather - docs

Looks like this may be the culprit.
Thanks you were right I do know that the formula should be in Plato for BF because in all my other ispindels they are in Plato. But I didn't noticed that there is an option in the Gravity settings in GravityMon.
So I switched from SG to Plato and it converted the formula also to Plato and now the values in BF are correct:

1658472929319.png
1658472966539.png

My ispindel was not stable at the time of the above readings but It is the same now in GravityMon as in BF.

I prefer SG above Plato so I think I will add the [SG] to the name so I can keep everything in SG instead.
 
I tried to add [SG] to the Device name and it looks like the field is limited to 12 characters.

1658473610255.png


So to switch back to SG I had to remove some characters before it was accepted:

1658473820104.png


12 characters is a bit short not? 🤔
 
I tried to add [SG] to the Device name and it looks like the field is limited to 12 characters.

View attachment 775666

So to switch back to SG I had to remove some characters before it was accepted:

View attachment 775667

12 characters is a bit short not? 🤔
I can extend the length of the field in the next version, how many do you need? Another option is to add the SG in the format template so you dont need to add it to the device. Need to check if there are any limits in mdns so i dont break anything.
 
If you just notice this in your documentation that the limit for the Device name is 12 characters then it is fine for me, but if you want to be compatible with the ispindel firmware then you need to check their limitation I gess?
 
If you just notice this in your documentation that the limit for the Device name is 12 characters then it is fine for me, but if you want to be compatible with the ispindel firmware then you need to check their limitation I gess?
I've checked the mdns specs and the limit there is 63 chars so I will change it according to that.
 
I found this thread the other day and decided to flash one of my iSpindels to see if I'd like it. I currently run Home Assistant and use it as my main method to view the data. I ran into a couple issues but was able to do a work around. When I flashed GravityMon directly to an iSpindel that had NOT been integrated with my Home Asssistant, I wasn't able to get the values to show. I'm guessing it's because the latest release of iSpindel has code to allow Home Assistant to auto-discover the device with MQTT. I tried to add the values from the GravityMon directions but got an error from Home Assistant saying that the configuration I had entered was depreciated. I knew that one of my other iSpindels worked fine in Home Assistant when I flashed GravityMon over top of it so I decided to flash iSpindel firmware, enter the wifi and MQTT info, confirm it shows in Home Assistant, and flash GravityMon. Sure enough, that worked and I was able to get all of my data to now show in Home Assistant with the GravityMon firmware. I'm really liking it so far and am excited to give it a try in the real world!!

Thanks for all your hard work, @mper !
 
I found this thread the other day and decided to flash one of my iSpindels to see if I'd like it. I currently run Home Assistant and use it as my main method to view the data. I ran into a couple issues but was able to do a work around. When I flashed GravityMon directly to an iSpindel that had NOT been integrated with my Home Asssistant, I wasn't able to get the values to show. I'm guessing it's because the latest release of iSpindel has code to allow Home Assistant to auto-discover the device with MQTT. I tried to add the values from the GravityMon directions but got an error from Home Assistant saying that the configuration I had entered was depreciated. I knew that one of my other iSpindels worked fine in Home Assistant when I flashed GravityMon over top of it so I decided to flash iSpindel firmware, enter the wifi and MQTT info, confirm it shows in Home Assistant, and flash GravityMon. Sure enough, that worked and I was able to get all of my data to now show in Home Assistant with the GravityMon firmware. I'm really liking it so far and am excited to give it a try in the real world!!

Thanks for all your hard work, @mper !
Thanks for the kind words. I havent tested the home assistant integration in a while but if it does not work i’ll check how to fix it. Thanks for the report. Im testing the next update but will surley fix this integration before i release that.
 
Just calibrated my two newly-built iSpindels with GravityMon 1.0. It seems to be working nicely, though I had trouble with one of them not accepting my calibration inputs. It'd be nice if that error would show which input(s) is/are out of range. But building the calibration into the device itself (rather than relying on an external web page) is definitely a nice touch, as is allowing logging to more than one target.
 
Thanks for the kind words. I havent tested the home assistant integration in a while but if it does not work i’ll check how to fix it. Thanks for the report. Im testing the next update but will surley fix this integration before i release that.
It's the configuration on the HA side that has changed for MQTT sensors, according to the docs this is an exampe of new configuration format:

mqtt:
sensor:
- name: "Gravmon2-Gravity"
state_topic: "gravmon/gravmon2/gravity"
unique_id: gravmon2_grav
unit_of_measurement: "SG"

format template in gravitymon (assuming device name is gravmon2

gravmon/${mdns}/gravity:${gravity}|


I will update the documentation with this information.
 
Just calibrated my two newly-built iSpindels with GravityMon 1.0. It seems to be working nicely, though I had trouble with one of them not accepting my calibration inputs. It'd be nice if that error would show which input(s) is/are out of range. But building the calibration into the device itself (rather than relying on an external web page) is definitely a nice touch, as is allowing logging to more than one target.
Do you mean when the device fails to find a correct formula after pressing save ? This error message: "Unable to find an accurate formula based on input."

I have noticed that if you have one point that is off then the whole formula creation will fail. I see the following options:

1. Reduce the sensitivity to allow for more variance
2. Skip values that are out of bounds and create the formula without them
3. Create the formula and dont validate, user needs to check the graphs and approve the formula manually.

Option 1 or 3 are the easiest to implement...

Any thoughts on these options?
 
It's the configuration on the HA side that has changed for MQTT sensors, according to the docs this is an exampe of new configuration format:

mqtt:
sensor:
- name: "Gravmon2-Gravity"
state_topic: "gravmon/gravmon2/gravity"
unique_id: gravmon2_grav
unit_of_measurement: "SG"

format template in gravitymon (assuming device name is gravmon2

gravmon/${mdns}/gravity:${gravity}|


I will update the documentation with this information.

Ok, I'm going to give that a try. I did try earlier but it didn't look exactly like that. I only had the name and state_topic and didn't have the dash before name.

Thanks for looking into this!
 
Ok, I'm going to give that a try. I did try earlier but it didn't look exactly like that. I only had the name and state_topic and didn't have the dash before name.

Thanks for looking into this!

You can also get HA to create the sensors using mqtt autodiscovery. This format template will automatically create two sensors without the need for any configuration in HA.


homeassistant/sensor/gravmon_${id}_gravity/state:${gravity}|
homeassistant/sensor/gravmon_${id}_gravity/config:{"name": "${mdns}_gravity", "state_topic": "homeassistant/sensor/gravmon_${id}_gravity/state"}|
homeassistant/sensor/gravmon_${id}_rssi/state:${rssi}|
homeassistant/sensor/gravmon_${id}_rssi/config:{"name": "${mdns}_rssi", "state_topic": "homeassistant/sensor/gravmon_${id}_rssi/state"}|
 
You can also get HA to create the sensors using mqtt autodiscovery. This format template will automatically create two sensors without the need for any configuration in HA.


homeassistant/sensor/gravmon_${id}_gravity/state:${gravity}|
homeassistant/sensor/gravmon_${id}_gravity/config:{"name": "${mdns}_gravity", "state_topic": "homeassistant/sensor/gravmon_${id}_gravity/state"}|
homeassistant/sensor/gravmon_${id}_rssi/state:${rssi}|
homeassistant/sensor/gravmon_${id}_rssi/config:{"name": "${mdns}_rssi", "state_topic": "homeassistant/sensor/gravmon_${id}_rssi/state"}|

I think I read that elsewhere but I don't know how to implement that.
 
I think I read that elsewhere but I don't know how to implement that.
Enter config mode and navigate to the mqtt section, press the format editor button, select mqtt in the drown down list, enter the text above (should be 4 lines) press save and you are done
 
Do you mean when the device fails to find a correct formula after pressing save ? This error message: "Unable to find an accurate formula based on input."

I have noticed that if you have one point that is off then the whole formula creation will fail. I see the following options:

1. Reduce the sensitivity to allow for more variance
2. Skip values that are out of bounds and create the formula without them
3. Create the formula and dont validate, user needs to check the graphs and approve the formula manually.

Option 1 or 3 are the easiest to implement...

Any thoughts on these options?
Yes, that's the error message. What I was thinking was that it would be nice if it would point out which point is off, and/or indicate how far off it is. But the third option might work--give the error and show a "save anyway" button.
 
Enter config mode and navigate to the mqtt section, press the format editor button, select mqtt in the drown down list, enter the text above (should be 4 lines) press save and you are done

Is there a way to confirm that it saved? I add the 4 lines to the Home Assistant (MQTT) template, press save, and it reverts back to the original 3 lines.
 
Is there a way to confirm that it saved? I add the 4 lines to the Home Assistant (MQTT) template, press save, and it reverts back to the original 3 lines.
Thats strange, then it probably fails to save if it's the same data as before. Can you check under the index page -> error log if there is something there that could give a hint ? Could be a out of memory issue on the device if the configuration is to big.
 
Yes, that's the error message. What I was thinking was that it would be nice if it would point out which point is off, and/or indicate how far off it is. But the third option might work--give the error and show a "save anyway" button.
You can probably deduct which point if off, if you view the graph (expand the next section of the calibration page).

You can also adjust the sensitivity of the validation under config -> advanced options -> Formula max deviation (SG). Set that to 10 and you should get a formula. There is a short section under Q&A in the docs; Q & A - GravityMon 1.1.0 documentation
 
homeassistant/sensor/gravmon_${id}_gravity/state:${gravity}|
homeassistant/sensor/gravmon_${id}_gravity/config:{"name": "${mdns}_gravity", "state_topic": "homeassistant/sensor/gravmon_${id}_gravity/state"}|
homeassistant/sensor/gravmon_${id}_rssi/state:${rssi}|
homeassistant/sensor/gravmon_${id}_rssi/config:{"name": "${mdns}_rssi", "state_topic": "homeassistant/sensor/gravmon_${id}_rssi/state"}|

I've been trying different things out so I'll try and break it down. I'll wait to try anything more until I hear from you.

1) I've figured out that if I add the 4 lines above, the MQTT clears out. It's as if there's too many characters. I can add the two short lines but if I add one of the longer ones, it clears out and is saved as blank.

2) I tried with ONLY the 4 lines and nothing is auto-discovered in Home Assistant... meaning that it doesn't show as a "Device" in the MQTT integration with corresponding entities. They're there but they are orphans. It sees something and the logs look like this:

Code:
2022-07-26 15:19:45 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Process discovery payload {'name': 'GravityMon4_gravity', 'state_topic': 'homeassistant/sensor/gravmon_f7d47a_gravity/state', 'platform': 'mqtt'}
2022-07-26 15:19:45 INFO (MainThread) [homeassistant.components.mqtt.discovery] Component has already been discovered: sensor gravmon_f7d47a_gravity, sending update
2022-07-26 15:19:45 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('sensor', 'gravmon_f7d47a_gravity') '{'name': 'GravityMon4_gravity', 'state_topic': 'homeassistant/sensor/gravmon_f7d47a_gravity/state', 'platform': 'mqtt'}'
2022-07-26 15:19:45 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: sensor.gravitymon4_gravity_2
2022-07-26 15:19:45 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Pending discovery for ('sensor', 'gravmon_f7d47a_gravity'): deque([])
2022-07-26 15:19:45 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on homeassistant/sensor/gravmon_f7d47a_rssi/config: b'{"name": "GravityMon4_rssi", "state_topic": "homeassistant/sensor/gravmon_f7d47a_rssi/state"}'
2022-07-26 15:19:45 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Process discovery payload {'name': 'GravityMon4_rssi', 'state_topic': 'homeassistant/sensor/gravmon_f7d47a_rssi/state', 'platform': 'mqtt'}
2022-07-26 15:19:45 INFO (MainThread) [homeassistant.components.mqtt.discovery] Component has already been discovered: sensor gravmon_f7d47a_rssi, sending update
2022-07-26 15:19:45 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('sensor', 'gravmon_f7d47a_rssi') '{'name': 'GravityMon4_rssi', 'state_topic': 'homeassistant/sensor/gravmon_f7d47a_rssi/state', 'platform': 'mqtt'}'
2022-07-26 15:19:45 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: sensor.gravitymon4_rssi_2
2022-07-26 15:19:45 DEBUG (MainThread) [homeassistant.components.mqtt.discovery] Pending discovery for ('sensor', 'gravmon_f7d47a_rssi'): deque([])
2022-07-26 15:19:45 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on gravmon/GravityMon4/battery: b'4.03'
2022-07-26 15:19:45 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on gravmon/GravityMon4/gravity: b'1.1298'

Enter config mode and navigate to the mqtt section, press the format editor button, select mqtt in the drown down list, enter the text above (should be 4 lines) press save and you are done

Thats strange, then it probably fails to save if it's the same data as before. Can you check under the index page -> error log if there is something there that could give a hint ? Could be a out of memory issue on the device if the configuration is to big.

The error log shows errors from before. Nothing current but it's hard to tell because it doesn't show a timestamp.
 
Back
Top