I got “Red Node” up and running as I hoped to be able to extract the header information from the http request fromt he flic hub. But with no luck. The msg.headers does not exists and the other "id"s does not contain what I hoped to find.
To make sure that the battery level actually are in the header information I put up at python-very-simple-http-server to listent to the requests from the http request from the flic-hub. I got the following result:
10.0.0.99 - - [31/Jan/2021 21:50:02] "GET /favicon.ico HTTP/1.1" 200 -
Authorization: Bearer --censored---
User-Agent: Google-HTTP-Java-Client/1.23.0 (gzip)
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
As it is seen above header does indeed include the battery level, but I do not know how to extract that information when the HA receives the request from the flic hub via /api/events/test .
Does anyone have an idea to extract the header information on received requests?