The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => openLuup => Topic started by: Drex on February 11, 2019, 10:05:57 pm

Title: VeraBridge Issues (user error)
Post by: Drex on February 11, 2019, 10:05:57 pm
I accidentally deleted the device VeraBridge, which was working fine.

Since then, I uninstalled and reinstalled VeraBridge from the plugins update, and I cannot get openluup to communicate with the Vera.  I filled in the IP directly under IP, and saved it, and tried the Misc Reload Luup Engine, and it still says No Vera, and no devices synced.

Any help appreciated. Accessed the logs under /etc/cmh-ludl (LuaUPnP.log, and LuaUPnP_startup.log) say nothing.

Any help would be appreciated. Thanks.
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 12, 2019, 02:36:09 am

There was no need to uninstall, just a click on the install button should have worked, but I don't think that this would be the issue.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 12, 2019, 07:34:57 am
I'll look shortly when I have access remotely. In the meantime. Is there an easy way to reset the whole thing? I'd like to start from scratch.


In addition, since I am running it on Esxi, I started another fresh install under Ubuntu server but  there was an error when running the install just script under list.1 that said there was a broken ssl dependency to github. 

Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 12, 2019, 08:10:49 am
I'll look shortly when I have access remotely. In the meantime. Is there an easy way to reset the whole thing? I'd like to start from scratch.

Yes.  If you want to throw everything you set up away, then, assuming the openLuup flies are intact, you can exit then running instance (with an HTTP request) and start it again from the shell using

Code: [Select]
./openLuup_reload AltUI&

Quote
In addition, since I am running it on Esxi, I started another fresh install under Ubuntu server but  there was an error when running the install just script under list.1 that said there was a broken ssl dependency to github.

This may mean that the Lua image you are running doesn?t have up to date libraries, or that the OS image doesn't have an up to date SSL (possibly openSSL?). GitHub has updated its security access a while ago and now uses tslv1.2, IIRC.
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 12, 2019, 09:21:03 am
In addition, since I am running it on Esxi, I started another fresh install under Ubuntu server but  there was an error when running the install just script under list.1 that said there was a broken ssl dependency to github.

This one is my fault... I haven't updated the install file for the tslv1.2 protocol.

Fix in progress.  Apologies.
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 12, 2019, 11:35:45 am
In addition, since I am running it on Esxi, I started another fresh install under Ubuntu server but  there was an error when running the install just script under list.1 that said there was a broken ssl dependency to github.

This one is my fault... I haven't updated the install file for the tslv1.2 protocol.

Fix in progress.  Apologies.

openLuup._install.lua now fixed in v19.2.12 in both master and development branches.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 12, 2019, 09:52:24 pm
I did the reset and now get this:

No handler for data_request?id=lr_ALTUI_Handler


I did ./openLuup_reload AltUI&


That resulted in the above handler.

Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 12, 2019, 10:21:28 pm
  • Is there still a L_VeraBridge.lua file in the openLuup directory?
  • Is the VeraBridge entirely missing from the Startup log?
  • Is there a L_VeraBridge.lua file in cmh_ludl/ ?


1) no
2)

