In Domoticz the simplest readout is making call to the desired Virtual Device.
For a T&H-sensor that results in a JSON-file like attached in zip-file Domoticz_RIDreadout.zip.
A related plugin for Meteobridge might rip out the data for T&H for that specific device:
is straightforward solution for 1 single device, to be repeated for any other device,
and (relative to Meteobridge) therefore not a suitable solution if you want to get data for a series of devices.
Searching further in this forum, combining with hints in other forums, have the impression that a pragmatic, stepwise solution might be to combine the readings for several Virtual Devices from Domoticz into one, small file:
1. Take the
script from this thread as basic approach to read the data from Domoticz to Meteobridge as JSON-file.
For a first trial setup clone & tune a Luftdaten-datafile to e.g. the Temperature and Humidity from a single T&H-sensor in Domoticz and test against a tuned script.
2. Expand with a few more parameters, for testing against a dynamic datafile generated by Domoticz.
Obvious to take as candidates a set of sensor data presently missing in the datasets uploaded to my Meteobridge.
3. For 'grand' setup of the JSON-file from Domoticz and for related read-out in Meteobridge
aim at the structure and dataset of Meteobridge's userdefined CampbellSci-plugin
However, the structure of the input-file for that CS-plugin is not JSON-layout.
Choice to be made:
either give file from Domoticz a layout&contents fitting the CS-plugin and suitable filename,
or rework the file to get 'real' JSON-layout with a matching plugin-script developed during steps 1. and 2.
File with 'real' JSON-layout might be alike the file coming out of
this exercise,
quite convenient as source to have a dynamic input-file for testing this plugin-script (and comparable applications) with 'realistic' data:
such file-layout included in the test-script as example for 'extended version'.
ToDo:
=> Develop user-defined plugin-script for Meteobridge to read from Domoticz a T&H-dataset as JSON-file
=> Make in Domoticz a dynamic JSON-file matching this plugin.
=> Before exposure to Meteobridge, test this combination with script at LAN-client and and datafile at webserver.
Status:
Step 1. completed [attached zip-file contains both trial-plugin and test-json-file]
Step 2. in progress.
.
.
Observations:
In the sourcescript (and therefore in the test-script) a readout and multiplication is present as
Code: Select all
awk -F '"' '{printf "%.1f\n", ($8*10.0)}'
For checking, in the testscript printlines have been inserted.
These printlines show that the read value is rounded and is multiplied by 10.
IMHO not correct to round the read values, because unnecessary loss of information.
Assume that 10*multiplication is an entry condition for Meteobridge's calculations.
Adaptation Feb03, 2024:
Added status and bottomline.
Adaptation Feb05, 2024:
Package with files corrected (=> version 1a).
Adaptation Feb06, 2024:
Added sample readout from Domoticz with related expansion of 1sr section of this message, and adapted bottomlines.