LaMetric Time Notifications


#1

Anyone have experience with this? I have one at my office that is not connected to ST at home, but

What I would like to do is send notifications to LaMetric using Webcore somehow?


#2

Looks like you should be able to send a notification to LaMetric using HTTP calls:

http://lametric-documentation.readthedocs.io/en/latest/reference-docs/device-notifications.html

Use webcore to send a web request to:

https://{WAN_IP}:{PORT}/api/v2/device/notifications

You’ll also need to get the authorisation header or embed your credentials into the URL.

Hard part will be including the body:

{
    "priority": "warning",
    "model": {
        "cycles": 1,
        "frames": [
           {
              "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAUklEQVQYlWNUVFBgYGBgYBC98uE/AxJ4rSPAyMDAwMCETRJZjAnGgOlAZote+fCfCV0nOmA0+yKAYTwygJuAzQoGBgYGRkUFBQZ0dyDzGQl5EwCTESNpFb6zEwAAAABJRU5ErkJggg==",
              "text": "HELLO!"
           }
        ],
        "sound": {
            "category": "notifications",
            "id": "cat"
        }
    }
}

Haven’t delved that deep yet??? @ipaterson


#3

That request body may not be possible to do in webCoRE. There have been a few similar posts recently (like this) but I haven’t seen a solution for a JSON request that includes nested objects or arrays. In cases like this I’ve recommended using IFTTT to do the request (as long as the endpoint is web accessible and not on your local network) until the web requests feature in webCoRE can be improved. Here is an example of using IFTTT for more control over the request body.


#5

I don’t think LaMetric would be web accessible.