Getting sma-bluetooth working with SMA SM5000TL-21

Getting sma-bluetooth to connect to my inverter, and upload to pvoutput proved to not be an exactly trivial exercise. In brief overview the below are the steps I took to get it working. It does however, now work well for auto uploading of data.

So after much fun and games, I finally managed to get monitoring and upload to pvoutput working with sma-bluetooth.

Step 1 – Grab the code

hg clone https://sma-bluetooth.googlecode.com/hg/ sma-bluetooth

Once the code was grabbed, I changed into the directory and ran make.

./smatool -INSTALL -U dbuser -P dbpass

There was a table missing, so I manually created it as per

CREATE TABLE `LiveData` (`id` BIGINT NOT NULL AUTO_INCREMENT ,`DateTime` datetime NOT NULL, `Inverter` varchar(10) NOT NULL, `Serial` varchar(40) NOT NULL, `Description` char(20) NOT NULL , `Value` INT NOT NULL , `Units` char(20) NOT NULL , `CHANGETIME` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY (`DateTime`,`Inverter`,`Serial`,`Description`), PRIMARY KEY ( `id` ) ) ENGINE = MYISAM;

Now the biggest gotcha for me was the below code block:

To make things happy and working, I added the following block to “invcode.in” and used this new  model in my smatool.conf file.

Inverter 5000TL21
Code1 0xde
Code2 0x15
Code3 0x2e
Code4 0x38
InvCode 0x8a

 

Update: For reference, I’ve switched to using SBFspot the bluetooth dongle is shockingly unreliable (eBay jobbie) will have to find something a little better, will update as info becomes available.

Leave a Reply

You must be logged in to post a comment.