Code: Select all
curl -s https://raw.githubusercontent.com/sbfspot/sbfspot-config/master/sbfspot-config | sudo bash
Anyone the golden tip?
Moderator: leecollings
Code: Select all
curl -s https://raw.githubusercontent.com/sbfspot/sbfspot-config/master/sbfspot-config | sudo bash
Yes, I did, maybe should try to set-up an older version of SBFspot, but am reluctant to stick with an old version unable to update.waltervl wrote: ↑Tuesday 09 August 2022 16:16 Did you check this wiki page for instructions and file locations: https://www.domoticz.com/wiki/SMASpot_M ... n_Domoticz
I do not know if it is up to date. Latest modified in april 2020 so if something changed in SFBSpot during that time it could influence Domoticz integration.
Add SBFspot to Domoticz
In Domoticz hardware section, add "SBFSpot (SMA)", for location, enter the SBFspot.cfg path (e.g. /home/pi/SBFspot/SBFspot/bin/Release_SQLite/SBFspot.cfg)
Note that since the 19th November 2015 build it is possible to use SBFSpot files that record logs for multiple inverters by suffixing the configuration line with a colon, followed by the inverter serial number. For example:
/home/pi/SBFspot/SBFspot/bin/Release_SQLite/SBFspot.cfg:1234567890
Data retrieval method
Internally, domoticz relies on SBFspot to generate logfiles in the spot format. It is therefore important that SBFspot is kept running in the background (e.g. as cronjob). See SBFspot.cpp for details.
Search for 'OutputPath', 'Plantname', 'DateFormat', and 'TimeFormat' in the config file
Build output path filename from given config strings (sprintf(szLogFile, "%s%s-Spot-%s.csv", strftime_t(m_SBFDataPath.c_str(), atime), m_SBFPlantName.c_str(), szDateStr);)
Read the output file SMA_POLL_INTERVAL per minute (default once per minute), but only if the seconds in current time are >20 (probably to give SBFspot time to query)
Check if the last line is newer than the one we have, if so, store and update power data
Code: Select all
//Lets create the sensor, and try again
SendMeter(0, 1, 0, 0, "SolarMain");
result = m_sql.safe_query("SELECT ID FROM DeviceStatus WHERE (HardwareID==%d) AND (DeviceID=='%q') AND (Type==%d) AND (Subtype==%d)",
m_HwdID, "00000001", int(pTypeGeneral), int(sTypeKwh));
if (result.empty())
{
Log(LOG_ERROR, "SBFSpot Import Old Month Data: FAILED - Cannot find sensor in database");
return;
}
Users browsing this forum: No registered users and 1 guest