Author Topic: Possible bug (scene editing) - Luup code for scene (Vera Plus)  (Read 487 times)

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1213
  • Karma: +65/-30
Re: Possible bug (scene editing) - Luup code for scene (Vera Plus)
« Reply #15 on: February 16, 2018, 05:30:01 am »

They had issues with handling "special" characters before in UI7. Typically ones that are special in HTML. Just a bit of poor coding if you ask me. In those cases a special character in one scene could impact a number of others as well as a file storing all got "corrupted" so the read routines would not be able to read back the LUA code for you to edit. This made it especially hard to isolate the one scene causing the issue. However, back then the scenes LUA was stored in plain text so at least you could find the problematic one by looking at the user data. To remediate the special character issue they now encode the LUA code in the user data so you cannot read it that way anymore.

[update] If you want to centralize all your Scenes code you start with what I put together. You can plugin your scenes LUA in the ScenesCode_1 table. Note that is you want to use luup.call_delay or luup.call_timer you cannot put that code in the ScenesCode_1 table, but have to add those functions to the end of the file else they will not be visible to the LUA compiler.

Success, Rene

BTW, I just found a trick to get all you scenes code, but use at your own risk. Make a backup of your Vera before you try.
All scenes LUA code are loaded with the Start up LUA. If you deliberately put an error in the start up lua you will see a readable dump of all your scenes code in the log file. If you already have the Error in LUA for Scenes at startup you will see the dump as well.

« Last Edit: February 17, 2018, 05:10:55 am by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline Thorden

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +5/-5
Re: Possible bug (scene editing) - Luup code for scene (Vera Plus)
« Reply #16 on: February 20, 2018, 02:22:37 am »
Support reached out to me with a firmware downgrade link this weekend. Applied it yesterday, all back to normal again regarding code in scenes.

However, it seems like my frequent restarts are back. Will monitor it closely.

Offline Corve

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Possible bug (scene editing) - Luup code for scene (Vera Plus)
« Reply #17 on: February 20, 2018, 02:45:11 pm »
For me, 2 request and no answer from support... Sinc?res at least 1 week!

Edit : Support answer me the 2 times. But there mails was considered as spam by my mailbox. Apologize about this.

They consider this as a bug. So I will try to downgrade soon.
« Last Edit: March 04, 2018, 04:14:07 am by Corve »