NorthernMan54 / homebridge-rtl

Homebridge Plugin for rtl_433 devices
MIT License
22 stars 10 forks source link

[INFO] How to add MightyMule Wireless Driveway Alarm System - FM231 #3

Closed Ewarren7 closed 3 years ago

Ewarren7 commented 3 years ago

Hey just wanted to pass along info on how I added this electromagnetic car driveway alarm / sensor with your package and also say thanks for your work! Let me now if PR for a md file is better.

After a bit of help I was able to integrate the FM231 into rtl_433 and now into this to get a homekit motion sensor that only detects cars. Original details and rtl_433 integration discussed here. Reposting key details below.

Initially was not clear to me how to add a rtl_433 new device with only a general purposes decoder (-X) based config and tie it in with this but realized you just need to put it in a rtl_433.conf file placed in one of the locations that rtl_433 looks such as /usr/local/etc/rtl_433/.

Instructions

I put a slightly modified version of the MightMule-FM231.conf into /usr/local/etc/rtl_433/rtl_433.conf so it is treated as a device. (file below)

I just added get=@0:{1}:motion:[0:true 1:true], bc that is what homebridge-rtl built in support for motion sensor device expects and it will return motion: true on any triggering. Then in homebridge, I installed this plugin and added in my conf the below where id is the ID you get from you dip switch settings and will see from just running rtl_433 ' if you have already setuprtl_433.conf` and trigger the alarm.

Now it will trigger a homekit motion sensor when car is detected and automatically turns it off after a few min.

homebridg conf

      {
            "platform": "rtl_433",
            "devices": [
                {
                    "id": "8",
                    "name": "Car Motion",
                    "type": "motion"
                }
            ]
        }

/usr/local/etc/rtl_433/rtl_433.conf

# Decoder for the Mighty Mule FM231 Driveway alarm from GTO Inc
# FCC Test report, including RF waveforms is here:
#   https://fccid.io/I6HGTOFM231/Test-Report/Test-Report-1214140.pdf

# Use the Accurite and similar convention for reporting battery.
# The name is 'battery_ok' with values 1 (ok) and 0. (which are
# numerically reversed from what the FM231 reports)

# The DIP switches for setting a unique device ID are labeled 1-4
# from left to right, but appear in the # data stream in reverse
# order.

decoder {
    name=MightyMule-FM231,
    modulation=OOK_PWM,
    short=650,
    long=1200,
    sync=3800,
    reset=1100,
    rows=1,
    bits=9,
    get=@4:{1}:battery_ok:[0:1 1:0],
    get=@5:{4}:id,
    get=@0:{1}:motion:[0:true 1:true],
    unique
}
NorthernMan54 commented 3 years ago

For me I spend the time documenting my efforts so that I can find the details a few years later when I need to redo it or something. So if you want to put this into a pull request as a markdown file and include a link in the README or expand on the README I will merge and publish.

On Oct 25, 2020, at 12:12 PM, Edward notifications@github.com wrote:

 Hey just wanted to pass along info on how I added this electromagnetic car driveway alarm / sensor with your package and also say thanks for your work! Let me now if PR for a md file is better.

After a bit of help I was able to integrate the FM231 into rtl_433 and now into this to get a homekit motion sensor that only detects cars. Original details and rtl_433 integration discussed here. Reposting key details below.

Initially was not clear to me how to add a rtl_433 new device with only a general purposes decoder (-X) based config and tie it in with this but realized you just need to put it in a rtl_433.conf file placed in one of the locations that rtl_433 looks such as /usr/local/etc/rtl_433/.

Instructions

I put a slightly modified version of the MightMule-FM231.conf into /usr/local/etc/rtl_433/rtl_433.conf so it is treated as a device. (file below)

I just added get=@0:{1}:motion:[0:true 1:true], bc that is what homebridge-rtl built in support for motion sensor device expects and it will return motion: true on any triggering. Then in homebridge, I installed this plugin and added in my conf the below where id is the ID you get from you dip switch settings and will see from just running rtl_433 ' if you have already setup rtl_433.conf` and trigger the alarm.

Now it will trigger a homekit motion sensor when car is detected and automatically turns it off after a few min.

homebridg conf

  {
        "platform": "rtl_433",
        "devices": [
            {
                "id": "8",
                "name": "Car Motion",
                "type": "motion"
            }
        ]
    }

/usr/local/etc/rtl_433/rtl_433.conf

Decoder for the Mighty Mule FM231 Driveway alarm from GTO Inc

FCC Test report, including RF waveforms is here:

https://fccid.io/I6HGTOFM231/Test-Report/Test-Report-1214140.pdf

Use the Accurite and similar convention for reporting battery.

The name is 'battery_ok' with values 1 (ok) and 0. (which are

numerically reversed from what the FM231 reports)

The DIP switches for setting a unique device ID are labeled 1-4

from left to right, but appear in the # data stream in reverse

order.

decoder { name=MightyMule-FM231, modulation=OOK_PWM, short=650, long=1200, sync=3800, reset=1100, rows=1, bits=9, get=@4:{1}:battery_ok:[0:1 1:0], get=@5:{4}:id, get=@0:{1}:motion:[0:true 1:true], unique } — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

NorthernMan54 commented 3 years ago

PS very cool use case

Ewarren7 commented 3 years ago

@NorthernMan54 sounds good. This will definitely be helpful to myself down the road haha. PR up https://github.com/NorthernMan54/homebridge-rtl/pull/4/

NorthernMan54 commented 3 years ago

Awesome, just published it