fermentrack icon indicating copy to clipboard operation
fermentrack copied to clipboard

Is there a way to display the data on Home Assistant using mqtt or json? Are you aware of anyone doing this?

Open blazem opened this issue 4 years ago • 13 comments

blazem avatar Apr 24 '20 12:04 blazem

I'm posting the data from Fermentrack to NodeRed via a websocket then distributing to MQTT and HA sensors that way. Happy to share the config and flows if you are interested.

lauofdoom avatar May 20 '20 02:05 lauofdoom

I'm posting the data from Fermentrack to NodeRed via a websocket then distributing to MQTT and HA sensors that way. Happy to share the config and flows if you are interested.

yes please i would really like to see that - as well as a snip of your data on the HA dash?

blazem avatar May 20 '20 22:05 blazem

I'd like to see it also, if you don't mind.

markcollar avatar Nov 26 '20 17:11 markcollar

What information/data do you want to have?

An option could be to use the push target functionallity to send data via http and then convert it to mqtt or add mqtt as a pushtarget... I'm also using HA and this would be a nice feature to have.

mp-se avatar Nov 27 '20 16:11 mp-se

I belive it should be possible to use nodered with standard push target to convert the http request to mqtt for use in home assistant. Will give it a try hopefully this weekend

mp-se avatar Nov 27 '20 20:11 mp-se

Hey Sorry guys, completely missed your requests for this info.

Have a look here:

Fermentrack HA Sync

This is my nodered flow for this - syncs push data from fermentrack in to home assistant via ha sensor nodes, and also0 brewfather via the web API. Haven't had time to run through a tutorial on settign this up, but will try this weekend if I can.

Hope it helps.

Cheers

lauofdoom avatar Nov 27 '20 20:11 lauofdoom

I'm trying to picture this and/or understand why I've never wanted it. I want EVERY gadget, so it must mean I just need to know more. How would I know I've been missing this all my life? :)

lbussy avatar Nov 27 '20 20:11 lbussy

I’ve not looked at the offered nodered integration so bear with me. I’d love to see the beer temp, gravity and mode settings as a minimum

\\ Greg


From: Lee Bussy [email protected] Sent: Friday, November 27, 2020 4:00:09 PM To: thorrak/fermentrack [email protected] Cc: uSlackr [email protected]; Comment [email protected] Subject: Re: [thorrak/fermentrack] Is there a way to display the data on Home Assistant using mqtt or json? Are you aware of anyone doing this? (#460)

I'm trying to picture this and/or understand why I've never wanted it. I want EVERY gadget, so it must mean I just need to know more. How would I know I've been missing this all my life? :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthorrak%2Ffermentrack%2Fissues%2F460%23issuecomment-734988551&data=04%7C01%7C%7Cfb26a5036abd4656740008d893176e0e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637421076116685241%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Xi3OnltChIDfzHyrxjNa3uL94DCatq9XGZGh2MFOuxs%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGEO6Z64RLCLT74ZEYRZJL3SSAHNTANCNFSM4MQBT4SQ&data=04%7C01%7C%7Cfb26a5036abd4656740008d893176e0e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637421076116695239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wafGa5NXhWNKNx9LSJIovUWHVf%2B84NFCdg8n0xLTR7w%3D&reserved=0.

uSlackr avatar Nov 28 '20 14:11 uSlackr

I have tested and can confirm that its possible to use the generic http push function to send data to node red and then update sensors in home assistant. I've used the HTTP IN in combination with HA_ENTITY to make it work. It will require some work to extract the values of interest. Here is an example of the payload from fermentrack so you can see what options are available in the HTTP post message; (I'm missing the beer_temp in this version since I dont have that configured for my keezer).

{"api_key": "sdfssfsdf", "version": "1.0", "brewpi_devices": [{"name": "keezer", "internal_id": 1, "temp_format": "C", "control_mode": "f", "fridge_temp": 4.06}], "gravity_sensors": [{"name": "iSpindel1", "internal_id": 1, "sensor_type": "ispindel", "gravity": 1.026436234683, "temp": 25.2, "temp_format": "C"}]}

mp-se avatar Dec 04 '20 13:12 mp-se

Here is a little more detailed description of my node-red flow for importing to homeassistant.

First I setup a Pushtarget in fermentrack that consisted of my Fermentration Fridge, Keezer and iSpindel. The important thing is the URL which needs to contain the full path to the node-red instance, in my case; http://192.168.4.100:1880/fermentrack (note that the port number field can be ignored since its not used). Port 1880 is the standard port for node-red.

My node-red flow looks like this and I will assume that you have a working connection towards your home assistant installation and the needed add-on is installed.

image

On the HTTP receive node I select MODE: POST and URL: /fermentrack On the JSON node select "always convert json to object" On the HTTP response add code 200 (OK) otherwise the connection will not be closed.

On the HA ENTITY nodes use the following;

NAME; set the name that will show up in HA SERVER; select your HA server TYPE; Sensor STATE; [msg] payload.brewpi_devices[1].fridge_temp

if you add a debug from the json conversion you can see what attribues are available in your system. other variable that I extract... you can add as many HA entities you want and extract the data you want.

payload.brewpi_devices[0].fridge_temp (first device in my list, my case Keezer) payload.brewpi_devices[1].fridge_temp (second device in my list, my Fridge, fridge probe) payload.brewpi_devices[1].beer_temp (second device in my list, my Fridge, beer temp probe) payload.gravity_sensors[0].gravity (Gravity value from the first sensor) payload.gravity_sensors[0].temp (Temp probe on my ispindle)

mp-se avatar Dec 07 '20 17:12 mp-se

@thorrak I believe you can close this one, there is no need to add any new push targets for fermentrack at this point.

mp-se avatar Dec 07 '20 17:12 mp-se

@thorrak could you reuse the code from tiltbridge to add mqtt support here?
Also, have you considered adding a "by me a coffee/beer link" Buying stickers and magnets doesn't seem enough :-)

uSlackr avatar Apr 30 '22 01:04 uSlackr

@thorrak could you reuse the code from tiltbridge to add mqtt support here? Also, have you considered adding a "by me a coffee/beer link" Buying stickers and magnets doesn't seem enough :-)

If the support is built into the controller itself, then yes. Unfortunately, though, building this into Fermentrack would require being built from scratch. This isn't something I'm likely to build out, unfortunately, so I'm closing this issue for now.

thorrak avatar Jun 18 '23 02:06 thorrak

I'm pretty sure this can be done with a HA webhoook, I plan to look into this and will pass along the how-to when done.

uSlackr avatar Jun 18 '23 02:06 uSlackr