thorrak / fermentrack

A replacement web interface for BrewPi
MIT License
134 stars 61 forks source link

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

Closed blazem closed 1 year ago

lauofdoom commented 4 years ago

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.

blazem commented 4 years ago

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?

markcollar commented 3 years ago

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

uSlackr commented 3 years ago

I’m just getting into HA myself and would like to see this integration. Maybe we can dig up the docs for this.

\\ Greg


From: markcollar notifications@github.com Sent: Thursday, November 26, 2020 12:31:44 PM To: thorrak/fermentrack fermentrack@noreply.github.com Cc: Subscribed subscribed@noreply.github.com 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'd like to see it also, if you don't mind.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthorrak%2Ffermentrack%2Fissues%2F460%23issuecomment-734417893&data=04%7C01%7C%7C6fb0d1c0c73f4c8b4e8108d89231268e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637420087075536067%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8JDp6dKUSHfjW7uBq02gOT2P1TU9Yx4JPsymGUkpYBM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGEO6Z6254FCO6LBZTDOM5TSR2GIBANCNFSM4MQBT4SQ&data=04%7C01%7C%7C6fb0d1c0c73f4c8b4e8108d89231268e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637420087075546060%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hEA3GPO%2Fp%2F70H9wI2gUtDg6gJvNAQupyNOD8SfGWDF0%3D&reserved=0.

mp-se commented 3 years ago

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 commented 3 years ago

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

lauofdoom commented 3 years ago

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

lbussy commented 3 years ago

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? :)

uSlackr commented 3 years ago

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 notifications@github.com Sent: Friday, November 27, 2020 4:00:09 PM To: thorrak/fermentrack fermentrack@noreply.github.com Cc: uSlackr gmartin@gmartin.org; Comment comment@noreply.github.com 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.

mp-se commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

uSlackr commented 2 years ago

@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 :-)

thorrak commented 1 year ago

@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.

uSlackr commented 1 year ago

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.