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

Offline scyto

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #375 on: March 25, 2015, 06:59:05 pm »
to be clear you re-added the failure lines and just waited - right?

I never got mine to come up, I submitted a ticket with vera folks - their app engine in UI7 is mucho buggy.

Offline SirMeili

  • Hero Member
  • *****
  • Posts: 1051
  • Karma: +43/-20
Re: Vera and an ISY994i
« Reply #376 on: March 25, 2015, 07:22:59 pm »
to be clear you re-added the failure lines and just waited - right?

I never got mine to come up, I submitted a ticket with vera folks - their app engine in UI7 is mucho buggy.
I put the original file in and set it up (initialized the Damon, put in username, password, ip, etc)... Then once all the devices were in and it was running I replaced the file with the one with the extra lines.... It took a while to work.

I agree about the ui7 app engine...I was a dining notifications and due to its auto restarts (I guess) it created a crap load of duplicates that took forever to remove because of the hidden restarts.
VeraLite (Live); ISY 994i (Live); Vera 3 (Waiting to replace VeraLite); Vera Edge (Waiting for all the bugs to be fixed); Xuan StackBox (Testing and waiting for more plugins and for it to mature)
Countless z-wave and insteon devices :D

Offline scyto

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #377 on: March 25, 2015, 07:30:45 pm »
Thanks, when I click initialize I just get 'device not ready' and in the error code variable it appears to indicate a comms issue.  If I put an invalid IP address I get a different error, so I am pretty sure it is contacting the ISY on port 80... just not sure what is happening after that :-(  - any ideas?

The daemon is now running, still get LUA startup failed when I put the IP in.
« Last Edit: March 26, 2015, 09:08:25 pm by scyto »

Offline scyto

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #378 on: March 27, 2015, 09:04:30 pm »
I reset the LUA to the one that came in the ZIP.  Now the insteon devices and z-wave devices have appeared (this means I have z-wave duplicates).

*edit 1*
Hmm maybe I spoke too soon, it still said disconnected so I restarted the LUA engine, now it says connected but it doesn't control any insteon loads.  I will give it some time to see what it does....  UI7 is a mess for apps....

*edit 2*
oh, its working properly
gah flaky unpredictable UI7 - I don't even have luup failure code mode - its running just fine?!

So my ask is "Does anyone have idiot proof instructions on how to comment out the z-wave sections in the LUA so I can stop it syncing the z-wave devices?"  (also does it matter what encoding the file uses for carriage returns etc?)
« Last Edit: March 27, 2015, 09:38:09 pm by scyto »

Offline scyto

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #379 on: March 27, 2015, 09:59:44 pm »
Yay I totally figured out the z-wave filtering.

If you have the plug-in working AND want to filter the z-wave out of the plugin - i.e. because you will be using vera as a secondary controller to the ISY primary then use this alternate L_ISYController1.lua file!

(if I have time I may try and work out how to create a new device variable to control this, note I have no clue about programming so don't hold your breath).
« Last Edit: March 28, 2015, 02:33:43 pm by scyto »

Offline scyto

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #380 on: March 28, 2015, 05:33:56 pm »
Sigh, and now for no reason at all I get ISY Controller[212] : Startup Lua Failed :-( nothing changed AFAIK.

--edit--
I put the ISYIP and the username and pass back into the variables and kicked the luup and now it is working, but of course all my insteon devices re-appeared back in 'no room'.. sigh... "another fine moment brough to you by our sponsors.... Vera... and UI7..."

--edit--
hmm this may have been caused by somehow having two ISY devices - I deleted the older one.
« Last Edit: March 29, 2015, 11:34:17 pm by scyto »

Offline ccclapp

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #381 on: March 29, 2015, 08:06:37 am »
scyto: great effort!  ive not tried it yet.  can you clarify a few things:

-- what lines did you change?
-- conceptually how do those changes stop zw from reporting?
-- is it now working (or close) or dont you yet know?

i agree that Vera as 2ndary wz controller and isy primary is ideal.


Anyone:  is there a reason someone would NOT want this  zw controller relationship?  ( i guess obvious answer is they have vera - centric config and just want vera for insteon...)

POLL:  HOW MANY USING THIS PLUGIN HAVE/WANT VERA AS LEAD HA CONTROLLER VS ISY??


Offline scyto

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #382 on: March 29, 2015, 09:25:54 pm »
Yes of course.

It was lines 1740 through 1856 - the key is make sure you comment out as far as the right end and not one too many.  also given this is a function I am assuming it is possible to either add an additional esleif  or modify the existing one for a mythical new variable I come up with to turn this section on or off with a variable state.

It turns off the node creation (I think).  On my system I had the normal plugin working, I copied over the modified file, the LUA engine restarted and the duplicate z-wave devices promptly disappeared.

Yes I did not post the file until I had verified the z-wave devices don't come back and insteon still worked.  Only issue I have had is some hours later I had the issue I reported above about duplicate ISY devices, unlclear why I got two. Since then everything is ok.
Of course YMMV - but if you don't like this modified version one can just copy the original back over to the Vera :-)


Code: [Select]
            -- -- Z-Wave items
            -- elseif (family ~= nil and family == "4") then
                   
                -- if (zwaveDeviceCategory4[devCat]) then
                   
                    -- -- Relay / Switch
                    -- if (zwaveDeviceCategory4.relay[subCat]) then
                        -- local newStatus
                       
                        -- debugLog("Creating Z-Wave Relay for: node " .. node)
                       
                        -- -- On
                        -- if (status ~= nil and status ~= " " and status ~= " " and tonumber(status) > 0) then
                            -- newStatus = 1
                         
                        -- -- Off
                        -- else
                            -- newStatus = 0
                        -- end
                       
                        -- luup.chdev.append(PARENT, children,
                            -- string.format("%s", parent), string.format("%s", name),
                            -- "urn:schemas-upnp-org:device:BinaryLight:1", "D_BinaryLight1.xml",
                            -- "", "urn:upnp-org:serviceId:SwitchPower1,Status=" .. newStatus ..
                            -- "\nurn:garrettwp-com:serviceId:ISYController1,Family=4", false)

                    -- -- Dimmer
                    -- elseif (zwaveDeviceCategory4.dimmer[subCat]) then
                    -- local loadLevel
                        -- local newStatus
                       
                        -- debugLog("Creating Z-Wave dimmer for: node " .. node)
                       
                        -- -- On
                        -- if (status ~= nil and status ~= " " and status ~= " " and tonumber(status) > 0) then
                            -- newStatus = 1
                         
                        -- -- Off
                        -- else
                            -- newStatus = 0
                        -- end
                       
                        -- luup.chdev.append(device, children,
                            -- string.format("%s", parent), string.format("%s", name),
                            -- "urn:schemas-upnp-org:device:DimmableLight:1", "D_DimmableLight1.xml",
                            -- "", "urn:upnp-org:serviceId:SwitchPower1,Status=" .. newStatus ..
                            -- "\nurn:garrettwp-com:serviceId:ISYController1,Family=4", false)
                            -- --.. "\n" .. "urn:upnp-org:serviceId:Dimming1,LoadLevelStatus=" .. loadLevel, false)

                    -- -- Lock
                    -- elseif (zwaveDeviceCategory4.lock[subCat]) then
                        -- local newStatus
                       
                        -- debugLog("Creating Z-Wave lock for: node " .. node)
                       
                        -- -- On
                        -- if (status ~= nil and status ~= " " and tonumber(status) > 0) then
                            -- newStatus = 1
                         
                        -- -- Off
                        -- else
                            -- newStatus = 0
                        -- end
                       
                        -- luup.chdev.append(PARENT, children,
                            -- string.format("%s", parent), string.format("%s", name),
                            -- "urn:schemas-micasaverde-com:device:DoorLock:1", "D_DoorLock1.xml",
                            -- "", "urn:micasaverde-com:serviceId:DoorLock1,Status=" .. newStatus ..
                            -- "\nurn:garrettwp-com:serviceId:ISYController1,Family=4", false)

                    -- -- Thermostat
                    -- elseif (zwaveDeviceCategory4.thermostat[subCat]) then
                      -- local loadLevel
                        -- local newStatus
                       
                        -- debugLog("Creating Z-Wave thermostat for: node " .. node)
                       
                        -- -- temp
                        -- if (status ~= nil and status ~= " " and tonumber(status) > 0) then
                            -- newStatus = tonumber(status)
                         
                        -- -- Off
                        -- else
                            -- newStatus = 0
                        -- end

                        -- debugLog("  Z-Wave thermostat current temp = " .. newStatus)
                       
                        -- luup.chdev.append(device, children,
                            -- string.format("%s", parent), string.format("%s", name),
                            -- "urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1", "D_HVAC_ZoneThermostat1.xml",
                            -- "", "urn:upnp-org:serviceId:TemperatureSensor1,CurrentTemperature="..newStatus, false)

                    -- -- Motion Sensor
                    -- elseif (zwaveDeviceCategory4.motionSensor[subCat]) then

                      -- local newStatus
                       
                        -- debugLog("Creating Z-Wave motion sensor for: node " .. node)
                       
                        -- -- tripped
                        -- if (status ~= nil and status ~= " " and tonumber(status) == 1) then
                            -- newStatus = 1
                       
                        -- -- secure (not tripped)
                        -- else
                            -- newStatus = 0
                        -- end
                       
                        -- luup.chdev.append(device, children,
                            -- string.format("%s", parent), string.format("%s", name),
                            -- "urn:schemas-micasaverde-com:device:MotionSensor:1", "D_MotionSensor1.xml",
                            -- "", "urn:micasaverde-com:serviceId:SecuritySensor1,Tripped=" .. newStatus .. 
                            -- "\n" .. "urn:micasaverde-com:serviceId:SecuritySensor1,Armed=0" ..
                            -- "\nurn:garrettwp-com:serviceId:ISYController1,Family=4", false)
                    -- end
                -- end
« Last Edit: March 29, 2015, 11:34:51 pm by scyto »

Offline scyto

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +1/-0
Re: Vera and an ISY994i
« Reply #383 on: April 04, 2015, 03:32:35 pm »
I notice that insteon leak sensors use D_MotionSensor1 device class, giver ther are two leak sensor classes is there are reason for me to not modify the lua to use those device classes instead?

Offline jjwalker

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +0/-0
Re: Vera and an ISY994i
« Reply #384 on: April 22, 2015, 09:32:02 pm »
So I got my ISY994i yesterday.. got the plugin setup and Vera sees the dual band dimmer I installed.  I'm noticing that the response time is a bit inconsistent when controlling the dimmer from Vera.  Sometimes it's instant, other times can take up to 5 seconds to respond.  I understand Vera is an intermediary and there will be a slight delay, but was wondering what is an acceptable amount with this setup.  Curious about your experiences. 

Also, I'm a bit confused as in how to implement the luup code for disconnect issues.  Do I create a scene and run it on a schedule? Or do I put it in the lua startup section?

Thanks


EDIT

Oh I downloaded the plugin from http://code.mios.com/trac/mios_universal_devices_isy_plugin/browser  - this is the latest build correct?  I compared the dates of the files to the linked downloads in this thread and they were more recent.

EDIT again

After further examining the luup codes found in this thread, I was able to make sense of what the codes are doing in a scheduled scene to restart and connect. 


« Last Edit: April 23, 2015, 12:11:36 am by jjwalker »

Offline impmonkey

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Vera and an ISY994i
« Reply #385 on: June 16, 2015, 08:04:58 am »
Just installed. Plugin pulled the devices correctly. I only have one dimmer installed. On/Off control works well but it always shows the dimmer at 55% even when the light is off. Any ideas?


Offline 93732

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-0
Re: Vera and an ISY994i
« Reply #386 on: August 21, 2015, 10:02:44 pm »
Hi PurdueGuy,

I applied your runScene argument changes and found that although the http call works, I could not use them in a Vera Scene because there was no where for me to enter the scene id.  I modified S_ISYController.xml as below and the sceneID box reappeared.  When you delete "<relatedStateVariable>string</relatedStateVariable>" it deletes the box where one enters the values for that variable in the Vera scene "Advanced" tab.  I have inserted a screenshot below.

Code: [Select]
<action>
      <name>runScene</name>
      <argumentList>
      <argument>
          <name>sceneid</name>
          <direction>in</direction>
  <relatedStateVariable>string</relatedStateVariable>
        </argument>
        <argument>
  <name>newTargetValue</name>
  <direction>in</direction>
  <relatedStateVariable>Target</relatedStateVariable>
</argument>
      </argumentList>
    </action>





The HTTP command for a scene should be something like:
Code: [Select]
http://ISY_IP:3480/data_request?id=lu_action&serviceId=urn:garrettwp-com:serviceId:ISYController1&action=runScene&newTargetValue=1&id=XXX&DeviceNum=YYYHowever, when I do that, I don't get a return, and the connection is dropped unexpectedly.

After some playing around, it appears Vera doesn't like the "id=XXXX" portion.   So in I_ISYController1.xml I changed the "job" for "runScene" to use a different name.   The new section of the XML file is:
Code: [Select]
<action>
            <serviceId>urn:garrettwp-com:serviceId:ISYController1</serviceId>
            <name>runScene</name>
            <job>
                local id = lul_settings.sceneid
                local target = lul_settings.newTargetValue
               
                if (target == "0") then
                    plugin.sendCommand(id, "", "DOF")
               
                else
                    plugin.sendCommand(id, "", "DON")
                   
                end
               
                return 4,0
            </job>
        </action>

This makes the new HTTP call:
Code: [Select]
http://ISY_IP:3480/data_request?id=lu_action&serviceId=urn:garrettwp-com:serviceId:ISYController1&DeviceNum=YYY&action=runScene&newTargetValue=1&sceneid=XXXX
I supposed the file "S_ISYController.xml" should be updated to match.
Code: [Select]
<action>
      <name>runScene</name>
      <argumentList>
      <argument>
          <name>sceneid</name>
          <direction>in</direction>
        </argument>
        <argument>
  <name>newTargetValue</name>
  <direction>in</direction>
  <relatedStateVariable>Target</relatedStateVariable>
</argument>
      </argumentList>
    </action>
NOTE: There was a "relatedStateVariable" line with the entry "string" that I thought might be the issue, but removing that didn't help.

Offline 93732

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-0
runScene with FAST ON/FASTOFF
« Reply #387 on: August 22, 2015, 07:37:25 pm »
One of my ISY scenes contains a keypadlinc only (KPL) and is capable of Fast ON and Fast OFF as I have confirmed using the ISY.  Is there a way for me to pass a FAST ON (DFON) or FAST OFF (DFOF) from the vera to the isy using the plugin's runScene command?

Offline sprex

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Vera and an ISY994i
« Reply #388 on: November 20, 2015, 12:46:46 pm »
Hi -

Is there a way to have Vera detect when a scene's status has changed in order that i can send runScene's to the ISY to turn off KPL LED's?

Scenario: Someone presses button B on the KPL, this initiated a Vera scene controlling 3 z-wave dimmers in a living room. Later, they walk by and adjust just one dimmer manually. At this point i want Vera to be able to detect the change so i can trigger a scene containing a runScene command to turn the KPL led off.

My config - UI5 Vera (primary)->ISY(secondary)

Thanks

Offline 93732

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-0
Re: Vera and an ISY994i
« Reply #389 on: November 20, 2015, 06:08:15 pm »
Does your zwave dimmer send changes back to the Vera? If it does, you can make a scene or PLEG condition on the Vera to turn on/off the KPL LED.