Not all parameters in MQTT BT device visible

I’m pretty much done with the ruuvi extension, but I’m struggling to get all parameters out. Somehow, my BT MQTT devices only display all parameters until “ruuvi-accy”. I’ve tried hard, but I can’t find the limit in the current code. :confused:
@1technophile could you give me a hand?

void ruuviDiscovery(char* mac) {
#    define ruuviparametersCount 13
  Log.trace(F("ruuviDiscovery" CR));
  char* ruuvisensor[ruuviparametersCount][8] = {
      {"sensor", "ruuvi-ver", mac, "version", jsonVer, "", "", ""},
      {"sensor", "ruuvi-batt", mac, "battery", jsonBatt, "", "", "%"},
      {"sensor", "ruuvi-tem", mac, "temperature", jsonTempc, "", "", "C"}, // remove for 0.9.6 release
      {"sensor", "ruuvi-tempc", mac, "temperature", jsonTempc, "", "", "C"},
      {"sensor", "ruuvi-tempf", mac, "temperature", jsonTempf, "", "", "F"},
      {"sensor", "ruuvi-hum", mac, "humidity", jsonHum, "", "", "%"},
      {"sensor", "ruuvi-pres", mac, "pressure", jsonPres, "", "", "hPa"},
      {"sensor", "ruuvi-accx", mac, "acc_x", jsonAccx, "", "", "mG"},
      {"sensor", "ruuvi-accy", mac, "acc_y", jsonAccy, "", "", "mG"},
      {"sensor", "ruuvi-accz", mac, "acc_z", jsonAccz, "", "", "mG"},
      {"sensor", "ruuvi-txpwr", mac, "tx_power", jsonTxpwr, "", "", "dBm"},
      {"sensor", "ruuvi-seq", mac, "measurementSeqNum", jsonSeq, "", "", ""},
      {"sensor", "ruuvi-mov", mac, "movementCounter", jsonMov, "", "", ""}
      //component type,name,availability topic,device class,value template,payload on, payload off, unit of measurement
  };

  createDiscoveryFromList(mac, ruuvisensor, ruuviparametersCount);
}

Do you mean that you cannot see them in home assistant thanks to auto discovery but you have them into your mqtt broker?

It is possible that they have so much parameters that they exceed the maximum size of the MQTT PACKET or/and the maximum size of the ArduinoJson Object.

So as to check the size of the Arduino Object you may use the ArduinoJson assistant which will help you in determining if the JSON object is over the 512 default value.

Correct, I can’t see them in FHEM (which I’m using in my case).

This was a good hint and very helpful, it looks like I’m exceeding some MQTT limits.

Hey guys, any success with Ruuvitag’s data?
I’m struggling with getting ruuvi’s sensor data to MQTT and HA.

@digitalyours would it be possible to share your work (even if not finished yet)

1 Like