Code: [Select]
2019-02-12 04:49:25.270   :: openLuup STARTUP :: /etc/cmh-ludl
2019-02-12 04:49:25.270   openLuup.init::        version 2018.03.21  @akbooer
2019-02-12 04:49:25.285   openLuup.scheduler::   version 2018.03.21  @akbooer
2019-02-12 04:49:25.287   openLuup.wsapi::       version 2017.01.12  @akbooer
2019-02-12 04:49:25.287   openLuup.servlet::     version 2018.02.22  @akbooer
2019-02-12 04:49:25.287   openLuup.server::      version 2018.03.22  @akbooer
2019-02-12 04:49:25.288   openLuup.rooms::       version 2016.06.23  @akbooer
2019-02-12 04:49:25.289   openLuup.scenes::      version 2018.02.19  @akbooer
2019-02-12 04:49:25.290   openLuup.chdev::       version 2018.03.18  @akbooer
2019-02-12 04:49:25.290   openLuup.userdata::    version 2018.03.02  @akbooer
2019-02-12 04:49:25.290   openLuup.requests::    version 2018.02.18  @akbooer
2019-02-12 04:49:25.290   openLuup.gateway::     version 2018.03.05  @akbooer
2019-02-12 04:49:25.292   openLuup.smtp::        version 2018.03.20  @akbooer
2019-02-12 04:49:25.292   openLuup.io::          version 2018.03.22  @akbooer
2019-02-12 04:49:25.292   openLuup.luup::        version 2018.03.22  @akbooer
2019-02-12 04:49:25.327   luup.create_device:: [1] D_ZWaveNetwork.xml / I_ZWave.xml /
2019-02-12 04:49:25.329   luup.create_device:: [2] D_openLuup.xml / I_openLuup.xml / D_openLuup.json
2019-02-12 04:49:25.329   openLuup.init:: loading configuration user_data.json
2019-02-12 04:49:25.339   openLuup.userdata:: loading user_data json...
2019-02-12 04:49:25.345   openLuup.userdata:: loading rooms...
2019-02-12 04:49:25.345   openLuup.userdata:: room#1 'MiOS-50002965'
2019-02-12 04:49:25.345   openLuup.userdata:: room#2 'Fountain'
2019-02-12 04:49:25.345   openLuup.userdata:: ...room loading completed
2019-02-12 04:49:25.345   openLuup.userdata:: loading devices...
2019-02-12 04:49:25.346   luup.create_device:: [1] D_ZWaveNetwork.xml / I_ZWave.xml /
2019-02-12 04:49:25.395   luup.create_device:: [3] D_ALTUI.xml / I_ALTUI.xml / D_ALTUI_UI7.json
2019-02-12 04:49:25.404   luup.create_device:: [4] D_AltAppStore.xml / I_AltAppStore.xml / D_AltAppStore.json
2019-02-12 04:49:25.415   luup.create_device:: [7] D_ZWay.xml / I_ZWay.xml / D_ZWay.json
2019-02-12 04:49:25.442   luup.create_device:: [8] D_DataYours.xml / I_DataYours.xml / D_DataYours.json
2019-02-12 04:49:25.455   luup.create_device:: [9] D_Arduino1.xml / I_Arduino1.xml / D_Arduino1.json
2019-02-12 04:49:25.457   luup.create_device:: [10] D_VeraBridge.xml / I_VeraBridge.xml / D_VeraBridge.json
2019-02-12 04:49:25.457   openLuup.userdata:: loading scenes...
2019-02-12 04:49:25.457   openLuup.userdata:: number of scenes = 0
2019-02-12 04:49:25.457   openLuup.userdata:: ...scene loading completed
2019-02-12 04:49:25.457   openLuup.userdata:: loading installed plugin info...
2019-02-12 04:49:25.457   openLuup.userdata:: [openLuup] openLuup (18.3.23)
2019-02-12 04:49:25.457   openLuup.userdata:: [8246] Alternate UI (GitHub.2501)
2019-02-12 04:49:25.457   openLuup.userdata:: [AltAppStore] Alternate App Store (18.2.27)
2019-02-12 04:49:25.457   openLuup.userdata:: [Z-Way] Z-Way (18.7.16)
2019-02-12 04:49:25.457   openLuup.userdata:: [Arduino] MySensors (GitHub.master)
2019-02-12 04:49:25.457   openLuup.userdata:: [8211] DataYours (16.10.4)
2019-02-12 04:49:25.457   openLuup.userdata:: [VeraBridge] VeraBridge (18.9.26)
2019-02-12 04:49:25.457   openLuup.userdata:: ...user_data loading completed
2019-02-12 04:49:25.457   openLuup.init:: running _openLuup_STARTUP_
3) yes



I reverted to the snapshot I made after screwing it up but before I received the Althandler error.  Please disregard that post.

In this version, my vera's ip address is showing in the device, but doesn't register even after reboot.

Thanks,

Drex
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 13, 2019, 02:31:53 am
Does the VeraBridge device have a variable called RemotePort?

Try moving L_VeraBridge.lua to cmh-ludl/openLuup/ and then reload.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 13, 2019, 06:55:18 am
please let me clarify my situation.

I reverted back to the version before the reload/reset. I no longer have the issue loading Alt UI. I am back to seeing the vera as a device with the attribute set to the correct IP but it fails to connect to the vera....
---------------
Part 2:
In the second new VM, openluup still won't install. It errors here after wiping out the old install Lua file and whetting the latest version:




download failed with tlsvl alert protocol version traceback [C}: in function 'assert' openluup_install.lua:30 in main chunk [c]: ?  and fails...

I don't know but suspect others trying to install openloop are having the same issue...




Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 13, 2019, 09:08:07 am
It seems that you are not using the latest install. You need to get it manually from GitHub.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 13, 2019, 09:50:49 am
Will do.

