Giter Site home page Giter Site logo

reef-pi-hass-custom's People

Contributors

alex255 avatar danmrossi avatar tdragon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

reef-pi-hass-custom's Issues

Ability to toggle/disable reef-pi-hass-custom ph data extraction

Hi @tdragon @alex255

first of all apologies for the long read - I’ve spent a year trying everything possible to diagnose and fix this myself.

Was wondering if it’s possible to code in the ability to disable your Home Assistant add-on from even pulling or even looking at reef-pi PH data?

Unfortunately I am of the belief that this has to be done at your app level as disabling the ph entity in Home Assistant that your addon brings in has no effect as obviously your addon is still accessing the data.

The issue I have been having and others have had in various posts I’ve seen on reef2reef and other forums is that when your addon is installed into Home Assistant and configured to connect to reef-pi, the ph section drops readings as shown below
image

it even shows the same in the reef-pi user interface as well.

I am running reef-pi 6.0 on a Robo tank board with a rpi4 plugged into it and using the Robo tank inbuilt ph module and also a bog
Standard plain Jane raspberry pi 4 and connected an atlas ph probe and its isolated board directly to it. Both have same issues.0

If I enable mqtt in reef-pi and map the ph into configuration.yaml to bring in ph that way while your addon is installed and connected to both reef-pi’s the readings still drop as per screenshot above.

If I remove your addon from Home assistant and wether or not I leave the mqtt enabled or not the ph readings in both reef-pi’s go back to normality in reef-pi and for the mqtt entity mapped into Home Assistant.

If I installed the addon again the ph readings drop again. Regardless if mqtt is on or not.

Also it doesn’t matter how often I configure reef-pi to get readings from the probe. Makes no difference when your addon is configured to connect to reef-pi

id like to keep using your addon so I can run macros and control outlets etc but I don’t know myself how to even compile my own version of your addon to remove the ph stuff

are you able to assist?

many thanks

Daniel

Authentication Error

I I have tried setting up both manually and via HACS. It appears I am getting a authentication error

the following error is appearing in smart assistant:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.0.222', port=80): Max retries exceeded with url: /auth/signin (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa730422a60>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

Home Assistant Deprecated Entry Log

2024-07-21 20:00:49.852 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'reef_pi' calls async_forward_entry_setup for integration, reef_pi with title: RoboCtrl and entry_id: 2cb08b84e75ae1b218215d2d36530320, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/reef_pi/init.py, line 66: hass.async_create_task(, please create a bug report at https://github.com/tdragon/reef-pi-hass-custom/issues
2024-07-21 20:00:50.305 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration reef_pi with title: RoboCtrl and entry_id: 2cb08b84e75ae1b218215d2d36530320, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
_LOGGER.warning(msg, stack_info=True)
2024-07-21 20:00:50.309 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration reef_pi with title: RoboCtrl and entry_id: 2cb08b84e75ae1b218215d2d36530320, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
_LOGGER.warning(msg, stack_info=True)
2024-07-21 20:00:50.310 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration reef_pi with title: RoboCtrl and entry_id: 2cb08b84e75ae1b218215d2d36530320, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
_LOGGER.warning(msg, stack_info=True)
2024-07-21 20:00:50.311 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration reef_pi with title: RoboCtrl and entry_id: 2cb08b84e75ae1b218215d2d36530320, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
_LOGGER.warning(msg, stack_info=True)
2024-07-21 20:00:50.319 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration reef_pi with title: RoboCtrl and entry_id: 2cb08b84e75ae1b218215d2d36530320, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
_LOGGER.warning(msg, stack_info=True)

pH Sensor value does not update

Hi All

Been using this addon for a few months now and would like to say well done to @tdragon - Would also like to say that the Macro Control works (i don't have an account yet on HA to reply to your thread there).

I shut-down my Reef-Pi and my Home Assistant Server (both on their own separate Raspberry Pi's) as i had to move their power supplies and now the pH Sensor only updates the once upon HA Startup and thats it. Unless i reload the Reef-Pi HACS integration will it update one more time and then back to not updating at all. My 2 temp sensors update every few minutes or so without issue.

Reef-Pi is on v5.3 running on a robo-tank board with it's inbuilt pH Connector/Sensor - pH Graphs update every 60 seconds in reef-pi GUI without issue.

I have gone as far as deleting your addon, deleting HACS, Rebooting, clearing any leftovers and reinstalling. Still same thing. Even restored HA to a 2022.08.x backup. No change.

Home Assistant build is 2022.9.7, Supervisor is 2022.09.1, Frontend is 20220907.2, Operating System is 8.5
HACS build is: Integration 1.27.2, Frontend is 20220906112053

Also when i last updated Home Assistant and rebooted it, the ph Sensor worked as normal. I have also tried rebooting both devices in staggered but different orders, no change. Rebooted my WiFi router for the hell of it. No change.

Has anyone else experienced anything like this or know where i could start to try and figure out the cause/issue?

Is there any other things i can provide to assist in diagnosis?

Many thanks :)

Daniel

Reef-Pi 6.0 incompatible?

Hi @tdragon and @alex255 i hope you are doing well :)

I thought it best to bring this to your attention in case others start having issues :)

