Skip to content

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Sep 26, 2025

Summary

This PR adds support for the Mopeka M1001 sensor model as requested in issue #67.

Key discovery: The M1001 uses a completely different protocol than other Mopeka sensors:

  • Manufacturer ID: 13 (0x0d) instead of 89 (0x59)
  • Service UUID: 0000ada0-0000-1000-8000-00805f9b34fb
  • Data format: 23+ bytes with different byte layout

Changes Made

  1. Added MOPEKA_M1001_MANUFACTURER = 13 constant for the M1001's manufacturer ID
  2. Added MOPEKA_M1001_SERVICE_UUID constant for M1001 devices
  3. Changed M1001 device type from 0x01 to 0x02 (based on real data analysis)
  4. Created separate _parse_m1001() method to handle the M1001's unique protocol
  5. Updated _start_update() to route M1001 devices to the correct parser
  6. Refactored standard Mopeka parsing into _parse_standard() method
  7. Added tests using real M1001 advertisement data (connected and not connected to tank)

Test Data Used

Real advertisement data from issue #67 comments:

Not connected to tank:

manufacturer_data={13: "00029d270c148081021d08b08104074c40c002a9294d0a"}

Connected to tank:

manufacturer_data={13: "00028c212854f701103e1c3001011330d08106b8294d0a"}

Current Parser Output

Not connected (quality=0):

  • Battery: 3.34V (100%)
  • Temperature: -1°C
  • Tank Level: None (quality too low)
  • Reading Quality: 0%

Connected (quality=1):

  • Battery: 2.81V (94.2%)
  • Temperature: -7°C
  • Tank Level: 2446mm
  • Reading Quality: 33%

Known Limitations

The framework is in place, but some readings may be incorrect due to limited real-world data:

  1. Temperature readings appear incorrect (-1°C and -7°C for likely room temperature). The M1001 may use a different temperature offset than the standard -40 formula.

  2. Battery formula is estimated. We derived (raw - 50) / 32 from observed values, but this needs verification.

  3. Tank level calculation uses the standard Mopeka PROPANE coefficients. This may not be correct for M1001.

  4. No accelerometer data is exposed for M1001 as we couldn't identify which bytes contain this data.

What Works

  • M1001 devices are now detected and parsed
  • Quality-based tank level filtering works (returns None when quality=0)
  • Basic sensor framework is in place for battery, temperature, tank level, button press

Next Steps

Users with M1001 hardware should:

  1. Test if the sensor is detected in Home Assistant
  2. Report actual vs displayed values for battery, temperature, tank level
  3. Provide additional advertisement samples at different tank levels/temperatures

Related Issues

@bdraco bdraco mentioned this pull request Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add model M1001

2 participants