Share MacroDroid Macros for Wyze IoT

My live test on this today failed, presumably from me entering the wrong trigger (the action definitely works). Here is an example of the notification:

So it says:

[Wife Name] arrived
1111 Street, City, ST Zip, USA

So it is using a title and a subtext as part of the notification, but I need information from both. I need to know Who (because there are messages for my wife and my daughter), Arrived/departed (because I get messages for both), AND where (because there are different locations that come through the message).

I though I could tell it to have the trigger be

Notification:

received;

App:

Maps

Contains:

[Wife name] arrived*[address]

But that didn’t work. I thought that would cover the info in the title, then the asterisk would work as a wildcard to cover anything else in the middle to get me to the subtext of the address, but apparently it didn’t work.

Oh Wyze Macrodroid Master Mentor @SlabSlayer tell me how to make this trigger work, please. :slight_smile: I verified the action itself definitely works, just need to figure out this trigger.

I also had some issues with some attempts to it clear specific Wyze notifications after 3-20 minutes, but I just made Buzz kill handle those for me for now, so it’s not a huge deal and I’ll get back to figuring out why those didn’t work right in Macrodroid later in a different post. For now I’m trying to figure out how to automate this one so I can have Alexa announce “welcomes” about my family and flash Wyze LED strips in my office. :slight_smile:

I’m not using any Google Maps notifications so I’m not familiar with how those come in.

But, from how I program mine, there are 3 parts to the notification:

  • The App Origin Identifier (Maps • xxxx@gmail)
  • The Message Title {bold text} ([Wife Name] arrived)
  • Message Text (1111 Street, City, ST Zip, USA)

The field for “contains” is only trying to match the Message Text, not the Message Title. Since the Message Text did not contain your Wife’s name, it is probably why it wouldn’t trigger.

I will have to do some digging on how to trigger the macro based on the message title and message text when I get some more free time.

The biggest hurdle, once it does trigger, is getting that info thru to Alexa. You would need a macro, webhook, and a routine for each location that sends a push notification for both your wife and your daughter. I haven’t researched any way to actually pass thru the specific location data to Alexa, only to trigger a routine.

1 Like

I’m not worried about getting the info through to Alexa, the action works great and does the announcement perfectly fine with the info you previously gave me. It is a definite success there.
I just can’t get the trigger itself to work as I need info from the message title and the Message Text.

If you think of something worth trying for that, let me know.

In the meantime I am thinking I might be able to do a work around by having BuzzKill watch for that notification and actually create a new muted notification with unique words that MacroDroid can then interpret and trigger the Alexa announcement, then clear the notification. That is a messy workaround, and I’d much rather it work directly from the Google Maps notification instead an extra intermediary, but it is something I’m willing to try.

I wish I could have Macrodroid do “And” conditions (more than one requirement to trigger) but it says all triggers work as “Or” so that if any trigger is true, it will execute the macro even if the other isn’t true.
I might be able to do a different workaround for this by using a ton of constraints though…like for the “Arrived” trigger I can make sure that the message doesn’t contain “Departed”; and for my wife, I can make sure the notification doesn’t have text for my daughter’s name. Something like that might be another workaround, and I wish I could just tell it to include text like I tried above: “[Wife Name] arrived*[Address]” and have that work, but it doesn’t seem to work that way. Grr…

Anyway, still learning, but loving the extra options so far. Suggestions are always very welcome.

Tested this today and it worked. I just had BuzzKill redo the notification and now MacroDroid was able to recognize it for the trigger and push the action to Alexa which announced “Welcome Home [Wife’s Name]” as soon as it popped up. Very cool. Wish I knew how to make it work directly through Macrodroid using the Google Notification, but at least this works just as well.

1 Like

I am still investigating this and have put out a request for help from the MacroDroid users.

The issue here is that Maps sends her name in the Message Title and the location in the Message Text.

I was able to get the macro to run using Either \ Or triggers. MacroDroid looks at both lines and will trigger if the text being matched is in either one, but it won’t look at both lines independently so far as I have found. In other words it will do the Name match OR the Address match to trigger, but not the Name Match AND the Address match.

It may be that there needs to be a macro for both with a restriction that goes back and checks for the other string and will not execute it if the other string isn’t there.

Will keep trying though.

1 Like

