LaMetric Time - improve integration

Hello everyone,

I would like to ask here if is possible to add (or increase better) the integration of LaMetric Time.
Currently with HA is only possible to send notifications to it

  • It would be nice to be able to manage the applications (switch between them).
    Like turn on the radio and start it, maybe select another station if you have more in it.
    Switch to another application based on some events from other devices and so on.
  • Set the volume (for example: increase, decrease, mute).
  • Set the screen brightness.

By looking on the web I saw OpenHAB has this kind of integration in it. Would be nice to be able to have the same kind of integration in HA.

  1. LaMetric developer webpage: https://developer.lametric .com/

  2. LaMetric APIs: lametric-documentation.readthedocs .io/en/latest/

  3. OpenHAB example: https://www.openhab .org/addons/bindings/lametrictime/

P.S. had to add spaces to the links as I was allowed to put more than the URL in the post.

Any chance to get some of the features available?

Hello,
you can doing a lot of things with command REST, for example change volume, brightness change app clock face …

just an example :

lametric_clock_weather:
    url: 'http://YOURIP:8080/api/v2/device/apps/com.lametric.clock/widgets/IDAPPS/actions/'
    method: POST
    headers:
      Authorization: "Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      Content-Type: application/json
    payload: '{"activate": "false","id": "clock.clockface","params": {"type": "weather"}}'
    content_type:  'application/json; charset=utf-8'

Hi ghisura,

could you maybe offer some detailed informations how i could use your code? Im totally new with the REST API.

Thank you very much!

Hello,
For volume and brightness it’s a little more complex, than changing clockface.
If your are interested, I’ll write the “process” I must remember how I have do it ^^’

If you have already played with REST api it’s not complicated :slight_smile:

Obtain your Lametric time local ip

  • Depend on your Router
  • OR use the mobile application
    Settings → Wi-Fi → IP Address

(LAMETRIC_IP)

Obtain your Token

  • Create an account to developer lametric go to developer lametric
  • go to devices account name → devices
  • take the Api Key
  • encode it to base64 dev:APIKEY
    expl on linux :
echo dev:APIKEY | base64

the result is your token (YOURTOKEN) used for authentication in the header

Find the ID_OF_THE_WIDGET :

You can use an app or browser extension to make the request.
Personnaly on macOS I use rested.

http://LAMETRIC_IP:8080/api/v2/device/apps/
header => Authorization: Basic YOURTOKEN

you obtain for example:

