We have moved at community.getvera.com

Author Topic: getting "ERROR: Device not ready" message on veralite  (Read 4053 times)

Offline timsen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
getting "ERROR: Device not ready" message on veralite
« on: December 04, 2014, 10:03:53 pm »
veralite firmware: 1.7.439
Nest app version: 1.8

Good evening!
Just installed the Nest app but I'm getting the message "ERROR: Device not ready" when I hit "Set". username (email address actually) and password are correct.
On top of screen I also see the message "Nest[10] : Startup Lua Failed".

What am I doing wrong?

Thanks,
Tim

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: getting "ERROR: Device not ready" message on veralite
« Reply #1 on: December 05, 2014, 04:31:24 am »
I'm not sure what's going on, but you might be able to see the log, and it might have something useful in it.  (I say "might" be able to see the log because I know this URL http://<IP ADDRESS OF VERA>/cgi-bin/cmh/log.sh?Device=LuaUPnP worked in UI5 but my UI7 unit is not currently hooked up for me to test.)  If you can ssh into your unit, the log file is also found at /var/log/cmh/LuaUPnP.log.

I just spent 15 minutes trying to find out what the latest UI7 firmware version is, but without a running UI7 Vera, it seems impossible to find this number.

Wish I could be of more help at the moment. 

watou

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: getting "ERROR: Device not ready" message on veralite
« Reply #2 on: December 05, 2014, 10:28:37 am »
The following added to the initialization sequence (Works in UI5 and UI7) will suppress this MCV bogus alert:

   luup.set_failure(false, lul_device)

Offline timsen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: getting "ERROR: Device not ready" message on veralite
« Reply #3 on: December 05, 2014, 08:25:54 pm »
this is what I'm seeing ion the logs:

01   12/05/14 17:20:14.135   LuaInterface::CallFunction_Startup-1 device 10 function init failed [string "..."]:131: attempt to index global 'json' (a nil value)
01   12/05/14 17:20:14.135   LuImplementation::StartLua running startup code for 10 I_Nest1.xml failed

adding " luup.set_failure(false, lul_device)" to the starup sequence did not make any difference

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: getting "ERROR: Device not ready" message on veralite
« Reply #4 on: December 05, 2014, 08:30:16 pm »
this is what I'm seeing ion the logs:

01   12/05/14 17:20:14.135   LuaInterface::CallFunction_Startup-1 device 10 function init failed [string "..."]:131: attempt to index global 'json' (a nil value)
01   12/05/14 17:20:14.135   LuImplementation::StartLua running startup code for 10 I_Nest1.xml failed

adding " luup.set_failure(false, lul_device)" to the starup sequence did not make any difference

Have you tried to uninstall and re-install the plugin?  It seems like the module "L_nest_dkjson.lua" is not loading for some odd reason.

Offline timsen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: getting "ERROR: Device not ready" message on veralite
« Reply #5 on: December 05, 2014, 08:54:18 pm »
yes, already tried that

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: getting "ERROR: Device not ready" message on veralite
« Reply #6 on: December 06, 2014, 02:45:39 am »
yes, already tried that

It seems like the file L_nest_dkjson.lua is not loading as a module properly.  Can you verify that this file is getting installed, and removed on uninstall?  Do you have other plugins installed that may be stepping on the global table named "json" (created when the L_nest_dkjson.lua file is loaded and it runs module("json") )?  Do you know if any other plugins are read or writing JSON data?  That might be related.

I'm afraid this is sort of like shooting in the dark since I don't have my UI7 system running at present, but I did not have this problem when I was running UI7 last month, and I've not heard of this situation before.

watou

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: getting "ERROR: Device not ready" message on veralite
« Reply #7 on: December 06, 2014, 09:43:30 am »
Your plugin has it's own LUA context ... so no other plugin (nor the Scene or Startup LUA context) can corrupt the json table.

Were their any errors earlier in the startup sequence that may indicate the problem ?

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: getting "ERROR: Device not ready" message on veralite
« Reply #8 on: December 06, 2014, 10:04:16 am »
Your plugin has it's own LUA context ... so no other plugin (nor the Scene or Startup LUA context) can corrupt the json table.

Good point.  That makes it seem even more likely to be corrupted plugin files, or a corrupted runtime, or something else.  I suppose the external environment could still call lua_setglobal on the plugin's context, but that seems unlikely.

Offline timsen

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: getting "ERROR: Device not ready" message on veralite
« Reply #9 on: December 06, 2014, 05:48:47 pm »
Finally got it to work!
I noticed that the Veralite wasn't correctly inked to my vera account. After fixing that, the Nest app started working. Did not think about this as the Network status in the vera logs was showing correct.

Thanks for the help everyone!
Tim