<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Sans Unicode";
        panose-1:2 11 6 2 3 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Another way, without having to make it call back, is to make this query to the nbi<br>
<br>
:7557/devices?query={"summary.serialNumber":"deviceid"}&projection=_lastInform,InternetGatewayDevice.ManagementServer.PeriodicInformInterval<br>
<br>
And then see if the _lastinform is less seconds ago than the PeriodicInformInterval<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">If it is more, then it is late calling in and could be considered down / off line.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hope that helps
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Yak<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Users [mailto:users-bounces@lists.genieacs.com]
<b>On Behalf Of </b>Dan Morphis<br>
<b>Sent:</b> 26 July 2016 23:34<br>
<b>To:</b> Community support for GenieACS users <users@lists.genieacs.com><br>
<b>Subject:</b> Re: Parameter in order to know if it's up or down<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans Unicode",sans-serif;color:#463C00">The way I determine if a CPE is online is to do a getParameterValues on </span><span style="font-family:"Lucida Sans Unicode",sans-serif;color:#463C00">InternetGatewayDevice.ManagementServer.PeriodicInformInterval
 with connection_request in the URI. If the GenieACS API returns a 200, then I know the CPE is online.</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:#463C00">The last inform value can be pulled from the api, the key is _lastInform.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Lucida Sans Unicode",sans-serif;color:#463C00">-dan</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Jul 26, 2016 at 2:30 PM, Sergio <<a href="mailto:sergio.fernandez@electronicamartinez.com" target="_blank">sergio.fernandez@electronicamartinez.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">I've thought about it now... And I don't know how to perform the last option...<br>
<br>
How could I query to GenieACS to know when has occurred the last inform? I thought I knew it but I've found I've got no idea to query that!<br>
<br>
Thank you,<br>
<br>
Sergio F.<br>
<br>
<br>
El 27/07/16 a las 00:21, Sergio escribió:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hello!<br>
<br>
I wanted to know if there's anything to know if a device is on or off. Maybe a parameter or some internal way to do it.<br>
<br>
I ask this because we have tried to query a device while connected and while disconnected, answering GenieACS the same for some parameters of the CPE's status.<br>
<br>
It's obvious that querying how much time since the last inform will work, but that's our last option.<br>
<br>
Thank you!<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" target="_blank">http://lists.genieacs.com/mailman/listinfo/users</a><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" target="_blank">http://lists.genieacs.com/mailman/listinfo/users</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<span style="font-family:arial;font-size:10px;margin:0px">--<br>
<b>Steve Hawkes</b><br>
Systems Developer<br>
<b>Zen Internet</b><br>
</span><span style="font-family:arial;font-size:10px;margin:0px">Main Switchboard: 01706 902000</span><br>
<span style="font-family:arial;font-size:10px;margin:0px">Web: zen.co.uk<br>
</span><br>
<p style="font-family:arial;font-size:10px;color:#00928F;margin:0px">Winner of 'Services Company of the Year' at the UK IT Industry Awards<br>
<br>
</p>
<p style="font-family:arial;font-size:7px;margin:0px">This message is private and confidential. If you have received this message in error, please notify us and remove it from your system.</p>
<br>
<p style="font-family:arial;font-size:7px;margin:0px">Zen Internet Limited may monitor email traffic data to manage billing, to handle customer enquiries and for the prevention and detection of fraud. We may also monitor the content of emails sent to and/or
 from Zen Internet Limited for the purposes of security, staff training and to monitor quality of service.<br>
<br>
Zen Internet Limited is registered in England and Wales, Sandbrook Park, Sandbrook Way, Rochdale, OL11 1RY Company No. 03101568 VAT Reg No. 686 0495 01
</p>
</body>
</html>