New communication methods


My Data DIY now supports more communication types, opening incredible opportunities for visualizing data delivered via a variety of channels of your choice.




  • HTTP Poll: the app will periodically poll an exposed URL on the Internet or a local network for data.
  • HTTP Push: the app needs to be pushed with data using local network URL.
  • MQTT Channel: the app connects to an external MQTT Broker and a particular topic to receive data.
  • Web Socket: the app connects to an external system via web sockets to receive date.



Support of any JSON or XML data structures with no-code


All communication methods, except HTTP Push, support any JSON or XML data structures from the existing data sources. This means that there's no need to transform the existing data source format into a LaMetric-specific one. Now, LaMetric devices can acquire data directly without the need for an intermediary server or writing a single line of code.


For example, on the screens below there is the configuration that gets data from a Shelly Switch by polling its local API Switch.GetStatus endpoint.




Here is an example of the returned JSON:


{
"id": 1,
  "src": "shellyplus1pm-441793ce3f08",
  "params": {
    "id": 0,
    "source": "WS_in",
    "output": false,
    "apower": 0,
    "voltage": 225.9,
    "current": 0,
    "aenergy": {
      "total": 11.5,
      "by_minute": [
        0,
        0,
        0
      ],
      "minute_ts": 1654511972
    },
    "temperature": {
      "tC": 53.3,
      "tF": 127.9
    }
  }
}


My Data DIY app will automatically transform all JSON keys into variables with their related values, as shown in the table below.



JSON key 

My Data DIY variable

Comment

id

{id[0]}

JSON keys with the same names form an array, and the order in this array corresponds to the order in which the keys appear in the data structure.


id, nested in params object

{id[1]}


src

{src}


source

{source}


output

{output}


apower

{apower}


voltage

{voltage}


current

{current}


total

{total}


minute_ts

{minute_ts}


tC

{tC}


tF

{tF}


by_minute

N/A

JSON keys with array values are ignored




Also, My Data DIY app supports the following default variables.


My Data DIY default variableComment
{#}Use to display raw data from your data source
{#topic}Use to display raw data from a particular MQTT topic
{#topic.key}Use to display JSON/XML key related data  from a particular MQTT topic


You can easily use these variables in your data frames, either alone or with additional text, to display them on the LaMetric device’s screen (TIME or SKY). Here's an example of five frames created using the variables mentioned above.





Shelly Switch data visualization on LaMetric TIME 


Using different icons based on the received data


To enhance data visualization diversity, each data frame can use various icons based on variable values and set rules. For instance, the example below displays a different icon when the {apower} variable exceeds 0; otherwise, it shows the default icon.






Rule to show different icon when the {apower} variable exceeds 0;




Shelly Switch data visualization on LaMetric TIME when {apower} > 0