HomeWizard Energy (Wi-Fi P1 meter, kWh meter, Energy Socket and Water Meter)

@bubbamester, This integration only uses the API of the HomeWizard P1 meter to expose data to Home Assistant. If the P1 meter works, it works with Home Assistant.

What you are asking unrelated to Home Assistant and this integration so indeed offtopic. The best thing you can do is to ask this question to HomeWizard directly → Support : HomeWizard Energy

I see. So I asked them directly. Thank you for your reply!

  • logs: all I found was 1 line on the 24th of januari:
2022-01-24 14:27:29 ERROR (MainThread) [custom_components.homewizard_energy.coordinator] Error fetching P1 meter data:
  • the energy app is fine, so the data is streaming and available from the device
  • other datapoints: Only the p1 meter related datapoints (current usage, total usage, etc. all flatline)

It was working for a couple of days (spontanously with me touching it) and 2 days ago it just flatlined again…


edit: I got it to work again by deleting the meter and re-adding it with the same name. However, I guess it should make a little more of an effort itself to restore a connection or retry once it fails to retrieve data once. Just reloading the integration did not work.

Some form of warning or notification when this happens would also be nice, I did not notice this untill 2 days later, so now I’m missing 2 days of data as well.

Hey,

bedankt voor je bijdrage.
Ik snap er helemaal niets meer van, ik heb mijn p1 wifi meter toegevoegd en wil je code overnemen maar ik kan nergens de map vinden die je aandraagt. Daarnaast accepteert die de code niet die ik invoer.

Waar moet ik beginnen? Ik heb nu enkel wat onbruikbare data zoals meterstanden etc.

I don’t get it… I added the code and nothing is working accept my daily energy.
I really don’t know where to start so can you please help me?

Whenever I try to input the entity it states that its not a numeric state…

:tada: Home Assistant 2022.2 is released. This version comes with this integration in core! Click here for more info.

I highly recommend to convert your configuration to use the core integration. This custom integration won’t be updated from now on.

Please let me know what you think! I spend a lot of hours to make this happen and I’m a bit proud! Please enjoy HomeWizard Energy for Home Assistant!

Some questions I can think of:

  1. Can I transfer my data to the core integration? No. I’ve spend a couple of hours to try this but it is not possible for now. I will keep an eye on this and will write a migrator when this is possible. You can keep using this custom component. Give a thumps up or something to this issue so I can determine the priority.
  2. My devices are rediscovered This is the core integration that can’t see that you already have the same device configured via this custom integration. You can ignore the discovered device.
  3. What if I have any problems with the integration? If the issues is with the core integration, you can open an issue here. If you have an issue with the custom integration, you can open an issue here
2 Likes

How can I convert from HACS version to Core version? I don’t mind losing my data.
I updated to core 2022.2. and received a notification a new device was discovered. Didn’t configure it and ignored it.
When I want to remove the HACS installation I receive the message:

The HomeWizard Energy integration is configured or ignored, you need to delete the configuration for it before removing it from HACS

I Ignored it and removed the custom installation.

After a reboot I receive errors:

The following integrations and platforms could not be set up:

  • homewizard_energy

Please check your config and logs.

Setup failed for homewizard_energy: Integration not found.
08:47:33 – (ERROR) setup.py
[548039700096] Received invalid command: energy/info

08:47:30 – (ERROR) Home Assistant WebSocket API - message first occurred at 08:47:30 and shows up 16 times

These errors keep popping up after a restart.
Even when I configured the Core intergration.

PS. Core version runs fine after I set it up.

But it looks like not everything is removed from the Custom HACS installation.

The HomeWizard Energy integration is configured or ignored, you need to delete the configuration for it before removing it from HACS

I Ignored it and removed the custom installation.

Why? It is saying exactly what you had to do.

Install the custom integration with HACS, restart HA, remove the configuration, remove the custom integration with HACS.

How do I remove the configuration?
I couldn’t find any configurations.

found it. you should remove the intergration first. Thats why I couldn’t find a configuration.

PS. found something nice now. After correctly removing the custom install and intergrated the Core install.
I renamed my entity’s to exactly the same names as they where before.
The Energy TAB now also shows the history from previous days/months.

1 Like

I renamed my entity’s to exactly the same names as they where before.
The Energy TAB now also shows the history from previous days/months.

Good to know, maybe I can use that to make a migration. Will look into that.

I’ve added your issue to the FAQ, thanks!

can you also add total daily and montly sensors for energy? combined and not loose l1 and l2.

can i also monitor the p1 splitter per port?

can you also add total daily and montly sensors for energy? combined and not loose l1 and l2.

You can create a template sensor to do that. See the first post

can i also monitor the p1 splitter per port?

No, the splitter is an ‘active splitter’, but not a ‘wifi splitter’. So it is not connected. Also, why would you do that?

Hi [@DCSBL (continuing message from GitHub).

Thanks for the quick response. I don’t have zero coding experience and get a error when creating this “template”.

This is what I have in the configuration.yaml file.

template:
  - sensor:
    - name: "P1 Gas Timestamp"
    - state: "{{ states.sensor.p1_meter_total_gas.last_updated }}"

Can you help me to get the right coding for this template with the correct (Dutch) timestamp?

I hope I am the right spot now for getting help. Better was it to left the gas timestamp sensor available in the new integration. It didn’t get easier for none coding people.

# configuration.yaml
sensor:
  - platform: template
    sensors:
      p1_meter_gas_timestamp:
        friendly_name: "Gas Timestamp"
        device_class: timestamp
        value_template: "{{ states.sensor.p1_meter_<serial>_total_gas.last_updated }}"

Replace p1_meter_<serial>_total_gas to use the correct entity id. Now you can use sensor. p1_meter_gas_timestamp

It was nice to have gas_timestamp available as datapoint, but it is already available when you click on ‘total_gas’. Now you have a way to see the last update for all entities. That is why is is removed, it was ambiguous.

update: Fixed incorrect template

Hi,

I added this in my configuration.yaml file and the result is always “unknown”. What’s going wrong?
(I changed the “active_power” with “total_gas” because I want the updated timestamp from that sensor).
For people -like me- without coding experience, it’s hard to understand what’s going wrong or how to change this template. It’s not getting easier.

sensor:

  - platform: template
    sensors:
      p1_meter_gas_timestamp:
        friendly_name: "Gas Timestamp"
        device_class: timestamp
        value_template: "{{ as_timestamp(states.sensor.p1_meter_total_gas.last_updated) }}"

Results on the overview dashboard:
Gas Timestamp unknown

My bad, you should do this:

sensor:

  - platform: template
    sensors:
      p1_meter_gas_timestamp:
        friendly_name: "Gas Timestamp"
        device_class: timestamp
        value_template: "{{ states.sensor.p1_meter_total_gas.last_updated }}"

I understand your frustration about having non-coding experience. But you want something that is not available in Home Assistant core by default. This is a nice in-between.

You can also just open the total_gas entity and see when you received the last update.
Schermafbeelding 2022-02-05 om 15.59.23

Thanks, now it works again. Also added the unique_id: “GasTimestamp_ID” to it, so I could place it in the area I want it to be.

Nice!
Can you close your issue? https://github.com/home-assistant/core/issues/65502

Any chance that with the new integration these ‘missing’ sensors from the telegram API will be added (optionally)?

Switched from my DSMR cable to the P1 sensor because of the Home Wizard Energy app (nicer graphs than HA. :grinning:)
However, as solar energy producer I would like to monitor the voltages of the different phases.

Any updates on this matter?