Giter Club home page Giter Club logo

hoplite's People

Contributors

yesrod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kaschik

hoplite's Issues

Backend rework for 2.0

  • Introduce a tap object
    • Taps are where the beer comes out
    • Single object associated with kegs, specific sensor channels, in both real life and Hoplite
    • tap object will have references to a specific sensor instance and a single channel on said instance
    • also a reference to the currently loaded keg object for that tap
  • Create a generic sensor object
    • Subclass that object for hx711_sensor
    • Allows common logic for different sensor types in the future
  • Move all weight->volume logic inside keg objects
    • update() function for getting new weight data, converting to available volume
    • available_volume() function for getting that converted data out
    • data stored internally as metric volume, do all weight->volume conversion during update()
  • Rework UI process
    • Create sensor, define type, channels, etc.
    • Create tap, associate with sensor
    • Create keg with sizes, beer names, etc.
    • Associate keg with specific tap

Setting a keg tare weight or volume to 0 causes a division by zero error

This happens in both web and main processes.

Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/__main__.py", lin
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/__main__.py", lin
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]:   File "build/bdist.linux-armv6l/egg/hoplite/hoplite.py", line
Apr 26 21:18:37 hoplite python2[2293]: ZeroDivisionError: float division by zero
Apr 26 21:18:37 hoplite python2[2294]: remi.update      ERROR    error updating gui
Apr 26 21:18:37 hoplite python2[2294]: Traceback (most recent call last):
Apr 26 21:18:37 hoplite python2[2294]:   File "/usr/local/lib/python2.7/dist-packages/remi/server.py"
Apr 26 21:18:37 hoplite python2[2294]:     client.idle()
Apr 26 21:18:37 hoplite python2[2294]:   File "build/bdist.linux-armv6l/egg/hoplite/web.py", line 95,
Apr 26 21:18:37 hoplite python2[2294]:     i = int(index) - 1
Apr 26 21:18:37 hoplite python2[2294]:   File "build/bdist.linux-armv6l/egg/hoplite/web.py", line 77,
Apr 26 21:18:37 hoplite python2[2294]:     except KeyError:
Apr 26 21:18:37 hoplite python2[2294]: ZeroDivisionError: float division by zero

Automatically build RasPi images

Figure out a way to use pipelines to build RasPi images for releases and on every commit. There should be an existing method to build a minimal Raspbian/Ubuntu/LibreELEC image via GitHub, then cram in Hoplite.

SNMP, LLDP, MDNS support

Adding additional protocols and things could make the experience a lot more pleasant and extensible.

Add an About page on the web GUI

Would be neat to have a help/about page on the Web GUI that links to the wiki, and has the current version of Hoplite, the hardware it's running on, and maybe an update checker.

Applying settings in web interface causes duplicates of weight data

Ended up with this mess during troubleshooting of #5 - every time I attempt to save data back to the shmem, the weight data is duplicated.

pi@hoplite:~ $ sudo cat /dev/shm/hoplite
{
  "data": {
    "co2": [
      60
    ],
    "temp": -687,
    "weight": [
      [
        17446,
        -9628
      ],
      [
        6189,
        1295
      ],
      [
        17447,
        -9604
      ],
      [
        6192,
        1283
      ],
      [
        17443,
        -9657
      ],
      [
        6188,
        1250
      ],
      [
        17443,
        -9602
      ],
      [
        6187,
        1296
      ],
      [
        17444,
        -9624
      ],
      [
        6185,
        1332
      ]
    ]
  },
  "config": {
    "hx": [
      {
        "channels": {
          "A": {
            "co2": false,
            "name": "Not Quite Cherry Gose",
            "weight": 17391,
            "tare": 4,
            "volume": 18.9,
            "refunit": 20.958,
            "offset": 298472,
            "size": "corny"
          }
        },
        "pd_sck": 6,
        "dout": 5
      },
      {
        "channels": {
          "A": {
            "co2": true,
            "name": "CO2",
            "weight": 6185,
            "tare": 4.82,
            "volume": 2.27,
            "refunit": 21.401,
            "offset": 128516,
            "size": "custom"
          }
        },
        "pd_sck": 13,
        "dout": 12
      }
    ],
    "weight_mode": "as_kg_net"
  }
}

Expand web UI configuration options

Need to be able to perform all tasks from the Web UI:

  • Create/delete sensor listings
  • Add/remove kegs from sensor listings
  • Change system-wide settings (preferred units, etc.)

Can't set weight mode via web interface anymore

Something somewhere is stomping on the weight_mode setting when its set via the web interface.

I can change keg settings and they stick, but if I change keg setting plus weight_mode, everything reverts.

The shmem stuff is a mess anyway, may fix this by moving the web interface to using the API.

Python 3 support/cutover

In theory Hoplite should still run with Python3 from the work done for v1.0.6 but I haven't tested it yet.

Since Python 2 is EOL I should make Hoplite Python3 only.

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.