feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

JSN-SR04T to add support for AJ-SR04M

Open tgrosz opened this issue 1 year ago • 5 comments

Describe the problem you have/What new integration you would like

The AJ-SR04M differs only slightly from JSN-SR04T. Mode 1 is the same, it's working, I tested it (it needs 120k resistor on R19). Mode 2 differs only from AJ-SR04M that it needs a 0x01 byte instead of 0x55 to start measurement (and it needs 47k resistor, so the two are swapped). I'd like to suggest a new parameter 'start_byte' defaulting to 0x55, but changeable to 0x01 - and so the component will handle the clone as well.

Please describe your use case for this integration and alternatives you've tried:

Ultrasonic measurement

Additional context

The manual for AJ-SR04M https://manuals.plus/arduino/aj-sr04m-distance-measuring-transducer-sensor-manual

tgrosz avatar Aug 17 '24 08:08 tgrosz

I have the same problem getting AJ-SR04M to work with ESPHome on my ESP32C6. I would welcome a solution.

rolandort avatar Sep 19 '24 13:09 rolandort

Try to use Ultrasonic component with open R19 Mode (no resistor)

becmar39 avatar Nov 28 '24 08:11 becmar39

It would be great if we could either override the start_byte or if it was set by the model setting

rsipka avatar Nov 28 '24 20:11 rsipka

Same here : start_byte option will be helpfull for me too...(as AJ-SR04M-2 (R27 for mode option) or AJ-SR04 (R19 for mode option) are very often found on the market)

edouardreg avatar Jan 08 '25 14:01 edouardreg

This support seems to have been added, but it actually fails and makes it worse.

I have raised a separate bug_report for these issues

kabongsteve avatar Oct 15 '25 07:10 kabongsteve