Fangtooth and creating a custom app

I am about to start taking environmental sensor readings from BLE broadcasts and store them to InfluxDB already setup on my TrueNAS.

Basicly I run Ruuvi Gateway (https://ruuvi.com/gateway/) that does MQTT delivery.

Then I would have this tool

to take those readings via MQTT and store them to the InfluxDB.

BUT: I have absolutely no idea of how to turn that latest release to a custom app on TrueNAS (25.04 / Fangtooth).

Any ideas would be appreciated.

basically create a dataset to store the config file andmap it to the container, take the yaml from the github and install via custom app yaml function ( click the three dots next to the big blue custom app button)

Edit:

  1. on your apps pool create a Dataset where you want to store the apps config file.
  2. use ssh or the webshell to navigate to that Dataset and create the config with
sudo touch config.yml

and paste in the contend of the example config file. if you already have on paste in your own.
3. go to the apps page and click on discover apps. Next to the blue Custom App button click on the three dots and click on Install via yaml
4. Give the app a name and paste in the compose file from github. Adjust the storage mapping so the config yml will be properly mounted. You may get an error on the first try because of a permission error ( i don’t know the run as context of the app so no idea wich user needs permissions)

This should be all to get the app running

1 Like

Thanks!

I’ll try to get it running with these instructions :slight_smile:

Edit: looks like it tries to go up, but then stops.

then try to find out what’s happened in the backend by checking the logfile from shell with:

sudo cat /var/log/app_lifecycle.log

hrngh

Error messages are sometimes… bad.

Failed ‘up’ action for ‘ruuvibridge’ app: unable to get image ‘Package ruuvibridge · GitHub’: Error response from daemon: invalid reference format

That doesn’t really help, I think :smiley:

Ok i just tried to deploy it myself and the app installs fine, but as expected i get a permission error because it can’t read the config.yml. Do you know which user that app wants to run as?

Nope. I suppose the default is 568 for apps, but as this is custom… Maybe it requires the root?

Hmmm… after chmod 777 on the config file i no longer get a permission error. But the app starts for a second and then shuts itself down. The apps log just says that there are no datasources selected and to check the config file

I honestly don’t know how to test any further since i don’t know if that starting and then shutting down is expected behaviour or not and i don’t use home assistant or any equipment to test if its actually polling data or not. I’m sorry.

No problem. At least I got it trying to start.

Config file is mapped to the root of the container, which is the right place.

So likely it’s permission problem then.

It’s supposed to stay running and relaying the sensor data to Influx, but.. Oh well.