Closed karmacop closed 1 year ago
I had a bit of a look and I added a locale line to the config and that fixed it but now it is sending a bunch of nulls to mqtt. Possibly this is an ethernet issue as it looks like it's not picking up some settings that the bluetooth version must be. See the below log:
[14:56:17] INFO: Setting Up PAC1
Skipping PAC2
Skipping PAC3
[14:56:17] INFO: Setting Up UAC1
Skipping UAC2
Skipping UAC3
[14:56:17] INFO: Setting Up IAC1
Skipping IAC2
Skipping IAC3
[14:56:17] INFO: Setting Up OperTm
[14:56:17] INFO: Setting Up FeedTm
[14:56:17] INFO: Setting Up PDCTot
[14:56:17] INFO: Setting Up PDC1
[14:56:17] INFO: Setting Up PDC2
Skipping PDC
[14:56:17] INFO: Setting Up UDC1
[14:56:17] INFO: Setting Up UDC2
Skipping UDC
[14:56:17] INFO: Setting Up IDC1
[14:56:17] INFO: Setting Up IDC2
Skipping IDC
[14:56:17] INFO: Setting Up GridFreq
[14:56:17] INFO: Setting Up BTSignal
Skipping BatTmpVal
Skipping BatVol
Skipping BatAmp
Skipping BatChaStt
[14:56:18] INFO: Setting Up InvWakeupTm
[14:56:18] INFO: Setting Up InvSleepTm
Skipping MeteringWOut
Skipping MeteringWIn
Skipping MeteringWTot
[14:56:23] INFO:
[14:56:23] INFO:
[14:56:23] INFO: || Generating Ethernet Configs ||
[14:56:23] INFO: || /usr/bin/sbfspot/SBFspot.cfg ||
[14:56:23] INFO: || /usr/bin/sbfspot/SBFspotUpload.cfg ||
[14:56:23] INFO:
[14:56:23] INFO:
[14:56:23] INFO: [Starting SBFspotUpload]
[14:56:23] INFO: [Starting cron in foreground]
SBFspot V3.9.6
Yet another tool to read power production of SMA solar inverters
(c) 2012-2022, SBF (https://github.com/SBFspot/SBFspot)
Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -ad0 -am0 -mqtt -finq
Reading config '/usr/bin/sbfspot/SBFspot.cfg'
Sun Oct 9 14:56:53 2022: INFO: Starting...
sunrise: 06:29
sunset : 19:07
Connecting to Local Network...
Initialising...
SUSyID: 125 - SessionID: 901316616
Device IP address: 192.168.1.101 from config
Inverter replied: 192.168.1.101 -> 181:xxxxxxxx
Logon OK
SUSyID: 181 - SN: xxxxxxxx
Device Name: STP 5000TL-20 745
Device Class: Solar Inverters
Device Type: STP 5000TL-20
Software Version: 02.55.03.R
Packet status: 21
SUSyID: 181 - SN: xxxxxxxx
Device Status: Ok
SUSyID: 181 - SN: xxxxxxxx
Device Temperature: 64.1°C
SUSyID: 181 - SN: xxxxxxxx
GridRelay Status: Closed
SUSyID: 181 - SN: xxxxxxxx
Energy Production:
EToday: 14.670kWh
ETotal: 60876.550kWh
Operation Time: 35078.00h
Feed-In Time : 34288.92h
SUSyID: 181 - SN: xxxxxxxx
DC Spot Data:
MPPT 1 Pdc: 2.389kW - Udc: 393.38V - Idc: 6.076A
MPPT 2 Pdc: 1.230kW - Udc: 173.70V - Idc: 7.089A
Calculated Total Pdc: 3.619kW
AC Spot Data:
Phase 1 Pac : 1.199kW - Uac: 242.48V - Iac: 4.945A
Phase 2 Pac : 1.186kW - Uac: 240.28V - Iac: 4.937A
Phase 3 Pac : 1.190kW - Uac: 241.50V - Iac: 4.929A
Total Pac : 3.575kW - Calculated Pac: 3.575kW
Efficiency : 98.78%
SUSyID: 181 - SN: xxxxxxxx
Grid Freq. : 49.96Hz
SUSyID: 181 - SN: xxxxxxxx
Current Inverter Time: 2022-10-09T14:56:56+1100
Inverter Wake-Up Time: 2022-10-09T06:47:24+1100
Inverter Sleep Time : 2022-10-09T14:57:00+1100
[2022-10-09 14:56:57.892] Error: Can't open MySQL db [SBFspot] : Unknown MySQL server host 'core-mariadb' (-2)
MQTT: Publishing (homeassistant/sbfspot_stp_5000TL_20/sbfspot_xxxxxxxx) null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null
Client null sending CONNECT
Client null received CONNACK (0)
Client null sending PUBLISH (d0, q0, r0, m1, 'homeassistant/sbfspot_stp_5000TL_20/sbfspot_xxxxxxxx', ... (166 bytes))
Client null sending DISCONNECT
Reading events: 2022-Oct-01
Sun Oct 9 14:56:57 2022: INFO: Done.
INFO: SBFspotUploadDaemon Version 3.0.2
docker exec -it addon_a51a23d8_haos-sbfspot /bin/bash
is the command to get into the container via a console.
This won't work in the official terminal addon however as the docker command is not available in that addon.
It should work in the community SSH and Terminal addon or a putty console.
Portainer is a much easier way to connect to the addon, if you feel the need in the future.
The above should hopefully clear up why you didn't find what you expected when using SSH
Using the SSH login in home assistant I can go to /usr/bin/ but there is no sbfspot directory.
To clarify you are actually intending to use an ethernet and not a Bluetooth connection?
You may be the first to try it with ethernet I believe.. So my side of it may be abit buggy.. the SBFspot side should work fine. That's my disclaimer out of the way..
In the options, for automatic sensors.
MQTT_Topic: homeassistant/sbfspot_stp_5000TL_20/sbfspot__xxxxxxxx_
Should be.
MQTT_Topic: homeassistant/sbfspot_{plantname}/sbfspot_{serial}
It will take Plantname from the options Plantname: stp_5000TL_20
and get the serial from the inverter.
They are actual variables that the addon will fill in.
This may be a buggy typo on my part. The Bluetooth and Ethernet configs are duplicates, but they are separate scripts.
Invalid value for 'Locale' de-DE|en-US|fr-FR|nl-NL|it-IT|es-ES
It looks like I omitted a default in the file
CONFIG_LOCALE="$(bashio::config 'Locale')"
CONFIG_LOCALE="$(bashio::config 'Locale' 'en-US')"
2022.10.1 should have that fixed.
Hmm the nulls are abit stranger though.
Any chance you could post the setConfig.cfg and SBFspot.cfg that get generated(without sensitive info). You can just copy paste the contents, I don't need the actual file. As your first post was using the setConfig.cfg and looked like it was picking up the mqtt data.
To explain.. setConfig.cfg is the config file SBFspot uses to grab the serial number from the inverter. That is created initially and just grabs those couple of sensors. genSenEth sets up that file.
SBFspot.cfg is made by genEthernetConfig.sh so more areas for typos..
Found it. MQTT_ItemFormat is also coming across as null. I put: MQTT_ItemFormat: "\"{key}\": {value}" into my config and it's working now.
So once you get that typo fixed I'd say you have ethernet working :) Thanks.
Nice, Thanks for that. Should be updated now.
Do you intend to use addon longterm or were you just trying it out?
Long term. I've just set up Home assistant for my parents and this is the only way they can get data from the inverter. Too far away to use bluetooth, modbus doesn't work on this inverter, and there is no webserver on the inverter. I'm happy to help where possible.
Well good to know this is a solution for them. Happy to know the ethernet version is actually working, I set it up awhile ago.. but never had a way to test it.
Describe the bug It doesn't appear as if a config is being created. Receiving the following lines in the log:
Using the SSH login in home assistant I can go to /usr/bin/ but there is no sbfspot directory.
To Reproduce Installed addon. Used the following config:
get the following log:
Expected behavior mqtt should be receiving data from SBFspot
HASS
Additional context I can see the fields were created in mqtt, and when I originally install the addon I get data that looks like it's communicating over ethernet which is great, but it ends up with the same config error and I never see the ethernet connection again. Log below: