first commit

This commit is contained in:
Souti
2025-03-06 11:09:58 +01:00
commit 11f7d440ff
330 changed files with 38306 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
-- Example of JSON parser handling data with the following structure
--{
-- "id": 13,
-- "name": "outside",
-- "temperature": 12.50,
-- "tags": ["France", "winter"]
--}
-- A test with curl would be : curl -X POST -d "@test.json" 'http://192.168.1.17:8080/json.htm?type=command&param=udevices&script=example_json.lua'
-- Retrieve the request content
s = request['content'];
-- Update some devices (index are here for this example)
local id = domoticz_applyJsonPath(s,'.id')
local s = domoticz_applyJsonPath(s,'.temperature')
domoticz_updateDevice(id,'',s)