[LAST_VALUE PERIPH_ID=[RAW_VALUE]]
[{"id":"ccf6ca07f83388f3","type":"group","z":"2460c5f.5cc0b3a","name":"Exemple de endpoint /pushEedomus","style":{"label":true},"nodes":["9dfea1908eaea33f","21915d7b760e6488","654d12b5ba14bfc8","f98166a252a11383","c4335d229eacabcb"],"x":94,"y":379,"w":612,"h":202,"info":"# Permet de récupérer 2 valeurs :\n## periphId / value\n\nexemple :\nhttp://192.168.0.24:1880/endpoint/pushEedomus?periphId=12345&value=98765\n\nRécupère le periphId=12345\net la value=98765"},{"id":"9dfea1908eaea33f","type":"debug","z":"2460c5f.5cc0b3a","g":"ccf6ca07f83388f3","name":"periphid","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.periphId","targetType":"msg","statusVal":"","statusType":"auto","x":540,"y":500,"wires":[]},{"id":"21915d7b760e6488","type":"http in","z":"2460c5f.5cc0b3a","g":"ccf6ca07f83388f3","name":"récupérer humidité salle de bain","url":"/pushEedomus","method":"get","upload":false,"swaggerDoc":"","x":250,"y":500,"wires":[["9dfea1908eaea33f","f98166a252a11383","c4335d229eacabcb"]]},{"id":"654d12b5ba14bfc8","type":"http response","z":"2460c5f.5cc0b3a","g":"ccf6ca07f83388f3","name":"","statusCode":"","headers":{},"x":490,"y":420,"wires":[]},{"id":"f98166a252a11383","type":"template","z":"2460c5f.5cc0b3a","g":"ccf6ca07f83388f3","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"success\": 1,\n \"body\": {\n \"periph\": \"{{payload.periphId}}\",\n \"value\": \"{{payload.value}}\"\n }\n}","output":"json","x":320,"y":420,"wires":[["654d12b5ba14bfc8"]]},{"id":"c4335d229eacabcb","type":"debug","z":"2460c5f.5cc0b3a","g":"ccf6ca07f83388f3","name":"value of periphId","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.value","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":540,"wires":[]}]
soundfab a écrit:Merci beaucoup !! ca marche super bien !! du coup pour mettre a jour régulièrement tu fais une règle sur eedomus ?
/pushEedomus?periphId=[RAW_VALUE]&value=[LAST_VALUE_PERIPH_ID=551133]
Michteedo a écrit:ok merci, apres il faut les aiguiller en fonction de leur adresse ID?
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 31 invité(s)