Notification with smartThings api

i am developing notification with smartThings api

i want to make notification with smartThing api Rules thru Postman

i google it for several days and search for official documents from Samsung smartThings

but i cannot find that how am i going to send body in postman

for example
when doors open, notify me that ‘the door opened’

I’ve been trying to get Notifications working via the Rules API for a long time but I just can’t get the syntax right. Every now and again I have another go in the hope it will suddenly become clear but it never does so I am stuck waiting for it to be documented.

1 Like

I also would like to be able to do a notification via the Rules API. This tutorial seems to demonstrate the lack of such capability.

While the tutorial is supposed to show a ‘notify me when’ capability, the notification consists of turning on a light. Not really what people want to do.

@nayelyz is there any plan to implement an ability for an actual notification via app in the Rules API? The Rules creation in the app allows creating notifications even to specific users but this capability is missing from the Rules API. So, the Rules API has more extensive capability than creating Rules in the app but is also limited. Seems like anything you can do in the app should be available in the API. Perhaps we need an ‘app’ device that we can command?

thanks,
Guy

2 Likes

Hi, Guy!

This has been mentioned before by other developers. However, there isn’t an option to send notifications. I’ll ask the team again to know if there’s any update.

3 Likes

Is there an update on this? Specifically, I am interested in showing a notification with text and image of a security camera when motion detected, doorbell ring, etc. This would be very useful on my Samsung phone or Samsung TV (Frame).

Thank you!

Welcome to the SmartThings Community, @Nea!
You can send notifications using the Routines tool, or, are you using only the API/Rules API?

I attempted to use a routine but there was not enough control over the trigger and the notification was only sent to my phone, not my TV. I will attempt to use the API. Can you link the documentation please. Thank you!

I was just asking because sending notifications from the Rules API isn’t currently available. I’m discussing this with the engineering team.
Also, AFAIK, notifications are only present in the mobile app. I don’t have any more information about notifications on the TV. In that case, you should contact SmartThings Customer Support to know if it’s possible using the Routines tool.

Open here to see their contact info

Through the SmartThings Web page

  1. Enter this page
  2. Click on “Support” in the upper-right corner
  3. Check if the URL includes your region. For example, en-us here: https://support.smartthings.com/hc/en-us
  4. At the bottom, select “email” and describe your issue as detailed as possible.
  5. Click on “submit”

From the ST app

  1. Open the SmartThings app
  2. Go to the menu tab at the bottom-right corner.
  3. On this page, select the option “contact us” and then go to “Report a problem”
  4. Accept the generation of logs, fill up the form describing your issue as detailed as possible, and screen captures of the issue always help.
  5. Click on “submit”. The Customer team will receive this info.

Via email

US: 1-866-813-2404
US: support@smartthings.com
UK support 0333 0000333
UK: support@smartthings.co.uk
CA: support@smartthings.ca

Can you also ask about when Smartapps are coming back please, as Smartapps are disabled at the moment. Thanks @nayelyz :+1:

Hi, @Alwas!
Please, follow this thread:

I recently posted an update there.

1 Like

8 posts were split to a new topic: Audio Notifications (TTS) with Rules API

Any updates from the eng team?

Your own example on your API documentation doesn’t compile (Rules | Developer Documentation | SmartThings). Can anyone ever save anything on your platform or this whole system is a gigantic bug?

I have been getting the same error for hours and there is no way to bypass it. I have no usage of word “type” in my code.

1 Like

Are we still talking about the example code?

What error are you getting?

1 Like

Hi @nayelyz,

Just wondering if you have heard back on this yet?

I haven’t found any way to show custom notifications on my TV through SmartThings.

Ring doorbell pro can show a notification on a button press, and like others have mentioned; when a washer is finished that will also send a notification. It seems like the underlying capability is present, but just not exposed.

Is there anyway to achieve this at the moment? and if not, are there any plans to make it available?

Thanks!

Here is the super simple rule I’m trying to create:

{
    "name": "Turn on a switch based on another one",
    "actions": [
        {
            "if": {
                "equals": {
                    "left": {
                        "device": {
                            "devices": [
                                "A simple switch device-id"
                            ],
                            "component": "main",
                            "capability": "switch",
                            "attribute": "switch"
                        }
                    },
                    "right": {
                        "string": "on"
                    }
                },
                "then": [
                    {
                        "command": {
                            "devices": [
                                "Another simple switch device-id"
                            ],
                            "commands": [
                                {
                                    "component": "main",
                                    "capability": "switch",
                                    "command": "on",
                                    "arguments": []
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

I’m getting this error:
Error adding rule "Turn on a switch based on another one". 422 The request is malformed. Unknown target: Malformed body on line 1:59

Can someone please explain what’s malformed here?

If you are using AWA add only actions to rule.
Example here:

2 Likes

Thank you! This fixed the issue…

Any update on this topic regarding notification?

On my Samsung Bespoke refrigerator I have noticed that I don’t receive any push notifications on my phone when the fridge door is left open — even though the SmartThings app correctly shows the door status as “open.” and all notification with device are already enabled.

Also in the “Routines” section, the only trigger available for the refrigerator is temperature — there’s no option to select door status as a condition.

To work around this, I explored the SmartThings Rules API. I was able to successfully create a rule that detects when the door is open. But unfortunately, I couldn’t find any capability or command in the API to push a notification to the phone.

Create a virtual switch, turn it on in rules API and create a routine in the app “if switch is on, notify”.

3 Likes

Hi, @nileshlande12. Welcome to the SmartThings Community!

Sending push notifications isn’t supported through the Rules API. So, the suggestion from @mocelet is a good alternative.

This generally happens when the manufacturer doesn’t configure those capabilities to appear in those views.
I remember another user mentioned his Fridge supported the notifications after the door was left open but it triggered after 5 minutes. It also made a “bip” sound. Have you checked if that is supported in yours?

1 Like