I appreciate that buddy. :+1: You definitely understand the issue the same way I do (need info in both the Title and message text to make it work, but it seems to only be able to look at one or the other at a time). Let me know if you figure out anything worth testing out as that would be preferable. I won’t be devastated if we don’t figure it out, since my BuzzKill workaround is functional, but still, I’m sure it won’t be the only time a Title/Message-text solution could come in handy.

1 Like

So specifying app doesn’t help? Here are the options in the program I’m using; seems to be AND and not OR since you can use things like “does not contain” for both title and body…

@DaBassMann, Rather than continue a detailed conversation in the Wishlist topic where we were posting, I decided to move my reply overs here where it would have more relevance and also not divert the original wishlist topic.

I am not debating the relevance of your wishlist topics. I voted for them all as I believe that there should be varied and comprehensive notification trigger options for all Wyze devices. The more options available, the more customization flexibility users have. This leads to increased ecosystem utility and user satisfaction.

However, if you look pragmatically at how long the Different Alert Sounds for Wyze Notifications has been on the Wishlist… 4 years, you can make a pretty accurate prediction as to how long it will be before they incorporate email notifications for rules or cam sirens, which they have never done for any device.

Because I took a realistic look at how long it might be until I saw a different notification sound from the Wyze app, different notification sounds from each Wyze device, from each type of notification, from devices that have no notification capability; I made the decision to proactively solve my individual needs and wants with a third party app or apps rather than wait on Wyze to do it for me. I have found that there isn’t one IoT provider that makes every product to do what I want it to do. It just doesn’t exist.

Many use BuzzKill, I use MacroDroid. I started this thread specifically to share solutions on using MacroDroid on Android to solve needs that Wyze currently cannot. If the Wyze functionality is developed down the road… Great! But until then we have to do what we have to do to make it work.

To that end… Your specific use case, if I am understanding it correctly, is that you have a number of cams being used that have a rule turning on the Siren when a person is identified by the AI between the hours of 11p and 7a.

And you want that rule to send you an email when it fires so that your phone is alerted. What I don’t understand is why your phone isn’t already being alerted by push notifications for Person detected.

Either way, MacroDroid can accomplish this functionality and be constrained to only pull the trigger on the macro when a Person Push Notification comes in from Wyze during specific hours…the same hours as when your sirens are being set off.

It can push a second notification, push an email, push an SMS, launch apps, launch warning messages, floating warnings, persistent messages, and a host of others.

If you want it to blow up your phone and wake the dead… It will. See what I have programmed it to do when I get a Push Notification from Wyze that my HMS is Alarming :point_up:

It can do that when you get your push notifications at night too.

MacroDroid will play any Audio Media file you can download to your phone.

I have an internal siren in the house that is activated by my Wyze Rule turning on the plug it is plugged into. This then triggers an upload to the net on every security cam I have and every cam siren activated. Each cam notifies my phone of this upload with a distinctly different push notification so that each and every push notification can be used as a Trigger for my Macro to blow up my phone if I wanted it to.

I am only suggesting that there are solutions available now if you want to pursue them.

You’re right, as usual, Chris P. C. You’ve convinced me to install MacroDroid and look at what all it can do. Pragmatic logic dictates creating an active solution rather than wishing on a star.
Do you have the Chime box for the Wyze Doorbell? Can you make it activate (make a sound) using MacroDroid (McD)? I’ll have to see how loud McD can make my phone, but I know the Chime box can wake the dead. When I had children I was a light sleeper, but as I’ve grown older it takes a very loud noise to wake me up.
I’ve bookmarked this Topic so I can come back to it easily and check out all your suggestions as I become used to McD.
Thanks again for your helpfulness and insight.
Rick

1 Like

No. I have the remote chime for the VDB V1 which is different. It does not serve as a hub for the bell but just a remote chime activated only by a bell press.

If it’s like my chime, no. I can’t even activate it with a Wyze Rule. The only thing that will activate it is a physical bell press and I can’t simulate or force that thru the app.

I have one of these plugged into a Wyze plug. It is an absolute screamer! It is in my office, next to my bedroom, and when it goes off I have to change the sheets.

https://www.amazon.com/dp/B0006BCCAE?ref=ppx_pop_mob_ap_share

Ok. Did some testing and I think I may have something but I need you to test it in the wild.

