[How-to] SMA-BT bluetooth users

SBFspot protocol http://sbfspot.codeplex.com/
Post Reply
Posts: 2049
Joined: Thu Aug 29, 2013 7:16 am

[How-to] SMA-BT bluetooth users

Post by jeanmarc » Sat Aug 31, 2013 6:39 am


Here's a quick guide writted by Alain to set-up your SMA-BT devices :
123Solar for SMA bluetooth inverters is getting its data from the SMAspot program

Quick Installation Instructions

A. SMAspot installation prerequisites - Linux packages
- bluez / bluez-utils / bluez-libs / curl
- gcc / make
( pacman -Sy <package_name> under Arch Linux )

B. Build SMAspot (see also SMAspot Wiki pages : Linux_HowTo)
- Download SMAspot 2.06a from Google Code site
- Uncompress to the directory of your choice
- make release, will compile and link SMAspot. The executable is created in the ./bin/Release directory
- Copy SMAspot.cfg configuration file to ./bin/Release and edit settings (inverter bluetooth address, etc)
- Preliminary standalone tests
SMAspot -q -123s (Writes 123Solar expected data frame to console (stdout))
SMAspot -q -123s=DATA ( same )
SMAspot -q -123s=SYNC (Invokes SMAspot inverter synchronization function)
SMAspot -q -123s=INFO (Writes 123Solar free format inverter information text to console)
SMAspot -q -123s=STATE (Writes 123Solar free format inverter state check text to console)

C. Create SMASpot shortcut

eg: ln -s /home/user/SMAProjects/SMAspot/bin/Release/SMAspot /usr/bin/SMAspot

D. SMA bluetooth inverter configuration

D.1 - Create SMAspot configuration file

Copy SMAspot.cfg to /srv/http/(123Solar_subdir/)config directory

Rename SMAspot.cfg to SMASpot_'id'.cfg
'id' is the SMA inverter id you will assign in D.2

Edit settings (inverter bluetooth address, etc)

D.2 - Add inverter in 123Solar administration page (123solar admin)

Select 123Solar inverter number 'n'
( 123Solar will store inverter data in : /srv/http/(123Solar_subdir/)data/invt'n' )

Select SMA-BT protocol

Assign a SMA inverter id of your choice [0-9] via the 123s admin interface
( 123Solar will run SMAspot with the /srv/http/(123Solar_subdir/)config/SMASpot_'id'.cfg configuration file )