In the meantime, in my existing running image, how do I get vera ridge to connect  correctly? It says it can't; the correct IP address was entered under attributes and won't despite restarts connect to my veraplus?
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 13, 2019, 10:18:52 am
In the meantime, in my existing running image, how do I get vera ridge to connect  correctly? It says it can't; the correct IP address was entered under attributes and won't despite restarts connect to my veraplus?

What does the console Scheduler > Startup Jobs show?
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 14, 2019, 10:04:54 pm
not sure where to find scheduler.

on the new machine, I manually downloaded openLuup_install, and it still fails.

Code: [Select]
vera@veraplus:/etc/cmh-ludl$ lua5.1 openLuup_install
openLuup_install   2019.02.12   @akbooer
getting openLuup version tar file from GitHub branch master...
lua5.1: openLuup_install:31: GitHub download failed with code tlsv1 alert protocol version
stack traceback:
        [C]: in function 'assert'
        openLuup_install:31: in main chunk
        [C]: ?
vera@veraplus:/etc/cmh-ludl$
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 15, 2019, 05:09:51 am
not sure where to find scheduler.

It's under the console pages menu.  You can get there with the URL http://your_openLuup_IP:3480/console?page=startup

Quote
on the new machine, I manually downloaded openLuup_install, and it still fails.

Yes, my fault (again.)  A case of 'more haste, less speed.'  I uploaded the wrong file!

It's been fixed in both branches again.  Sorry once more.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 16, 2019, 08:47:13 am


Still not right.  New VM/totally new install oi ubuntu this morning.    Just wget new file. from link in install docs.

Error now in line 30, same error, same chunk.

 lua5.1 openLuup_install.lua
openLuup_install   2019.02.12   @akbooer
getting openLuup version tar file from GitHub branch master...
lua5.1: openLuup_install.lua:30: GitHub download failed with code tlsv1 alert protocol version
stack traceback:
        [C]: in function 'assert'
        openLuup_install.lua:30: in main chunk
        [C]: ?
vera@veraplus:/etc/cmh-ludl$



not sure where to find scheduler.

on the new machine, I manually downloaded openLuup_install, and it still fails.

Code: [Select]
vera@veraplus:/etc/cmh-ludl$ lua5.1 openLuup_install
openLuup_install   2019.02.12   @akbooer
getting openLuup version tar file from GitHub branch master...
lua5.1: openLuup_install:31: GitHub download failed with code tlsv1 alert protocol version
stack traceback:
        [C]: in function 'assert'
        openLuup_install:31: in main chunk
        [C]: ?
vera@veraplus:/etc/cmh-ludl$
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 16, 2019, 08:57:38 am
In the meantime, in my existing running image, how do I get vera ridge to connect  correctly? It says it can't; the correct IP address was entered under attributes and won't despite restarts connect to my veraplus?

What does the console Scheduler > Startup Jobs show?


7  2019-02-16 08:50:45        10      Abort[1]  job#7 :plugin VeraBridge [string "openLuup/L_VeraBridge.lua"]:440: attempt to call field 'create' (a nil value)

btw, There is a L_VeraBridge.lua in the directory /ec/cmh-ludl already....




from the detailed log:

2019-02-16 08:50:45.089   luup_log:10: Vera info received!
2019-02-16 08:50:45.089   luup_log:10: MiOS-500XXXX
2019-02-16 08:50:45.089   openLuup.context_switch::  ERROR: [string "openLuup/L_VeraBridge.lua"]:440: attempt to call field 'create' (a nil value)
2019-02-16 08:50:45.089   openLuup.scheduler:: job aborted : [string "openLuup/L_VeraBridge.lua"]:440: attempt to call field 'create' (a nil value)
2019-02-16 08:50:45.089   luup_log:3: ALTUI: UPNPregisterDataProvider(3,datayours,http://127.0.0.1:3480/data_request?id=lr_DataWatcherRelay&target={0},[{
  "default":"unknown",
  "key":"target",
  "label":"Metric Name",
  "type":"text"
},{
  "default":"\/data_request?id=lr_render&target={0}&hideLegend=true&height=250&from=-y",
  "key":"graphicurl",
  "label":"Graphic Url",
  "type":"url"
}])
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 16, 2019, 10:08:33 am
Sigh...

Something has got really screwed up here.  You should not have a L_VeraBridge.lua anywhere other than the openLuup/ folder.  Delete the one in /cmh-ludl/.  Then just click the openLuup update button of the Plugins page to ensure that you are using the latest master release.

