OpenHAB 2 + Mosquitto (local) + cloud mqtt for persistence possible?

Hi Guys!

I’m running OH2 on a Rpi 3b with mosquitto broker, several Sonoff TH16 with temperature sensors (tasmota firmware), and everything is working really nice and smooth :slight_smile: .

  1. Is it possible to send the temperature values to a second mqqt broker (cloud based) such as IBM bluemix or Cayenne to store the temperature values?
  2. I’ve read somewhere that running persistence services on the Rasperry using SD card for storage corrupts the cards very easily, that’s why I’d rather store things in the cloud. I’m not quite sure if this is true!

Thanks for your time…

  1. There is the MQTT persistence add-on. I think that would work and work fairly simply. If not, you can create another broker config for the external broker and add an MQTT config to your Items that publishes the state to this other broker when the Item gets updated. But be aware that these approaches will be write-only. You will not be able to restoreOnStartup or query this remote store from Rules.

  2. It isn’t just persistence, it is ANY writing including logs. Moving your persistence off of your RPi may buy you some time but it will not completely prevent SD card failure. You are better off establishing a good backup and restore procedure (which you should have anyway) and focus doing home automation stuff. Or set up your SBC to store logs and persistence on a USB SDD or HDD or over the network on a NAS (you still need a good backup and restore) so there are little to no writes on your SD card.