Skip to content

Latest commit

 

History

History
184 lines (135 loc) · 5.97 KB

basics.md

File metadata and controls

184 lines (135 loc) · 5.97 KB

Logo

ioBroker.lametric

Requirements

  • LaMetric Time with firmware 2.2.2 (or later)

Configuration

You can get your device API key here.

api-key

Features

  • Set display brightness (percent, auto-mode/manual-mode)
  • Set audio volume (percent)
  • Configure screensaver (enable/disable, time based, when dark)
  • Activate/Deactivate bluetooth and change bluetooth name
  • Switch between apps (next, previous, go to specific app)
  • Send notifications with blockly (with configurable priority, sound, icons, text, ...)
  • Control special apps like clock, radio, stopwatch or weather
  • Use My Data (DIY) LaMetric App to display persistent information

Features are limited by the official API features.

Blockly Examples

You can use a simple string as message, which will be shown as a single frame

single frame

To show multiple frames, you can also provide an array as message

multiple frames

If you want to use chart frames, you have to specify an array of numbers as a frame

chart data frames

My Data (DIY) (version > 1.1.0)

LaMetric offers an app (on the integrated app market) to poll custom data. This app is called My Data DIY. This adapter creates a new state in the required format. You can use the Simple API Adapter to transfer the data to the LaMetric Time.

ioBroker LaMetric Adapter -> State with Frame information <- Simple API Adapter <- My Data DIY App <- LaMetric

Configuration (with authentication)

  1. Install the Simple API ioBroker Adapter
  2. Create a new ioBroker user called lametric with a custom password (e.g. HhX7dZl3Fe)
  3. Add the lametric user to the default group users
  4. Install this My Data DIY App on your LaMetric Time (use Market)
  5. Open the My Data (DIY) app settings and configure the simple api url (see below)
  6. Go to the adapter configuration and configure the frames with your custom information (see next chapter)
http://172.16.0.219:8087/getPlainValue/lametric.0.mydatadiy.obj/?json&user=lametric&pass=HhX7dZl3Fe

Important: use json flag of SimpleAPI Adapter (available since version 2.6.2)

Ensure to update IP, port, user and password in the URL if necessary!

Configuration (without authentication)

  1. Install the Simple API ioBroker Adapter
  2. Install this My Data DIY App on your LaMetric Time (use Market)
  3. Open the My Data (DIY) app settings and configure the simple api url (see below)
  4. Go to the adapter configuration and configure the frames with your custom information (see next chapter)
http://172.16.0.219:8087/getPlainValue/lametric.0.mydatadiy.obj/?json

Ensure to update IP and port in the URL if necessary!

Frame Configuration (version > 1.1.0)

  • Use the plus icon to add as many frames as you want
  • Icon: Choose an icon from the official website and put the ID in the configuration field. Important: Add an i (for static icons) or an a (for animated icons) as a prefix for that ID. (Example: i3389)
  • Text: Just type the text information for the frame. You can use states in curly braces. These information will be replaced with the corresponding value of the state. (Example: {youtube.0.channels.HausAutomatisierungCom.statistics.subscriberCount} Subscribers)

Example configuration of 3 frames:

example frame config

Special Apps / Widgets (version > 1.1.2)

You can control some apps with custom information.

clock.clockface

Allowed values are:

  • one of weather, page_a_day, custom or none
  • custom icon data in format data:image/png;base64,<base64 encoded png binary> or data:image/gif;base64,<base64 encoded gif binary>

Example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAOklEQVQYlWNUVFBgwAeYcEncv//gP04FMEmsCmCSiooKjHAFMEF0SRQTsEnCFcAE0SUZGBgYGAl5EwA+6RhuHb9bggAAAABJRU5ErkJggg==

countdown.configure

Allowed value: Time in seconds

Scripts

To show messages/notifications on your LaMetric Time, send a message to this instance with the JavaScript adapter (or any other):

sendTo(
    "lametric.0",
    "notification",
    {
        priority: "[info|warning|critical]",
        iconType: "[none|info|alert]",
        sound: "<string from sound list>",
        lifeTime: <milliseconds>,
        icon: "<icon>",
        text: "<string|array>",
        cycles: <integer>
    }
);

Example single frame:

sendTo(
    "lametric.0",
    "notification",
    {
        priority: "info",
        iconType: "none",
        sound: "cat",
        lifeTime: 5000,
        icon: "i31820",
        text: "test",
        cycles: 1
    }
);

Example multiple frames:

sendTo(
    "lametric.0",
    "notification",
    {
        priority: "info",
        iconType: "none",
        sound: "cat",
        lifeTime: 5000,
        icon: "i31820",
        text: ["frame 1", "frame 2", "frame 3"],
        cycles: 1
    }
);

Example to show some information cyclic:

let i = 0;
function show() {
    console.log('Show ' + i);
    sendTo(
        "lametric.0",
        "notification",
        {
            priority: "info",
            iconType: "info",
            lifeTime: 5000,
            icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjEuNWRHWFIAAAAySURBVBhXY4AAYdcKk1lngCSUDwHIfAQbzgLqgDCgIqRLwFkQCYQoBAD5EATl4wQMDADhuxQzaDgX0gAAAABJRU5ErkJggg==",
            text: "Hi " + i,
            cycles: 1
        }
    );
    i++;
}
setInterval(show, 10000);
show();