sbfspot is quite simple, you either choose storage of data in csv or database and then it’s up to you what you’ll do with all the date you have.
I personally did some changes into the sbfspot code so besides all the data are stored in mysql running on my nas server for later use, it’s as well storing choosen data into the memory of RPi which reads them by BT and then I have MQTT script which is monitoring those memory data and propagate them to the mqtt by usual way in homie 4 convention.
it’s very efficient system and not that hard to setup
I know, I have been reading some of them. But they´re all filled with anything else making it very confusing.
However, I just ordered a few Sonoff devices. So I guess I just have to make it happen some way or another.
I would need one for sure, when the devices arrive, (hopefully in a few days).
I have ordered the Sonoff 433mhz bridge. I hope to get my doorbell (433mhz pushbutton) to work with openhab through the Sonoff 433mhz bridge.
And then I have ordered a Sonoff POWR2, just for fun I guess
I´m not really sure what info you need on the network infrastructure.
I run an Ubiquity UniFi network with a USG gateway, three Access Points (two light and one proff).
Then I have 2 UniFi switches, one with POE, beside af few other brand switches with/without POE.
The controller runs on a UniFi CloudKey.
actually not, what I need to know basically is where and how you are running OH (rpi? nas? server?) and if you have some kind of nas or something 24/7 which holds your data and can have database and if something is in range of your SMA with BT eg. RPi 3+ (i do not recommend RPi 3 build in BT as it suxx (or use BT dongle))
at the end of the day, it can be RPi running OH itself to suit as data/bridge for your SMA even as mqtt server if you like
Ahh, damn… I did write all that part as well, but dumped it cause you said you needed to know the network infrastructure… Now I see, how come I didn´t quite understand that request
Anyway…
I have three Rpi3B´s and a Odroid C2. Then i have an old Windows 2008 server and a VERY old QNAP NAS (TS-110).
One Rpi3 runing my main opehab setup. Another Rpi running an utility to IHC (IHC Captain), and the third Rpi runs a linux for browsing habpanel (my monitoring floorplan) only.
The Odriod C2 is running openhab as well. It´s a new setup (2.5M1) to test some Velbus devices I playing with.
My windows server is actually a WHS2011, but I only use it for mail server, (Hmailserver) and then I have Grafafa running for rendering charts for my main openhab server. My QNAP NAS is hardly ever used. It´s mainly file storage.
Regarding the BT… I´m not sure I have an BT dongle. I kinda hoped I could use the Rpi for this. It´s place right next to the SMA inverter anyway, (aprox 50cm). I can buy a BT dongle if it´s needed.
maybe you will have some luck, but all rpi3 I’ve tried had frozing bluetooth after like 6-10 requests. rpi3+ does not have those issues at all.
you can definitely try to run sbfspot with built-in bt and if it will work for whole day, you’ll have quite big chance it will run reliably since then, if not … well disable onboard BT and go dongle
are you running somewhere some sql database for something? as sbfspot is way easier to use that way.
if not, it’s not end of the world.
My Rpi´s are all 3B models, one is actually 3B+ (the one running my main openhab server).
Hmailserver (my mail server) uses Microsoft SQL server compact 3.5 ENU. But I have no idea how to add databases to it. It was all done by Hmailserver installer.
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
51
I can organise you a Bluetooth dongle for the C2 if you want one?
Thanks Start. But I think I´ll try go with the LAN connection which is already there, (not sure if it will conflict with the inverter having connection to the SMA Smart Energy Meter at the same time). If it does, a BT dongle might come in hand.
Hi all,
Sounds interesting, but I lost how to being able to gather information from SMA SunnyBoy with Speedwire WebConnect? Do I have to run the Python Script, or simply Mqtt, which is running on my OpenHab to connect to Worx Landroid anyway. I believr/understood I have to do some configuration with Mqtt? But fail to get it working/configured properly.
My OpenHab is running on a Windows Machine
Regards,
Joerg
Typical problems include register numbering versus addressing. Historically, modbus register number 1 is found at address 0. It is often unclear which variation any given document talks about.
openHAB modbus binding always talks addresses; so sometimes if register NN looks funny it is worth checking register NN-1.
Then modbus has “table” addressing - traditionally, different types of modbus register are distinguished by the numbering i.e. “discrete” are 10001 to 19999, “input” are 30001 to 39999.
The table numbers are not used in the protocol layer - “input 30775” would be configured in the binding as “Input type, 774”. Probably?!
Table number use limits the address range, so “extended addressing” is also used. That just means that 30775 means 30775 (or maybe 30774) and that’s what you’d put in the binding config.
32-bit (or 64-bit etc.) values can highlight another issue. Modbus protocol only knows 16-bit registers, to make a 32-bit value we must use two registers. Usually NN and NN+1 - but which is the “high” part and which the “low”? There is no rule and not even a convention, is it A+B or B+A?
The binding provides two versions of datatypes i.e. int32 and int32swap. It’s up to you to find out which your device uses.
For 32-bit words, they can be signed or unsigned integers. Furthermore, they can be float numbers - at least there is a convention for that using IEEE encoding. But the word-swap dilemma still applies.
So its a bit of a nightmare. “Address 30775” might be 30774 or 775 or 774, the format might be int32 or or uint32 or float32 or int32swap or uint32swap or float32swap.
The manufacturer docs may give more help, sometimes you have to trial and error.
I recognize the formatting/parsing challenges, but have been able to setup a connection to my SMA Sunny Boy over the WiFi via the standard Modbus binding.
I do still have some parsing challenges, where my current config has a Modbus poller for each data field eg. I have 1 poller setup on address 30775, with length 2, type ‘input register’ to pull current power in kWh. Setup of the data field uses the same address 30775, with type 32 bit unsigned integer.
This works, but I get parsing errors if I extend the poller to a length >2 and try to read multiple data fields. Not ideal, but workable.
The bigger issue I have is that the modbus data turns into garbage at night, when the panels are not generating any energy. When I connect to the SMA webpage I do see normal values. Any idea what is causing this and how to solve?
hi rossko57, thanks for your quick response. I did not see this in the FAQ and CPU shutdown in case of low voltage explains the behavior as indeed I see NaN values on a few registers.
I managed to use a quick & dirty javascript transformation to “fix” this:
I did some further tests on my earlier issue to read multiple registers at the same time and this does seem to work correctly now. I think that I got confused as I was trying to read multiple Daily Yield registers before (30535-30539) but these always return NaN even though according to the Modbus docs for my SB3.6-1AV-40 they should work (Total Yield at 30529-30533 works fine).