Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request : brew by weight #33

Open
neuralldev opened this issue Feb 2, 2024 · 7 comments
Open

feature request : brew by weight #33

neuralldev opened this issue Feb 2, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@neuralldev
Copy link
Contributor

Hi zweckj,

do you think it can be possible to detect bbw? add buttons to select 1 dose, 2 doses and normal mode when you have brew by weigth activated? maybe dose definition too?

I can help by capturing wifi frames if needed.

regards

@zweckj
Copy link
Owner

zweckj commented Feb 2, 2024

Maybe? My guess how this goes is: you set it in the app, which means it’s sent to the machine once. The scale then sends its weight to the machines and stops once the weight is reached. But that’s just a theory.
If you have a Mini and a BBW scale you can try to see if you find anything in the mitmproxy/Bluetooth logs.

@neuralldev
Copy link
Contributor Author

I cannot find the BT directory on my HA, maybe I'm searching at the wrong place.

I had a look at the journal and what I see is that the dose actually for 1 shot is stored in the dose_k1 variable you already retreive, so this afternoon I will make a try of shot and see what the logs are collecting when I set the doses, and if the app receives information about it as well. I think it only works with wifi, the bbw flow is linked to BT point to point from scale to Mini but the settings are sent with the app throught wifi as when wifi is not available all these settings are not reachable.

i will investigate and let you know.

@zweckj
Copy link
Owner

zweckj commented Feb 3, 2024

Oh that's not how this works. You would really need to sniff the traffic between app and machine (for example with mitmproxy) because HA doesn’t know about that traffic at the moment, so there won’t be logs.

@neuralldev
Copy link
Contributor Author

ok, so I'll sniff the traffic from the AP side. I have a pro infrastructure and can tcpdump between peers. I will let you know if I can decode the requests.

@zweckj
Copy link
Owner

zweckj commented Feb 3, 2024

Keep in mind it’s HTTPS traffic, so you'll need a proxy

@adampetrovic
Copy link

FWIW I have implemented brew by weight myself using this integration and an ESPHome connected to my Acaia Lunar.

You can see the implementation here: https://gist.github.com/adampetrovic/448b276d591ee1c1a2ebd9e52119c9f8

@zweckj zweckj added the enhancement New feature or request label Jun 18, 2024
@TiStef
Copy link

TiStef commented Dec 18, 2024

FWIW I have implemented brew by weight myself using this integration and an ESPHome connected to my Acaia Lunar.

You can see the implementation here: https://gist.github.com/adampetrovic/448b276d591ee1c1a2ebd9e52119c9f8

Great work Adam! as an alternative, because now there is an HA integration with the Lunar (thanks again to Zwekj) do you think you can read scale sensors from HA directly and bring them as text sensor inside ESPHOME for controlling logic? Just one config file and control the trigger and action directly on ESPHOME alone.
I am am waiting on the ACAIA and will give it a try...

if only had we access to the brew switch from HA ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants