Git Product home page Git Product logo

amber-light's Introduction

☕️ amber-light

Web-based dashboard and controls for the Ember Mug²


See it in action

🔗 https://EduardDopler.github.io/amber-light/

Browser support

Chromium-based browsers are the only browsers supporting the Bluetooth API, which is kind of essential for a bluetooth connection.

Tested with Google Chrome 124+.

Bluetooth API is only available in secure contexts (HTTPS). I use Caddy locally.

Persistent connection

Chrome has experimental support for persistent bluetooth connections. This way, the browser is able to access devices it connected to in the past without querying permission again after every browser restart.

Enable it via this Chrome flag: chrome://flags/#enable-web-bluetooth-new-permissions-backend

And vote for this feature here and here.

Reconnection issues

In general, the mug struggles with reconnecting itself to a previous bluetooth host. Sometimes we can observe bluetooth beacons (advertisements) being sent but the connection still fails, or just takes a long time. As the same happens with the native Ember app, it is probably safe to assume this cannot be fixed by software.

If you run into this, press and hold the mug's power button until the LED flashes blue to initiate a new connection.

If the LED still flashes after successfully connecting, just press the button again to return to normal operation mode.

Log/Debug

See your browser's console for connection info, warnings errors.

Roadmap

  • Setting target temperature, unit (°C/°F), mug color and mug name
  • Notifications
    • Connection status
    • Target temp reached
    • Battery low/full
  • Styling
  • Offline support/PWA

Motivation

I love good coffee. Among other things, it has to have the perfect temperature. In theory, the Ember mug is a good temperature-controlled mug, doing its job. At this price point you would expect a company to build a decent, reliable app that also doesn't collect a ton of your personal and device data. Disappointed in all aspects, I built this minimal alternative.

Main goals:

  • Fast
  • Simple
  • No thrills
  • No data collection

Technologies

  • The Web™️ (Web Bluetooth API)
  • No runtime dependencies/libraries, only plain: HTML, CSS, JS
  • Web components/custom elements (Light DOM)
  • Dev dependencies: Vite, Prettier, ESLint, Caddy

Special thanks

amber-light's People

Contributors

eduarddopler avatar

Watchers

 avatar

amber-light's Issues

GATT operation failed for unknown reason/operation already in progress

Reading multiple values at the same time sometimes leads to GATT errors, especially on mobile devices.

Idea: Handle bluetooth connection/GATT readings centrally, maybe combine EmcConnect and EmcPushEvents.

Workaround: Currently, for debugging purposes, single clicks on each category read their values one by one.

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.