3 Issues

I wanted to call out some minor issues, all have workarounds for me (usually involving bouncing back between UI5 and altUI), but I just wanted to bring them to your attention:

[ul][li]I sometimes have issues saving scenes. I get “Could not edit Scene xxx”. I can’t figure what’s different about this particular scene since I can edit others just fine. I end up going back to UI5 to edit it.[/li]
[li]There seems to be a limit on the number of lines in the “test LUA code” feature. It starts failing for me if there are more than 7 or 8 lines of code that I am testing.[/li]
[li]I think this was addressed in a previous version, but I had to remove a thermostat from my system. However, there were still references to that thermostat in the “variables to watch” and “variables to send” sections of the altUI settings.[/li][/ul]

All little stuff with workarounds (for me). Hope this isn’t annoying to you.

Thx

[quote=“tedp, post:1, topic:190720”]I wanted to call out some minor issues, all have workarounds for me (usually involving bouncing back between UI5 and altUI), but I just wanted to bring them to your attention:

[ul][li]I sometimes have issues saving scenes. I get “Could not edit Scene xxx”. I can’t figure what’s different about this particular scene since I can edit others just fine. I end up going back to UI5 to edit it.[/li]
[li]There seems to be a limit on the number of lines in the “test LUA code” feature. It starts failing for me if there are more than 7 or 8 lines of code that I am testing.[/li]
[li]I think this was addressed in a previous version, but I had to remove a thermostat from my system. However, there were still references to that thermostat in the “variables to watch” and “variables to send” sections of the altUI settings.[/li][/ul]

All little stuff with workarounds (for me). Hope this isn’t annoying to you.

Thx[/quote]

  1. I need more info on the scene content ( like the scene definition in the user_data structure ) .
  2. Lua test : that code herebelow is long & works for me so it could be due to the code you pass in. you can give us more details ? nevertheless , testlua is done via a HTTP GET request to the vera box and HTTP GET request are by definition limited in length since all parameters are passed in on the url query line which is not infinite.
  3. understood i need to work on this

[code]local json = require(“L_ALTUIjson”)

local tbl = {2,3}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)

return v[/code]

[quote=“amg0”][quote=“tedp, post:1, topic:190720”]I wanted to call out some minor issues, all have workarounds for me (usually involving bouncing back between UI5 and altUI), but I just wanted to bring them to your attention:

[ul][li]I sometimes have issues saving scenes. I get “Could not edit Scene xxx”. I can’t figure what’s different about this particular scene since I can edit others just fine. I end up going back to UI5 to edit it.[/li]
[li]There seems to be a limit on the number of lines in the “test LUA code” feature. It starts failing for me if there are more than 7 or 8 lines of code that I am testing.[/li]
[li]I think this was addressed in a previous version, but I had to remove a thermostat from my system. However, there were still references to that thermostat in the “variables to watch” and “variables to send” sections of the altUI settings.[/li][/ul]

All little stuff with workarounds (for me). Hope this isn’t annoying to you.

Thx[/quote]

  1. I need more info on the scene content ( like the scene definition in the user_data structure ) .
  2. Lua test : that code herebelow is long & works for me so it could be due to the code you pass in. you can give us more details ? nevertheless , testlua is done via a HTTP GET request to the vera box and HTTP GET request are by definition limited in length since all parameters are passed in on the url query line which is not infinite.
  3. understood i need to work on this

[code]local json = require(“L_ALTUIjson”)

local tbl = {2,3}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)
tbl = {4,5}
local v= json.encode(tbl)
print(v)
tbl = {6,7}
local v= json.encode(tbl)
print(v)
tbl = {8,9}
local v= json.encode(tbl)
print(v)

return v[/code][/quote]
I’ll try and get some more useful info to help troubleshoot. Where is the user data structure you mention?

Sent from my Moto X using Tapatalk

it is http://wiki.micasaverde.com/index.php/Luup_Requests#user_data

but you can try to go to MISC DEBUG Javascript code and type

MultiBox.getScenes()

[quote=“amg0, post:4, topic:190720”]it is http://wiki.micasaverde.com/index.php/Luup_Requests#user_data

but you can try to go to MISC DEBUG Javascript code and type

MultiBox.getScenes()

Here’s the scene in question (I’m removing my API key for privacy in "local APIKEY="APIKEY"). I can’t get this scene to save. Also, the LUA section is the one I was having problems executing from the debug window. When I shortened it, things began to work.

I just copied/pasted the output from the javascript command you gave me, and it looks like special characters are escaped. Hope that’s OK.

This is not a big deal for me, as I’ve got things working by editing the scene in the regular UI5.

{
“timers”: [
{
“id”: 1,
“name”: “Thingspeak Regular Update”,
“type”: 1,
“enabled”: 1,
“interval”: “20m”,
“last_run”: 1453745873,
“next_run”: 1453747073
}
],
“triggers”: [],
“groups”: [
{
“delay”: 0,
“actions”: []
},
{
“delay”: 15,
“actions”: []
}
],
“name”: “Thingspeak Temperature”,
“lua”: "local APIKEY="APIKEY"\r\nlocal F1_GUEST_CURRENT = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 34)\r\nlocal F2_KIDS_CURRENT = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 30)\r\nlocal F3_FAU_CURRENT = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 39)\r\nlocal F4_MASTER_CURRENT = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 33)\r\nlocal F5_OUTSIDE_CURRENT = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 10)\r\nlocal F6_FAU_SET = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat", "CurrentSetpoint", 39)\r\nlocal http = require("socket.http")\r\nhttp.TIMEOUT = 30\r\nresult, status = http.request("http://emoncms.org/input/post.json?node=2&json={guestCurrent:\“..F1_GUEST_CURRENT..\”},{kidsCurrent:\“..F2_KIDS_CURRENT..\”},{fauCurrent:\“..F3_FAU_CURRENT..\”},{masterCurrent:\“..F4_MASTER_CURRENT..\”},{outsideCurrent:\“..F5_OUTSIDE_CURRENT..\”},{fauSet:\“..F6_FAU_SET..\”}&apikey=\“..APIKEY)”,
“paused”: 0,
“id”: 6,
“favorite”: false,
“onDashboard”: 0,
“room”: 8,
“Timestamp”: 1453441356,
“altuiid”: “0-6”
}

quick question : if you remove the LUA code, does the scene save successfully ?

Yes… it seems to be a combination of the LUA code AND trying to edit the scene remotely (via the UI5 method).

When I pasted the LUA into a scene of my local Vera, it saved fine.