Author Topic: Vera and an ISY994i  (Read 90424 times)

Offline Ds514

  • Full Member
  • ***
  • Posts: 189
  • Karma: +2/-0
  • Because automatic.
Re: Vera and an ISY994i
« Reply #30 on: December 03, 2013, 10:11:20 pm »
I use the pleg plugin to run scenes from the ISY that will turn on the keypad linc buttons if certain zwave lights are on in the house that the keypad linc control. If you are interested in more information, I am wiling to provide it as well as the code for the plugin.

Garrett, could you provide an example of a PLEG that runs a scene from the ISY that interacts with the KPL?

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6376
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Vera and an ISY994i
« Reply #31 on: December 04, 2013, 12:59:34 am »
Ok, sent messages off.

Current status for new items:
  • Z-Wave Binary switches
    • done
  • Z-Wave Dimmer switches
    • appear as binary switches (for now)
    • only on/off supported
    • ISY itself only supports On/Off for Leviton - others dimmers may work?
  • Z-Wave Locks
    • only status is reported
    • awaiting release of developer documentation to added remote lock/unlock (or trial & error)
  • Z-Wave Thermostat
    • Not started
  • Insteon IOLinc
    • relay works
    • sensor needs to be tested

-Jacob (PurdueGuy)

Great job! Looking forward to looking over the code changes. Hopefully MCV will get back to you soon. MCV.Andrei has been pretty responsive in requests.

I am hoping that this plugin is proving it's value to others.

- Garrett

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6376
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Vera and an ISY994i
« Reply #32 on: December 04, 2013, 01:08:21 am »
I use the pleg plugin to run scenes from the ISY that will turn on the keypad linc buttons if certain zwave lights are on in the house that the keypad linc control. If you are interested in more information, I am wiling to provide it as well as the code for the plugin.

Garrett, could you provide an example of a PLEG that runs a scene from the ISY that interacts with the KPL?

When I get some time, I'll post a little write up. What you would do is create inputs for the devices you want to act on and their respective conditions in pleg. For their actions you would go to the advanced tab of the action creator, select the ISY Controller device -> select runScene and the id field would than be the scene id number found in the ISY controller. The newTargetValue would be either 1 for on or 0 for off.

- Garrett

Offline PurdueGuy

  • Hero Member
  • *****
  • Posts: 1170
  • Karma: +21/-0
Re: Vera and an ISY994i
« Reply #33 on: December 04, 2013, 01:39:39 am »
Ok, here are my updates.  No access the the git repo yet.