What I did to test this was set up an incoming Push Notification that I could trigger on command. My macro is monitoring for Push Notifications from MacroDroid (since I don’t use the Google Maps geolocation or notifications), your macro will need to monitor notifications from Maps.

I set my incoming Push Notification to read much like the one you posted above:

MacroDroid triggers will inspect both lines of the notification, independently of each other, for a single data string. But, it will not inspect both lines for two data strings within the same trigger. Since the two lines are seperate, they represent two independent data strings. If you use one trigger and ask it to match the data from both lines, it is trying to match both data string A (name) and data string B (address) to line 1 and then the same to line 2. Since A and B don’t appear together, it can’t match to either of the line inspections.

What I needed to do is to implement two triggers, one looking to match the data string in the first line (name), and another to match the data string in the second line (address). But, multiple triggers in a macro are set as an OR logic. If either trigger matches one of the data strings, the macro would fire even if the other did not match.

The proposed solution, and the one I need tested in the wild with real data, is to constrain each of the triggers to firing only if the other trigger is also fired thereby effectively making them a dual AND logic trigger.

Here is the proposed solution. You will need to make all the modifications to the trigger data strings and actions based on your real world conditions, but I think you can get the idea from the template. When setting the constraint for each trigger, select the opposite trigger as the Trigger Fired constraint for that trigger.




1 Like

Thanks, brilliant idea. Will have to wait until tomorrow to fully test it in the wild.

I am going to run this test for my wife leaving the house, and since she will leave before I wake up, I’ll have it send a text to myself to tell me it worked.

If it also sends me the same text when some returns home or to or from her office, or fails to send a text all, I’ll know it failed and to consider checking other things out.
If it works, I will have it push to the Alexa and trigger Wyze devices like lights, etc for various such messages.

I appreciate your efforts and ideas and mentorship with this. :slight_smile:

1 Like

Failure to launch. I repeat: failure to launch!

:slight_smile:

I’m sure there is a way to do it with some tweaking, and this was a good test, but didn’t quite work. I’m guessing because it runs sequentially and the constraint must’ve stayed with the tested section, so the title trigger only checked the title for the constant, but the constraint needed to check the message text and wasn’t able to. Dang. It was a good idea though.

Check your data strings in the triggers to make sure there aren’t any special characters like parenthesis or brackets?


The only difference is that I have unchecked “Ignore ongoing notifications” (so that it doesn’t ignore anything), and unchecked “Prevent multiple triggers” (so it is okay to trigger an unlimited number of times)

Also, for the address, I am telling it to trigger for anything containing just the street address:

1234 Street

And didn’t even bother entering the city, state, zip, USA. As long as the street address is in the notification it should be covered.

This setting on will keep MD from triggering on old notifications that you haven’t cleared from your notifications. With it off, there is the possibility that a new Maps notification coming in will cause it to trigger on a notification that is old but hasn’t been cleared.

That is what I do as well. Give it the shortest string to match.

Two things to try… :wink:

  • After the macro should have triggered, review the System Log to see why it was constrained.
  • After making modifications and saving the macro, close, open, and reclose the app to double insure the background gets updated with the new parameters.
1 Like

Thanks! I intend to try this tomorrow (my brain is foggy at the moment from sleep deprivation and exhaustion of caring for 2 high maintenance babies all day while my wife worked) :slight_smile:

1 Like

@NRHTX,

Replying to your post over here so I don’t divert the #wishlist topic.

Macro to Wake Sleeping Phone, Unlock Phone w\ PIN.

Click for full details

Note: This macro is highly dependant on your specific OS and how you have your lock screen configured. I can only give you how I do it in my Moto G Android 11. This should give you a starting point though.

Also note, the execution of the macro is highly dependant on what is going on on the phone screen. If the screen is in landscape or if popups come in. At times I will get a notification popover when my macros are running and it fubars the macro. Still working on suppressing those.

I have my macros set up to run when they receive a specific push notification from Alexa. For example, when I tell Alexa “I’m going to bed”, she will run all her routine tasks like turning off the lights, she will turn on a special Wyze Plug I use as a relay to activate a Wyze Rule to set my Thermostat to Sleep Mode, and she will finally send a Push Notification to my phone “Sleep Mode Activated”. It is that notification that triggers my phone to wake up, unlock using a PIN, open the Wyze App, click the monitoring tab, and set my HMS Alarm to Home Mode. I have to use MacroDroid to do this because the HMS is inaccessible to all rules and routines.

