Post

1 follower Follow
0
Avatar

Adding preset to datapoint using SOAP

Good evening,

I am currently working on a Smartserver 2.2 from a customer.

I try to add new presets for datapoints using a SOAP request, because I have to create a custom webpage that will include this option.

I tried a variation of examples from the developper guide using the SET function (like in chap. 4.3.3 of programmer's reference). But each time I got an error : 'XML error in SOAP request' (3) or even 'fail' (99)

This is an example of one basic datapoint for a light system:

<Item xsi:type='Dp_Cfg'>
<UCPTname>Net/LON/P68/OLC[0]/nviLampValue_1</UCPTname>
<UCPTannotation>Dp_In;xsi:type=&quot;LON_Dp_Cfg&quot;</UCPTannotation>
<UCPThidden>0</UCPThidden>
<UCPTlastUpdate>2021-12-02T14:24:11.220+01:00</UCPTlastUpdate>
<UCPTdescription></UCPTdescription>
<UCPTformatDescription>#0000000000000000[0].SNVT_switch</UCPTformatDescription>
<UCPTlength>2</UCPTlength>
<UCPTdirection LonFormat="#8000010128000000[4].UCPTdirection">DIR_IN</UCPTdirection>
<UCPTbaseType LonFormat="#8000010128000000[4].UCPTbaseType">BT_STRUCT</UCPTbaseType>
<UCPTmaxFields>2</UCPTmaxFields>
<SCPTmaxSendTime>0.0</SCPTmaxSendTime>
<SCPTminSendTime>0.0</SCPTminSendTime>
<SCPTmaxRcvTime>0.0</SCPTmaxRcvTime>
<ValueDef>
<UCPTindex>0</UCPTindex>
<UCPTname>OFF</UCPTname>
<UCPTvalue LonFormat='#0000000000000000[0].SNVT_switch'>0.0 0</UCPTvalue>
</ValueDef>
<ValueDef>
<UCPTindex>1</UCPTindex>
<UCPTname>ON</UCPTname>
<UCPTvalue LonFormat='#0000000000000000[0].SNVT_switch'>100.0 1</UCPTvalue>
</ValueDef>

</Item>

 

And I want to add a new Preset (ValueDef) like this one:

<ValueDef>
<UCPTindex>2</UCPTindex>
<UCPTname>NEWPRESET</UCPTname>
<UCPTvalue LonFormat='#0000000000000000[0].SNVT_switch'>65.0 1</UCPTvalue>
</ValueDef>

If someone have any indication. It would help a lot.

Thanks by advance.

Best Regard,

C. Lemoulan

Cedric Lemoulan

Please sign in to leave a comment.