MiCasaVerde Vera UI5, UI6, UI7 Plugin

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 3115
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by kgschlosser » Fri Jul 28, 2017 3:30 pm

HA HA there was one other error i made... i fixed it and attached the file
Attachments
TextControls.py
(15.96 KiB) Downloaded 19 times
If you like the work I have been doing then feel free to Image

holdestmade
Experienced User
Posts: 68
Joined: Thu Dec 04, 2014 2:44 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by holdestmade » Sat Jul 29, 2017 6:40 am

Yes, I think I understand how you add categories, thanks.

All working great with that latest file.

Cheers

User avatar
kgschlosser
Site Admin
Posts: 3115
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by kgschlosser » Sat Jul 29, 2017 2:11 pm

the categories are defined by UPNP and Vera uses their standard. so these will not change (hopefully) what the system i designed is a means to be able to add specific variable names to watch I am going to update this one more time i think to add a dialog to be able to add and remove variable names to monitor and what the user wants to generate for event names. any variable for any device/plugin that is able to be viewed inside of the Vera UI is able to b monitored. I will have to go diging again and find it. but there is also a means to be able to set any variable as well. I will add this functionality also. then it will expose all of the Vera to the user from within EventGhost
If you like the work I have been doing then feel free to Image

holdestmade
Experienced User
Posts: 68
Joined: Thu Dec 04, 2014 2:44 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by holdestmade » Fri Oct 27, 2017 8:32 am

Hey KG,

I know you're not working on this any more but I still find it very useful.

I've recently added a NEST thermostat and when I try and add a macro using the "MiCasaVerde Vera UI5 UI6 UI7: HVAC Controls" I get a repeating error in the log:

09:25:48 Traceback (most recent call last) (0.5.0-rc4):
09:25:48 File "C:\Program Files (x86)\EventGhost\plugins\MiCasaVerdeVera\HVACControls.py", line 334, in UpdateHVACDisplay
09:25:48 tmpstates = self.GetHVACStates(devc)
09:25:48 File "C:\Program Files (x86)\EventGhost\plugins\MiCasaVerdeVera\HVACControls.py", line 184, in GetHVACStates
09:25:48 fanmode = item['fanmode']
09:25:48 KeyError: 'fanmode'

I think this may be that in the UK NEST doesn't have a fan or cool mode, only heating and eco.

Would this be an easy fix/option ?

Thanks is advance

User avatar
kgschlosser
Site Admin
Posts: 3115
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by kgschlosser » Fri Oct 27, 2017 8:39 am

that should be a pretty simple fix.

do me a favor tho. go into you vera and check the thermostat variables and see if there is one in there called fanmode if not look for something similar. once i know this I will add the new variable if it has changed or if it is not there i will account for that.


***EDIT***

OK I was reading what you typed but not processing it i guess. you are going to have to list off all of the variables for the nest thermostat so i can account for the ones that are missing and add the ones that are there.

actually if you give me a couple of hours to sleep. i will dig up the API when i wake up so you can connect to a URL on your vera and simply copy and paste the data returned. this will give me everything form the Vera on a specific device. What I am going to need form you is the device number. there are 2 of them i need both. one will be listed in the advanced section of the device in the UI
If you like the work I have been doing then feel free to Image

holdestmade
Experienced User
Posts: 68
Joined: Thu Dec 04, 2014 2:44 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by holdestmade » Fri Oct 27, 2017 8:58 am

Great thanks, all device numbers for that was added to Vera:

NEST main device is device number 511
NEST Thermostat is device number 518
NEST Home/Away is device number 513
NEST Humdity is device number 519

User avatar
kgschlosser
Site Admin
Posts: 3115
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by kgschlosser » Fri Oct 27, 2017 11:52 am

ok cool thanks. I have to drop the wife off at work and then i will grab that URL for ya. it will be in about 45 minutes to an hour or so.
If you like the work I have been doing then feel free to Image

holdestmade
Experienced User
Posts: 68
Joined: Thu Dec 04, 2014 2:44 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by holdestmade » Fri Oct 27, 2017 12:13 pm

No rush at all.

holdestmade
Experienced User
Posts: 68
Joined: Thu Dec 04, 2014 2:44 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by holdestmade » Fri Oct 27, 2017 1:40 pm

Think I've found the URL and I'll PM you the XML

I'm away for a week now so no rush.

Cheers

holdestmade
Experienced User
Posts: 68
Joined: Thu Dec 04, 2014 2:44 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by holdestmade » Fri Nov 03, 2017 8:45 pm

Hey Kg, no pressure, have you had chance to look into this ?

Cheers

User avatar
kgschlosser
Site Admin
Posts: 3115
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by kgschlosser » Fri Nov 03, 2017 10:31 pm