I have included screenshots below.

My main macro that looks for the notification is first. In order for it to wake up and sound off, my phone can’t be in DND. So, I turn that off in the macro first. I then adjust the volume and vibration. I have it run another Macro that then unlocks the phone. This is the second screenshot.

Screen on wakes the phone. Setting the screen rotation will lock it in portrait in case the phone is on its side (really messes with the UI Interaction commands when the coordinates are reversed). Then I use a gesture control using an x, y coordinate start point and end point over a set time perimeter to swipe up from the bottom revealing the unlock keypad. I then use UI Interactions to tell it to click the 4 digit code and click enter (I changed the code in my screenshot to 0 0 0 0 :wink:). I give it a few seconds to get all unlocked and then I tell it to go to the home screen in case I left an app open. I always want to continue my macro from the same Home base. I release the screen rotation and the macro goes back to the original macro running.

My macro continues and then arms my HMS to home mode.

The screen off command can either shut off the screen without locking it or it can admin lock it requiring a PIN and disallowing a fingerprint.

This was quick and fast. Happy to provide details if you need it. Feel free to PM me.

2 Likes

Wow that is impressive (really).

2 Likes

Step by Step How To: Macro to play a unique notification sound for every Individual Cam, Device, or AI Tag that sends Push Notifications from Wyze

Click Here to read the full details.

Set The Trigger:
• Open MacroDroid
• Select Macros at the bottom
• Select the Plus (+) sign to add a new Macro
• In the Red Trigger box, select the Plus (+) sign to add the trigger
• Select Device Event
• Select Notification
• Insure “Notification Received” is selected and select “OK”
• Insure “Select Application” is selected and select “OK”
• In the App List, scroll to the bottom and select the Wyze App
• Insure “Include” is selected then click “OK”
• Select “Contains”
• In the user variable text line, where “Enter text to match” is shown in grey letters, type in the exact text that you want the macro to match. This comes from the push notification you get from Wyze. If you are creating a custom tone for each cam, the text would need to match "detected on ‘My Cam Name’ (My Cam Name = whatever you named the cam). If you are creating a custom tone for an AI type, it will need to be “Person detected” or “Pet detected”. This is very important. How the macro reacts depends on what text it is looking for within every Wyze Push Notification. This text depends on how you named your cams, devices, and\or what event AI type and\or Alert you are looking to hear in a custom tone. You can also do this for all HMS, sensor, thermostat, vacuum, sound, etc. notifications. You are not limited to only cams and AI types, or just Wyze for that matter. You can match the full or partial text of ANY Push Notification received from ANY app on your phone.
• Insure “Ignore Ongoing Notifications” and “Prevent Multiple Triggers” is selected and that “Notification Sound” is set to “Any Value”
• Click “OK”

Set the Action:
• In the Blue Action Block, select the Plus (+) sign to add the Action
• Toward the bottom, select Media
• Select Play/Stop Sound
• Choose the Notification Tone Sound you want to hear when the Notification arrives with the specified text. It should play a preview when you select each entry. If you choose “Select File”, it will launch your File System Browser so you can choose a file that is not in your default Notifications sounds folder. You can also select which Audio Stream the sound plays on. This is important if you have audio playing that needs to be stopped to hear the notification. It can be changed later if you have notifications walking on other audio content.
• Block Actions until Complete will insure that the macro waits to play the tone before it moves in with other actions in the macro.
• Click “OK”

The macro is now complete. All that needs to be done is to name it and save it.

• In the top bar, type the name for your Macro
• Click the :heavy_check_mark: Checkmark in the lower right to save it.


The sound should now play every time your phone receives a Push Notification with text that matches the text you specified.

You may want your Android Default Notification tone to play along with this new Macro tone, you may want the Wyze tone to play. If you only want the Macro sound, you will need to disable the Android assigned tone. This WILL vary depending on the version of your Android OS and the Brand Specific OS Build from your phone.

• Long press the Wyze Icon
• Select App Info
• Find the entries listed as WyzeMessage, complete this for each
• Click WyzeMessage
• You may need to click Advanced
• Find Sound and select it
• Select the tone you want to hear or select “None” if you only want the macro sound to play
• Click OK

You can now close the settings

.

3 Likes