New plugin HttpImport could be interesting #4539
Labels
Category: Plugin
Related to supported sensors
Type: Feature Request
Add a completely new feature (e.g. controller/plugin)
I am not able to code by myself a new plugin but I saw that MqttImport is able to parse a Json string.
I think that for specialists it could be very easy to use the parsing possibilities allready used in MgttImport and apply them in a new plugin using the SendToHttp command feature.
I have a device used before I happened to know EspEasy which is able to answer to a http request by a Json string after easy configuration in it of a cgi file and made a trial.
Answer in a browser : { PuissancePAC :620, IntensitePAC :3, Nappe_Arr :14.06, Exterieur :10.06, PAC_Retour :37.25, PACext_Ret :14.56, Interieur :19.31, PAC_Sortie :37.56, Nappe_Ret :13.25, PACext_Sor :14.75, Air_Pulse :33.75 }
In the tools/command of Espeasy I sent a SendToHttp command to this device and looked to the reaction in the log.
It seems that the data are well received; here is the log data and the way for such a new plugin is maybe not so far
32087776: Webserver 1 Arguments: 0: 'cmd' length: 61
32087778: HTTP: SendToHTTP,http://admin:xxx@192.168.2.133/JSONTestNomHttp.CGI
32087780: HTTP after parseTemplate: SendToHTTP,http://admin:xxx@192.168.2.133/JSONTestNomHttp.CGI
32087783: Command: SendToHTTP
32087783: SendToHTTP,http://admin:xxx@192.168.2.133/JSONTestNomHttp.CGI
32087784: Par1: 0 Par2: 0 Par3: 0 Par4: 0 Par5: 0
32087785: SendToHTTP: Host: 192.168.2.133 port: 80 path: /JSONTestNomHttp.CGI
32087813: HTTP : SendToHTTP 192.168.2.133 GET... HTTP code: 200
32087815: HTTP : SendToHTTP 192.168.2.133 GET... HTTP code: 200 Received reply: {^^PuissancePAC^^:620,^^IntensitePAC^^ :3,^^ Nappe_Arr^^
32087887: EVENT: http#192.168.2.133=200
32087888: EVENT: http#192.168.2.133=200 Processing time:2 milliSeconds
The text was updated successfully, but these errors were encountered: