Hi,
Im quite newbie with Ignition but I want to use Maker for my home automation system UI. My system has this BAOS 777 KNX-eth gateway. It has web service where you can Get or Set values from/to KNX bus.
Example: http://xxx.xxx.xxx.xxx//baos/GetDatapointValue?DatapointStart=55&DatapointCount=1&Format= Default
This gives me answer: {“Data”:[{“Datapoint”:55,“Format”:“DPT9”,“Length”:2,“State”:16,“Value”:21.1}],“Result”:true,“Service”:“GetDatapointValue”}
or you can ask multiple values same time by setting DatapointCount=“wantedcount”. Then I get response: {“Data”:[{“Datapoint”:49,“Format”:“DPT1”,“Length”:1,“State”:0,“Value”:false},{“Datapoint”:50,“Format”:“DPT3”,“Length”:1,“State”:0,“Value”:{“Control”:false,“StepCode”:0}},{“Datapoint”:51,“Format”:“DPT5”,“Length”:1,“State”:0,“Value”:0},{“Datapoint”:52,“Format”:“DPT1”,“Length”:1,“State”:0,“Value”:false},{“Datapoint”:53,“Format”:“DPT3”,“Length”:1,“State”:0,“Value”:{“Control”:false,“StepCode”:0}},{“Datapoint”:54,“Format”:“DPT1”,“Length”:1,“State”:0,“Value”:false},{“Datapoint”:55,“Format”:“DPT9”,“Length”:2,“State”:16,“Value”:21.6}],“Result”:true,“Service”:“GetDatapointValue”}
Then to my question: What is best way to get values to tags? I tried to read value to tag by using UDT where expression tag reads value from httpget and use value in derived tag {source} value but jsonGet it didnt work. Is it best way to read all values in script (1000ms interval) and write to tags? How I can parse “value” from that json?