Hjelp til en variabel

Trenger hjelp til en variabel.

Har en powerplugg som rapporterer: energi, watt, ampere og volt. Alt kommer i ‘evt.meter.report’

Jeg har satt opp en trigger som henter: evt.meter.report og sender den til en variable
Jeg ønsker at variablen kun viser Watt.

Sånn som det er nå så viser variablen, det som sist ble sendt fra selve powerpluggen

There are 2 options :

  1. Use property filter in Trigger
  2. Use transform node to extract unit and if to filter

Property filter is the simplest option but the property is not available in UI , however, can be added via Flow Source editor , like this :

Complete flow should look like that :
{
“Id”: “3rVmRSXD225Tmut”,
“ClassId”: “3rVmRSXD225Tmut”,
“Author”: “”,
“Version”: 0,
“CreatedAt”: “2020-06-04T11:13:05.198725564+02:00”,
“UpdatedAt”: “2020-06-04T12:23:57.899144379+02:00”,
“Name”: “Meter tester”,
“Group”: “test”,
“Description”: “”,
“Nodes”: [
{
“Id”: “1”,
“Type”: “trigger”,
“Label”: “Meter report”,
“SuccessTransition”: “2”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “pt:j1/mt:evt/rt:dev/rn:tibber/ad:1/sv:meter_elec/ad:user_your_tibber_id_here”,
“Service”: “meter_elec”,
“ServiceInterface”: “evt.meter.report”,
“Config”: {
“InputVariableType”: “”,
“IsValueFilterEnabled”: false,
“LookupServiceNameAndLocation”: false,
“PropFilterName”: “unit”,
“PropFilterValue”: “W”,
“RegisterAsVirtualService”: false,
“Timeout”: 0,
“ValueFilter”: {
“Value”: null,
“ValueType”: “”
},
“ValueJPath”: “”,
“ValueJPathResultType”: “”,
“VirtualServiceGroup”: “”,
“VirtualServiceProps”: null
},
“Ui”: {
“nodeType”: “”,
“x”: 279,
“y”: 180
}
},
{
“Id”: “2”,
“Type”: “set_variable”,
“Label”: “Save last meter value”,
“SuccessTransition”: “”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “”,
“Service”: “”,
“ServiceInterface”: “”,
“Config”: {
“DefaultValue”: {
“Value”: 0,
“ValueType”: “”
},
“Name”: “han_meter_power”,
“UpdateGlobal”: true,
“UpdateInputMsg”: false
},
“Ui”: {
“nodeType”: “”,
“x”: 198,
“y”: 453
}
}
],
“Settings”: null,
“IsDisabled”: false,
“IsDefault”: false,
“ParallelExecution”: “parallel”
}

Thank you​:+1::+1:

I will try this😀

Worked like at dream :slight_smile:
But one more question. I would like to use the flow you sent about total power from tibber.
Where do I find my tibber id?

Found the tibber id in messagestream

1 Like