magico13 / ha-emporia-vue

Home Assistant Integration for Emporia Vue Energy Monitor
MIT License
462 stars 62 forks source link

Emporia Energy Monitor values regularly not available in Home Assistant #160

Open Balou067 opened 1 year ago

Balou067 commented 1 year ago

I use this integration since about one week, however I do encounter often problem that the integration can not get the values via the API (The Emporia Web UI is running and I can see the values there). Sometime I can just reload the Integration again (I created a automation detecting the the values are not available anymore and then reload the integration. So I found a sort of a work around) But now I had an situation the reloading was not possible anymore and I had to delete and re-install the integration.

What can I do to get a stable situation and the values from the Emporia Energy Monitor are available in Home Assistant reliable?

I’m using the Supervised Home Assistant version with all updates being instated running on/in a virtual machine with 4GB RAM and 32 GB storage on my Synology NAS.

ThellraAK commented 1 year ago

So not the maintainer, but it's the API that occasionally gets mad at the world, not this integration. They seem to prioritize their own app/website well enough, they just sometimes don't want to hand out data.

I don't even think it's an API, Magico13 made one for us.

rb2k commented 1 year ago

I can confirm that just reloading the integration usually fixes it for me. So it seems like there's some missing retry/reconnect?

JAudi23 commented 1 year ago

I second @rb2k on this, I've noticed that after a restart Home Assistant sometimes the data stops collecting and is missing, and if I reload the integration in HA, it starts collecting the data again. Sometimes it will happen, throughout the week, I just haven't narrowed down all the reasons it stops collecting. Reloading always resolves the issue though.

multinet33 commented 1 year ago

I made this automatisation 👍 alias: "WTACHDOG : Emporia Vue Gen 2" description: Rechargement de l'intégration emporia en cas de sensor(s) indispo trigger:

johntdyer commented 1 year ago

@multinet33 this seems to work nicely...

johntdyer commented 1 year ago

@multinet33 could you post that in back ticks / code block so it renders properly... Im struggling to understand the repeat template behavior

johntdyer commented 1 year ago

this is what I ended up w/... testing it now

alias: Energy Test
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.emporia_vue_dyer_main_123_1min
      - sensor.emporia_vue_servers_1_1min
      - sensor.emporia_vue_roselyns_room_3_1min
      - sensor.emporia_vue_kitchen_ceiling_5_1min
      - sensor.emporia_vue_master_bed_6_1min
      - sensor.emporia_vue_basement_7_1min
      - sensor.emporia_vue_great_room_8_1min
      - sensor.emporia_vue_dishwasher_10_1min
      - sensor.emporia_vue_oven_11_1min
      - sensor.emporia_vue_beverage_center_12_1min
      - sensor.emporia_vue_ac_13_1min
      - sensor.emporia_vue_fridge_14_1min
      - sensor.emporia_vue_dryer_15_1min
      - sensor.emporia_vue_tesla_16_1min
      - sensor.emporia_vue_dyer_main_balance_1min
      - sensor.emporia_vue_family_room_4_1min
      - sensor.emporia_vue_washer_2_1min
      - sensor.emporia_vue_upstairs_rooms_9_1min
      - sensor.emporia_vue_switch_living_room_media_123_1min
      - sensor.emporia_vue_switch_basement_media_123_1min
      - sensor.emporia_vue_switch_office_123_1min
      - sensor.emporia_vue_switch_3d_printer_123_1min
      - sensor.emporia_vue_switch_outdoor_fridge_123_1min
      - sensor.emporia_vue_switch_office_shelf_123_1min
    to: unavailable
    for:
      hours: 0
      minutes: 0
      seconds: 30
condition:
  - condition: state
    entity_id:
      - sensor.emporia_vue_dyer_main_123_1min
      - sensor.emporia_vue_servers_1_1min
      - sensor.emporia_vue_roselyns_room_3_1min
      - sensor.emporia_vue_kitchen_ceiling_5_1min
      - sensor.emporia_vue_master_bed_6_1min
      - sensor.emporia_vue_basement_7_1min
      - sensor.emporia_vue_great_room_8_1min
      - sensor.emporia_vue_dishwasher_10_1min
      - sensor.emporia_vue_oven_11_1min
      - sensor.emporia_vue_beverage_center_12_1min
      - sensor.emporia_vue_ac_13_1min
      - sensor.emporia_vue_fridge_14_1min
      - sensor.emporia_vue_dryer_15_1min
      - sensor.emporia_vue_tesla_16_1min
      - sensor.emporia_vue_dyer_main_balance_1min
      - sensor.emporia_vue_family_room_4_1min
      - sensor.emporia_vue_washer_2_1min
      - sensor.emporia_vue_upstairs_rooms_9_1min
      - sensor.emporia_vue_switch_living_room_media_123_1min
      - sensor.emporia_vue_switch_basement_media_123_1min
      - sensor.emporia_vue_switch_office_123_1min
      - sensor.emporia_vue_switch_3d_printer_123_1min
      - sensor.emporia_vue_switch_outdoor_fridge_123_1min
      - sensor.emporia_vue_switch_office_shelf_123_1min
    match: any
    state: unavailable
action:
  - service: homeassistant.reload_config_entry
    data: {}
    target:
      entity_id:
        - sensor.emporia_vue_dyer_main_123_1min
        - sensor.emporia_vue_servers_1_1min
        - sensor.emporia_vue_roselyns_room_3_1min
        - sensor.emporia_vue_kitchen_ceiling_5_1min
        - sensor.emporia_vue_master_bed_6_1min
        - sensor.emporia_vue_basement_7_1min
        - sensor.emporia_vue_great_room_8_1min
        - sensor.emporia_vue_dishwasher_10_1min
        - sensor.emporia_vue_oven_11_1min
        - sensor.emporia_vue_beverage_center_12_1min
        - sensor.emporia_vue_ac_13_1min
        - sensor.emporia_vue_fridge_14_1min
        - sensor.emporia_vue_dryer_15_1min
        - sensor.emporia_vue_tesla_16_1min
        - sensor.emporia_vue_dyer_main_balance_1min
        - sensor.emporia_vue_family_room_4_1min
        - sensor.emporia_vue_washer_2_1min
        - sensor.emporia_vue_upstairs_rooms_9_1min
        - sensor.emporia_vue_switch_living_room_media_123_1min
        - sensor.emporia_vue_switch_basement_media_123_1min
        - sensor.emporia_vue_switch_office_123_1min
        - sensor.emporia_vue_switch_3d_printer_123_1min
        - sensor.emporia_vue_switch_outdoor_fridge_123_1min
        - sensor.emporia_vue_switch_office_shelf_123_1min
  - service: notify.home_assistant_bot
    data:
      message: Reloading Vue Watchdog
      target:
        - "xxxxxx"
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
mode: single
JAudi23 commented 1 year ago

@johntdyer can you expand on your service for "notify.home_assistant_bot"? The only notification I currently use is the HA App on my phone, but would like to work with something more flexible so i can send SMS to my wife or kids and they won't need to install the app on their phones. Sorry if this conversation doesn't belong here, happy to take it offline.