Balenasense and Homeassitant on same device

Hi everyone. I’m trying to get Balenasense and Homeassistant on one Pi3 to control a greenhouse.

I have both containers working on the same device but cannot get Homeassistant to read the MQTT data. I can get the sensors visible on Homeassistant (i.e. they show up) but no data is published from Telegraf (or so it seems)

I have added the variable TELEGRAF_MQTT_URL_PORT in lots of different configurations, publishing to internal, publishing to localhost or the device IP but no dice. I’m still stuck with the sensors as “unavailable”. Have also tried as an device variable and a specific variable as well but no change.

Any ideas?

Thank you

Hello, it sounds like you already added the sensors to Home Assistant’s configuration.yaml file, but did you enable mqtt and provide the broker address as well?

mqtt:  
  broker: mqtt

You need to make sure balenaSense is publishing to the same broker that Home Assistant is listening to. If using the mqtt entry above in configuration.yaml, then the device variable TELEGRAF_MQTT_URL_PORT should be :1883, where the is the local IP of your device. For instance, 192.168.1.147:1883. This assumes that you are using the internal mqtt broker.

If you’ve already tried this setting unsuccessfully, please post your docker-compose file so we can take a closer look.

Hello @green-agate! Just wanted to ping to see if Alan’s answer resolved the issue? If not, please as he indicated post your docker-compose.yml.

Hi. I gave up in the end and just wrote a python script. Didn’t use the Balena product I’m afraid.