I’m writing a plugin to control a thermostat (Essent E-Thermostaat). To set the operating mode, I want to use the standard upnp HVAC_UserOperatingMode service. So I’ve included this in my D_***.xml file as a service.
Now when I implement an action from the UserOperatingMode service in my implementation file in the actions list (see below) my Vera can no longer parse the implementation file. In the LuaUPnP.log file I see:
01 02/09/13 17:51:08.668 LuaInterface::LoadCode: [string “…”]:284: ‘’ expected near ‘end’ <0x2af22000>
01 02/09/13 17:51:08.729 Device_Interface::CreateLuaInterface 12 failed to start engine <0x2af22000>
I know the Implementation file itself is correct, when I rename the action to something not specified by upnp (for example ‘DummyModeTarget’), everything parses normally.
What’s going on here? Do I need another way to implement the standard actions or should I stay away from them? Quite lost at the moment…
Snippet from my implementation file:
<action>
<serviceId>urn:upnp-org:serviceId:HVAC_UserOperatingMode1</serviceId>
<name>SetModeTarget</name>
<run>
luup.log('modecalled')
end
</run>
</action>
Snippet from my D_*** file:
<service>
<serviceType>urn:schemas-upnp-org:service:HVAC_UserOperatingMode:1</serviceType>
<serviceId>urn:upnp-org:serviceId:HVAC_UserOperatingMode1</serviceId>
<SCPDURL>S_HVAC_UserOperatingMode1.xml</SCPDURL>
</service>