PiBrewing / craftbeerpi4

GNU General Public License v3.0
58 stars 28 forks source link

MQTT fermenter payloads are not updated #127

Closed InnuendoPi closed 8 months ago

InnuendoPi commented 8 months ago

cbpi/fermenterstepupdate: value "status" is constant "A" for all steps while cbpi/fermenterupdate value "status" in arr "steps" shows correct state.

in fermenter mode, last message in cbpi/notification topic hangs on "step finished" instead of publishing next step info like "waiting for target temp".

please remove array steps from topic fermenterupdate.

avollkopf commented 8 months ago

I will look into it and fix it

avollkopf commented 8 months ago

I think, Fermenterstepupdate should show only the active step but not the completed step. Would that make sense?

avollkopf commented 8 months ago

Found the code part in the fermentation controller:

            # send mqtt update for active femrentersteps
            for fermenter in fermentersteps:
                for step in fermenter['steps']:
                    if step['status'] == 'A':
                        self.cbpi.push_update("cbpi/{}/{}/{}".format(key,fermenter['id'],step['id']), step)

It just updates steps with an 'A' but the older active steps will remain...

Need to look into it and try to remove the inactive steps.

avollkopf commented 8 months ago

Fixed in 4.3.2