Page 1 of 3

Brew/Fermentation temperature versus used Brick

Posted: Mon Aug 07, 2023 7:15 pm
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.

Re: Brew/Fermentation temperature versus used Brick

Posted: Mon Aug 07, 2023 7:40 pm
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.

Re: Brew/Fermentation temperature versus used Brick

Posted: Mon Aug 07, 2023 7:50 pm
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.

Re: Brew/Fermentation temperature versus used Brick

Posted: Tue Aug 08, 2023 6:57 am
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.

Re: Brew/Fermentation temperature versus used Brick

Posted: Tue Aug 08, 2023 7:43 am
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.

Re: Brew/Fermentation temperature versus used Brick

Posted: Tue Aug 08, 2023 8:21 am
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.

Re: Brew/Fermentation temperature versus used Brick

Posted: Sat Oct 14, 2023 9:38 am
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

Re: Brew/Fermentation temperature versus used Brick

Posted: Sat Oct 14, 2023 10:12 am
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.

Re: Brew/Fermentation temperature versus used Brick

Posted: Sat Oct 14, 2023 10:51 am
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 4472 times
Regards,
Jos

Re: Brew/Fermentation temperature versus used Brick

Posted: Sat Oct 14, 2023 4:44 pm
by Bernhard
Hmm. Can you send me your API key via email? Happy to take a look.

Cheers