BrewPiLess icon indicating copy to clipboard operation
BrewPiLess copied to clipboard

[FR] Update MQTT reporting on change of state, mode, beerSet or fridgeSet

Open denisfrench opened this issue 1 year ago • 3 comments

I have successfully setup capture of BrewPiLess data within Home Assistant via MQTT.

Control via MQTT is also working, but I have found the lack of immediate feedback makes programmatic MQTT control problematic.

Please consider updating MQTT reporting on change of mode, beerSet or fridgeSet, to complement the MQTT remote control functionality. Update of state upon change would also be useful for monitoring purposes, as it often changes within the Publish Period timeframe.

Likely this is relevant to MQTT control through other approaches, such as NodeRed, Python etc.

Thanks for your work on this 🙂

denisfrench avatar Oct 10 '24 06:10 denisfrench

I have used your example from #432 and got brewpiless via MQTT into Home Assistant. The only control I can make work is to set the brew mode but I cannot set the temperature for fridge or beer constant.

EDIT - Actually I can only change mode to any setting except Beer Constant.

Got any tips?

Second edit - worked it out.

glenosAU avatar Oct 19 '24 06:10 glenosAU

Are you certain it is not working? The key issue is that feedback via MQTT is delayed, therefore you will not see it update in HA until the next Publish Period. Check the BrewPiLess webif directly for real-time updates.

For this reason I have given up on control from HA, hence raising this FR.

The YAML from https://github.com/vitotai/BrewPiLess/issues/432#issuecomment-2404552570 was otherwise working fine for me. Probalby also check you have the full topic (ie it does not automatically include Base Path) in your "MQTT Remote Control" settings (https://github.com/vitotai/BrewPiLess/issues/432#issuecomment-2404603519), which had me stumped for a while.

Concievably we could reduce Publish Period to 5 or 15 seconds and it would probalby work, but I would rather not spam my MQTT server, and wonder about the load on my BrewPiLess which already spontaniously resets occaisionally.

denisfrench avatar Oct 19 '24 09:10 denisfrench

I've found a related problem. If I set the beer constant temperature through HA and check that it has been applied in Brewpiless it works as expected. Even with a 300s MQTT update time.

The strange behaviour is at some time later it will change to 18°C. I thought it was happening due to poor wifi signal which I fixed a few days ago.

For example, yesterday I set the beer constant through HA to 4°C at 4pm. At 1:55am today the set temp changed to 18°C. The previous se point was 8°C so it isn't reverting to a previous set point.

When I set the set point through Brewpiless it stays as set.

Attached picture is HA history for yesterday and today. The gap yesterday was me adjusting the WiFi extender. Uploading Screenshot_20241031-104919_Home Assistant.png…

glenosAU avatar Oct 30 '24 23:10 glenosAU