...
             "name": "snooze"
                }
            }
        },
        "vendor": "LaMetric",
        "version": "2.2.13",
        "version_code": "50",
        "widgets": {
            "<ID_OF_THE_WIDGET_THAT_YOU_WHANT_CALL>": {
                "index": 0,
                "package": "com.lametric.clock",
                "settings": {
                    "_title": "Horloge"
                }
            }
        }
    },
    "com.lametric.countdown": {
        "actions": {
...

this is the full automation I use for clockface:

in configuration.yml :

  lametric_clock_date:
    url: 'http://LAMETRIC_IP:8080/api/v2/device/apps/com.lametric.clock/widgets/ID_OF_THE_WIDGET/actions/'
    method: POST
    headers:
      Authorization: "Basic YOURTOKEN"
      Content-Type: application/json
    payload: '{"activate": "false","id": "clock.clockface","params": {"type": "page_a_day"}}'
    content_type:  'application/json; charset=utf-8'
      
  lametric_clock_weather:
    url: 'http://LAMETRIC_IP:8080/api/v2/device/apps/com.lametric.clock/widgets/ID_OF_THE_WIDGET/actions/'
    method: POST
    headers:
      Authorization: "Basic YOURTOKEN"
      Content-Type: application/json
    payload: '{"activate": "false","id": "clock.clockface","params": {"type": "weather"}}'
    content_type:  'application/json; charset=utf-8'

  lametric_clock_custom:
    url: 'http://LAMETRIC_IP:8080/api/v2/device/apps/com.lametric.clock/widgets/ID_OF_THE_WIDGET/actions/'
    method: POST
    headers:
      Authorization: "Basic YOURTOKEN"
      Content-Type: application/json
    payload: '{"activate": "false","id": "clock.clockface","params": {"type": "custom", "icon":"{{ icone }}"}}'
    content_type:  'application/json; charset=utf-8'

The automation (change all 15s the clockface [Weather → custom → Date → custom {taken randomly in a list picture in base64}])

alias: LaMetric clockface
description: ''
trigger:
  - platform: time_pattern
    minutes: /1
condition:
  - condition: time
    after: '06:15'
    before: '22:00'
action:
  - service: rest_command.lametric_clock_weather
    data: {}
  - delay: '00:00:15'
  - service: rest_command.lametric_clock_custom
    data:
      icone: |-
        {{ [
          "data:image/png;base64,‘’iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAeUlEQVQYlXWMvwmD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kECRQAAAAsAAAAAAgACAAAAgyEjwmxGe8gYkxZWwAAIfkECRQAAAAsAAAAAAgACAAAAguEj2mhwekUeLKmAgAh+QQJFAAAACwAAAAACAAIAAACCoSPCaHbrGCbqgAAIfkECRQAAAAsAAAAAAgACACAJCIkAAAAAgeEj6nL7V0AADs=",
          "data:image/gif;base64,R0lGODlhCAAIAIAAACQiJCSqFCH/C05FVFNDQVBFMi4wAwEAAAAh+QQJFAAAACwAAAAACAAIAAACCYSPqcsX+1RUBQAh+QQJFAAAACwAAAAACAAIAAACCoSPqXuh4VKUDBQAIfkECRQAAAAsAAAAAAgACAAAAg2ED4HLuuEOjEbRhBkoACH5BAkUAAAALAAAAAAIAAgAAAINhB9nCbztYJQTKnQbKAAh+QQJFAAAACwAAAAACAAIAAACDoQdh3sZ32BCD6qq2DUFACH5BAkUAAAALAAAAAAIAAgAAAIPhBFniZoBWUQyQjedWqcAACH5BAkUAAAALAAAAAAIAAgAAAIPhGOZqBD/DoIO0mmdbtIVACH5BAkUAAAALAAAAAAIAAgAAAIPBGKZaBwPD4qwPmmPUvcVACH5BAkUAAAALAAAAAAIAAgAAAIPRIB4lhsPoXkzSktXU4cWACH5BAkUAAAALAAAAAAIAAgAAAIODH4GuhkPW4S01oQUwwUAIfkECRQAAAAsAAAAAAgACAAAAg+EHXgJ4Z+ia7BaxtrZGhQAIfkECRQAAAAsAAAAAAgACAAAAg+EEXeJGJ/icxJOy1RWzRQAIfkECRQAAAAsAAAAAAgACAAAAg+EYwmo4XyQS+/FCc+iGRQAIfkECRQAAAAsAAAAAAgACAAAAg8EYnlq4YxecnQ+pKJloAAAIfkECRQAAAAsAAAAAAgACAAAAg5EgHmpy+ZQmHGad+pDBQAh+QQJFAAAACwAAAAACAAIAAACDQyOaGmr4Q6MgKZbMSgAIfkECRQAAAAsAAAAAAgACAAAAgqEf4G5ELpem7QWACH5BAkUAAAALAAAAAAIAAgAAAIKhG+Bpwu9oJt0FgA7",
          "data:image/gif;base64,R0lGODlhCAAIAIAAACQiJPz+/CH/C05FVFNDQVBFMi4wAwEAAAAh+QQJRgAAACwAAAAACAAIAAACDgyOEJa37Rh6ia47MQQFACH5BAkoAAAALAAAAAAIAAgAgSQiJPz+/FRSVAAAAAIPDI4QlrftGHqJiiskFvAUADs=",
        ] | random }}
  - delay: '00:00:15'
  - service: rest_command.lametric_clock_date
    data: {}
  - delay: '00:00:15'
  - service: rest_command.lametric_clock_custom
    data:
      icone: |-
        {{ [
          "data:image/png;base64,‘’iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAeUlEQVQYlXWMvwmDQBSHvyeCZAabZwrBEY40qW4I17DLAHYpXcEhrhe3OOwyQkj1Ugm5B/m631/pVClIwYi7nLLCE3chBftf+H0Cau/nQ43+BcBV3UM+1D6PsRhUPmzmFYBlaAEQ4244lqHl+d4EQDpVpsutKJ0hwBca0yGxC/Gv9QAAAABJRU5ErkJggg==",
          "data:image/gif;base64,R0lGODlhCAAIALMAACQiJASq/JRuBPzarNTS1AR2NPSGBAT2ZISGhPz6bPz+/HRaBAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAAACwAAAAACAAIAAAEJBCAc1IyUtVhTVEcMEiAIg5oVhxDARBBvBhLgYjr4d6AIC2SCAAh+QQJCgAAACwAAAAACAAIAAAEJBCAc1IyUtVhTVEcMEiAIg5oVhxDARBBvBhLgYjr4d6AIC2SCAAh+QQJCgAAACwAAAAACAAIAAAEJBCAc1IyUtVhTVEcMEiAIg5oVhxDARBBvBhLgYjr4d6AIC2SCAAh+QQJCgAAACwAAAAACAAIAAAEIxCAc1IyUtVhTVEcMEiAIg5oRg0FQATwYiwFIhZUawOCtEgRACH5BAkKAAAALAAAAAAIAAgAAAQkEKhzUjJA1mFNURwwZJI4nECgHkMBEOKyGEuBZAXl3oCQLZkIACH5BAkKAAAALAAAAAAIAAgAAAQkEKhzUjJA1mFNURwwZJI4n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ia7BaxtrZGhQAIfkECRQAAAAsAAAAAAgACAAAAg+EEXeJGJ/icxJOy1RWzRQAIfkECRQAAAAsAAAAAAgACAAAAg+EYwmo4XyQS+/FCc+iGRQAIfkECRQAAAAsAAAAAAgACAAAAg8EYnlq4YxecnQ+pKJloAAAIfkECRQAAAAsAAAAAAgACAAAAg5EgHmpy+ZQmHGad+pDBQAh+QQJFAAAACwAAAAACAAIAAACDQyOaGmr4Q6MgKZbMSgAIfkECRQAAAAsAAAAAAgACAAAAgqEf4G5ELpem7QWACH5BAkUAAAALAAAAAAIAAgAAAIKhG+Bpwu9oJt0FgA7",
          "data:image/gif;base64,R0lGODlhCAAIAIAAACQiJPz+/CH/C05FVFNDQVBFMi4wAwEAAAAh+QQJRgAAACwAAAAACAAIAAACDgyOEJa37Rh6ia47MQQFACH5BAkoAAAALAAAAAAIAAgAgSQiJPz+/FRSVAAAAAIPDI4QlrftGHqJiiskFvAUADs=",
        ] | random }}
mode: single

you can find all endpoints here : Device API Documentation — LaMetric v1.7.7 documentation

Documentation to obtain IP …
lametric Documentation

Hope this can help you

4 Likes

Hi ghisura!

Thx for the great documentation. I’ve I try to access the API over browser I get a login screen with username and password.

Hello,
Because you must pass by the header, to authenticate:

Thanks for the hint, but this didn’t work neither:

It shows a login screen again.

I used this site for the encoding:

The site seems to encode correctly with default parameters.
Your Token seems strange I think you have forget dev: before your api key
you must encode dev:api_key not just api_key
it seems that token must start by ZGV2O

1 Like

Thank you very much! Now i understand. :upside_down_face:

One question:
I studied the API documentation. There are implementations for for changing the current app for- and backward:
https://lametric-documentation.readthedocs.io/en/latest/reference-docs/device-apps.html#

But how can i activate (show) a specific app?

Hello,
With a PUT request like this:

Create in config.yml the rest command

lametric_netatmo:
    url: 'http://YOURIP:8080/api/v2/device/apps/com.lametric.netatmo.weather.station/widgets/ID_OF_THE_WIDGET/activate'
    method: PUT
    headers:
      Authorization: "Basic YOURTOKEN"
      Content-Type: application/json

lametric_clock_recall:
    url: 'http://YOURIP:8080/api/v2/device/apps/com.lametric.clock/widgets/ID_OF_THE_WIDGET/actions/'
    method: POST
    headers:
      Authorization: "Basic YOURTOKEN"
      Content-Type: application/json
    payload: '{"activate": "true","id": "clock.clockface","params": {"type": "custom"}}'
    content_type:  'application/json; charset=utf-8' 

lametric_countdown:
    url: 'http://YOURIP:8080/api/v2/device/apps/com.lametric.date.ticker/widgets/ID_OF_THE_WIDGET/activate'
    method: PUT
    headers:
      Authorization: "Basic YOURTOKEN"
      Content-Type: application/json

Make an automation:

for example:
all 15min from 06h15 to 22h00 it will :
Make a notification without text to have a sound → call the netatmo “app” → delay 30s → countdown “app” → delay 20s → return to the clock display

alias: Lametric infos cyclique 15 min
description: ''
trigger:
  - platform: time_pattern
    minutes: /15
condition:
  - condition: time
    after: '06:15'
    before: '22:00'
action:
  - service: notify.lametric
    data:
      message: ''
      data:
        sound: notification3
        icon: ''
        cycles: 1
        priority: critical
  - service: rest_command.lametric_netatmo
    data: {}
  - delay: '00:00:30'
  - service: rest_command.lametric_countdown
    data: {}
  - delay: '00:00:20'
  - service: rest_command.lametric_clock_recall
    data: {}
mode: single

Has anyone here tried creating a persistent notifications using the REST API and then storing the notification ID in Home Assistant to be able to programmatically clear it later?

1 Like

Since the update of the Lametrics module and improved automation I have had problems sending notifications to my lametrics devices.

Previousally this was configured manually in my config yaml entry using the API keys and everything worked fantastic.

I removed the config entries and installed the module, 2 instances as I have 2 devices.

Both show up fine in the module with 1 device and 3 enties per device.

Device 1: My LaMetric
Device 2: My LaMetric 2

However when I try to run any automation by sending notifications the automation runs but doesn’t send out a notification to either of the devices.

Script i’m using

service: notify.my_lametric_2
data:
  message: Grid Power usage {{ states("sensor.zappi_grid"), "KW" }}
  data:
    sound: None
    icon: a7437
    cycles: 2
    priority: critical
    icon_type: info

The Entities associated are as follow although no real use to me as all I need to do is use notifications:

button.my_lametric_2_next_app
button.my_lametric_2_previous_app
number.my_lametric_2_volume

Therefore would expect the device to be named my_lametric_2 hence is why i have used notify.my_lametric_2 as the service name.

Unsure if this is a bug or i’m doing something wrong, any help on this would be appreciated.

Thanks

*updated.

I did manage to get some joy with this; by recreating the automation again.
This does notify the device however no progress on the icons or other parms.

working script

service: notify.my_lametric_2
data:
  icon: a27283
  message: >-
    Solar Power Live Genration: {{
    states("sensor.my_solis_inverter_ac_output_total_power"), "Watts" }}

@CheekyKangaroo — This is is what mine looks like:

  - service: notify.lametric
    data:
      data:
        sound: notification
        icon: "96"
        priority: info
        icon_type: info
      message: Text that appears on the device

Not sure why data needs to appear twice, but it seems to work well.

you may want to add “cycles: x” to your config where x is the amout of times the message scrolls through.

Forigve my ignorance on this matter but how do I take the following (as an example), and convert it to JSON for purposes of Node-Red.

- service: notify.lametric
    data:
      data:
        sound: notification
        icon: "96"
        priority: info
        icon_type: info
      message: Text that appears on the device

Hello everyone,
I’ve been experimenting with the LaMetric REST API and was wondering if there’s a way to send a notification to the LaMetric device that allows for an action to be triggered in Home Assistant when the middle button on the LaMetric is pressed.
Is this functionality currently supported or has anyone found a workaround to achieve this?
Thanks in advance for any insights or suggestions! Feel free to adjust it as needed before posting.

I never tried this, but I suppose you’ll have to create a button app in the LaMetric (from the developers site) and then configure it to point to a webhook created by Home Assistant which, in turns, runs an automation you’ve created previously.