I have. and I started working on it. It's going to be kind of a pain in the &%# to do with the current setup. mainly because I do not have a working Vera anymore.

But I am going to toss you some code to run in a day or 2. I am going to need you to test something out for me. If it works then this plugin is going to drastically change. it will allow for changing anything on the Vera. I will make some nice actions up for the basics But it will expose the whole API in a manner that will make it compatible with any new UI for the foreseeable future (so long as they continue to stick to UPnP standards).

But it will also allow for access to any plugin that is on the Vera as well.

I will add into the plugin config a means to create events for different changes. so if something is not built in but you want an event for it you will be able to create it.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3115
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by kgschlosser » Fri Nov 03, 2017 10:44 pm

here. send this to your vera from a browser

You will have to fill in the IPADDRESS part.

Code: Select all

http://IPADDRESS:3480/data_request?id=variableset&DeviceNum=518&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1_Heat&Variable=CurrentSetpoint&Value=18
This is going to change your thermostat heat set point to 18C.... hopefully.
If you like the work I have been doing then feel free to Image

holdestmade
Experienced User
Posts: 68
Joined: Thu Dec 04, 2014 2:44 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by holdestmade » Sat Nov 04, 2017 11:18 am

All sounds interesting !

Yes that changed the setpoint in Vera to 18degC but didn't update the actual thermostat. If I send:

Code: Select all

http://IP/data_request?id=action&DeviceNum=518&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1&action=SetCurrentSetpoint&NewCurrentSetpoint=18
OR

Code: Select all

http://IP/data_request?id=action&DeviceNum=518&serviceId=urn:micasaverde-com:serviceId:VeraConnectWWN1&action=SetModeAndSetpoint&NewModeTarget=HeatOn&NewCurrentSetpoint=18
this changes the thermostat as well as the Vera.

I found the commands below by trial and error which I use in my remote system, not sure if they are of any use.

Cheers

SET SETPOINT TEMPERATURE TO 22 DEGREES

Code: Select all

http://IP/data_request?id=action&DeviceNum=518&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1&action=SetCurrentSetpoint&NewCurrentSetpoint=22
SET TO OFF

Code: Select all

http://IP/data_request?id=action&DeviceNum=518&serviceId=urn:upnp-org:serviceId:HVAC_UserOperatingMode1&action=SetModeTarget&NewModeTarget=Off
HEAT ON AND SET TO 30 DEGREES

Code: Select all

http://IP/data_request?id=action&DeviceNum=518&serviceId=urn:micasaverde-com:serviceId:VeraConnectWWN1&action=SetModeAndSetpoint&NewModeTarget=HeatOn&NewCurrentSetpoint=30
SET TO ECO

Code: Select all

http://IP/data_request?id=action&DeviceNum=518&serviceId=urn:upnp-org:serviceId:HVAC_UserOperatingMode1&action=SetModeTarget&NewModeTarget=EnergySavingsMode
GET CURRENT TEMPERATURE

Code: Select all

http://IP/data_request?id=variableget&DeviceNum=518&serviceId=urn:upnp-org:serviceId:TemperatureSensor1&Variable=CurrentTemperature
GET CURRENT SETPOINT TEMPERATURE

Code: Select all

http://IP/data_request?id=variableget&DeviceNum=518&serviceId=urn:upnp-org:serviceId:TemperatureSetpoint1_Heat&Variable=CurrentSetpoint
GET CURRENT HUMIDITY

Code: Select all

http://IP/data_request?id=variableget&DeviceNum=519&serviceId=urn:micasaverde-com:serviceId:HumiditySensor1&Variable=CurrentLevel

User avatar
kgschlosser
Site Admin
Posts: 3115
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by kgschlosser » Sat Nov 04, 2017 12:35 pm

I know the HVAC commands but the setvariable will allow me to set any variable. If I can set any variable and then send a command for the vera to update the device or refresh the device with the new settings my job just because a whole lot easier the. Using specialized commands per device. So we know the setvariable does in fact work. Which is a good thing. Now I gotta dig up that refresh command. If there is one.

The setvariable would be a global use. So it would allow you to change everything. I could make a simple action that when you selected a device it would display all of the variables that device has and their current settings. With this you could change whatever.

I am trying to decide if I want to use requests to handle the vera communications or go with a simple socket connection. And I don't remember if the vera stores the data as json or XML. I do know that conversion has a pretty nasty performance hit for the vera. So I will have to do some reading again.
If you like the work I have been doing then feel free to Image

zogg
Posts: 6
Joined: Wed Feb 24, 2016 11:43 pm

Re: MiCasaVerde Vera UI5, UI6, UI7 Plugin

Post by zogg » Thu Nov 09, 2017 11:29 pm

KG,

Is the download link on the first page up to date? It looks like you've made some changes since but the first post notes don't reflect that.

Thanks!

Post Reply