Giter VIP home page Giter VIP logo

gravitymon's Introduction

download release issues pr dev_build doc_build

Gravity Monitor for Beer Brewing

GravityMon Logo

GravityMon is a replacement firmware for the iSpindle firmware. It's 100% compatible with the iSpindle hardware design so it does not require any hardware changes. From v1.2 you can also use GravityMon for the DIY Floaty Hardware with ESP32 Lite.

Now also works with ESP32 d1 mini, ESP32 c3 mini, ESP32 S2 mini, ESP32 S3 mini which are pin compatible with ESP8266.

Installation can be made using https://www.brewflasher.com or the web version at https://web.brewflasher.com

The documentation can be found here: https://www.gravitymon.com/docs.html

Visit the gravitymon homepage here for more information about the project: https://www.gravitymon.com

If you want to support my work you can do that through these options

Supporters

Thanks to the following persons for supporting me and this project:

  • David Conde, @davidconde
  • Lars H.
  • Vonchilliman
  • Andreas Dohl
  • StodgyWaif

gravitymon's People

Contributors

darkside90a avatar jinjorge avatar magnus avatar mp-se avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gravitymon's Issues

Temp Sensor Adj Problem

Hello.
I changed my OTA Base URL to:
https://github.com/mp-se/gravitymon/tree/master/bin/
(Not sure if this is correct or not)

And the Temp Sensor Adj value automatically goes to -17.77778.
I tried changing it to 0 but it just goes back to that value.
Even after removing the OTA value I cannot set the Temp Sensor value back to 0.

I tried in both Chrome and Firefox.
This is on the 0.8.0 version.

EDIT:
By entering in +32 for the Temp Sensor Adj value it has reset back to 0.
After restarting the device it seems to be showing the correct temperature.

Add token as a field in the UI

Token can be set in the format templates but to simplify this it should be possible to set this as a field and have the ispindle format use this by default.

Add brewers friend as endpoint.

I dont have an account for brewers friend so I have not been able to verfy this completely. Its based on the available documentation. Need help to verfiy these instructions.

Brewer's friend is an all in one service that allows you to manage you recepies and brews.

You can find you API key when logged in to the service. Follow these instructions https://docs.brewersfriend.com/devices/ispindel

Note there are different URLs if you are using plato or specific gravity!

http://log.brewersfriend.com/ispindel/[API KEY]
http://log.brewersfriend.com/ispindel_sg/[API KEY]

From what I can read in the documentation you need to add the API key as a token as well. This can be done using a custom
format for the endpoint. Just add you API key after token.

{
"name" : "${mdns}",
"ID": "${id}",
"token" : "[API KEY]",
"interval": ${sleep-interval},
"temperature": ${temp},
"temp-units": "${temp-unit}",
"gravity": ${gravity},
"angle": ${angle},
"battery": ${battery},
"rssi": ${rssi}
}

Add more validation in ui

Only basic validation is added in ui (using form params only). Would be good to do more advanced checks to avoid input errors.

Add function to estimate battery life when in gravity mode.

It would be nice to estimate how long the device will last based on sleep/push interval.

We know that the battery is typically 2200mAh and the main power is drained when aware. Since we are measuring the run time we can store this and estimate an average for the last 10 wakeups. This should be sufficient to estimate how long the device can operate.

We need to:

  • add a function that stores the runtime (last 10 should be sufficient)
  • update API to send this to the UI
  • add calulation in UI to estimate battery life based on past performance

Remove brewfather endpoint

Brewfather works with the standard http endpoint, no need for duplicated options. The current one can be used with a custom format templete anyway.

MQTT format is not compatible with iSpindle

The current version sends a json payload over mqtt which is not compatible with how iSpindle sends data. iSpindle sends data over several topics like below. Update the MQTT target to support multiple topics. Also add so the port number can be edited.

ispindel/iSpindel000/tilt/89.96796
ispindel/iSpindel000/temperature/21.375
ispindel/iSpindel000/temp_units/C
ispindel/iSpindel000/battery/0.04171
ispindel/iSpindel000/gravity/33.54894
ispindel/iSpindel000/interval/1
ispindel/iSpindel000/RSSI/-58

