Can I control VeraLite from my cloud-based program

I want to control VeraLite from my cloud-based program through the Internet. For example, I want to turn off the lighting switch or read sensor data through VeraLite.

Does anyone know how to do that? How to connect through http request or TCP request?

Thanks a lot

I believe what you require is here:

http://wiki.micasaverde.com/index.php/UI_Simple

Thanks! That’s helpful.

I met some problem in controlling the thermostat. I used VeraLite and z-wave thermostat from 2gig.

I want to send http request through VeraLite to the thermostat to set the cooling setpoint, but I failed.

According to the UI Simple wiki page, I tried the following command
http://192.168.81.1:3480/data_request?id=action&output_format=xml&DeviceNum=4&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1_Cool&action=SetCurrentSetpoint&newCurrentSetpointValue=72

Then it replied “ERROR: Device does not handle service/action”.

Does it mean I cannot control the device through servece/action? Is there any other way to control the thermostat by sending http request?

Thanks

[quote=“strangely, post:2, topic:171747”]I believe what you require is here:

http://wiki.micasaverde.com/index.php/UI_Simple[/quote]

Try this:

http://192.168.81.1:3480/data_request?id=lu_action&output_format=json&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1_Cool&DeviceNum=4&action=SetCurrentSetpoint&NewCurrentSetpoint=72

  • Garrett

Hi, Garrett

Thanks so much for your reply.

I have tried the commands. The status in VeraLite does changed, but the setting on the thermostat does not change at all. I guess it just edit the record value in VeraLite, not send control signal to the device.

The status look like this:

Any other ideas?

Thanks!!

[quote=“garrettwp, post:5, topic:171747”]Try this:

http://192.168.81.1:3480/data_request?id=lu_action&output_format=json&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1_Cool&DeviceNum=4&action=SetCurrentSetpoint&NewCurrentSetpoint=72

  • Garrett[/quote]

Not sure why it is not updating the thermostat. This is what I use in my Android app to control the thermostats. Can you confirm that a change from the Vera Web interface updates the thermostat?

  • Garrett

Thanks Garrett

It’s working now! I am not sure why it didn’t work before, but now I tried it again and it’s working!

[quote=“garrettwp, post:7, topic:171747”]Not sure why it is not updating the thermostat. This is what I use in my Android app to control the thermostats. Can you confirm that a change from the Vera Web interface updates the thermostat?

  • Garrett[/quote]

One more question.

When I change the setpoint of thermostat manually, I didn’t see the corresponding change in VeraLite. Even I wait for several minutes, the parameter does not change in VeraLite.

The time interval of polling is set to be 60 seconds, so it is supposed to update the device status every 60 seconds.

Can anyone help me?

Thanks a lot

By default Vera polls a device every 30 seconds, and a device cannot be polled more than once every 60 seconds. If you have 1 Z-Wave device it will be polled once every 90 seconds, if you have 10 Z-Wave devices it will be polled once every 330 seconds. So if you have many Z-Wave devices it can take several minutes for a device to be updated.

See also the wiki page on polling.

Hi, mcvflorin

I don’t quite understand this part. Could you explain to me how you get 330 seconds for 10 devices?

Thanks a lot

Hi, all

Here is the strange thing.

I am sure the poll is successful, but the setpoint shown on Vera is different from the actual setpoint on thermostat. After I set the setpoint on thermostat manually, I wait for long time but the setpoint in Vera did not change. Even if I press the button ‘Poll Now’ in the web UI, the setpoint does not change. It seems there is some problem with the poll function.

Can anyone help me?

Thanks so much!

If Vera polls a device every 30 seconds then a polling cycle takes 30 seconds * 10 devices = 300 seconds. The next polling cycle begins 30 seconds after the previous polling cycle ended, so 300 seconds + 30 seconds = 330 seconds until the first device in the new polling cycle is polled. I’m not that good at explaining things. :slight_smile:

Even if I press the button 'Poll Now' in the web UI, the setpoint does not change. It seems there is some problem with the poll function.

You should SSH into Vera and look in the LuaUPnP.log file.

  1. First you must enable verbose logging with the command:
    [tt]VerboseLogging.sh enable[/tt]

  2. Then watch the logs for lines starting with 06:
    [tt]tail -f /var/log/cmh/LuaUPnP.log | grep ‘^06’[/tt]

After you issue a poll command from the UI you should see something like this in the log file:

06 04/23/12 6:08:18.545 Device_Variable::m_szValue_set device: 47 service: urn:upnp-org:serviceId:TemperatureSetpoint1_Heat variable: CurrentSetpoint was: 60 now: 61
- or -
06 04/23/12 6:08:18.545 Device_Variable::m_szValue_set device: 47 service: urn:upnp-org:serviceId:TemperatureSetpoint1_Cool variable: CurrentSetpoint was: 80 now: 79
  1. After you’re done watching the logs you should disable verbose logging:
    [tt]VerboseLogging.sh disable[/tt]

Thanks!! mcvflorin

That’s really helpful. My log information are as follows

06 01/04/-30 20:26:50.424 Device_Variable::m_szValue_set device: 4 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: 72 now: 72 #hooks: 0 upnp: 0 v:0x9e3e80/NONE duplicate:1 <0x2b6b9680> 06 01/04/-30 20:26:56.864 Device_Variable::m_szValue_set device: 4 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 variable: Mode was: ContinuousOn now: ContinuousOn #hooks: 0 upnp: 0 v:0x9cd710/NONE duplicate:1 <0x2b6b9680>

It seems that the problems is VeraLite does not poll the setpoint, only polls the temperature and fan mode. Do you have any idea to make it poll the setpoint?

Thanks a lot!!

If Vera polls a device every 30 seconds then a polling cycle takes 30 seconds * 10 devices = 300 seconds. The next polling cycle begins 30 seconds after the previous polling cycle ended, so 300 seconds + 30 seconds = 330 seconds until the first device in the new polling cycle is polled. I’m not that good at explaining things. :slight_smile:

Even if I press the button 'Poll Now' in the web UI, the setpoint does not change. It seems there is some problem with the poll function.

You should SSH into Vera and look in the LuaUPnP.log file.

  1. First you must enable verbose logging with the command:
    [tt]VerboseLogging.sh enable[/tt]

  2. Then watch the logs for lines starting with 06:
    [tt]tail -f /var/log/cmh/LuaUPnP.log | grep ‘^06’[/tt]

After you issue a poll command from the UI you should see something like this in the log file:

06 04/23/12 6:08:18.545 Device_Variable::m_szValue_set device: 47 service: urn:upnp-org:serviceId:TemperatureSetpoint1_Heat variable: CurrentSetpoint was: 60 now: 61
- or -
06 04/23/12 6:08:18.545 Device_Variable::m_szValue_set device: 47 service: urn:upnp-org:serviceId:TemperatureSetpoint1_Cool variable: CurrentSetpoint was: 80 now: 79
  1. After you’re done watching the logs you should disable verbose logging:
    [tt]VerboseLogging.sh disable[/tt][/quote]

@ljcljc,

Which Vera firmware version are you running?

Hi, oTi@

I am using VeraLite 1.5.286. Could you help me with the problem?
Thanks a lot!

I would first update your firmware to 1.5.346 as there have been many bug fixes.

  • Garrett

I see.

The setpoint issue was fixed in build 1.5.322, so you would have to update to 1.5.346 to get that fix.

Thanks, all

The problem is solved after I upgrade the firmware version. ;D