Closed golish closed 5 years ago
Yes, I remapped the Night mode to stay mode, because my system doesn't support it (afaik).
I will make this a priority in my next update, so to support night mode in the system. Will comment on it later on the instructions to retrieve the night mode information!
Before you start, place your system into TEST MODE. You can do that at the MyADT website.
Here are the instructions to grab the Night Mode URLs from ADT Pulse's website:
https://portal.adtpulse.com/myhome/summary/summary.jsp
.Console
tab.jQuery("#divOrbSecurityButtons").html();
jQuery("#divOrbSecurityButtons").html();
jQuery("#divOrbTextSummary .p_boldNormalTextLarge").html();
jQuery("#arm_button_1").html();
P.S. Remember to let me know which mode you are in when following 6
, 8
, and 12
!
A couple of questions:
armed night
or opened window/door
, just state the current status.Here are the details:
<div><input type="button" id="security_button_0" name="security_button_0" value="Arm Away" alt="Arm Away" class="p_btn p_btnMnormal" onclick="setArmState('quickcontrol/armDisarm.jsp','Arming Away','0','2','false','href=rest/adt/ui/client/security/setArmState&armstate=off&arm=away')" onmouseover="javascript:btnHover(this,'M')" onmouseout="javascript:btnNormal(this,'M')" onmousedown="javascript:btnDown(this,'M')" onmouseup="javascript:btnNormal(this,'M')" data-fitlabel="ellips"><style type="text/css">#testSizesecurity_button_0 {position: absolute; visibility: hidden; height: auto; width: auto; white-space: nowrap; min-width: 0}</style><div id="testSizesecurity_button_0" class="p_btn p_btnMnormal">Arm Away</div></div><div style="margin-top: 6px;"><input type="button" id="security_button_1" name="security_button_1" value="Arm Stay" alt="Arm Stay" class="p_btn p_btnMnormal" onclick="setArmState('quickcontrol/armDisarm.jsp','Arming Stay','1','2','false','href=rest/adt/ui/client/security/setArmState&armstate=off&arm=stay')" onmouseover="javascript:btnHover(this,'M')" onmouseout="javascript:btnNormal(this,'M')" onmousedown="javascript:btnDown(this,'M')" onmouseup="javascript:btnNormal(this,'M')" data-fitlabel="ellips"><style type="text/css">#testSizesecurity_button_1 {position: absolute; visibility: hidden; height: auto; width: auto; white-space: nowrap; min-width: 0}</style><div id="testSizesecurity_button_1" class="p_btn p_btnMnormal">Arm Stay</div></div>
<div><input type="button" id="security_button_0" name="security_button_0" value="Arm Away" alt="Arm Away" class="p_btn p_btnMnormal" onclick="setArmState('quickcontrol/armDisarm.jsp','Arming Away','0','2','false','href=rest/adt/ui/client/security/setArmState&armstate=off&arm=away')" onmouseover="javascript:btnHover(this,'M')" onmouseout="javascript:btnNormal(this,'M')" onmousedown="javascript:btnDown(this,'M')" onmouseup="javascript:btnNormal(this,'M')" data-fitlabel="ellips"><style type="text/css">#testSizesecurity_button_0 {position: absolute; visibility: hidden; height: auto; width: auto; white-space: nowrap; min-width: 0}</style><div id="testSizesecurity_button_0" class="p_btn p_btnMnormal">Arm Away</div></div><div style="margin-top: 6px;"><input type="button" id="security_button_1" name="security_button_1" value="Arm Stay" alt="Arm Stay" class="p_btn p_btnMnormal" onclick="setArmState('quickcontrol/armDisarm.jsp','Arming Stay','1','2','false','href=rest/adt/ui/client/security/setArmState&armstate=off&arm=stay')" onmouseover="javascript:btnHover(this,'M')" onmouseout="javascript:btnNormal(this,'M')" onmousedown="javascript:btnDown(this,'M')" onmouseup="javascript:btnNormal(this,'M')" data-fitlabel="ellips"><style type="text/css">#testSizesecurity_button_1 {position: absolute; visibility: hidden; height: auto; width: auto; white-space: nowrap; min-width: 0}</style><div id="testSizesecurity_button_1" class="p_btn p_btnMnormal">Arm Stay</div></div>
"Armed Night. All Quiet."
Hmm... this is unexpected. I don't see the Arm Night buttons in the code you pasted. Can you confirm that there is an Arm Night
button in the web portal?
And, during Steps 10 to 13, are you also Arming Night
in the web portal? It should pop out a dialog where it asks to Arm Anyway
.
Possibly a screenshot might work out.
Oh, sorry - no, there is no Arm Night button in the portal, I'm arming in night mode only through the panel. The state does get correctly reflected in the portal, though. I wonder if they just don't expose through the portal since it's not enabled in their systems by default? And if it's not exposed, I wonder if their REST APIs support it? Is there some experimenting I can do to help find the right parameters?
Ah, no wonder. In order for me to enable full functionality for Arm Night on the plugin, it must be exposed in the Web Portal.
Icontrol One (a white labeled panel that ADT Pulse uses) doesn't have an actual REST API I can use, so I'm forced to reverse engineer the code so I can implement it into HomeKit.
But on the other hand, I can definitely update the plugin to show that the system is in Armed Night
mode.
What I mean is that the portal is just a UI on top of ADT's REST APIs as far as I can tell - maybe we can test if those underlying APIs support night mode, even if there's no button for it in the portal.
I can try to come up with some URLs that might be able to Arm Night the system remotely (not that optimistic that it will work), will update you on that later.
Just a curious question. How do you Arm Night using your Security Panel? If you have that function, I might also be able to debug it from my side.
I have it mapped to a function key but the official way is: security code + [3] + [3] Not sure if it will work for you, though - I had the night mode enabled by the system installer before I was able to start using it.
Gotcha. I'll also call ADT and see what answers I can get from them in addition to testing this on my system if it works.
Good news! I called ADT customer support, and they told me there isn't an official way to Arm Night
in ADT Pulse, but with some common sense hack I found the URLs required to Arm Night
the system.
Set the system from Disarmed
to Arm Night
:
https://portal.adtpulse.com/myhome/quickcontrol/armDisarm.jsp?href=rest/adt/ui/client/security/setArmState&armstate=disarmed&arm=night
Set the system from Arm Night
to Disarmed
:
https://portal.adtpulse.com/myhome/quickcontrol/armDisarm.jsp?href=rest/adt/ui/client/security/setArmState&armstate=night&arm=off
Go ahead and try these two URLs while you are logged into the Web Portal. And let me know if it works for you!
Those two work perfectly - the system gets armed and disarmed as it should and the change is reflected both in ADT portal and on the panel!
Perfect! I'm working on the functions now. Will update you when the next version is released, thanks for letting me know!
Night mode is now supported as of v1.3.0
! Closing this issue now😎
This issue is now locked and considered resolved. If you have questions or inquiries, you may start a new issue.
Both ADT Pulse and HomeKit seem to support the Night mode but when using homebridge-adt, this mode isn’t correctly mapped between the two systems:
I know Night mode isn’t enabled in many ADT systems so let me know if I can help with more info on this.