I am completely confused in the sensor REST Custom. I ask you to help.
I do not quite have a standard response from the device I want to monitor, when requested "http://1.1.1.1:2222/default/en_US/status.xml" (GoIP GSM-gateway)
I get such an answer
<status>
<l1_module_status_gsm>1</l1_module_status_gsm>
<l1_module_title_gsm/>
<l1_module_status><a href="?type=list&down=1&line=1">Y</a></l1_module_status>
<l1_module_title>Click to shut down module</l1_module_title>
<l1_gsm_sim>Y</l1_gsm_sim>
<l1_gsm_status>Y</l1_gsm_status>
<l1_status_line>Y</l1_status_line>
<l1_line_state>IDLE</l1_line_state>
<l1_sms_login/>
<l1_smb_login><font color="#FF0000">N</font></l1_smb_login>
<l1_gsm_signal>19</l1_gsm_signal>
<l1_gsm_cur_oper>MegaFon</l1_gsm_cur_oper>
<l1_gsm_cur_bst/>
<l1_lac/>
<l1_sim_remain>NO LIMIT</l1_sim_remain>
<l1_nocall_t>0</l1_nocall_t>
<l1_acd>95</l1_acd>
<l1_asr>18</l1_asr>
<l1_callt>2118m</l1_callt>
<l1_callc>1827/10575</l1_callc>
<l1_rct>2018-09-06 04:00:46</l1_rct>
<l1_sms_count>NO LIMIT</l1_sms_count>
<l1_call_count>NO LIMIT</l1_call_count>
<l2_module_status_gsm>2</l2_module_status_gsm>
<l2_module_title_gsm/>
<l2_module_status><a href="?type=list&down=1&line=2">Y</a></l2_module_status>
<l2_module_title>Click to shut down module</l2_module_title>
<l2_gsm_sim>Y</l2_gsm_sim>
<l2_gsm_status>Y</l2_gsm_status>
<l2_status_line>Y</l2_status_line>
<l2_line_state>IDLE</l2_line_state>
<l2_sms_login/>
<l2_smb_login><font color="#FF0000">N</font></l2_smb_login>
<l2_gsm_signal>25</l2_gsm_signal>
<l2_gsm_cur_oper>MegaFon</l2_gsm_cur_oper>
<l2_gsm_cur_bst/>
<l2_lac/>
<l2_sim_remain>NO LIMIT</l2_sim_remain>
<l2_nocall_t>0</l2_nocall_t>
<l2_acd>85</l2_acd>
<l2_asr>17</l2_asr>
<l2_callt>1509m</l2_callt>
<l2_callc>1280/7861</l2_callc>
<l2_rct>2018-09-06 04:00:46</l2_rct>
<l2_sms_count>NO LIMIT</l2_sms_count>
<l2_call_count>NO LIMIT</l2_call_count>
</status>
I need only these lines
<l1_gsm_sim>Y</l1_gsm_sim>
<l1_gsm_status>Y</l1_gsm_status>
<l1_status_line>Y</l1_status_line>
<l1_gsm_signal>19</l1_gsm_signal>
The status "Y" is good, the status "N" is an accident, but in the event of an accident the next line comes
<l1_gsm_sim><font color="#FF0000"></font></l1_gsm_sim>
<l1_gsm_status><font color="#FF0000">N</font></l1_gsm_status>
<l1_status_line><font color="#FF0000">N</font></l1_status_line>
<l1_gsm_signal>0</l1_gsm_signal>
It is desirable in one sensor, with the ability to turn on the alarm when the status changes.
Add comment