Aeon Doorbell Type Beta

I can try and elaborate a bit:

First step is to add "musicPlayer" to the device capabilities section near the top, so something like this:

capability "Actuator"
capability "Alarm"
capability "Battery"
capability "Switch"
capability "Configuration"
capability "Refresh"
capability "musicPlayer"

This gives the device additional commands like play, pause, etc. We’re going to utilize the play command. We have to define that command so anywhere in the code add this function:

def play(track) {
    def request = [
       zwave.configurationV1.configurationSet(parameterNumber: 80, size: 1, scaledConfigurationValue: 0), // mutes notifications
       zwave.configurationV1.configurationSet(parameterNumber: 6, size: 1, scaledConfigurationValue: track),
       zwave.configurationV1.configurationSet(parameterNumber: 80, size: 1, scaledConfigurationValue: 2) // unmutes
    ]
    commands(request, 50)  
}

This essentially allows you to play any track on demand. The first and third lines in the request first disable, then enable notifications. I did this because I have a different rule set up to push notify me when the doorbell rings. I did not want this to trigger every time a door opens. If you don’t have doorbell push notifications, you could comment out these two lines.

Once we have the doorbell device type modified, then we can jump over to Rule Machine. In Rule Machine, under Expert Features near the bottom, we want to create custom commands. Here, you first choose a device (doorbell), then a command (play), and finally set parameter 1 to type number, and then the integer you enter is the track you want to play. If the musicPlayer capability gets integrated into Rule Machine, this custom command part wont be necessary, but as for now, you’ll need to create a custom command for each track you’d like to play. Once you’ve created the custom commands, they will be accessible in your actions when setting up your rules.

So for example, I have a rule to notify me when my garage door opens and closes:


where tracks 17 & 18 are the sounds I play when the door opens or closes. So far, it seems to be working pretty well.

1 Like