ljcljc
April 17, 2013, 10:43pm
1
Hi, I want to control my thermostat by send http request to Veralite. The varaible look like this.
<state id="129" service="urn:upnp-org:serviceId:HVAC_UserOperatingMode1" variable="ModeTarget" value="AutoChangeOver"/>
<state id="130" service="urn:upnp-org:serviceId:HVAC_UserOperatingMode1" variable="ModeStatus" value="Off"/>
<state id="131" service="urn:upnp-org:serviceId:TemperatureSensor1" variable="CurrentTemperature" value="73"/>
<state id="132" service="urn:upnp-org:serviceId:TemperatureSetpoint1_Heat" variable="CurrentSetpoint" value="72"/>
<state id="133" service="urn:upnp-org:serviceId:TemperatureSetpoint1_Heat" variable="SetpointTarget" value="72"/>
I know how to change the setpoint through url, but I don’t know how to change the “ModeStatus” from ‘Off’ to ‘HeatOn’. The similar url does not work.
Here is the two urls I use.
http://192.168.1.65:3480/data_request?id=lu_action&output_format=json&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1_Heat&DeviceNum=18&action=SetCurrentSetpoint&NewCurrentSetpoint=70
This one works.
192.168.1.65:3480/data_request?id=lu_action&output_format=json&serviceId=urn:upnp-org:serviceId:HVAC_UserOperatingMode1&DeviceNum=18&action=SetModeStatus&NewModeStatus=HeatOn
This one does not work.
And the error message is “ERROR: Device does not handle service/action”
Can anyone help me? Thanks a lot
I believe you want action=SetModeTarget and NewModeTarget=HeatOn
UPnP generally uses Target for what you want and Status for what you’ve got.
spudjr
April 18, 2013, 10:15pm
4
Also working with a Ct100 thermostat. Trying to get the current temperature to be returned by a http command. any suggestions.
tried:
http://192.168.100.53:3480/data_request?id=status&DeviceNum=23&serviceId=urn:micasaverde-com:serviceId:TemperatureSensor1&Variable=CurrentTemperature&Value=hvacstate
Returns all variables
Also tried
http://192.168.100.53:3480/data_request?id=variableget&DeviceNum=23&serviceId=urn:micasaverde-com:serviceId:TemperatureSensor1&Variable=CurrentTemperature
All that is returned is the word hvacstate
This seems to be the info I want
{“id”: 209, “service”: “urn:upnp-org:serviceId:TemperatureSensor1”, “variable”: “CurrentTemperature”, “value”: “65” }
Don’t know how to parse that info of CurrentTemperature from all the other info that is returned.
Thanks
Try: [url=http://192.168.100.53:3480/data_request?id=variableget&DeviceNum=23&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature]http://192.168.100.53:3480/data_request?id=variableget&DeviceNum=23&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature[/url]
spudjr
April 19, 2013, 1:26pm
6
That works beautifully, just what I wanted. Thanks a bunch.
Any explanation to why to use the different URN? Guessing this goes directly to the thermostat to get the info as compared to trying to get micasaverde servers to talk to the thermostat and get the info. Am I close
It depends on who defined the service. TemperatureSensor1 was defined by the UPnP organisation - as were quite a few of the basic device types and services. You can find out more at: [url=http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions]http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions[/url]