Closed karlismaj closed 3 years ago
risco documentation risco source (message by IssueLinks)
Hey there @onfreund, mind taking a look at this issue as its been labeled with an integration (risco
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
Can you see the entity in Dev Tools -> States?
I don’t know what is the name for that. I see only those sensors I’ve mentioned in my issue and then sensors for each of my alarm zones. But nothing else related to risco. Can you send me the entity name example I’ll try to look for it manually?
Get Outlook for iOShttps://aka.ms/o0ukef
From: On Freund notifications@github.com Sent: Saturday, September 19, 2020 4:04:09 PM To: home-assistant/core core@noreply.github.com Cc: karlismaj km@outlook.lv; Author author@noreply.github.com Subject: Re: [home-assistant/core] 0.115 RISCO integration risco panel does not appear on the lovelace alarm panel card entity list (#40290)
Can you see the entity in Dev Tools -> States?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/40290#issuecomment-695210780, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHXRW4SZEHSODI3V45IVWLLSGST4TANCNFSM4RS4NQGA.
Well, it's an alarm_control_panel
entity. You probably don't have many of those, so should be easy to find...
No. I can’t find it. Any clue what to do?
Get Outlook for iOShttps://aka.ms/o0ukef
From: On Freund notifications@github.com Sent: Saturday, September 19, 2020 4:08:42 PM To: home-assistant/core core@noreply.github.com Cc: karlismaj km@outlook.lv; Author author@noreply.github.com Subject: Re: [home-assistant/core] 0.115 RISCO integration risco panel does not appear on the lovelace alarm panel card entity list (#40290)
Well, it's an alarm_control_panel entity. You probably don't have many of those, so should be easy to find...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/40290#issuecomment-695211345, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHXRW4TLY2UBVFFMMC6HDOTSGSUNVANCNFSM4RS4NQGA.
Any errors in the logs?
Logger: homeassistant.components.alarm_control_panel Source: components/risco/alarm_control_panel.py:55 Integration: Alarm control panel (documentation, issues) First occurred: 11:30:14 AM (1 occurrences) Last logged: 11:30:14 AM
Error while setting up risco platform for alarm_control_panel Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 193, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/risco/alarm_control_panel.py", line 55, in async_setup_entry for partition_id in coordinator.data.partitions File "/usr/local/lib/python3.8/site-packages/pyrisco/risco.py", line 134, in partitions self._partitions = {p["id"]: Partition(p) for p in self._raw["partitions"]} TypeError: 'NoneType' object is not iterable
Hmmm, your Risco system isn't reporting any partitions. What type of Risco system is this?
Risco commpact. But it is not WIFI enabled. It has only GPRS, GSM and PSTN communication interface options. Maybe that is an issue.
Well, if you're getting all of your zones, it's definitely connected to the network in some way :)
Looks like this isn't a partitioned system, so it's too different than the API I have. You'll have to reverse engineer the API for that if you want to support it. Sorry.
have the same issue. also using a risco compact. have all the sensors, but the alarm control panel is missing :(
reverse engineer the API - sounds to me like build a rocket to the Mars. Any hints on the community developers where this one could be discussed?
I'm more than happy to try to help, but without access to such a device, there's a limit to what I can do, and you'll have to do most of the heavy lifting. I was lucky that someone already reverse engineered the api for partition based systems - maybe search online and see if someone already did that? If you find something, I might be able to convert it to be used in this integration.
Or wait untill Jan 2020, risco is making a public official API
Assuming the API supports Risco CommPact...
I can ask... Allthough I think the api will be a paid feature... I also think they are changing this riscocloud stuff, so we can't use this integration anymore
😱
Just guessing ;)
We will see what happens , I hope not .. but I if it will be a paid feature, I buy it anyway ... I also hope that we can use the api on local lan, instead of cloud only
Hey, same issue here with an iConnect2 panel. All zones and the 4 event sensors show up but no alarm panel.
Log says: _Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 193, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/risco/alarm_control_panel.py", line 55, in async_setup_entry for partition_id in coordinator.data.partitions File "/usr/local/lib/python3.8/site-packages/pyrisco/risco.py", line 134, in partitions self._partitions = {p["id"]: Partition(p) for p in self.raw["partitions"]} TypeError: 'NoneType' object is not iterable
The API from Risco has been promised for a very long time now and continues to be pushed to the next release so I don't have high hopes for that to come anytime soon... :(
Scheduled for Q1 2021
I was using this integration with homebridge https://github.com/gawindx/homebridge-risco-platform and i was able to successfully connect to risco service and even arm my house via the HomeKit. I don't know if these codes have similarities. But i wonder maybe missing site id input onto configuration is the one that generates the error?
The integration with Homebridge is built on scraping the Risco web UI, so it doesn't really help. The implementation details are taken care of by the Risco servers, and hidden from us, and HA doesn't allow scraping in core integrations, so we can't really use this.
The site id isn't missing - the first site is being used (otherwise you wouldn't get binary sensors for the zones). The problem is the lack of partitions, but once again, without reverse engineering the API, there's not much I can do.
I would be happy to reverse engineer API.. well at least try my best, but my device works on mobile network and i cannot sniff into traffic to see how it flows.
You need to reverse engineer the api between the phone app and Risco cloud, not the device. If you're using iOS, this is a good start: https://www.raywenderlich.com/1827524-charles-proxy-tutorial-for-ios
This piece of software costs 10€ and I don't know if it will help. Is there a free alternative?
It has a free trial
Unfortunately not. Maybe not in my region. I can only purchase it for 9.99. No option for install and then make in-app purchased
From: On Freundmailto:notifications@github.com Sent: otrdiena, 2020. gada 22. septembris 19:38 To: home-assistant/coremailto:core@noreply.github.com Cc: karlismajmailto:km@outlook.lv; Authormailto:author@noreply.github.com Subject: Re: [home-assistant/core] 0.115 RISCO integration risco panel does not appear on the lovelace alarm panel card entity list (#40290)
It has a free trial
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/40290#issuecomment-696838950, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHXRW4UOPOIF3AHWVYKN3IDSHDHGVANCNFSM4RS4NQGA.
Why not just buy it? What's the issue?
@karlismaj get it on your computer, not the phone app. The link I sent has the instructions on using your computer as a proxy to your phone.
Same issue here on a Commpact. Entity alarm panel is not created, would it work to create partitions on the alarm? It is strange because it appears to identify well the alarm but then it does not refresh any info...
would it work to create partitions on the alarm?
I really don't know. I don't have this system and I don't know if it even supports partitions.
Same problem here. Was running fine with docker from mancioshell. But with this integration I only have the 4 event sensors show up but no alarm panel created. My alarm system is Lightsys2 (4 years running).
Errors logged are as follow:
2020-10-29 10:12:55 ERROR (MainThread) [homeassistant.components.risco] Error fetching risco data: {'result': 17, 'validationErrors': None, 'errorText': None, 'errorTextCodeID': None, 'status': 200, 'response': None} 2020-10-29 10:12:55 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error while setting up risco platform for alarm_control_panel Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 197, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/risco/alarm_control_panel.py", line 55, in async_setup_entry for partition_id in coordinator.data.partitions AttributeError: 'NoneType' object has no attribute 'partitions' 2020-10-29 10:12:55 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up risco platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 197, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/risco/binary_sensor.py", line 26, in async_setup_entry for zone_id, zone in coordinator.data.zones.items() AttributeError: 'NoneType' object has no attribute 'zones'
At Risco Cloud I can see only one partition (named "Mi casa").
Let me know if I can provide more information needed to fix this issue.
Logger: homeassistant.components.alarm_control_panel Source: components/risco/alarm_control_panel.py:55 Integration: Alarm control panel (documentation, issues) First occurred: 10:58:47 AM (1 occurrences) Last logged: 10:58:47 AM
Error while setting up risco platform for alarm_control_panel Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 197, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/risco/alarm_control_panel.py", line 55, in async_setup_entry for partition_id in coordinator.data.partitions File "/usr/local/lib/python3.8/site-packages/pyrisco/risco.py", line 134, in partitions self._partitions = {p["id"]: Partition(p) for p in self._raw["partitions"]} TypeError: 'NoneType' object is not iterable
Is it possible to change the python code to work without partitions?
You're mixing two completely separate issues.
@jfamaral I've already answered this multiple times:
I'm more than happy to try to help, but without access to such a device, there's a limit to what I can do, and you'll have to do most of the heavy lifting. I was lucky that someone already reverse engineered the api for partition based systems - maybe search online and see if someone already did that? If you find something, I might be able to convert it to be used in this integration.
@adyannu unfortunately Risco doesn't really tell us what each error number maps to, but my best guess would be that you still have the MQTT running, and your panel is rejecting the additional connection from HA. Please try to disable the MQTT-based code (not just in HA, stop it from running completely so it doesn't connect to risco), wait about an hour, and then try the HA integration again. If it still doesn't work, please open a new issue, since this one is focused on non-partitioned systems (I wish I had permissions to change the title...)
@OnFreund Thank you for your directions. I will try that and give feedback or open another issue if needed.
@OnFreund thanks. Really kind of you to take the time to answer and so fast 👍 MANY THANKS!
I just don't know that the heavy lifting could be in this case. I have been able to understand AlphaESS.com for instance to get the API for battery data but in this case I am not sure...
Detectors: https://riscocloud.com/ELAS/WebUI/Detectors/Get ArmDisarm: https://riscocloud.com/ELAS/WebUI/Security/ArmDisarm
I'm glad to try to understand what would be helpful to provide. I have been analyzing the communication on riscocloud.com For my particular system it shows on GetCPState?userIsAline=true
Status: https://riscocloud.com/ELAS/WebUI/Security/GetCPState?userIsAlive=true
{"error":0,"strResult":"D:","eh":null,"overview":{"partInfo":{"armedStr":"No ","disarmedStr":"Yes ","partarmedStr":"No "},"lastAlarms":[{"dateStr":"21/10/2020","timeStr":"11:36","title":"Alarm - 'LAVANDARIA'","ViUID":"","YTime":"2020-10-21 11:36:00"},{"dateStr":"21/10/2020","timeStr":"10:45","title":"Alarm - 'CABLE'","ViUID":"","YTime":"2020-10-21 10:45:01"},{"dateStr":"19/10/2020","timeStr":"13:31","title":"Alarm - 'CABLE'","ViUID":"","YTime":"2020-10-19 13:31:00"}],"bypassed":[],"cameraSlides":[],"errorIconHint":""},"haSwitch":[],"detectors":{"parts":[{"id":-1,"name":"System","armIcon":"/ELAS/WebUI/Content/images/ico-disarmed.png","detectors":[{"id":0,"bypassed":false,"filter":"","classAttrib":"","data_icon":"detector","name":"Area 1","strTimeval":""},{"id":1,"bypassed":false,"filter":"","classAttrib":"","data_icon":"detector","name":"Area 2","strTimeval":""},{"id":2,"bypassed":false,"filter":"","classAttrib":"","data_icon":"detector","name":"Area 3","strTimeval":""},{"id":3,"bypassed":false,"filter":"","classAttrib":"","data_icon":"detector","name":"Area 4","strTimeval":"21/10/2020 11:36"},{"id":4,"bypassed":false,"filter":"","classAttrib":"","data_icon":"detector","name":"Area 5","strTimeval":"29/09/2020 11:27"},{"id":32,"bypassed":false,"filter":"","classAttrib":"","data_icon":"detector","name":"Cable","strTimeval":"21/10/2020 10:45"}]}]},"allGrpState":{"GlobalState":null,"PartState":[]},"IsOffline":false,"OfflineSince":"N/A","ShowRearmButton":false,"OngoingAlarm":false,"MemoryAlarm":true,"HideDisarmOption":true,"unix_time":1603981891.2880542,"PartArmString":"Partial ","FullArmString":"Set ","ExitDelayTimeout":[0],"PartArmFailures":null}
ID -1 is always the system in these cases IDs 1 to 31 are always sensors ID 32 is always the wired cabling
This is the web application - HA doesn't allow scraping in core components. the integration is using the mobile app api - that's what you should be looking into. Please read through this thread again - this was already discussed.
@adyannu did you manage to resolve this? Would help me troubleshoot future problems if I know that error 17 indeed maps to the panel rejecting a session.
@OnFreund Thanks for the followup. I'm facing random SD Card problems so I can't try much on this due to major concerns. But when I posted this issue I was recovering from a snapshot and the container with Risco integration was not working, so I'm sure that there wasn't more connections to my Risco Cloud account. But as soon as I can migrate to a more stable system I will investigate better this integration. Thank you for all your work and support!
any update?
@coolduke666 As I mentioned several times - someone with access to this system will have to do the heavy lifting here in order to make progress.
best to close this ticket, since there is no issue :)
@OnFreund Hi (everyone). Sorry for not updating before. In my case, the integration is now working. I've done a new system installation (for other reasons) and restored the last snapshot, configure integration again, and it starts working at once. Can't say exactly what has solved it. Thanks to all for the support!
Thanks for the update @adyannu. However, the problem you experienced is very different than then one @coolduke666 is experiencing (he's using a Risco model that's currently not supported by the integration).
Isn't it possible to o create a PR so a "not supported system" is written in the log ?:-)
Well, currently the definition of a system that's not supported is one that doesn't have partitions, so this log will be identical to having no alarm control panels, and won't really supply any new information.
Experiencing the same behaviour with my own Risco. No idea what kind of Risco it is, isn't on the big white "master" box. Every panel, every PIR and every smoke detector is completely wireless, without the need for Wifi.
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.
The problem
Cannot select Risco alarm as an entity when adding lovelace card. The entity is simply missing there. I've even done a fresh installation of HA with only Risco integration just to be sure that this is not related to any custom config. I have successfully connected my risco account. The app recognizes all my zones. I have following sensors available along with my zone sensors (replaced real numbers with XXX): sensor.risco_0000000XXXXX_alarm_events sensor.risco_0000000XXXXX_other_events sensor.risco_0000000XXXXX_status_events sensor.risco_0000000XXXXX_trouble_events
Environment
Problem-relevant
configuration.yaml
Clean configuration.yaml because of clean fresh installation of HA
Traceback/Error logs
Additional information