Homey Community Forum

[APP] Lametric (Test: 1.1.0)

Control your LaMetric Time

This app works only on firmware 5.0.0 and newer!

Link to app store (test-version).

Link to community app store.

With this app you can:

  • Send notifications, with icon and sound
  • Activate a specific widget
  • Control the Alarm clock, Radio, Timer, Stopwatch and Weather apps
  • Set the volume
  • Set the brightness of the display

Release Notes:

1.1.0

  • Added flows to set clockface

1.0.0

  • Fixed Homey Community ID

0.9.2

  • Removed SSDP discovery

0.9.1

  • First release
2 Likes

Works great. Thank you !

1 Like

Awesome, thank you!!!

1 Like

could it be possible to add the clockface settings?
It is in the API, and you only need to know the clockface id code: i received a description from La Metric how to do this.

You can change the icon on the clock yourself, using the Local API (https://lametric-documentation.readthedocs.io/en/latest/reference-docs/device-apps.html#api-v2-device-apps-package-widgets-id-actions)

First of all, get the clock widget id. You can make request to the LaMetric Time (assuming LaMetric Time is in your local network)

curl “http://{{lametric_ip}}:8080/api/v2/device/apps/com.lametric.clock/widgets/” -u “dev:{{api_key}}”

Where lametric_ip is the device IP address. You can obtain api_key on https://developer.lametric.com under My Devices tab.

The response will look like this:

{
“actions”: {
“clock.clockface”: {
“icon”: {
“data_type”: “string”,
“name”: “icon”,
“required”: false
},
“type”: {
“data_type”: “string”,
“format”: “weather|page_a_day|custom|none”,
“name”: “type”,
“required”: false
}
}
},
“package”: “com.lametric.clock”,
“widgets”: {
“08b8eac21074f8f7e5a29f2855ba8060”: {
“index”: 0,
“package”: “com.lametric.clock”,
“settings”: {
“_title”: “Clock”
}
}
}
}

As you can see, there is one widget with id 08b8eac21074f8f7e5a29f2855ba8060

Now we can send clock.clockface action to the widget with desired icons:

curl -X POST “http://{{lametric_ip}}:8080/api/v2/device/apps/com.lametric.clock/widgets/{{widget_id}}/actions” -u “dev:{{api_key}}” -H ‘Content-Type: application/json’ -H ‘Accept: application/json’ --data-raw ‘{
“id”:“clock.clockface”,
“params”: {
“type” : “custom”,
“icon” : “{{icon_data}}”
}
}’

The type parameter indicates that we want to set custom-defined icon (other possible variant are weather, page_a_day or none). The icon parameter is the icon data in format “data:image/png;base64,”

To sum up, you need to obtain the api key at https://developer.lametric.com/, get your Clock widget id and send icons directly to the widget.

Hi,

Yes, that’s a good suggestion. I will add two flows: one for switching between: “Weather”, “Page-a-day” and "None, and another flow to set a custom icon.

That is very nice: thank you.

How can i buy you a beer?

Select PayPal :wink:

Check out v. 1.1.0, which has two new flows for adjusting the clockface.