I am currently running your beta 0.3.3 - i was the one having issues with PH & Temp Sensors not updating and you released the 0.3.3 beta for me :)

I was running Reef-Pi v5.3 and for Home Assistant: 2022.11.4 / Supervisor 2022.10.2 / Operating System 9.3 / Frontend 20221108.0 - Without any issues. Have rebooted both reef-pi hardware and Home Assistant hardware and no issues.

I saw Reef-Pi v6.0 was released about 6 hours ago at the time of writing this and installed it, no issues there. Only updated it for the ESP32 integrations i will be soon utilising.

PH/Temp sensors in Reef-Pi web gui still update/function in the new 6.0 version without issue.

However the Temp and PH Sensors have stopped updating again in Home Assistant. Just displays the last value it got upon startup and that's it.

I can still control everything else in Reef-Pi and Home Assistant Integration such as equipment and macros without issue.

To try to fix, I deleted the "Reef-Pi Integration" from HA Integrations and then deleted your HACS Addon and power-cycled on/off/on my Home Assistant hardware. I then reinstalled your 0.3.3 beta addon and then performed another power-cycle. I then re-added the integration, waited about 30 minutes and Powercycled the Home Assistant again to force refresh, I can control equipment macros etc in Home Assistant but PH and Temp Sensors are frozen again. Also tried rebooting the reef-pi hardware. No change..

Is there anything else i can provide you to help determine what's at fault?

Kind Regards

Daniel

Add dosing usage?

Hello! Thanks so much for creating this easy to use HACS integration. It's working fantastic for my setup.

That said, I wonder if you'd be willing to extend the functionality a little bit? One of the APIs allows to view dosing usage information, for example:

/api/doser/pumps/{id}/usage

Which returns a JSON string like:

{"current":[{"pump":11,"time":"Aug-18-14:05, 2021"}],"historical":[{"pump":11,"time":"Aug-18-14:05, 2021"}]}

It would be great if I could pull in this information to HA so I could get a visual on my dosing runs.

Thank you!

Home assistant update breaks integration?

Recently updated to a newer version of HA (2023.9.0) and am getting an error when trying to establish connection to entities. After the error there's no further reporting and the entities aren't enabled any longer/not reporting. Any ideas?

