Brew/Fermentation temperature versus used Brick

You have questions or need help around BierBot Bricks - this is the right place.
User avatar
JoDaNl
Posts: 23
Joined: Wed Mar 01, 2023 10:49 am

Brew/Fermentation temperature versus used Brick

Post by JoDaNl »

Hi Bernhard,

I started so re-coding of my "BookesBrick"...an alternative Fermentation controller-brick which support BierBot...
See : https://github.com/JoDaNl/BookesBrick

I will also add support now for a cheap 128x64 Graphic LCD display.

Next to the actual temperature (Ist Wert) I want to show the target temperature (Soll Wert). My current clunky implementation (mis)-uses the LCD API for this. But this only works when having 1 active brew only (as only 1 temperature is reported in that case). As I have a second fermenter this poses an issue when having 2 brews/fermentations at the same time.

Do you have any idea or suggestion how to 'link' a brew with a brick it's using?

Regards, Jos.
User avatar
Bernhard
Site Admin
Posts: 267
Joined: Sun Jan 23, 2022 3:53 pm
Location: Munich - Germany

Re: Brew/Fermentation temperature versus used Brick

Post by Bernhard »

Hi Jos,

how cool is that? :)

The LCD endpoint is supposed to return an array of all currently running brews? You're saying that's not the case? If so: I'll fix it.

In addition, your usecase sounds like it the even cooler solution would be, if the iot endpoint returns the calibrated current and target value of the linked device - am I right?

Cheers,
Bernhard.
User avatar
JoDaNl
Posts: 23
Joined: Wed Mar 01, 2023 10:49 am

Re: Brew/Fermentation temperature versus used Brick

Post by JoDaNl »

Hi Bernhard,

Well...an array is returned...so in case of 2 fermenters running at the same time 2 temperatures are reported...but I have no means of knowing which Brew/Temperature belongs to which fermenter...

So if Brick-API (not LCD) could also send-out the target temperature to the linked Bricks this would solve all.
Note : sending out the temperature only during an active brew (or manual) would also help to indicate that the fermenter is active.

Thansk for your swift response.

Gruesse, Jos.
User avatar
Bernhard
Site Admin
Posts: 267
Joined: Sun Jan 23, 2022 3:53 pm
Location: Munich - Germany

Re: Brew/Fermentation temperature versus used Brick

Post by Bernhard »

Hi Jos,

I've did a quick change. And introduced a new device type "bookes" to honor your work.

So requesting

Code: Select all

{
    "a_bool_epower_0": "1",
    "apikey": "KmT6ToPyfooo123123123",
    "brand": "bierbot",
    "chipid": "1335429_C8:2B:96:05:01:00",
    "s_number_temp_0": "1.5",
    "type": "bookes",
    "version": "0.0.1"
}
Note the "type": "bookes" will result into

Code: Select all

{
    "error": 0,
    "error_text": "",
    "warning": 0,
    "warning_text": "",
    "next_request_ms": 10000,
    "epower_0_state": 1,
    "used_for_devices": "[\"y4Efxk7NTMJf0STrE99u\"]"
}
Note the "used_for_devices": "[\"y4Efxk7NTMJf0STrE99u\"]". It is an array as one iot device can also be linked to more than one device. I should probably also add additional endpoints for getting all devices and their names, etc.

Cheers,
Bernhard.
User avatar
JoDaNl
Posts: 23
Joined: Wed Mar 01, 2023 10:49 am

Re: Brew/Fermentation temperature versus used Brick

Post by JoDaNl »

Hi Bernard,

Thanks for taking the effort...cool!

The id's in the "used_for_devices": "[\"y4Efxk7NTMJf0STrE99u\"]" field, are they a reference to the "id" field (under "brews") of the LCD-API ?

Regards, Jos.
User avatar
Bernhard
Site Admin
Posts: 267
Joined: Sun Jan 23, 2022 3:53 pm
Location: Munich - Germany

Re: Brew/Fermentation temperature versus used Brick

Post by Bernhard »

Every device of yours has one unique Id which will stay constant at all times. As the mentioned endpoint is currently missing, you have to do one A/B test.
User avatar
JoDaNl
Posts: 23
Joined: Wed Mar 01, 2023 10:49 am

Re: Brew/Fermentation temperature versus used Brick

Post by JoDaNl »

Hi Bernhard,

It's been a while since my last response. I was busy with a lot of other things...but now I've picked up some planned code-updates for the BookesBrick.

I'm able to receive the used_for_devices data-field...so that's looking good. However as of yesterday I cannot reveice any valid data via the LCD-API anymore. Not sure what happened. When I remove all bricks via the GUI and switch on my BookesBrick it registers as a new LCD brick. But as of the second API call I get an 'internal' response.

This is a snippet of my log-output, 2nd API call (key has been obfuscated):

Code: Select all

[COMMS] LCD API url=https://bricks.bierbot.com/api/iot/v1?apikey=XXXXXXXXXXXXXX&type=display&brand=oss&version=0.1&chipid=140892815140784&d_object_information_0=4x20
[COMMS] Received response from LCD API
[COMMS] response LCD=internal.
Any thoughts on this?

Kind regards.,
Jos
User avatar
Bernhard
Site Admin
Posts: 267
Joined: Sun Jan 23, 2022 3:53 pm
Location: Munich - Germany

Re: Brew/Fermentation temperature versus used Brick

Post by Bernhard »

Hi Jos,

after the first request, you need to click "activate" in the UI to avoid spamming. May that be the reason?

Cheers,
Bernhard.
User avatar
JoDaNl
Posts: 23
Joined: Wed Mar 01, 2023 10:49 am

Re: Brew/Fermentation temperature versus used Brick

Post by JoDaNl »

Hi Bernhard,

Yes I did. Sorry, fogot to mention that.
See picture below
Screenshot 2023-10-14 125003.jpg
Screenshot 2023-10-14 125003.jpg (15.36 KiB) Viewed 4485 times
Regards,
Jos
User avatar
Bernhard
Site Admin
Posts: 267
Joined: Sun Jan 23, 2022 3:53 pm
Location: Munich - Germany

Re: Brew/Fermentation temperature versus used Brick

Post by Bernhard »

Hmm. Can you send me your API key via email? Happy to take a look.

Cheers
Post Reply