Current status for new items:
  • Z-Wave Binary switches
    • done
  • Z-Wave Dimmer switches
    • appear as binary switches (for now)
    • only on/off supported
    • ISY itself only supports On/Off for Leviton - others dimmers may work?
  • Z-Wave Locks
    • works
  • Z-Wave Thermostat
    • Not started
  • Insteon IOLinc
    • creates 2 devices
    • relay works (my relay is set to Momentary A - doesn't reflect as on in Vera, which is what I want
    • sensor work (trip the sensor once, and a "Reverse" variable is created in case the status shows backwards)

Have a look.  I think you just need to upload the files, restart the daemon, and any new devices will be created.

After the new devices are detected, you can click "Update Names" for the main ISY device, and item will be renamed to match ISY.

I am going to have to wipe my ISY Z-Wave dongle and start over, so I might be re-installing the ISY plugin.
-Jacob (PurdueGuy)
« Last Edit: December 04, 2013, 02:34:40 am by PurdueGuy »
Vera3, Leviton, Intermatic, SQ Blaster, HomeWave, DSC 1832, Insteon/Altsteon

Offline PurdueGuy

  • Hero Member
  • *****
  • Posts: 1170
  • Karma: +21/-0
Re: Vera and an ISY994i
« Reply #34 on: December 04, 2013, 02:59:49 am »
Ok, so my initial set of devices wasn't a good set to start with it appears.
I wasn't sure how the "type" field worked for Z-Wave nodes, since it was set to 4, which in Insteon is a whole different category.  Turns out, there is a new tag for Z-Wave nodes, called "family" which is set to 4.

Currently, the "family" tag is not handled by the code, and will need to be added.

I have found that all z-wave devices are "family"=4, but the "type" varies:
Kwikset Locks: type = 4.64.3.0
Leviton relay switch & receptacle: type = 4.16.3.0
Leviton dimmer: type=4.17.4.0
GE relay switch & receptacle: type=4.16.1.0
Intermatic receptacle: type=3.16.1.0
Cooper receptacle: type=4.16.1.0
Evolve relay module: type=4.16.3.0

It looks like the code will work UNLESS you have Intermatic devices.
I will have to ask UD about that.

For now, you can experiment.  Perhaps someone more versed in the XML parsing, etc. can update/add the "family" parsing.  That code will have to check the family tag (if it exists) before creating a Z-Wave device.

EDIT: Oops, I believe it is Intermatic HomeSettings receptacles that are different.
« Last Edit: December 04, 2013, 03:05:17 am by PurdueGuy »
Vera3, Leviton, Intermatic, SQ Blaster, HomeWave, DSC 1832, Insteon/Altsteon

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6376
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Vera and an ISY994i
« Reply #35 on: December 04, 2013, 03:42:10 am »
In which api call does the family tag show up in? e.g /rest/nodes/devices If you provide me the xml output, I can see what I can do to add the family tag. It should not be too hard to add.

Update:

Looking further into the family tag, we would need to modify the code to check the family id first and than proceed with the appropriate functions. This would require changing the category maps to their respective families.  Does the family tag exist for the insteon devices or only show for the zwave devices? I do not have a family tag listed for any of my insteon devices. If no family tag is set for the device, I would than assume it would be an insteon device.

- Garrett
« Last Edit: December 04, 2013, 07:01:24 am by garrettwp »

Offline PurdueGuy

  • Hero Member
  • *****
  • Posts: 1170
  • Karma: +21/-0
Re: Vera and an ISY994i
« Reply #36 on: December 04, 2013, 11:52:38 am »
It only shows up for Z-Wave that I have seen.

Here is 2 examples with different types:
Kwikset deadbolt:
Code: [Select]
<node flag="144">
  <address>ZW002_1</address>
  <name>Front Door Deadbolt</name>
  <family>4</family>
  <parent type="3">39649</parent>
  <type>4.64.3.0</type>
  <enabled>true</enabled>
  <deviceClass>0</deviceClass>
  <wattage>0</wattage>
  <dcPeriod>0</dcPeriod>
  <pnode>ZW002_1</pnode>
  <devtype>
    <gen>4.64.3</gen>
    <mfg>144.1.1</mfg>
  </devtype>
  <ELK_ID>K08</ELK_ID>
  <property id="ST" value="101" formatted="Locked" uom="boolean"/>
</node>

Intermatic receptacle:
Code: [Select]
<node flag="128">
  <address>ZW011_1</address>
  <name>Nightstand</name>
  <family>4</family>
  <parent type="3">63462</parent>
  <type>3.16.1.0</type>
  <enabled>true</enabled>
  <deviceClass>0</deviceClass>
  <wattage>0</wattage>
  <dcPeriod>0</dcPeriod>
  <pnode>ZW011_1</pnode>
  <devtype>
    <gen>3.16.1</gen>
    <mfg>5.1.3</mfg>
  </devtype>
  <ELK_ID>L07</ELK_ID>
  <property id="ST" value="0" formatted="Off" uom="%"/>
  </node>
Vera3, Leviton, Intermatic, SQ Blaster, HomeWave, DSC 1832, Insteon/Altsteon

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6376
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Vera and an ISY994i
« Reply #37 on: December 04, 2013, 12:35:52 pm »
Let me see what I can break with adding support for the family id. I took your changes and added them to the code and will upload it to the git repo.

Even though the leviton dimmers do not support dimming yet, I changed the device type to a dimmer for future use. It would be confusing and a pain to convert the zwave dimmer devices from a binary switch to a dimmable switch.

- Garrett

Offline Ds514

  • Full Member
  • ***
  • Posts: 189
  • Karma: +2/-0
  • Because automatic.
Re: Vera and an ISY994i
« Reply #38 on: December 04, 2013, 04:50:40 pm »
When I get some time, I'll post a little write up. What you would do is create inputs for the devices you want to act on and their respective conditions in pleg. For their actions you would go to the advanced tab of the action creator, select the ISY Controller device -> select runScene and the id field would than be the scene id number found in the ISY controller. The newTargetValue would be either 1 for on or 0 for off.

Sorry, running into a bit of a wall here. Are the scenes that you refer to ISY-only (i.e., only incorporating Insteon devices), or are you able to create scenes that incorporate any eligible device configured with your Vera? While I understand how to make scenes or programs within the ISY, I am not seeing a way to do so incorporating Vera devices. Specifically, the scene controller device created by the plugin does not have any of the typical drop-downs used for this purpose.

I understand that you are still working to get the meat of the plugin functional; if you prefer to leave these types of details until after that, it is fine.

Offline PurdueGuy

  • Hero Member
  • *****
  • Posts: 1170
  • Karma: +21/-0
Re: Vera and an ISY994i
« Reply #39 on: December 04, 2013, 05:02:44 pm »
With in a Vera scene, on the Advanced tab, you can choose the main ISY device, and hit "Add"
Then you can choose "runScene" to run an Insteon scene on the ISY.
What that IYS scene does is up to the user/ISY capabilities.

So say you had a group of devices, some Insteon, some Z-Wave and you want to turn them all off.
Create a scene in ISY called "All Off" - add all the Insteon members, setting them to off.
Create a scene in Vera called "All Off" - set the Z-Wave items you want off in the devices tab.
Go to the Advanced tab, chose the main ISY device, hit "Add", select "runScene" fill in the details, (scene id as defined in ISY, 0 for newTargetValue).
Vera3, Leviton, Intermatic, SQ Blaster, HomeWave, DSC 1832, Insteon/Altsteon

Offline Ds514

  • Full Member
  • ***
  • Posts: 189
  • Karma: +2/-0
  • Because automatic.
Re: Vera and an ISY994i
« Reply #40 on: December 04, 2013, 05:23:50 pm »
Ok, this helps, thanks.

Am I correct in assuming that the method of calling that scene from the KPL button in the Vera is to use the "Add trigger" tab in Automation (UI5), selecting the device created by the ISY plugin, and then using a "scene number" corresponding with the desired button?

Offline PurdueGuy

  • Hero Member
  • *****
  • Posts: 1170
  • Karma: +21/-0
Re: Vera and an ISY994i
« Reply #41 on: December 04, 2013, 05:56:26 pm »
I haven't tried any of this, so I am just guessing.   But yes, choose the "<DEVICE> SC" then either "A scene is activated" or "A scene is de-activated", name it, and enter 1-8 corresponding to a KPL button number.  (Remember an 8 button is 1-8, and a 6 button is 1,3, 4, 5, 6)

However, I would question why you would want to call an Insteon scene from Vera when initiated by a KPL.  But here goes some ways to do it?..

It depends on your setup.

Case A)  If you have the KPL button setup as a Controller for an Insteon scene or kicking off an ISY program, Vera need not be involved for Insteon devices.  If you want to use that KPL button to alter Z-Wave devices within Vera, you would use the KPL activation as a trigger, and set the Z-Wave devices as you want.  Ignore any Insteon.

Case B)  If you do not have the KPL button setup as a Controller for an Insteon scene or ISY program initiator, Vera could handle it all.  You can have the scene set the Z-Wave devices as you want.   Then you can also have Vera set the Insteon devices as you want, or you could have Vera call an Insteon scene that you already defined in the ISY.

Clear as mud right?  It's flexible to the point of being too flexible!  The reason I would use Case A over B is less network traffic and ease of use.  Insteon/ISY will nicely handle the Insteon side of things.  And let Vera handle the Z-Wave side.  This cuts down on Insteon traffic, IP traffic, etc.
Vera3, Leviton, Intermatic, SQ Blaster, HomeWave, DSC 1832, Insteon/Altsteon

Offline Ds514

  • Full Member
  • ***
  • Posts: 189
  • Karma: +2/-0
  • Because automatic.
Re: Vera and an ISY994i
« Reply #42 on: December 04, 2013, 07:54:50 pm »
Funny, tested it before reading this and used 2 as the random button on my 6 button KPL dimmer. Will try again with 3.

As far as the basis for calling the scene from the Insteon that involves the both the Vera and ISY, there's two scenarios in mind:

1. Living Room: Activate Sonos along with lighting as part of a scene triggered by KPL. As far as I know, Insteon does not have (simple or robust) Sonos integration as yet.

2. Living Room: Activate a Philips Hue device (Living Colors) along with Insteon devices.

3. There will be more.

Edit: That worked; I have the Vera responding to KPL button presses. Thanks again. Another shipment of Insteon devices on the way.
« Last Edit: December 04, 2013, 08:25:47 pm by Ds514 »

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6376
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Vera and an ISY994i
« Reply #43 on: December 05, 2013, 08:32:27 am »
Funny, tested it before reading this and used 2 as the random button on my 6 button KPL dimmer. Will try again with 3.

As far as the basis for calling the scene from the Insteon that involves the both the Vera and ISY, there's two scenarios in mind:

1. Living Room: Activate Sonos along with lighting as part of a scene triggered by KPL. As far as I know, Insteon does not have (simple or robust) Sonos integration as yet.

2. Living Room: Activate a Philips Hue device (Living Colors) along with Insteon devices.

3. There will be more.

Edit: That worked; I have the Vera responding to KPL button presses. Thanks again. Another shipment of Insteon devices on the way.

This would only be wise if you wanted to manage the action of the kpl button on one controller. But it would be better to have the kpl button issue the isy scene on the isy side and the actions for vera on the vera side. This would require setting up the action for the kpl button on both controllers, but you are already configuring the scene on both anyway.

- Garrett

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6376
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Vera and an ISY994i
« Reply #44 on: December 05, 2013, 08:35:52 am »
PurdueGuy,

I granted you access to the git repository. You can now commit. I merged your changes to the code and made some additional changes as well.

Merged the zwave code.
Merged the iolinc code.
Changed the zwave dimmer child creation to use the dimmer device and not the binary device.
Added code for the family tag for use in distinguishing between z-wave and insteon devices.
Other minor bug fixes and code cleanup.

- Garrett