MySensors door sensor

I have two mysensors sensors which used to work pretty well. After one of last updates (0.44) door sensor changed behavior. It stopped showing battery level and all details that were previously available. How can get all mysensors information available again?

Here is my temperature sensor:

And here is door sensor (S_DOOR, V_TRIPPED):

I’ll look into if something has changed in the base binary sensor component.

How do you get the temp sensor to report battery level?, I have built mine following the Mysensor guide and it doesn’t show battery level at all?

The missing attributes was a general problem for all binary sensors, introduced by mistake two weeks ago. Fixed now in:
https://github.com/home-assistant/home-assistant-polymer/commit/ffe0b22d772c619efabc43ae56d94e1564f9f6e6

Is the problem sending the battery value, or measuring the battery value?

To send a battery percentage use sendBatteryLevel. Read more here:

The problem is that Home Assistant is ignoring values sent by MySensors.
Please take a look at MYSController log:

Also you can check my code for sending battery level that was working for 4 months:

void sendBat()
{
  // get the battery Voltage
  int sensorValue = analogRead(BATTERY_SENSE_PIN);
#ifdef MY_DEBUG
  Serial.println(sensorValue);
#endif

  // 1M, 470K divider across battery and using internal ADC ref of 1.1V
  // Sense point is bypassed with 0.1 uF cap to reduce noise at that point
  // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts
  // 3.44/1023 = Volts per bit = 0.003363075
  int batteryPcnt = sensorValue / 10;

#ifdef MY_DEBUG
  float batteryV  = sensorValue * 0.003363075;
  Serial.print("Battery Voltage: ");
  Serial.print(batteryV);
  Serial.println(" V");
  Serial.print("Battery percent: ");
  Serial.print(batteryPcnt);
  Serial.println(" %");
#endif

  if (oldBatteryPcnt != batteryPcnt ) {
    sendBatteryLevel(batteryPcnt);
    oldBatteryPcnt = batteryPcnt;
  }
}

Thanks

As I tried to explain in my post above, the missing attributes, including battery level, was just a frontend issue for binary sensors and has been fixed in the dev branch. The fix will be included in the next release.

I was asking @anilet about what the problem was about reporting battery.

@martinhjelmare - thank you for clarification, waiting for merge with release branch :slight_smile:

1 Like