Hi
I am not Docker or linux expert, just learning as I go.
I am running HAOS on NUC and want to get my solar inverter readings via bluetooth.
I found a docker container that is using SBFspot code and it has a good guide, but I am stuck with using HA to create a local add on.
This is the docker that I am using:
I have used the Dockerfile from the project and config.json that I hacked off another addon to build it, but now I am stuck in trying to get it to launch. I need to pass some parameters to the Docker to start it like this, including the “–network host” part so that it reads my USB bluetooth dongle:
docker run --network host -e "CSV_STORAGE=1" -e "ENABLE_SBFSPOT=1" -e "TZ=Europe/Berlin"
-v /path/to/your/config/dir/on/host:/etc/sbfspot -v /path/to/your/data/dir/on/host:/var/sbfspot nakla/sbfspot:latest
but I dont know where to put this launch commands… My guess is in the config.json file, as I understand is like a docker-compose type file, but different. In the project they use this in their docker-composer as an example, but how do I make it work with config.json?:
version: '3'
services:
sbfspot:
image: nakla/sbfspot:latest
network_mode: host
volumes:
- ./etc:/etc/sbfspot
- ./data:/var/sbfspot
environment:
TZ: Europe/Berlin
ENABLE_SBFSPOT: 1
SBFSPOT_INTERVAL: 600
ENABLE_SBFSPOT_UPLOAD: 0
DB_STORAGE: sqlite
CSV_STORAGE: 1
MQTT_ENABLE: 1
QUIET: 0
SBFSPOT_ARGS: -d0 -v2
INIT_DB: 0
restart: always
This is my current config.json file - as I said, I am reusing something I had for another addon
{
"name": "SBFSpot",
"version": "1",
"slug": "sbfspot",
"description": "SMA inverter connector",
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
"startup": "application",
"boot": "auto",
"ports": {
"1000/tcp": 1000
},
"options": {
"url": "http://10.0.1.1:8123"
},
"schema": {
"url": "url"
}
}