Git Product home page Git Product logo

ha_sense's People

Contributors

actions-user avatar dahlb avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

viper5000

ha_sense's Issues

Excessive logging generated by integration

System Health details

unnecessary for this issue, I have already determined the root cause

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

The integration generates a long line every couple of minutes for every enabled entity.

I have tracked this down to the following line:

data[CONF_SENSE_LINK].print_instance_wattages()

The preceeding for loop does the same thing as the library does when this line is called, but the for loop correctly does it at the debug level. The line in question does the same thing at the info level, which is unnecessary. I recommend just removing the line in question that calls print_instance_wattages() as users will still be able to access that logging if they enable debug logging, and will not clutter their logs making it more difficult to troubleshoot issues unrelated to this integration.

Reproduction steps

  1. install the integration
  2. enable some entities provided by the integration
  3. look at your logs

Debug logs

2023-09-27 10:25:05.014 INFO (SyncWorker_5) [root] Plug cph50 power output power: 0.0
2023-09-27 10:25:05.014 INFO (SyncWorker_5) [root] Plug terrarium lights power power: 93.0
2023-09-27 10:25:05.014 INFO (SyncWorker_5) [root] Plug korben port 1 poe power power: 7.64
2023-09-27 10:25:05.014 INFO (SyncWorker_5) [root] Plug korben port 2 poe power power: 6.13
2023-09-27 10:25:05.014 INFO (SyncWorker_5) [root] Plug korben port 3 poe power power: 3.46
2023-09-27 10:25:05.015 INFO (SyncWorker_5) [root] Plug omnilogic pool filter pump power power: 150.0
2023-09-27 10:27:05.015 INFO (SyncWorker_7) [root] Plug cph50 power output power: 0.0
2023-09-27 10:27:05.015 INFO (SyncWorker_7) [root] Plug terrarium lights power power: 93.0
2023-09-27 10:27:05.015 INFO (SyncWorker_7) [root] Plug korben port 1 poe power power: 7.64
2023-09-27 10:27:05.015 INFO (SyncWorker_7) [root] Plug korben port 2 poe power power: 6.02
2023-09-27 10:27:05.015 INFO (SyncWorker_7) [root] Plug korben port 3 poe power power: 3.51
2023-09-27 10:27:05.015 INFO (SyncWorker_7) [root] Plug omnilogic pool filter pump power power: 150.0
2023-09-27 10:29:05.017 INFO (SyncWorker_16) [root] Plug cph50 power output power: 0.0
2023-09-27 10:29:05.017 INFO (SyncWorker_16) [root] Plug terrarium lights power power: 92.7
2023-09-27 10:29:05.017 INFO (SyncWorker_16) [root] Plug korben port 1 poe power power: 7.64
2023-09-27 10:29:05.017 INFO (SyncWorker_16) [root] Plug korben port 2 poe power power: 6.18
2023-09-27 10:29:05.018 INFO (SyncWorker_16) [root] Plug korben port 3 poe power power: 3.94
2023-09-27 10:29:05.018 INFO (SyncWorker_16) [root] Plug omnilogic pool filter pump power power: 150.0

Diagnostics dump

No response

Address already in use error when enabling a second device

System Health details

System Information

version core-2023.8.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone America/Chicago
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4070
Installed Version 1.32.1
Stage running
Available Repositories 1274
Downloaded Repositories 27
Home Assistant Cloud
logged_in true
subscription_expiration April 27, 2024 at 7:00 PM
relayer_connected true
relayer_region us-east-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled true
remote_server us-east-1-2.ui.nabu.casa
certificate_status ready
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.5
update_channel stable
supervisor_version supervisor-2023.08.1
agent_version 1.5.1
docker_version 23.0.6
disk_total 457.7 GB
disk_used 30.1 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons Studio Code Server (5.10.1), Terminal & SSH (9.7.1), Node-RED (14.4.5), Let's Encrypt (4.12.9), chrony (2.6.0), MariaDB (2.6.1), phpMyAdmin (0.8.7), Vaultwarden (Bitwarden) (0.19.4), Glances (0.19.2), Z-Wave JS UI (1.15.7), Mosquitto broker (6.2.1), ESPHome (2023.8.2), Bookstack (1.9.1), InfluxDB (4.7.0), Grafana (9.0.3), Nginx Proxy Manager (0.12.3), AdGuard Home (4.8.14)
Dashboards
dashboards 4
resources 15
views 22
mode storage
Recorder
oldest_recorder_run July 30, 2023 at 1:47 AM
current_recorder_run August 25, 2023 at 3:57 PM
estimated_db_size 968.72 MiB
database_engine mysql
database_version 10.6.12
Spotify
api_endpoint_reachable ok

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

When enabling more than one device, the logs produce an error about the address already being in use. If multiple devices are already enabled when the integration first starts up (for example after restarting Home Assistant) things seem to be fine. It appears that every time you enable a device perhaps it tries to restart the SenseLink, but it does not stop the old one first, so port 9999 (appears to be the default in SenseLink code) is already in use.

Reproduction steps

  1. Install ha_sense integration from HACS
  2. Enable one of the added entities
  3. Wait at least 30 seconds for the entity to fully enable
  4. Enable a second entity
  5. Wait at least 30 seconds for HA to attempt to enable the entity
  6. Observe error in logs

Debug logs

I cannot include the entirety of the logs because it makes the bug report to long, the maximum is 65536 characters.  I will attach it to the issue.

home-assistant_ha_sense_2023-08-25T21-17-11.339Z.log

Diagnostics dump

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.