HTTP Push web-variables
-
Pushing using the palamoa.tpl template includes extra fields that I cannot find documented like these...
"device_name": "rackB"
"color": "#e86161"We would like to use sensor name, sensor location, sensor colour etc in our template.
Is there a full list of web-variables available ?
Thanks,
Martin
-
With version 5.2 (might be released as 6.0) there will be a major redesign of the template interface and handling. Thus, all existing internal documents are currently outdated or incomplete.
Anyway, there is a way to figure out those web-variables. You may check the source code of the configuration pages. Each inputfield is given a name, for example
name="syslocation"
So
"device_location": "{{syslocation}}"
should do the trick.
In any case, as long as the official list of webvars is missing, we are ready to help with custom templates.
Regards,
Harald
-
Thanks Harald for the quick reply.
I thought it might be something like that, but I was guessing the names !
If you are redesigning there here are some ideas...
- Access to a timestamp
- Sensor MAC address to uniquely ID the sensor. (We already use the two user variables for an API key and user device notes)
- Increase the number of characters in user variables. Maybe 256 ? I think it's 31 at the moment, which clipped our api key.
- Use TLS so we can push to an https endpoint
Best,
Martin
-
Thanks for the suggestions. Some of them are already implemented in version 5.0.3 Beta, which can be downloaded from http://sensors.egnite.de/en/network-sensors-and-data-loggers/support-and-service/querx-firmware/
Version 5 stores the configuration differently. You should create a backup of the configuration before updating and restore it later, because the old configuration will be overwritten. The new configuration increases the limits for many settings. The variables for HTTP Push can now be up to 127 bytes long.
TLS for HTTP Push is also implemented in Version 5, but only for Querx WLAN. It will be used if the url starts with https://
A timestamp for the current time can be accessed in templates using {{systimestamp}}.
The device MAC address is available in templates using {{mac}}. On Querx WLAN this will be the MAC address for the currently active interface. {{netiftab_mac.0}} will always be the LAN MAC address and {{netiftab_mac.1}} the WLAN MAC address.
Regards,
Tim
-
For anyone wondering, you can now find the firmare here:
https://www.egnite.de/support-en/firmware/
-
I'm using the mac and systimestamp in our template now. Thanks for making these improvements !
Best,
Martin