Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install Risco integration using local option #103380

Closed
03397 opened this issue Nov 4, 2023 · 18 comments · Fixed by #113505
Closed

Cannot install Risco integration using local option #103380

03397 opened this issue Nov 4, 2023 · 18 comments · Fixed by #113505

Comments

@03397
Copy link

03397 commented Nov 4, 2023

The problem

Guys, I am trying to connect my Risco Alarm Panel Rw132 as local to Home Assistant.
I am 100% sure that the IP address, port and CS Pin Number are all correct..
When I try to add I am getting a "Failed to Connect" message without any entries in the logs of Home Assistant

What version of Home Assistant Core has the issue?

2023.11.0

What was the last working version of Home Assistant Core?

It never worked.

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Risco

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Nov 4, 2023

Hey there @OnFreund, mind taking a look at this issue as it has been labeled with an integration (risco) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of risco can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign risco Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


risco documentation
risco source
(message by IssueLinks)

@OnFreund
Copy link
Contributor

OnFreund commented Nov 4, 2023

Have you looked at #99229?

@jakob1911
Copy link

jakob1911 commented Nov 4, 2023

i currently have the same problem, but this is on the way to be solved by adding a communication delay. Already done in "Pyrisco"
the goal or porpose is to cover the slower mono socket ip modules, which are sometimes in the need of this delay.

FredericMa:add_communication_delay

@03397
Copy link
Author

03397 commented Nov 4, 2023

Have you looked at #99229?

My panel can successfully connect to the cloud and connect to CS software simultaneously. This is multi socket. Is this the solution or this is something to try or the solution is the delay proposed?

@03397
Copy link
Author

03397 commented Nov 4, 2023

In addition, I have disabled the cloud connection and I am getting the same behavior.

@FredericMa
Copy link
Contributor

PR #101349 has been merged. I guess it will be shipped in the December release.

@issue-triage-workflows
Copy link

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.

@03397
Copy link
Author

03397 commented Feb 11, 2024

Ιs this solved here or on PR #101349?

@github-actions github-actions bot removed the stale label Feb 11, 2024
@FredericMa
Copy link
Contributor

I think so

@03397
Copy link
Author

03397 commented Feb 11, 2024

Still does not work
Logger: homeassistant.components.risco.config_flow
Source: components/risco/config_flow.py:184
Integration: Risco (documentation, issues)
First occurred: 8:20:20 PM (1 occurrences)
Last logged: 8:20:20 PM

Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/risco/config_flow.py", line 184, in async_step_local
info = await validate_local_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/risco/config_flow.py", line 99, in validate_local_input
await risco.connect()
File "/usr/local/lib/python3.12/site-packages/pyrisco/local/risco_local.py", line 28, in connect
firmware = await self._rs.send_result_command("FSVER?")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyrisco/local/risco_socket.py", line 98, in send_result_command
command = await self.send_command(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyrisco/local/risco_socket.py", line 108, in send_command
return await asyncio.wait_for(future, 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
pyrisco.common.OperationError: cmd_id: 6, Risco error: N05

@jakob1911
Copy link

I had the same fault when trying to connect to my Agility 3. The "problem" is not at the risco integration here -- its in the dependency of this integration ! PYRISCO by OnFreund is a depedency for this integration to work !
I found out the problem by checking the code ( ---- PYRISCO by OnFreund) on the point where "FSVER?" is send to the panel. My RW132 never gave me an response on that command "FSVER?". So i had the same fault in homeassistant as you !

Then i verified this guess (panel not giving a response) by analysing the logs when communicating with the risco config software. This command is asking for the firmware version. In my case (my panel) the commad for retriving the firmware has to be "PNLVER?".
But i don´t wasted my time on that and modified the code (i forked pyrisco - jakob1911) right away to give a fixed response on that command. So instead of await..... i use a constant string '3.95' -- which is my firmware version.
Then communication was possible for me.

I was also mentioning creating a PR in the next months, but not here at the risco integration. The code parts that i modified is within the used dependency for this integration which is PYRISCO by OnFreund.

@03397
Copy link
Author

03397 commented Feb 13, 2024

I have also an Agility 3 so our scenarios are actually identical.
I am running Home assistant in a docker, can you please be more specific in how I can change the Pyrisco that you have mentioned above and change it using your fork Pyrisco?

Is your change going to be included in the Pyrisco at sometime or not?

@OnFreund
Copy link
Contributor

had the same fault when trying to connect to my Agility 3. The "problem" is not at the risco integration here -- its in the dependency of this integration ! PYRISCO by OnFreund is a depedency for this integration to work !

Yes, I maintain both the integration and the underlying dependency. HA integrations don't communicate directly with devices, they use libraries.

Then i verified this guess (panel not giving a response) by analysing the logs when communicating with the risco config software. This command is asking for the firmware version. In my case (my panel) the commad for retriving the firmware has to be "PNLVER?".

FSVER and PNLVER are not equivalent, but it's good to know that FSEVER isn't supported on all devices. I can figure out a way around that.
Other than FSVER, is everything else functioning correctly? I want to make sure this isn't representative of other unsupported commands.

@OnFreund
Copy link
Contributor

I released a new version of pyrisco that doesn't get the firmware version for RW panels. Can you test that?
https://pypi.org/project/pyrisco/0.5.9/

@jakob1911
Copy link

jakob1911 commented Feb 16, 2024

Hello OnFreund,

many thanks for your fast reply ! I really appriciate your work and your time for this code/project. It took me quite a lot of time to get my fork of pyrisco working properly togehter with HomeAssistant. I´m willing to contribute with my changes, but i was still testing everything for stability purpose.

I will create a Issue in the depedency -- pyrisco right now with the other changes i made. I hope you can modifiy, so that i dont need to get the expirienced way with the "custom integration", which i do now for testing purpose.

Thank you ! Jakob

@jakob1911
Copy link

jakob1911 commented Feb 16, 2024

Hello OnFreund, hello 03397,

please find my Issue here OnFreund/pyrisco#18

I put all the information on modifications to get it to work with homeassistant.

@03397 I´m also using HA in a Docker..... I can share my manifest.json from my "custom integration" which i did in HA. But i think we should wait for OnFreund`s answer first.
Because my solutions with the "custom integration" - Risco also has negative aspects -- like you are by your self responsible for updating it...... and so on.. I think this are problems that can be solved and merged.

@03397
Copy link
Author

03397 commented Mar 9, 2024

Guys, any news on this?

@OnFreund OnFreund mentioned this issue Mar 15, 2024
20 tasks
@OnFreund
Copy link
Contributor

OnFreund commented Mar 15, 2024

@03397 this should be fixed in 2024.3.2

@jakob1911 Can you open a new issue (here in HA, not in pyrisco) for your max concurrency situation? Might take me a while to get to it, so I don't want to lose track of it.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants