XML error: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 404 NOT_FOUND</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing //gateway/apipublic/reportInstantaneousValues. Reason:
<pre> NOT_FOUND</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
<?xml version="1.0" encoding="ISO-8859-1"?>
<root><report>
Instantaneous values:<BR>voltage=232.1 Vrms<BR>FFTComponents:<BR>Phase 1:<BR> current=2.13 A, activePower=476.884 W, reactivePower=130.695 var, apparentPower=494.469 VA, cosfi=96, quadrant=0, phaseshift=0.0, phaseDiff=0.0<BR> FFTComponents:<BR><BR>Load[185693] state[0] power: 0.0 on Tue Nov 24 07:20:18 GMT 2015<BR>Load[186125] state[0] power: 0.0 on Mon Nov 16 11:48:38 GMT 2015<BR>Load[262961] state[0] power: 0.0 on Tue Nov 24 10:52:38 GMT 2015<BR>Load[184801] state[0] power: 0.0 on Tue Nov 24 10:55:54 GMT 2015<BR>Load[274030] state[0] power: 0.0 on Mon Nov 16 12:32:07 GMT 2015<BR>Load[373854] state[0] power: 0.0 on Mon Nov 23 12:40:07 GMT 2015<BR>Load[184461] state[1] power: 63.6 on Tue Nov 24 10:43:09 GMT 2015<BR>Load[191946] state[0] power: 0.0 on Sat Nov 21 18:48:45 GMT 2015<BR>Load[185694] state[1] power: 1476.7 on Mon Nov 23 12:10:03 GMT 2015<BR>Load[257520] state[0] power: 0.0 on Fri Nov 20 14:55:41 GMT 2015<BR>Load[194103] state[0] power: 0.0 on Mon Nov 23 12:13:01 GMT 2015<BR>Load[271561] state[0] power: 0.0 on Thu Nov 19 09:39:51 GMT 2015<BR>Load[186878] state[1] power: 2030.9 on Mon Nov 23 14:29:57 GMT 2015<BR>Load[185692] state[0] power: 0.0 on Sat Nov 21 12:45:01 GMT 2015<BR>Load[350593] state[0] power: 0.0 on Thu Nov 19 18:33:50 GMT 2015<BR>Load[192188] state[0] power: 0.0 on Mon Nov 23 16:50:58 GMT 2015<BR>Load[398912] state[0] power: 0.0 on Thu Nov 19 11:02:15 GMT 2015<BR>Load[274031] state[0] power: 0.0 on Fri Nov 20 14:53:54 GMT 2015<BR>Load[370057] state[0] power: 0.0 on Sat Nov 21 12:25:47 GMT 2015<BR>Load[283660] state[0] power: 0.0 on Tue Nov 24 08:15:01 GMT 2015<BR>Load[227315] state[0] power: 0.0 on Mon Nov 23 20:28:20 GMT 2015<BR>Load[184264] state[0] power: 0.0 on Tue Nov 24 10:29:57 GMT 2015<BR>Load[291850] state[0] power: 0.0 on Sat Nov 14 11:14:19 GMT 2015<BR>Load[365187] state[1] power: 62.0 on Mon Nov 23 11:27:44 GMT 2015<BR>Load[246745] state[1] power: 97.0 on Tue Nov 24 10:55:27 GMT 2015<BR>Load[184800] state[1] power: 1154.3 on Sun Nov 22 14:30:09 GMT 2015<BR>Load[226430] state[1] power: 107.8 on Tue Nov 24 07:16:18 GMT 2015<BR>Load[184799] state[0] power: 0.0 on Tue Nov 24 07:20:36 GMT 2015<BR>Load[215957] state[0] power: 0.0 on Sun Nov 22 11:23:00 GMT 2015<BR>Load[187552] state[1] power: 599.8 on Mon Nov 23 14:25:49 GMT 2015<BR>Load[313183] state[1] power: 93.5 on Mon Nov 23 18:29:02 GMT 2015<BR><BR>Phase 1, peak active power 6686.943 W at 17/01/2015 12:06:45<BR>
</report>
</root>
substring-before(substring-after(//root/report , 'activePower='),' ')
Floman321 a écrit:C'est exactement ca : un périphérique capteur http avec un xpath
Attention un script est quand meme mieux.
Car ca récupère en 1 fois les valeurs.
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 1 invité