2023-09-07 11:22:24.157 DEBUG (MainThread) [custom_components.reef_pi] Finished fetching reef_pi data in 2.393 seconds (success: True) 2023-09-07 11:22:24.157 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.reef_pi 2023-09-07 11:22:24.157 INFO (MainThread) [homeassistant.components.switch] Setting up switch.reef_pi 2023-09-07 11:22:24.157 INFO (MainThread) [homeassistant.components.light] Setting up light.reef_pi 2023-09-07 11:22:24.157 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.reef_pi 2023-09-07 11:22:24.157 INFO (MainThread) [homeassistant.components.button] Setting up button.reef_pi 2023-09-07 11:22:24.158 DEBUG (MainThread) [custom_components.reef_pi] sensor temperature: 1, pH: 2 2023-09-07 11:22:24.159 ERROR (MainThread) [homeassistant.components.sensor] reef_pi: Not adding entity with invalid device info: Invalid device info {'configuration_url': 'http://192.168.10.79', 'default_manufacturer': 'reef-pi.github.io', 'default_model': 'Reef PI', 'default_name': 'reef-pi', 'identifiers': {('reef_pi', 'http://192.168.10.79')}, 'model': 'Raspberry Pi Zero 2 W Rev 1.0', 'name': 'reef-pi', 'sw_version': '5.3'} for 'reef_pi' config entry: device info needs to either describe a device, link to existing device or provide extra information. 2023-09-07 11:22:24.160 ERROR (MainThread) [homeassistant.components.switch] reef_pi: Not adding entity with invalid device info: Invalid device info {'configuration_url': 'http://192.168.10.79', 'default_manufacturer': 'reef-pi.github.io', 'default_model': 'Reef PI', 'default_name': 'reef-pi', 'identifiers': {('reef_pi', 'http://192.168.10.79')}, 'model': 'Raspberry Pi Zero 2 W Rev 1.0', 'name': 'reef-pi', 'sw_version': '5.3'} for 'reef_pi' config entry: device info needs to either describe a device, link to existing device or provide extra information. 2023-09-07 11:22:24.161 ERROR (MainThread) [homeassistant.components.switch] reef_pi: Not adding entity with invalid device info: Invalid device info {'configuration_url': 'http://192.168.10.79', 'default_manufacturer': 'reef-pi.github.io', 'default_model': 'Reef PI', 'default_name': 'reef-pi', 'identifiers': {('reef_pi', 'http://192.168.10.79')}, 'model': 'Raspberry Pi Zero 2 W Rev 1.0', 'name': 'reef-pi', 'sw_version': '5.3'} for 'reef_pi' config entry: device info needs to either describe a device, link to existing device or provide extra information. 2023-09-07 11:22:24.162 ERROR (MainThread) [homeassistant.components.switch] reef_pi: Not adding entity with invalid device info: Invalid device info {'configuration_url': 'http://192.168.10.79', 'default_manufacturer': 'reef-pi.github.io', 'default_model': 'Reef PI', 'default_name': 'reef-pi', 'identifiers': {('reef_pi', 'http://192.168.10.79')}, 'model': 'Raspberry Pi Zero 2 W Rev 1.0', 'name': 'reef-pi', 'sw_version': '5.3'} for 'reef_pi' config entry: device info needs to either describe a device, link to existing device or provide extra information. 2023-09-07 11:22:24.162 ERROR (MainThread) [homeassistant.components.binary_sensor] reef_pi: Not adding entity with invalid device info: Invalid device info {'configuration_url': 'http://192.168.10.79', 'default_manufacturer': 'reef-pi.github.io', 'default_model': 'Reef PI', 'default_name': 'reef-pi', 'identifiers': {('reef_pi', 'http://192.168.10.79')}, 'model': 'Raspberry Pi Zero 2 W Rev 1.0', 'name': 'reef-pi', 'sw_version': '5.3'} for 'reef_pi' config entry: device info needs to either describe a device, link to existing device or provide extra information. 2023-09-07 11:22:24.163 ERROR (MainThread) [homeassistant.components.binary_sensor] reef_pi: Not adding entity with invalid device info: Invalid device info {'configuration_url': 'http://192.168.10.79', 'default_manufacturer': 'reef-pi.github.io', 'default_model': 'Reef PI', 'default_name': 'reef-pi', 'identifiers': {('reef_pi', 'http://192.168.10.79')}, 'model': 'Raspberry Pi Zero 2 W Rev 1.0', 'name': 'reef-pi', 'sw_version': '5.3'} for 'reef_pi' config entry: device info needs to either describe a device, link to existing device or provide extra information.

Home Assistant reporting deprecated "constsants" which will be REMOVED in HA Core 2025.1

hi @tdragon and @alex255

Just thought i would let you know about the below. Realise it states it won't affect us until 2025.1 version but thought i would give you a heads up.

2024-04-06 14:52:29.379 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from reef_pi, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'reef_pi' custom integration

2024-04-06 14:52:29.383 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_FAHRENHEIT was used from reef_pi, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please report it to the author of the 'reef_pi' custom integration

update delay

Hi
great effort and really easy to use, however i have an update delay issue, like when i turn on a switch though HA it lags on reef-pi side to be updated as turned on
the other way if i turn a switch on on reef-pi side it will not update on HA side for a long time even if i reload the page, the only solution is to open a different item other than Lovelace and then return to it
i tried to find an update option in the code but failed also i can not find an update option in HA Lovelace
any advice will be appreciated
regards

Dosers

Hi there @tdragon Hope all is well with you :)

Integration has been working great! Just wondering if it is humanly possible to integrate the full or close to the full dosing api into Home Assistant? As i (in a nutshell) would love to be able to fully control and automate components by combination of either reef-pi and home assistant for controlling, scheduling, dosing etc and then use a combination macros in reef-pi and automations in Home Assistant that if x doser runs longer than x then to initiate a shutdown and notify message/sound etc etc.

Hope that makes sense :)

I am more than happy to donate to your beer or coffee fund :)

Ph Value

Hi,
I'm testing the Reef-Pi integration,
Everything works fine exept for the analog sensor reading:
I'm using a Ph Sesor and if I calibrate the probe in Reef-Pi I have the right value, but in Home Assistant I only have the raw ADC value.
How can I solve that?
Thank you very much!
Best regards

Simone

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.