Just a Note for Connections with Wifi Sticks V2 (tested with Version 2.033.20 and 2.034.22).
It seems not necessary using a reverse Proxy setup with nginx to map the IP 5.8.8.8 or use downgraded Firmware to access the API on a local IP, its enough to add a “X-Forwarded-For: 5.8.8.8” header to the request.
The device shows up at my local Network as “MXCHIP”. Using:
curl --header “X-Forwarded-For: 5.8.8.8” -X POST “http://192.168.178.22/?optType=ReadRealTimeData&pwd=&”
returns the JSON data.
Important, it seems to be necessary to have the “&” at the end of the URL, otherwise my stick just crashes.
If this works, adding the following lines in your YAML configuration of the REST API allows direct access on the local IP:
rest:
- authentication: digest
scan_interval: 20
resource: http://192.168.178.22
payload: “optType=ReadRealTimeData&pwd=&”
method: POST
headers:
Content-Type: “application/x-www-form-urlencoded”
X-Forwarded-For: “5.8.8.8”
sensor:
…