Add possibility to upload certificates

It would be good to have proper validation of SSL certificates. Uploading all current CA is not an option, it takes to long to load them from disk ~3 seconds.

Adding on CA for each service is probably a better approach to validate the endpoint certificate. Doing validation would also mean that we need to perform an NTP sync for the validation to be successful.

Add persistent error log

Store errors on flash and make it possible to view them in the ui. This will make it easier to see issues connected to sending data without the need for serial connection.

show the correct device.local name to connect to in initial setup

Issue

On initial setup I found that the IP address generated by the interface was incorrect ( 192.168.4.1
and it was quite hard to find either :

  • the mdns name (requires installation of mdns tools)
  • or the device IP address,
    • apparently no host name is associated with the DHCP request
    • as the DHCP lease is released quite quickly , the router does not show the client in the lease table
  • I ended up reading the serial debug to find the IP address

Expected behaviour:

  • the mdsn name to be <devicename>.local as documented : https://mp-se.github.io/gravitymon/configuration.html
    I assume that, in order to run multiple devices on the same network, you have added a few characters to the mdns name to make it unique , which works quite well in my own projects, however that only works if this device name is also shown to the end user doing the configuration.

Proposed fix :

Wrong format in standard push, missing device name

The standard format for normal http does not include the device name properly. This is a corrected format template fixing the bug.

  {
   "name" : "${mdns}",
   "ID": "${id}",
   "token" : "gravmon",
   "interval": ${sleep-interval}, 
   "temperature": ${temp},
   "temp-units": "${temp-unit}",
   "gravity": ${gravity},
   "angle": ${angle},
   "battery": ${battery},
   "rssi": ${rssi},
   "corr-gravity": ${corr-gravity},
   "gravity-unit": "${gravity-unit}",
   "run-time": ${run-time}
  }

Create instructions for contribution

Add a section on contribution to this project. Probably need to have a section describing the software setup and how to add an new push target.

Cleanup UI

Combine the index and device pages in the UI to have a complete overview of data and device information in one place.

Add support for plato

The firmware currently only support SG as gravity format. I would be good to also support plato. I plan to use SG as the internal format and just present the data in plato on UI and when sending data to other targets. This would make it easy to switch between the two.

Parts affected:

  • All pushtargets
  • Configuration
  • Formula creation

Memory gets low when in config mode

See if we can locate the memory leak when sending data in config mode. More frequent when using ssl. Low memory causes crash when ssl is used (ssl needs lots of memory to work).

This is not an issue when in gravity mode since we then start from reset state.

Show estimated batterylife

Based on processing time it should be possible to estimate the batterylife since runtime is the main impact on battery life. The basic functionallity is there so this is an UI update.

Wrong over push temp when using F as temp

Hello.
I just installed GravityMon and it seems to be working well but I noticed the temperature recorded in Fermentrack is 30 degrees F or more higher than what the GravityMon web server page shows. Is this a push configuration error?
Thanks for any advice or information.

EDIT:
Okay I just figured out that GravityMon is detecting the temperature as 68F but it's sending it to Fermentrack as 68C.
Any idea how I can correct this?

Add possibility to define http headers

Many services uses http headers for authentication and format defintions, having the possibility to define these would increase support for more services.

For example:
Content-Type: application/json
Authorization: Basic
X-Auth-Token: MtRbM7ipKUsjRh6RwJE0ofIQo0KqoG

SSL support for push targets

Add support for SSL. This should cover most targets.

Options:

  • just skip cert validation. This is the easy approach and does not validate the remote target (if its valid). However it uses the least amount of memory and is easy to implement.
  • use fingerprints to validate remote targets. this would require some type of function to catch and store the fingerprints for the remote targets and users will have to update when the remote certificate is updated. better security but not really user friendly
  • store root ca in the device. this is the optimal solution but would require around 150 kb of flash storage to implement. There are projects that have done it but I'm not sure I want to waste this amount of space on certificates.

Need to investigate what the different libraries support.

Length of http field is to short

Increase the lenght of the http fields.

Its currently to short to support a URL to ubidots when including token in URL. The device name is limited to 5 chars.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.