(SOLVED) DSMR and bluetooth

Hi all,

I have a strange issue which keeps me struggling for weeks for now.

I installed OH 1.8.3 which is working fine. Also installed the weather binding (shows the weather forecast for the next week), the ntp service, some remote dimmers and switches, integrated the MAX thermostats, added several temperature and humidity sensors and the DSMR binding. All is working fine. System is RasPi 2 on raspbian version (at the moment) of mid january 2017. Did an apt-get installation.

I allso added SBFspot and integrated it in openhab. Excellent. But only if it works.

After a while (can’t say what the actual reason is) the connection between the SMA solarinverter and the bleutooth dongle is down. The dongle even disappears from the usb ports (lsusb shows all the usb devices like necessary for the DSMR binding or the RFXCom). Unplugging the dongle and inserting in a new port revives it for a period of time, but eventually also there the dongle is unloaded. The timeperiod actually changes between 5 minutes and 1 or 2 days. I use a seperate powered USB hub which only powers the bluetooth dongle. I checked the powersupply: 2 amps and checked if the powersupply really supplies by unhooking it from the RasPi and connecting a device which has some LEDs blinking (answer is a yes, supply works).

Latest experience: I build a rule within openhab to bump the dongle (every minute a ‘hcitool scan’ to make sure it is being accessed; time needed for the scanning is aprox 10 secs). What I notice is that the dongle stays alive for a longer period of time (which is good) but the DSMR values don’t update anymore (or at least very rarely, once every couple hours).

Now I have a feeling that there is a relation towards the DSMR binding, but…

Please help, what can be done to solve this issue or determine what is the root cause.

Best regards,

HWL

Hi,
I suppose you’re on Raspberry Pi…
If this is the case, I recommend trying a different brand of BT dongle. Personally I use HAMA for a couple of years now without issues (uptime of 69 days now)
Regards,
SBF

Hi SBF,

Thx for your response. Yes, I’m on RasPi 2. Already tried 2 brands (at the moment Cambridge Bluetooth).

You are using SBFSpot? What version are you using? Maybe that’s the issue in my config?

Best regards,

HWL

by the way: what type do you use? (than I can try to get that one).

Thanks a lot.

Yes I’m using SBFspot V3.3.1 - I have to, I’m the developer :wink:
This is the BT dongle I have: “Hama 049233 Nano Bluetooth USB Adapter” but I’m afraid they don’t sell it anymore.
Do you have a good connection? Have you tried to move your RPi closer to the inverter?
Also, get rid of the USB hub, at least for testing. Mine is connected directly to the RPi

Hi SBF,

I could have known it, since you use the SBF tag. Many thanks, you did / do a wonderfull job! (when it’s working :wink: ).

The signal strength is ok, I use a USB extension cable and the device is place at approx 2 mtrs from the inverter. Should be near enough. It is being powered by an usb hub with separate power supply.

Strange thing is, the device shows in hciconfig for the time it works, then it disappears (and off course) stops working. Reboot fixes this or the switch to another port (think that also resets the dongle).

Also: I tried to connect it directly to the Pi (without any other devices connected: same issue). I think I have to order a new dongle (read somewhere that there are devices with this same issue but they use a fake chipset: very annoying, it reports as a cambridge chipset with even the right id’s).

Any clue what devices should be working or how to test any further?

Best regards,

HWL

Is there already a SBFspot binding for OH2 (or OH1.x)?

@HWL
It sounds like a hardware problem. is there only one USB chip on en RPi? you can try to switch some port for the DSMR and Bluetooth dongle?

Hi FutureCow,

Thx for your reaction. I am afraid it is more a compatibility issue (read somewhere that there are a lot of fake chipsets which can cause this issue). I don’t know how the RPi’s hardware is looking in detail, but I tried almost all combinations of ports (even if I connect the bluetooth as only device to the Pi the problem keeps the same) since I thought it could be a bus problem.

I think i will order a new dongle this evening. Unfortunately the Hama that SBF mentions isn’t available anymore.

Best regards,

HWL

Maybe this one?

Is your OS up-to-date?
apt-get update/upgrade?

OS is up to date: did a clean install with the raspbian version of 11-1-2017 (latest version to download). Afterwards an apt-get update and upgrade after every install (openhab, sbf, bluetooth).

I saw the dongle, thanks for your tip. I am going to swap the boards probably tomorrow (have 1 Pi that I use as a security cam and wanted that one to update anyway): maybe it’s an hardware problem of the board. If that doesn’t fix it, … new dongle.

In the meantime: I placed the Pi next to the SMA (distance is now 10 cm), hope that works. Keep you posted.

Just for the record:

  • I updated the installation (apt-get update/upgrade / distr / …): eventually 0 to be upgraded, 0 to …
  • still the same issue
  • swapped the Pi (have another one): still the same issue
  • swapped the SD card: same issue
  • removed everything except the bluetooth dongle: same issue
  • bought the new one (thx to SBF): same issue
  • … didn’t know what to do next
  • changed power supply: now going steady and strong for 3 days without errors… seems to be an issue with the power supply. I bought it as a set together with the Pi (2.1A @ 5V), so don’t understand why (since the only problem is with the bluetooth dongle). But anyway: I am glad it has been solved.

Thx for helping / giving suggestions.

Best regards, HWL.