Yanik Cawidrone Adding image try 3
Latest commit ed85b63 2 years ago
README.md

python-as-http

Small Python HTTP Application server which logs all POST and GET requests. Intended to work initially with Actility TPE & TPW.

Usage

./httpserve.py

Port can be specified

./httpserve.py 8080

Output

All the POST and GET requests are save to httpserve.log

[193] POST Request: 2022-11-16T0718-------------------------------------------
[193] Path: /
[193] HeadersBegin:
Accept: application/json, application/*+json
Content-Type: application/json
Content-Length: 918
Host: 116.15.141.206:8002
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/1.8.0_262)
Accept-Encoding: gzip,deflate


[193] HeadersEnd: -----
[193] BodyBegin:
{"DevEUI_uplink":{"Time":"2022-11-16T07:18:50.784+00:00","DevEUI":"0220000000000005","FPort":2,"FCntUp":12,"ADRbit":1,"MType":2,"FCntDn":2,"payload_hex":"80021004fe8102132efe700101fe","mic_hex":"4393ad79","Lrcid":"00000233","LrrRSSI":-93.0,"LrrSNR":10.25,"LrrESP":-93.391785,"SpFact":7,"SubBand":"G0","Channel":"LC1","DevLrrCnt":1,"Lrrid":"100017C9","Late":0,"LrrLAT":20.796381,"LrrLON":106.780083,"Lrrs":{"Lrr":[{"Lrrid":"100017C9","Chain":0,"LrrRSSI":-93.0,"LrrSNR":10.25,"LrrESP":-93.391785}]},"CustomerID":"1100006327","CustomerData":{"loc":{"lat":"20.7974","lon":"106.779769"},"alr":{"pro":"LORA/Generic","ver":"1"}},"ModelCfg":"1:TPX_745e8881-3b75-40fe-8d11-2f43341b7d8f","InstantPER":0.0,"MeanPER":0.0,"DevAddr":"05C05ECF","TxPower":14.0,"NbTrans":1,"Frequency":919.6,"DynamicClass":"C"},"downlinkUrl":"https://thingparkenterprise.au.actility.com/iot-flow/downlinkMessages/2f6c37d1-1e5b-421d-bd1e-b6a07313cbab"}
[193] BodyEnd:
--------------------------------------------------------

Web monitoring

When accessed through browser it will display the last 2 POST received.

Capture of HTTP Watch