Skip to main content

LaMetric Time/Clock Receipe

  • Official Website: https://lametric.com
  • Icon Support: Yes
  • Message Format: Text
  • Message Limit: 32768 Characters per message

Setup

You now have to methods of notifying your LaMetric Device:

  1. Device Mode: Directly query your LaMetric Device on your local network to send it a notification.
  2. Cloud Mode: A secure query to LaMetric's API server in the cloud to send a message to your clock. You will have limited options with this method.

Device Mode Setup

With Device Mode, your Magic Receipe query will directly interface with the LaMetric Time Device on your local network.

  1. Sign Up and login to the Developer Webpage.
  2. Locate your Device API Key; you can find it here:
  3. You now need to know the IP address your device resides on. Your devices IP Address can be found in LaMetric Time app at: Settings -> Wi-Fi -> IP Address

Cloud Mode Setup

Using Cloud Mode, you will interface with your LaMetric Time device through the internet.

  1. Sign Up and login to the Developer Webpage.

  2. Create a Indicator App if you haven't already done so from here.

    • There is a great official tutorial on how to do this here
  3. Make sure to set the Communication Type to PUSH

  4. You will be able to Publish your app once you've finished setting it up. This will allow it to be accessible from the internet using the cloud mode of this Magic Receipe Plugin. The Publish button shows up from within the settings of your Lametric App upon clicking on the Draft Vx folder (where x is the version - usually a 1)

  5. When you've completed the above steps, the site would have provided you a PUSH URL that looks like this:

    • https://developer.lametric.com/api/v1/dev/widget/update/com.lametric.{app_id}/{app_ver}

    You will need to record the {app_id} and {app_ver} to use the cloud mode.

    The same page should also provide you with an Application Access Token. It's approximately 86 characters with two equal (=) characters at the end of it. This becomes your {app_access_token}. Here is an example of what one might look like:

    • K2MxWI0NzU0ZmI2NjJlZYTgViMDgDRiN8YjlmZjRmNTc4NDVhJzk0RiNjNh0EyKWW==

Receipe

Device Mode receipes are as follows:

  • lametric://{apikey}@{hostname}
  • lametric://{apikey}@{hostname}:{port}
  • lametric://{userid}:{apikey}@{hostname}
  • lametric://{userid}:{apikey}@{hostname}:{port}

Cloud Mode syntax is as follows:

  • lametric://{app_access_token}@{app_id}
  • lametric://{app_access_token}@{app_id}/{app_version}

Parameter Breakdown

The breakdown of parameters depend on whether you are using the Cloud Mode or Device Mode.

Device Mode

VariableRequiredDescription
apikeyYesYour Device API Key can be found on LaMetric's website here
hostnameYesThis is the IP address or hostname of your Lametric device on your local network.
portNoThe port your LaMetric device is listening on. By default the port is 8080.
useridNoThe account login to your Lametric device on your local network. By default the user is set to dev.
modeNoDefine the Magic Receipe/Lametric mode to use. This can be either set to cloud or device. It's worth pointing out that Magic Receipe is smart enough to detect the mode you're using based on the URL you provide it. But for those who want to explicitly provide it's value, they can do so.
cyclesNoThe number of times message should be displayed. If cycles is set to 0, notification will stay on the screen until user dismisses it manually. By default it is set to 1.
soundsNoAn audible alarm that can be sent with the notification. The following keywords are supported: bicycle, car, cash, cat, dog, dog2, energy, knock-knock, letter_email, lose1, lose2, negative1, negative2, negative3, negative4, negative5, notification, notification2, notification3, notification4, open_door, positive1, positive2, positive3, positive4, positive5, positive6, statistic, thunder, water1, water2, win, win2, wind, wind_short, alarm1, alarm2, alarm3, alarm4, alarm5, alarm6, alarm7, alarm8, alarm9, alarm10, alarm11, alarm12, and alarm13.
priorityNoThe priority of the message; the possible values are info, warning, and critical. By default info is used if nothing is specified.
icon_typeNoRepresents the nature of notification; the possible values are info, alert, and none. By default none is used if nothing is specified.

Cloud Mode

VariableRequiredDescription
app_idYesYour Indicator App's Application ID can be found in your *Indicator App Configuration**. You can access your application's configuration from the LaMetric's website here.
app_access_tokenYesYour Indicator App's Access Token can be found in your *Indicator App Configuration**. You can access your application's configuation from the LaMetric's website here.
app_verNoThe version associated with your Indicator App. If this isn't specified, then the default value of 1 (One) is used.
modeNoDefine the Magic Receipe/Lametric mode to use. This can be either set to cloud or device. It's worth pointing out that Magic Receipe is smart enough to detect the mode you're using based on the URL you provide it. But for those who want to explicitly provide it's value, they can do so.