nakla/sbfspot

No connect to inverter

TheBoneZone opened this issue · 4 comments

Hi,
first thank you for your effort to build a SBFSpot container. Since now i run it as a 'Standalone' installation on a seperate RPI.

After some struggle with init the Database i got to the following point:

Yet another tool to read power production of SMA solar inverters
(c) 2012-2020, SBF (https://github.com/SBFspot/SBFspot)
Compiled for Linux (LE) 32 bit with MySQL support
Commandline Args: -d0 -v2 -cfg/etc/sbfspot/SBFspot.cfg
Reading config '/etc/sbfspot/SBFspot.cfg'
Thu Oct 29 16:28:43 2020: INFO: Starting...
sunrise: 07:06
sunset : 17:04
Connecting to 00:80:25:25:E2:4C (1/10)
Connecting to 00:80:25:25:E2:4C (2/10)
Connecting to 00:80:25:25:E2:4C (3/10)
Connecting to 00:80:25:25:E2:4C (4/10)
Connecting to 00:80:25:25:E2:4C (5/10)
Connecting to 00:80:25:25:E2:4C (6/10)
Connecting to 00:80:25:25:E2:4C (7/10)
Connecting to 00:80:25:25:E2:4C (8/10)
Connecting to 00:80:25:25:E2:4C (9/10)
Connecting to 00:80:25:25:E2:4C (10/10)
Thu Oct 29 16:28:52 2020: CRITICAL: bthConnect() returned -1
Thu Oct 29 16:28:52 CET 2020

Sleeping 600 seconds.

The adress is correct. I copied the SBFspot.cfg from the running RPI via scp.

I found a similar issue on the host project: https://github.com/SBFspot/SBFspot/issues/277 but a restart dosen't helped me.

I tried to run a console command to see if the RPI gets a positive BT scan result, but failed:

$ docker exec -it sbfspot_sbfspot_1 "hcitool scan"
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"hcitool scan\": executable file not found in $PATH": unknown

Any other hints are really appreciated.

For completeness, used docker compose file: (sbfspot container runs at network_host: mode)

version: '3'

services:
    db:
        image: jsurf/rpi-mariadb:latest
        restart: always
        environment:
           MYSQL_ROOT_PASSWORD: repleaced
        volumes:
           - /home/pirate/sbfspot/db_data:/var/lib/mysql

    adminer:
        image: adminer:latest
        restart: always
        ports:
           - 5000:8080

    sbfspot:
        image: nakla/sbfspot:latest
        network_mode: host
        depends_on:
            - db
        volumes:
            - /home/pirate/sbfspot/config:/etc/sbfspot
            - /home/pirate/sbfspot/data:/var/sbfspot
        environment:
            TZ: Europe/Berlin
            ENABLE_SBFSPOT: 1
            SBFSPOT_INTERVAL: 600
            ENABLE_SBFSPOT_UPLOAD: 1
            DB_STORAGE: mariadb
            CSV_STORAGE: 1
            MQTT_ENABLE: 0
            QUIET: 0
            SBFSPOT_ARGS: -d0 -v2
        restart: always

Update: I fear it has something to do with my Base System (Hypriot on Strech), because i installed:

sudo apt-get --no-install-recommends install bluetooth libbluetooth-dev

and get a negative result on

$ hcitool scan
Device is not available: No such device

I think i had to update to Hypriot Version 1.12.3 ... ?

nakla commented

Hi, your bluetooth adapter has to be setup in your base system. I don't know, if you have to upgrade or if you can configure the adapter in your current system.

Just for completness. After setting up a new RPI 4, it works.

nakla commented

Thanks for your feedback.