Optional - Specify user communication options
( these are additional command switches which will be passed to SMAspot,
be careful not entering -q -finq -d# -v# or -123s here, as these switches are managed by 123Solar )

E. Ready, start 123Solar

SMAspot DATA can be checked on 'Detail' page
SMAspot INFO on 'Infos page' -- No panic, will only appear after 1 hour
SMAspot STATE on 'Inverter page' + click on Dashboard
SMAspot SYNC has no return (123Solar 'Infos page' will just log the time the command was issued)

_. Additional bluetooth stuff

pacman -Sy bluez Installs bluetooth drivers package
pacman -Sy bluez-utils Installs bluetooth utilities (hcitool etc)
pacman -Sy bluez-libs Installs bluetooth developer libraries

systemctl enable bluetooth.service Automatic start of bluetooth service at boot
systemctl start bluetooth.service Manual start of bluetooth service
systemctl stop bluetooth.service Manual stop of bluetooth service
systemctl restart bluetooth.service Manual restart of bluetooth service
systemctl status bluetooth.service Display status of bluetooth service

lsusb | grep -i bluetooth Checks if bluetooth USB dongle is listed among USB devices

hciconfig hci0 up Initializes HCI device
hcitool dev Show host HCI devices (hci0 should be present)
hcitool scan Search for inverters (will also list SMA WebBox, Sunny Beam, etc)
Use this command to identify inverter bluetooth address (SMAspot.cfg)

If HCI device (hci0) does not automatically come up at boot time :
- Create new file /etc/udev/rules.d/10-local.rules
- File contents :
# Initializes HCI device
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"

Posts: 8
Joined: Tue Jan 06, 2015 10:26 am

Re: [How-to] SMA-BT bluetooth users

Post by delfi5 » Tue Jan 06, 2015 10:29 am

from google code - Download SMAspot 2.06a from Google Code site; is no longer available for download. Someone has available to share? :roll:

Posts: 2049
Joined: Thu Aug 29, 2013 7:16 am

Re: [How-to] SMA-BT bluetooth users

Post by jeanmarc » Tue Jan 06, 2015 11:03 am

It has been renamed SBFspot

Posts: 8
Joined: Tue Jan 06, 2015 10:26 am

Re: [How-to] SMA-BT bluetooth users

Post by delfi5 » Tue Jan 06, 2015 11:15 am

Ok yes, that is correct.
Indeed in the site is no longer the 206a version .tar file for download.

Posts: 14
Joined: Fri Mar 21, 2014 6:45 pm

Re: [How-to] SMA-BT bluetooth users

Post by febpro » Tue Mar 17, 2015 9:47 pm

In this time i work with 123solar wit SMaspot 2.0.6a and Inverter SMA SB4000TL-21
OK from may 2014 year

I would like to upgrade 123solar
I use new SD card and I installed everything from empy SD

Unfortunately I can not find a copy SMAspot 2.0.6a in my hard drive and on-line onli SBFspot
I have tried to install SBFspot, but 123solar not work

123solar works with SBFspot?

you can have an installation guide?

i have install SBFspot; it is OK to console (putty)

thank you for help

Fabio form Italy

My guide

Install boost

Code: Select all

..# sudo apt-get install libboost-all-dev
Install SQLite:

Code: Select all

..# sudo apt-get install sqlite3 
..# sudo apt-get install libsqlite3-dev
Make directories:

Code: Select all

..# mkdir /home/pi/sbfspot.3 
..# mkdir /home/pi/smadata 
..# mkdir /home/pi/smadata/logs
Download file SBFspot_SRC_303_Linux_Win32.tar.gz into sbfspot.3


Code: Select all

tar -xvf SBFspot_SRC_303_Linux_Win32.tar.gz
remove file

Code: Select all

rm -v SBFspot_SRC_303_Linux_Win32.tar.gz
Compiled e install SBFspot with support SQLite in /usr/local/bin/sbfspot.3:

Code: Select all

cd /home/pi/sbfspot.3/SBFspot 
sudo make install_sqlite
Copy empty database SBFspot_Empty.db from /home/pi/sbfspot.3/SBFspot to /home/pi/smadata

Code: Select all

cd /home/pi/sbfspot.3/SBFspot
cp SBFspot_Empty.db /home/pi/smadata
setting config file

Code: Select all

sudo nano /usr/local/bin/sbfspot.3/SBFspot.cfg

Code: Select all

cd /usr/local/bin/sbfspot.3
./SBFspot -q -123s -finq 

System--> OK

Copy SBFspot.cfg and rename SBFspot.cfg in SBFspot_1.cfg

Code: Select all

cd /usr/local/bin/sbfspot.3
cp SBFspot.cfg /var/www/123solar/config
cd /var/www/123solar/config
mv SBFspot.cfg SBFspot_1.cfg
and ...

on 123solar not find on choice SBFspot

Posts: 5
Joined: Tue Mar 17, 2015 10:40 am

Re: [How-to] SMA-BT bluetooth users

Post by pac » Wed Mar 18, 2015 12:49 pm

SBFspot works correctly with 123solar.
You can see my fresh installation on a Raspberry Pi2 at http://caluso.ns0.it/123solar

I don't have a guide but I followed (more or less) the Walter62 one (http://walter62.altervista.org/joomla/r ... datalogger in Italian)


Posts: 2049
Joined: Thu Aug 29, 2013 7:16 am

Re: [How-to] SMA-BT bluetooth users

Post by jeanmarc » Wed Mar 18, 2015 2:56 pm

I am currently reworking that part among other things, please be patient..

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests