Closed gsteever closed 6 years ago
@gsteever The calls to control the peripheral devices i.e. lights, locks, etc., were created by @yungsters. Looking at them, it doesn't look like any of them use the extra form variables that the login call does. Maybe they should be sending them now? As I don't have any of those devices, I can't test. If you, or anyone else that has these devices, want to try it yourself and see if it works, I can clone your call and update the plugin.
@bryanbartow, I'd be happy to test them if you don't mind coding it with the extra variables. Just let me know when you have them done and what I need to do anything on my end (ie. update, test via wrap, etc). Thanks!
@gsteever You've got it in the reverse order. Since I don't have these devices, it's something you (or someone else who has them) needs to create and give to me. Once that's done, I can modify my calls and update the plugin. Make sense?
I'm sorry, I'm not following. Please let me know what you need from me and I'll gladly help. If it involves either creating a new alarm.com account or changing my alarm.com password to give you temporary access, just let me know.
@gsteever I don't feel comfortable using someone else's account. You (or someone who has these devices tied to their account) needs to create new working API calls using WrapAPI. Once that's done, I'll clone the new calls and update the plugin.
Sorry for the confusion, I'm new to this. I'll try to figure out how to do this and let you know when it is working. Also, just to let you know, overnight the API issue started to happen again. My homebridge is unable to login with alarm.com again. I tried the wrapapi, initlogin and login but getting the same problem we saw last week.
@gsteever Yep. Noticed it just shortly after my last comment. I've updated the calls and plugin. Once you update, you should at least get your alarm functionality back.
I have updated the plugin and the call key but getting this;
[2/14/2017, 11:15:10 AM] [Security Panel] Request livefeed/alarmdotcom/getviewstate/0.1.2
was unsuccessful:
livefeed/alarmdotcom/getviewstate/0.1.2
was unsuccessful:livefeed/alarmdotcom/getviewstate/0.1.2
was unsuccessful:@livefeed there was a new wrapapi call, getviewstate. you can find the link in the readme.
Thanks David, I added the new call but now see this;
11:24:32 - [Security Panel] Error while getting lock devices: TypeError: Cannot read property 'map' of undefined 11:24:33 - [Security Panel] Error while getting light devices: TypeError: Cannot read property 'map' of undefined 11:24:33 - [Security Panel] Initializing platform accessory 'Alarm.com Security Panel'...
Personally, I've always had those errors because I do not own any lock or light devices. It should still work with these errors.
ahhh yeis working - thank you! I now have my garage door (MyQ) in my Alarm.com account should it show up via your plugin? @bryanbartow It would be really nice if the plugin would pull the garage door in as a lock.
@livefeed The general rule is if the device is supported on the Alarm.com mobile site, it can potentially be supported by the plugin. Do you see controls for you garage door when you log in to that site?
@bryanbartow yes I see it it my account and opens and closes
I just wanted to come on here and say thank you for continuing to maintain this and the changes that appear to be breaking this interaction from homebridge lately. This is a really a nice way to operate and automate my alarm system.
I second that last comment, thank you!
@kpdillon @livefeed You bet. As long as my wife insists on having a home security system and as long as that system uses Alarm.com I'll keep updating the plugin. Glad you like it.
@livefeed I don't have any way to work on that since I don't have a garage door integrated with Alarm.com, but if you want to submit a PR I'll be happy to look at it.
@bryanbartow sorry new to this, whats a PR?
@livefeed Pull request. I take it you're not a developer ;)
@bryanbartow aaahhhh no!
If you could tell me how to do it? Would love to have that garage door in HomeKit via alarm.com
Hi,
I do have locks which show in alarm.com yet I still get "Error while getting lock devices: TypeError: Cannot read property 'map' of undefined". All I'm seeing right now is my security panel correctly showing as off and one of their z-wave light dimmers showing as no response.
@jdshkolnik As previously stated, I only have an alarm.com panel. I don't have any other peripheral devices. I can't work on those calls. @yungsters originally created them using his devices. If someone who has them wants to submit PR to fix/update the associated calls, I'll be happy to merge them in.
I saw the Chrome plugin for WrapAPI but how exactly are you capturing these calls?
@bryanbartow, I just created a pull request although I'm not sure if I did it correctly. I also grabbed what I could which you can find attached to this message.
https://github.com/bryanbartow/homebridge-alarm.com/pull/46/files
@jdshkolnik Read the docs.
@gsteever I closed the pull request because it would revert the plugin to a previous state and didn't include any new code which could fix the current issue(s) you are facing.
No problem, I figured what I had attempted earlier wasn't going to help much. As I mentioned previously, I'm happy to assist with the troubleshooting as I have both a garage door and locks integrated with my Alarm.com account. Although I am not a developer, my degree was in computer science and I still have technical ability. If you can point me in the right direction, by either suggesting resources such as using the wrapapi plug-in or a hybrid approach, I'd like to assist getting this resolved since @yungsters doesn't appear to be active or responsive to what is happening right now. Thanks again for all that you do...this community appreciates all of your efforts!
@gsteever There are two areas you can work on to try and solve the issue(s):
It may turn out that there are no changes necessary to the plugin itself and only modification to the WrapAPI calls are necessary. If that's the case, just let me know when you have working calls and I'll modify the existing calls to match yours. Make sense?
Yes, this makes sense. I'll try to dig into it over the weekend. There will be a learning curve and an efficiency delay so please be patient with me. Thanks!
@gsteever @bryanbartow thank you both for working on this, fingers crossed!
I updated to latest npm package and added the new accessories section but still get "Error while getting lock devices: TypeError: Cannot read property 'map' of undefined"
@jdshkolnik Those calls still have not been updated. Whatever issue(s) existed before will still exist. The new version just allows you to conditionally load the individual accessories.
@bryanbartow How is the conditional loading accomplished? You mean during active development, like in a debug mode?
@jdshkolnik I'm not sure if I follow your question. The accessories object in the config contains three booleans each one representing one of the accessory types. The plugin will attempt to load each accessory type if the corresponding boolean in the config is set to true.
I understand now. You're saying the attempt will now be made but the API calls themselves are still not working.
@jdshkolnik Yep.
Were you ever able to fix this? I'm getting this same error on a new setup and I'm wanting to get the locks working. I have the locks and the API appears to be right from what I can see but it appears to be hitting on this line in the code:
getLockAccessories() { return this.api.login() .then(session => session.send('locks/0.1.1')) .then(json => json.data.locks.map( lock => new ADCLockAccessory(this, lock) )) .catch(error => { this.log('Error while getting lock devices: %s', error); return []; }); }
[3/16/2017, 9:19:01 PM] Loading 1 platforms... [3/16/2017, 9:19:01 PM] [Security Panel] Initializing Alarmdotcom platform... [3/16/2017, 9:19:05 PM] [Security Panel] Error while getting lock devices: TypeError: Cannot read property 'map' of undefined [3/16/2017, 9:19:05 PM] [Security Panel] Initializing platform accessory 'Alarm.com Security Panel'...
Let me know what you need help with to fix this, I'm going to work on the code and see if I can get this working.
Thanks
@btotharye Not sure if your question was directed at me or not, but I don't have locks in my Alarm.com account, so I don't have any way of testing this. If you or someone else with locks can get it working and submit a PR, I will merge it in.
I would just like my garage door that's in alarm.com to port over via this.
I've taken a look at the WrapAPI calls for the locks and found the form selector needed to up updated. I've created a PR (#54) with the modified url.
I've merged @andrewmattie PR. It requires one to delete their existing /locks call and replace it with his. I have not noticed any issues with my system, but I don't have locks, so I can only verify that it doesn't interfere with the core alarm functionality.
I'll look at this when I have a chance. I don't have a garage so I'll spin the locks out as a separate enhancement before starting.
Great thank you!
I can confirm the new WrapAPI URL works for locks.
@wdbrady Just to be clear, you're saying this issue can be closed, right?
Using the @andredmattie link on WrapAPI works for locks. I would recommend updating the link on NPM, but this can be closed in my opinion.
Hi iv added a nutone nws15z light switch to my iq panel 2 and it's working fine on the panel but it doesn't come up on alarm.com.
It appears the issue we experienced earlier this week concerning, "WrapAPI Login call failing?", is also affecting my locks and garage door integration with Alarm.com. After launching homebridge I see the following messages. I do not have any lights bound to my Alarm.com account so the first two messages may not hold any relevance. Please let me know if you have any suggestions. It was particularly nice when I would say good night to siri, she would turn off lights, set the alarm, close the garage door and engage all of the locks.
[2/11/2017, 7:22:56 AM] [Security Panel] Request
username/alarmdotcom/lights/0.1.1
was unsuccessful:username/alarmdotcom/lights/0.1.1
was unsuccessful: