#F&F energy meter

1 messages · Page 1 of 1 (latest)

void smelt
#

Hi,

I connected the Wi-MEF-3 F&F FOX energy meter to my home assistant,
however, I get power consumption in watt-hours and I would prefer to have it in kilowatt-hours
in the meter application I can also select "REST API mode"
fixed key, no key required and dynamic key.
how can I add this to my code?

    - platform: rest
    resource: http://192.168.1.56/0000/get_total_energy
    scan_interval: "00:00:05"
    name: L1 Energy
    device_class: energy
    unit_of_measurement: "Wh"
    value_template: "{{ value_json.active_energy_import[0] | float(0) }}"
  - platform: rest
    resource: http://192.168.1.56/0000/get_total_energy
    scan_interval: "00:00:05"
    name: L2 Energy
    device_class: energy
    unit_of_measurement: "Wh"
    value_template: "{{ value_json.active_energy_import[1] | float(0) }}"
  - platform: rest
    resource: http://192.168.1.56/0000/get_total_energy
    scan_interval: "00:00:05"
    name: L3 Energy
    device_class: energy
    unit_of_measurement: "Wh"
    value_template: "{{ value_json.active_energy_import[2] | float(0) }}"
    json_attributes:
      - active_energy_import
      - voltage
      - current
      - power_active
      - power_reactive
      - frequency
      - power_factor
      - active_energy_import```
serene viper
#

Divide the values by 1000 and change the UoM to kWh.

#

e.g.

[...]
    unit_of_measurement: "kWh"
    value_template: "{{ value_json.active_energy_import[0] | float(0) / 1000 }}"
[...]
void smelt
#

Thanks

#

What about API key?

#

Should i add it?

serene viper
#

What does it do according to the documentation? shksShrug

void smelt
#

The device enables integration with other systems using the REST protocol.
REST API can operate in three modes:
Fixed key - each REST command must contain a fixed key generated by the application.
Dynamic key - a variable key generated using an algorithm.
Key not required - the key can have any value in the hex system, e.g. "00".
Changing the mode is possible in the advanced settings of the device, in the Remote access section. The REST API Calls section presents sample commands with which you can control the device. The protocol is disabled by default. Therefore, to test the operation of the commands, select the No key required mode. Remember to set the REST mode to one of the safe options after completing the tests: Fixed Key, Dynamic Key or Disabled.

serene viper
#

So an authentication setting. As long as it is on the local network only and you don't want to dig deeper into it, I would keep it at "Key not required".

#

Or you set one of the keys and use the according authentication settings in the RESTful integration.

#

Fixed key should be compatible to HA.

void smelt
#

sometimes I still have problems reading the meter.
it does not read the value of one entity, but the next reading already contains the value.
Is it possible to somehow make it show the previously read value in the absence of a value?

#

and if i have API code should i just add" api: ######" to config?

serene viper
#

You would have to write a more complex template with conditions.

void smelt
#

and how could I make a total consumption of three phases?