home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Opentherm integration sends tons of messages when actual state isn't changing #39752

Closed iamkarlson closed 3 years ago

iamkarlson commented 4 years ago

The problem

I have an OTGW device installed next to my boiler and integrated it in Home Assistant. Most of the things works fine and there are no blockers for performing streamlined tasks like automations or so. However, if you want to check the state of the boiler for example you would notice that it's being constantly changed from ON to OFF and vice versa when boiler is heating water. It makes things complex to analyze and create unnecessary load on the recorder (influxdb in my case).

Environment

Hassio image for NUC instaled in VM:

arch | x86_64
-- | --
dev | false
docker | true
hassio | true
os_name | Linux
os_version | 4.15.0-99-generic
python_version | 3.7.7
timezone | Europe/Amsterdam
version | 0.109.6
virtualenv | false

Problem-relevant configuration.yaml

opentherm_gw:
  otgw_unit:
    device: socket://192.168.1.123:6638

Traceback/Error logs

Event 5 fired 10:16 PM:
{
    "event_type": "state_changed",
    "data": {
        "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
        "old_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "off",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:35.017887+00:00",
            "last_updated": "2020-05-16T20:16:35.017887+00:00",
            "context": {
                "id": "3d46d3f3eea3460dbfa88c4a2b2d3bbb",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "on",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:35.023014+00:00",
            "last_updated": "2020-05-16T20:16:35.023014+00:00",
            "context": {
                "id": "d10e1f59d00e475b922cd91a347a15ac",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-16T20:16:35.023041+00:00",
    "context": {
        "id": "d10e1f59d00e475b922cd91a347a15ac",
        "parent_id": null,
        "user_id": null
    }
}
Event 4 fired 10:16 PM:
{
    "event_type": "state_changed",
    "data": {
        "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
        "old_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "on",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:34.489149+00:00",
            "last_updated": "2020-05-16T20:16:34.489149+00:00",
            "context": {
                "id": "6e9f00ed847c43c2b452814d4a8ed8a9",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "off",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:35.017887+00:00",
            "last_updated": "2020-05-16T20:16:35.017887+00:00",
            "context": {
                "id": "3d46d3f3eea3460dbfa88c4a2b2d3bbb",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-16T20:16:35.017933+00:00",
    "context": {
        "id": "3d46d3f3eea3460dbfa88c4a2b2d3bbb",
        "parent_id": null,
        "user_id": null
    }
}
Event 3 fired 10:16 PM:
{
    "event_type": "state_changed",
    "data": {
        "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
        "old_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "off",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:34.459035+00:00",
            "last_updated": "2020-05-16T20:16:34.459035+00:00",
            "context": {
                "id": "f33725c1a2eb407c8828862cbbb46cfa",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "on",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:34.489149+00:00",
            "last_updated": "2020-05-16T20:16:34.489149+00:00",
            "context": {
                "id": "6e9f00ed847c43c2b452814d4a8ed8a9",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-16T20:16:34.489173+00:00",
    "context": {
        "id": "6e9f00ed847c43c2b452814d4a8ed8a9",
        "parent_id": null,
        "user_id": null
    }
}
Event 2 fired 10:16 PM:
{
    "event_type": "state_changed",
    "data": {
        "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
        "old_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "on",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:33.930225+00:00",
            "last_updated": "2020-05-16T20:16:33.930225+00:00",
            "context": {
                "id": "d7c25859e4934c82afc618b35e40a3a3",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "off",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:34.459035+00:00",
            "last_updated": "2020-05-16T20:16:34.459035+00:00",
            "context": {
                "id": "f33725c1a2eb407c8828862cbbb46cfa",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-16T20:16:34.459065+00:00",
    "context": {
        "id": "f33725c1a2eb407c8828862cbbb46cfa",
        "parent_id": null,
        "user_id": null
    }
}
Event 1 fired 10:16 PM:
{
    "event_type": "state_changed",
    "data": {
        "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
        "old_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "off",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:33.905847+00:00",
            "last_updated": "2020-05-16T20:16:33.905847+00:00",
            "context": {
                "id": "ce1368b4aa854365a4827c08cc6ee4ed",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "on",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:33.930225+00:00",
            "last_updated": "2020-05-16T20:16:33.930225+00:00",
            "context": {
                "id": "d7c25859e4934c82afc618b35e40a3a3",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-16T20:16:33.930244+00:00",
    "context": {
        "id": "d7c25859e4934c82afc618b35e40a3a3",
        "parent_id": null,
        "user_id": null
    }
}
Event 0 fired 10:16 PM:
{
    "event_type": "state_changed",
    "data": {
        "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
        "old_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "on",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:33.367125+00:00",
            "last_updated": "2020-05-16T20:16:33.367125+00:00",
            "context": {
                "id": "7a11ba5ebfab428d9d8549441daf0f7b",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "binary_sensor.master_ch_enabled_otgw_unit",
            "state": "off",
            "attributes": {
                "friendly_name": "Thermostat Central Heating Enabled otgw_unit"
            },
            "last_changed": "2020-05-16T20:16:33.905847+00:00",
            "last_updated": "2020-05-16T20:16:33.905847+00:00",
            "context": {
                "id": "ce1368b4aa854365a4827c08cc6ee4ed",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-16T20:16:33.905876+00:00",
    "context": {
        "id": "ce1368b4aa854365a4827c08cc6ee4ed",
        "parent_id": null,
        "user_id": null
    }
}

Additional information

Issue is successor of #35714 (stale and closed) the problem is still persists and heavily affects my user experience:

Also, bug is created in pyotgw repo

iamkarlson commented 4 years ago

It would be great if someone can reopen an original issue rather than keeping this one. I simply can't do that

frenck commented 4 years ago

Hi there @iamkarlson,

Thanks for opening up an issue. When creating an issue, an issue template is presented. It looks like you've (partly) removed it. This causes your issue report to be incomplete.

Please edit your issue to have the full issue template back again and provide as much of the requested data as possible. Without it, we won't be able to help you.

The original issue has been closed stale, a new issue should be created (as you just did).

Thanks already! πŸ‘

iamkarlson commented 4 years ago

@frenck could you please check that everything is in the order?

basnijholt commented 4 years ago

@iamkarlson, it's not a direct solution to this specific issue but because I kept having issues with this integration I created (with help of @frenck) the OTmonitor add-on https://github.com/basnijholt/addon-otmonitor/ for supervisor. It works very reliably for me.

probot-home-assistant[bot] commented 4 years ago

opentherm_gw documentation opentherm_gw source (message by IssueLinks)

probot-home-assistant[bot] commented 4 years ago

Hey there @mvn23, mind taking a look at this issue as its been labeled with an integration (opentherm_gw) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

iamkarlson commented 4 years ago

@basnijholt Thanks! It seems very promising! However, I was missing documentation where to start and what I can do. If you are able just to outline what are the services I can use or where I can find it - it would be really great!

basnijholt commented 4 years ago

All that is needed is in the README.md, however, in order not to hijack this topic, please create an issue here if anything is unclear πŸ˜„

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment πŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

mvn23 commented 3 years ago

Nor stale, the closing PR is awaiting review.