My device has the following variables declared :
<stateVariable sendEvents="no">
<name>SMSText</name>
<sendEventsAttribute>no</sendEventsAttribute>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>SMSRecipientNumber</name>
<sendEventsAttribute>no</sendEventsAttribute>
<dataType>string</dataType>
</stateVariable>
and an action : SendSMS
I am calling the device (currently from the Test Code page) as follows :
luup.call_action(“urn:upnp-org:serviceId:GSMControl1”,“SendSMS”,{ SMSRecipientNumber= “07855511327”, SMSText=“Test Text” },9)
In the SendSMS action I reference the variables like this :
<name>SendSMS</name>
<run>
luup.log('GSMControl : SMS Send : Number: ' .. SMSRecipientNumber)
luup.log('GSMControl : SMS Send : Text: ' .. SMSText)
This is clearly not the correct approach as the variables aren’t set.
Is this the correct approach (with whatever code changes are required) or is the whole approach flawed?