Bonjour
j ai acheté le Koubachi, et malgé les differentes critiques sur le sujet, je trouve que le produit est plutot pas mal.
Oui les infos sont remontées que toutes les 12h , mais ce n est pas en 12h que la plante va mourir.
EN fait je m en sert pour automatiser l aoorsage de mon potager, en gros si l humidité du sol descend en dessous de 30% je lance la pompe d arrosage ( mirco drip) pour 1h
Par contre j ai besoin de vos lumieres en requete http
En gros comme j ai plutot adherer au concept, j ai acheté en promo ( 39€) 2 autres capteurs
Par contre lorsque que je fais la requete HTML , j ai tous les capteurs ( les 3 donc) qui sont remontés:
la requete http est la suivante :
http://api.koubachi.com/v2/user/smart_d ... _key=xxxxxle chemin xpath est ( pour l humidité du sol)
substring(//smart-device-devices/smart-device-device/recent-soilmoisture-reading-value,1,string-length(//smart-device-devices/smart-device-device/recent-soilmoisture-reading-value)-2)
et la reponse est mise a la fin de cette email
Avec ce chemin xpath, je n ai en retour que la valeur du premier capteur de la liste
quelle doit etre la syntaxe, pour remonter la valaur en fonction de l ID du capteur
Merci d avance pour vos reponse
<?xml version="1.0" encoding="UTF-8"?>
<smart-device-devices type="array">
<smart-device-device>
<id>00066655f8f1</id>
<virtual-battery-level type="integer">1</virtual-battery-level>
<ssid nil="true"/>
<last-transmission type="datetime">2015-06-26T09:03:07+02:00</last-transmission>
<next-transmission type="datetime">2015-06-27T09:03:07+02:00</next-transmission>
<associated-since type="datetime">2015-06-25T21:02:59+02:00</associated-since>
<recent-soilmoisture-reading-value>81 %</recent-soilmoisture-reading-value>
<recent-soilmoisture-reading-time type="datetime">2015-06-26T09:02:10+02:00</recent-soilmoisture-reading-time>
<recent-soilmoisture-reading-si-value type="float">6032.20574638308</recent-soilmoisture-reading-si-value>
<recent-temperature-reading-value>22.7 °C</recent-temperature-reading-value>
<recent-temperature-reading-time type="datetime">2015-06-26T09:02:45+02:00</recent-temperature-reading-time>
<recent-temperature-reading-si-value type="float">295.859862789934</recent-temperature-reading-si-value>
<temperature-polling-interval type="integer">3600</temperature-polling-interval>
<recent-light-reading-value>508.5 lx</recent-light-reading-value>
<recent-light-reading-time type="datetime">2015-06-26T09:02:45+02:00</recent-light-reading-time>
<recent-light-reading-si-value type="float">508.471904186566</recent-light-reading-si-value>
<light-polling-interval type="integer">3600</light-polling-interval>
<hardware-product-type type="symbol">indoor</hardware-product-type>
<mac-address>00066655f8f1</mac-address>
<plants type="array">
<plant type="SmartObject::Plant">
<id type="integer">269166</id>
<vdm-calibration-start-pending type="boolean">false</vdm-calibration-start-pending>
<vdm-calibration-check-pending type="boolean">false</vdm-calibration-check-pending>
<vdm-next-calibration-check-at nil="true"/>
<vdm-last-calibration-check-at nil="true"/>
<vdm-calibration-in-progress type="boolean">false</vdm-calibration-in-progress>
<vdm-last-water-source nil="true"/>
<vdm-water-pending type="boolean">false</vdm-water-pending>
<vdm-water-level type="float">0.20402811705468837</vdm-water-level>
<vdm-precalibrated type="boolean">false</vdm-precalibrated>
<vdm-water-cycle type="float">0.0</vdm-water-cycle>
<vdm-water-instruction>Utilisez de l’eau du robinet tiède. Arrosage abondant pour que l’eau stagne dans la soucoupe. Videz la soucoupe au bout de 15 minutes.</vdm-water-instruction>
<vdm-water-analyzing-until type="datetime">2015-06-26T22:19:52+02:00</vdm-water-analyzing-until>
<vdm-mist-pending type="boolean">false</vdm-mist-pending>
<vdm-mist-level type="float">0.9311322150630568</vdm-mist-level>
<vdm-mist-instruction>Vaporisez sur toute la plante. Pas de consignes particulières.</vdm-mist-instruction>
<vdm-fertilizer-pending type="boolean">false</vdm-fertilizer-pending>
<vdm-fertilizer-level type="float">0.9926213220630801</vdm-fertilizer-level>
<vdm-fertilizer-instruction>Mettre Engrais pour palmiers comme engrais (par ex. N8-P4-K12). Utilisation comme indiqué sur la notice de l’engrais. Arroser comme d’habitude.</vdm-fertilizer-instruction>
<vdm-temperature-pending type="boolean">false</vdm-temperature-pending>
<vdm-temperature-advice nil="true"/>
<vdm-temperature-level type="float">0.58191810708007</vdm-temperature-level>
<vdm-temperature-instruction nil="true"/>
<vdm-temperature-hint>Koubachi analyse la température.</vdm-temperature-hint>
<vdm-temperature-analyzing-until type="datetime">2015-06-28T20:56:47+02:00</vdm-temperature-analyzing-until>
<vdm-light-pending type="boolean">false</vdm-light-pending>
<vdm-light-advice nil="true"/>
<vdm-light-level type="float">0.21015109596691087</vdm-light-level>
<vdm-light-instruction nil="true"/>
<vdm-light-hint>Koubachi analyse les conditions de lumière.</vdm-light-hint>
<vdm-light-analyzing-until type="datetime">2015-07-02T20:56:47+02:00</vdm-light-analyzing-until>
<pot-color-hex>363638</pot-color-hex>
<has-smart-device-associated type="boolean">true</has-smart-device-associated>
<plant-photos type="array"/>
</plant>
</plants>
</smart-device-device>
<smart-device-device>
<id>0006668094e3</id>
<virtual-battery-level type="integer">1</virtual-battery-level>
<ssid nil="true"/>
<last-transmission type="datetime">2015-06-26T09:04:06+02:00</last-transmission>
<next-transmission type="datetime">2015-06-27T09:04:06+02:00</next-transmission>
<associated-since type="datetime">2015-06-25T21:02:11+02:00</associated-since>
<recent-soilmoisture-reading-value>53 %</recent-soilmoisture-reading-value>
<recent-soilmoisture-reading-time type="datetime">2015-06-26T09:03:18+02:00</recent-soilmoisture-reading-time>
<recent-soilmoisture-reading-si-value type="float">16144.8250967498</recent-soilmoisture-reading-si-value>
<recent-temperature-reading-value>18.2 °C</recent-temperature-reading-value>
<recent-temperature-reading-time type="datetime">2015-06-26T09:03:53+02:00</recent-temperature-reading-time>
<recent-temperature-reading-si-value type="float">291.395180826767</recent-temperature-reading-si-value>
<temperature-polling-interval type="integer">3600</temperature-polling-interval>
<recent-light-reading-value>5103.4 lx</recent-light-reading-value>
<recent-light-reading-time type="datetime">2015-06-26T09:03:53+02:00</recent-light-reading-time>
<recent-light-reading-si-value type="float">5103.3818057403</recent-light-reading-si-value>
<light-polling-interval type="integer">3600</light-polling-interval>
<hardware-product-type type="symbol">indoor</hardware-product-type>
<mac-address>0006668094e3</mac-address>
<plants type="array">
<plant type="SmartObject::Plant">
<id type="integer">269163</id>
<vdm-calibration-start-pending type="boolean">false</vdm-calibration-start-pending>
<vdm-calibration-check-pending type="boolean">false</vdm-calibration-check-pending>
<vdm-next-calibration-check-at nil="true"/>
<vdm-last-calibration-check-at nil="true"/>
<vdm-calibration-in-progress type="boolean">false</vdm-calibration-in-progress>
<vdm-last-water-source nil="true"/>
<vdm-water-pending type="boolean">false</vdm-water-pending>
<vdm-water-level type="float">0.0</vdm-water-level>
<vdm-precalibrated type="boolean">false</vdm-precalibrated>
<vdm-water-cycle type="float">0.0</vdm-water-cycle>
<vdm-water-instruction>Utilisez de l’eau du robinet tiède. Arrosage abondant pour que l’eau stagne dans la soucoupe. Videz la soucoupe au bout de 15 minutes.</vdm-water-instruction>
<vdm-water-analyzing-until type="datetime">2015-06-26T21:52:26+02:00</vdm-water-analyzing-until>
<vdm-mist-pending type="boolean">false</vdm-mist-pending>
<vdm-mist-level type="float">0.0</vdm-mist-level>
<vdm-mist-instruction>Vaporisez sur toute la plante. Pas de consignes particulières.</vdm-mist-instruction>
<vdm-fertilizer-pending type="boolean">false</vdm-fertilizer-pending>
<vdm-fertilizer-level type="float">0.9972244002356672</vdm-fertilizer-level>
<vdm-fertilizer-instruction>Mettre Engrais pour plantes vertes comme engrais (par ex. N14-P6-K8). Utilisation comme indiqué sur la notice de l’engrais. Arroser comme d’habitude.</vdm-fertilizer-instruction>
<vdm-temperature-pending type="boolean">false</vdm-temperature-pending>
<vdm-temperature-advice nil="true"/>
<vdm-temperature-level type="float">0.5018945495599</vdm-temperature-level>
<vdm-temperature-instruction nil="true"/>
<vdm-temperature-hint>Koubachi analyse la température.</vdm-temperature-hint>
<vdm-temperature-analyzing-until type="datetime">2015-06-28T20:52:19+02:00</vdm-temperature-analyzing-until>
<vdm-light-pending type="boolean">false</vdm-light-pending>
<vdm-light-advice nil="true"/>
<vdm-light-level type="float">0.231801591083601</vdm-light-level>
<vdm-light-instruction nil="true"/>
<vdm-light-hint>Koubachi analyse les conditions de lumière.</vdm-light-hint>
<vdm-light-analyzing-until type="datetime">2015-07-02T20:52:19+02:00</vdm-light-analyzing-until>
<pot-color-hex>363638</pot-color-hex>
<has-smart-device-associated type="boolean">true</has-smart-device-associated>
<plant-photos type="array"/>
</plant>
</plants>
</smart-device-device>
<smart-device-device>
<id>0006666b6a96</id>
<virtual-battery-level type="integer">1</virtual-battery-level>
<ssid nil="true"/>
<last-transmission type="datetime">2015-06-26T01:50:25+02:00</last-transmission>
<next-transmission type="datetime">2015-06-27T01:50:25+02:00</next-transmission>
<associated-since type="datetime">2015-06-08T20:48:02+02:00</associated-since>
<recent-soilmoisture-reading-value>55 %</recent-soilmoisture-reading-value>
<recent-soilmoisture-reading-time type="datetime">2015-06-25T23:22:51+02:00</recent-soilmoisture-reading-time>
<recent-soilmoisture-reading-si-value type="float">15187.170252811</recent-soilmoisture-reading-si-value>
<recent-temperature-reading-value>13.5 °C</recent-temperature-reading-value>
<recent-temperature-reading-time type="datetime">2015-06-26T01:22:55+02:00</recent-temperature-reading-time>
<recent-temperature-reading-si-value type="float">286.671574707031</recent-temperature-reading-si-value>
<temperature-polling-interval type="integer">3600</temperature-polling-interval>
<recent-light-reading-value>0.0 lx</recent-light-reading-value>
<recent-light-reading-time type="datetime">2015-06-26T01:22:55+02:00</recent-light-reading-time>
<recent-light-reading-si-value type="float">0.0</recent-light-reading-si-value>
<light-polling-interval type="integer">3600</light-polling-interval>
<hardware-product-type type="symbol">outdoor</hardware-product-type>
<mac-address>0006666b6a96</mac-address>
<plants type="array">
<plant type="SmartObject::Plant">
<id type="integer">266164</id>
<vdm-calibration-start-pending type="boolean">false</vdm-calibration-start-pending>
<vdm-calibration-check-pending type="boolean">false</vdm-calibration-check-pending>
<vdm-next-calibration-check-at nil="true"/>
<vdm-last-calibration-check-at nil="true"/>
<vdm-calibration-in-progress type="boolean">false</vdm-calibration-in-progress>
<vdm-last-water-source>user</vdm-last-water-source>
<vdm-water-pending type="boolean">false</vdm-water-pending>
<vdm-water-level type="float">0.1365228853233943</vdm-water-level>
<vdm-precalibrated type="boolean">false</vdm-precalibrated>
<vdm-water-cycle type="float">3.0</vdm-water-cycle>
<vdm-water-instruction>Utilisez de l’eau du robinet tiède. Arrosage modéré pour humidifier la terre. Dès que la soucoupe commence à se remplir, arrêtez l’arrosage et videz l’eau de la soucoupe.</vdm-water-instruction>
<vdm-water-analyzing-until nil="true"/>
<vdm-mist-pending type="boolean">false</vdm-mist-pending>
<vdm-mist-level type="float">0.0</vdm-mist-level>
<vdm-mist-instruction>Cette plante n’a pas besoin de vaporisation.</vdm-mist-instruction>
<vdm-fertilizer-pending type="boolean">false</vdm-fertilizer-pending>
<vdm-fertilizer-level type="float">0.9165799169176352</vdm-fertilizer-level>
<vdm-fertilizer-instruction>Mettre Engrais pour fleurs comme engrais (par ex. N8-P12-K6). Utilisation comme indiqué sur la notice de l’engrais. Arroser comme d’habitude.</vdm-fertilizer-instruction>
<vdm-temperature-pending type="boolean">false</vdm-temperature-pending>
<vdm-temperature-advice nil="true"/>
<vdm-temperature-level type="float">0.2841955024556794</vdm-temperature-level>
<vdm-temperature-instruction nil="true"/>
<vdm-temperature-hint>Tomates se sent bien. La température du sol est ok.</vdm-temperature-hint>
<vdm-temperature-analyzing-until nil="true"/>
<vdm-light-pending type="boolean">false</vdm-light-pending>
<vdm-light-advice nil="true"/>
<vdm-light-level type="float">0.751596262189837</vdm-light-level>
<vdm-light-instruction nil="true"/>
<vdm-light-hint>Tomates a trop de lumière.</vdm-light-hint>
<vdm-light-analyzing-until nil="true"/>
<pot-color-hex>363638</pot-color-hex>
<has-smart-device-associated type="boolean">true</has-smart-device-associated>
<plant-photos type="array"/>
</plant>
</plants>
</smart-device-device>
</smart-device-devices>