If you still have problems, I need the startup log and the initial regular log after starting up.  Give it a minute or so after restart.

_________

Edit: I take it that the other clean install went OK.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 16, 2019, 04:27:53 pm
in regards to fresh install, as reported above, the error moved down a line.... but unable to fresh install (on new virigin built from scratch vm....


Error now in line 30, same error, same chunk.

 lua5.1 openLuup_install.lua
openLuup_install   2019.02.12   @akbooer
getting openLuup version tar file from GitHub branch master...
lua5.1: openLuup_install.lua:30: GitHub download failed with code tlsv1 alert protocol version
stack traceback:
        [C]: in function 'assert'
        openLuup_install.lua:30: in main chunk
        [C]: ?
vera@veraplus:/etc/cmh-ludl$
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 16, 2019, 04:39:31 pm
in regards to fresh install, as reported above, the error moved down a line.... but unable to fresh install (on new virigin built from scratch vm...

I'm so sorry.  You must have taken this from the master branch, which, for some reason, had failed to merge with the development.  Both now should be up to date at version 2019.02.15.

Can you try one more time...?

I'll work on the other issue now.  In future it might help to separate the two issues into separate posts.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 16, 2019, 04:44:13 pm
Sigh...

Something has got really screwed up here.  You should not have a L_VeraBridge.lua anywhere other than the openLuup/ folder.  Delete the one in /cmh-ludl/.  Then just click the openLuup update button of the Plugins page to ensure that you are using the latest master release.

If you still have problems, I need the startup log and the initial regular log after starting up.  Give it a minute or so after restart.



Did exactly as you said; deleted plugin in cmh-ludl.  upgraded plugin.  reloaded lua.  it still has the ip in it, but doesn't connect.

Logs:


startup

Code: [Select]
X   openLuup   Scheduler   Servers   Logs   Backups
2019-02-16 16:30:56.734   :: openLuup STARTUP :: /etc/cmh-ludl
2019-02-16 16:30:56.734   openLuup.init::        version 2018.03.21  @akbooer
2019-02-16 16:30:56.738   openLuup.scheduler::   version 2018.03.21  @akbooer
2019-02-16 16:30:56.739   openLuup.wsapi::       version 2017.01.12  @akbooer
2019-02-16 16:30:56.739   openLuup.servlet::     version 2018.02.22  @akbooer
2019-02-16 16:30:56.739   openLuup.server::      version 2018.03.22  @akbooer
2019-02-16 16:30:56.741   openLuup.rooms::       version 2016.06.23  @akbooer
2019-02-16 16:30:56.741   openLuup.scenes::      version 2018.02.19  @akbooer
2019-02-16 16:30:56.742   openLuup.chdev::       version 2018.03.18  @akbooer
2019-02-16 16:30:56.742   openLuup.userdata::    version 2018.03.02  @akbooer
2019-02-16 16:30:56.742   openLuup.requests::    version 2018.02.18  @akbooer
2019-02-16 16:30:56.742   openLuup.gateway::     version 2018.03.05  @akbooer
2019-02-16 16:30:56.743   openLuup.smtp::        version 2018.03.20  @akbooer
2019-02-16 16:30:56.744   openLuup.io::          version 2018.03.22  @akbooer
2019-02-16 16:30:56.744   openLuup.luup::        version 2018.03.22  @akbooer
2019-02-16 16:30:56.747   luup.create_device:: [1] D_ZWaveNetwork.xml / I_ZWave.xml /
2019-02-16 16:30:56.748   luup.create_device:: [2] D_openLuup.xml / I_openLuup.xml / D_openLuup.json
2019-02-16 16:30:56.749   openLuup.init:: loading configuration user_data.json
2019-02-16 16:30:56.749   openLuup.userdata:: loading user_data json...
2019-02-16 16:30:56.755   openLuup.userdata:: loading rooms...
2019-02-16 16:30:56.755   openLuup.userdata:: room#1 'MiOS-50XXXXX'
2019-02-16 16:30:56.755   openLuup.userdata:: room#2 'Fountain'
2019-02-16 16:30:56.755   openLuup.userdata:: ...room loading completed
2019-02-16 16:30:56.755   openLuup.userdata:: loading devices...
2019-02-16 16:30:56.756   luup.create_device:: [1] D_ZWaveNetwork.xml / I_ZWave.xml /
2019-02-16 16:30:56.765   luup.create_device:: [3] D_ALTUI.xml / I_ALTUI.xml / D_ALTUI_UI7.json
2019-02-16 16:30:56.766   luup.create_device:: [4] D_AltAppStore.xml / I_AltAppStore.xml / D_AltAppStore.json
2019-02-16 16:30:56.768   luup.create_device:: [7] D_ZWay.xml / I_ZWay.xml / D_ZWay.json
2019-02-16 16:30:56.769   luup.create_device:: [8] D_DataYours.xml / I_DataYours.xml / D_DataYours.json
2019-02-16 16:30:56.772   luup.create_device:: [9] D_Arduino1.xml / I_Arduino1.xml / D_Arduino1.json
2019-02-16 16:30:56.774   luup.create_device:: [10] D_VeraBridge.xml / I_VeraBridge.xml / D_VeraBridge.json
2019-02-16 16:30:56.774   openLuup.userdata:: loading scenes...
2019-02-16 16:30:56.774   openLuup.userdata:: number of scenes = 0
2019-02-16 16:30:56.774   openLuup.userdata:: ...scene loading completed
2019-02-16 16:30:56.774   openLuup.userdata:: loading installed plugin info...
2019-02-16 16:30:56.774   openLuup.userdata:: [openLuup] openLuup (18.3.23)
2019-02-16 16:30:56.774   openLuup.userdata:: [8246] Alternate UI (GitHub.2501)
2019-02-16 16:30:56.774   openLuup.userdata:: [AltAppStore] Alternate App Store (18.2.27)
2019-02-16 16:30:56.774   openLuup.userdata:: [Z-Way] Z-Way (18.7.16)
2019-02-16 16:30:56.774   openLuup.userdata:: [Arduino] MySensors (GitHub.master)
2019-02-16 16:30:56.774   openLuup.userdata:: [8211] DataYours (16.10.4)
2019-02-16 16:30:56.774   openLuup.userdata:: [VeraBridge] VeraBridge (19.1.26)
2019-02-16 16:30:56.774   openLuup.userdata:: ...user_data loading completed
2019-02-16 16:30:56.774   openLuup.init:: running _openLuup_STARTUP_
2019-02-16 16:30:56.774   luup_log:0: startup code completed
2019-02-16 16:30:56.774   openLuup.init:: init phase completed
2019-02-16 16:30:56.774   :: openLuup LOG ROTATION :: (runtime 0.0 days)
 
   
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 16, 2019, 04:52:33 pm
in regards to fresh install, as reported above, the error moved down a line.... but unable to fresh install (on new virigin built from scratch vm...

I'm so sorry.  You must have taken this from the master branch, which, for some reason, had failed to merge with the development.  Both now should be up to date at version 2019.02.15.

Can you try one more time...?

I'll work on the other issue now.  In future it might help to separate the two issues into separate posts.

Just re-downloaded it (wget), and getting the file from 2/15... same error

vera@veraplus:/etc/cmh-ludl$ ls
openLuup_install.lua
vera@veraplus:/etc/cmh-ludl$ lua5.1 openLuup_install.lua
openLuup_install   2019.02.15   @akbooer
getting openLuup version tar file from GitHub branch master...
lua5.1: openLuup_install.lua:31: GitHub download failed with code latest.tar.gz: Permission denied
stack traceback:
        [C]: in function 'assert'
        openLuup_install.lua:31: in main chunk
        [C]: ?

Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 16, 2019, 05:01:34 pm
[Just re-downloaded it (wget), and getting the file from 2/15... same error

Not same error.

Was:

lua5.1: openLuup_install.lua:30: GitHub download failed with code tlsv1 alert protocol version

Now:

lua5.1: openLuup_install.lua:31: GitHub download failed with code latest.tar.gz: Permission denied


At least the original problem is solved.

No idea about the permissions, though.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 16, 2019, 08:55:56 pm
It worked.

used sudo lua5.1 openLuup-install.lua.
Title: Re: VeraBridge Issues (user error)
Post by: Drex on February 16, 2019, 10:36:41 pm
so disregard the logs and stuff.  have a new working virgin vrsion on ubuntu.  thank goodness for Vmware ESXi servers. 

It worked. AltUI registration transferred.  Your install script is working.

-drex
Title: Re: VeraBridge Issues (user error)
Post by: akbooer on February 17, 2019, 03:59:23 am
used sudo lua5.1 openLuup-install.lua.

At last!  Good call using sudo, I'll add something to the docs.

So everything OK now.