ALTUI : New Features Suggestions

OK - after running the debug with MultiBox.getScenesSync() I think I understand what might be happening. I don’t bother with the the UI to set set up my scenes - I just execute Lua code to control my devices. So all my scenes call Lua code - refer this post:

http://forum.micasaverde.com/index.php/topic,29627.msg209898.html#msg209898

The important part is I (nearly) always return false, as all the control work has (generally) been done by my Lua code, so the scene is triggered but not executed as such. See flow chart:

I should probably return true and the time stamps would get set up. I’ll do some tests and get back to you. Perhaps the last run field in the UI should say “Never” if the variable is nil.

Have attached various files re: the minimote. The only tab of great interest is the “Scenes” tab, where you associate a scene, from the pull down list of scenes, to a button. Looks like it just creates a variable containing the concatenated scene names as a comma separated list.

It would be useful for tabs that use shared.js to be shown but with a label saying “Not implemented” or similar.

The important part is I (nearly) always return false, as all the control work has (generally) been done by my Lua code, so the scene is triggered but not executed as such.

OK - changed all my Lua scene code to return true, even if the scene does nothing and false to abort like you normally would. All the time stamps now work - so problem fixed.

Another query - would it be possible to have any code placed in the Lua Test code box to persist in the browser. That way, you don’t have to cut and paste into the browser each time you run a test. You can then just make the appropriate code changes and re-execute.

[quote=“a-lurker, post:62, topic:188330”]

The important part is I (nearly) always return false, as all the control work has (generally) been done by my Lua code, so the scene is triggered but not executed as such.

OK - changed all my Lua scene code to return true, even if the scene does nothing and false to abort like you normally would. All the time stamps now work - so problem fixed.

Another query - would it be possible to have any code placed in the Lua Test code box to persist in the browser. That way, you don’t have to cut and paste into the browser each time you run a test. You can then just make the appropriate code changes and re-execute.[/quote]
will be in v>=744

[quote=“a-lurker, post:61, topic:188330”]Have attached various files re: the minimote. The only tab of great interest is the “Scenes” tab, where you associate a scene, from the pull down list of scenes, to a button. Looks like it just creates a variable containing the concatenated scene names as a comma separated list.

It would be useful for tabs that use shared.js to be shown but with a label saying “Not implemented” or similar.[/quote]

that scene tab screen seems to be linked to the variable “SceneShortcuts” on the scene controller device. but I cannot make sense of the syntax of this varialbe. anybody knows ?
mine looks like this for a NODON remote
1=69-0,2=69-0,3=69-0,4=69-0

I have seen people saying it is
(onbtn)|(offbtn)
where (onbtn) is btnnumber=scenenumber-x but no idea what the x is for

so something like
1=69-0,2=69-0,3=69-0,4=69-0|1=70-0,2=70-0,3=70-0,4=70-0

any input appreciated

I’m guessing at:

In UI5:

a=x,etc|a=y,etc

In UI7:

a= x-y,etc

a = button number
x = scene for short button tap
y = scene when button is held
etc = next button

[quote=“a-lurker, post:65, topic:188330”]I’m guessing at:

In UI5:

a=x,etc|a=y,etc

In UI7:

a= x-y,etc

a = button number
x = scene for short button tap
y = scene when button is held
etc = next button[/quote]

all my experiment on latest UI7 shows this is right now totally flawed on MCV side. you delete a trigger from a scene and this string and button assignment screen does not show the reflection , you add the second part after the “|” for the Off button and nothing works any more , in some instance it was also preventing me from deleting triggers completely or once I deleted one trigger and all button disappeared.

so it is a mess and different behavior in UI5 vs UI7. I think MCV has not finished implementing this right now, we will have to be patient a bit , or do something completely independant of MCV ( which whould not be too hard to be frank , it is just a UI goody to create triggers in multiple scene , although the problem is there are no 2 remote which behave the same in terms of button ID / LastSceneID mapping )

My recomendation (and this is what I use on my NODON remote zWave) is to use ALTUI device watch capatility to set a watch on the remote “LastSceneID” variable of the remote and trigger scenes based on this. This way I have full access to the possible 16 scenes of my 4 button remote. ( crazy enough LastSceneID is right but all the default scene trigger and sl_SceneActived parameter are all wrong )

How about a “pretty” print function in Lua Test? (inspired by Rex Beckett’s excellent RBLuaTest functionality)

So, for example, you could write [tt]print(pretty(luup.devices[3]))[/tt] and see:

{
  category_num = 0,
  description = "ALTUI",
  device_num_parent = 0,
  device_type = "urn:schemas-upnp-org:device:altui:1",
  embedded = false,
  hidden = false,
  id = "ALTUI",
  invisible = false,
  ip = "",
  mac = "",
  pass = "",
  room_num = 0,
  subcategory_num = 0,
  user = ""}

It needs to handle bizarre tables like [tt]{a=42,7,8,9,1,2,3,nil,nil,nil,3.1415,b=“foo”,f=function () return 7 end}[/tt]

{
  7,8,9,1,2,3,
  [10] = 3.1415,
  a = 42,
  b = "foo",
  f = function: 0x001bc8f8}

and circular structures [tt]y = {1,2,3,a=42}; y.x = y[/tt]

{
  1,2,3,
  a = 42,
  x = {CIRCULAR_REF = table: 0x00454ba8}}

I can supply a short bit of Lua (30 lines) to do this if helpful.

Looks like another good idea. I’ll happily integrate your code into it.

Envoy? de mon iPad en utilisant Tapatalk

I discovered your app recently and I find sympathetic.
Can you create an option to export the full scenes description in excel format for example.
Thank you.

[quote=“MAUMAIRE, post:69, topic:188330”]I discovered your app recently and I find sympathetic.
Can you create an option to export the full scenes description in excel format for example.
Thank you.[/quote]

one way for now could be going into DEBUG/ MISC / Javascript code and type

MultiBox.getScenesSync()

Full scene description is not quite simple to export in either excel or even a flat CSV file list. it is a complex data structure which 1<=>n relationships with many other informations like triggers, actions etc… so maybe you d need to refine your need a little bit more precisely. thx !

Tried out the watches and Blocky - great addition. A lot of flexibility there.

I wanted to turn on fan when the electric kettle is turned on. So I put a watch on the power meter Wattage. And set up this expression (kettle is about 2200W):

(new-old)>2000

I could enter it as text but Blockly would not allow me to drop the “new” and “old” variables into the “greater than” maths block. Not sure if it’s a nesting problem or data type problem.

Regardless the fan now turns on when the kettle goes on. Might now set a scene to indicate “The clothes washer has finished” out the Sonos system.

It is a type problem. New and old are textual values like any device variable . Blockly forces you to compare with text, or you can use the tonumber block I have added ( I never tried but should work )

Envoy? de mon iPad en utilisant Tapatalk

It is a type problem.

Yes that makes sense - now have from Blockly:

((tonumber(new)) - (tonumber(old)) > 2000)

just a case of getting the hang of Blockly, etc.

It would be nice to be able to rename rooms simply by clicking on their name on the Home / Rooms page.

yep. in v 878 !

In a similar vein, it would be cool to have a ‘view’ button in the actions. So you could click and go straight to the room / devices. Maybe looking like the attached.

in v 882

Hi

I would suggest adding a slider, to the Panels page. That way you could control dimmers, volume in recivers or sonors, and others from the custom inteface as well.

Regards
Dalhoj

I noticed that I have a lot of child devices and it’s kind of a pain to move things individually. For instance, I have 15 Philips Hue den bulbs I’d like to move to the den in one step.
Perhaps something like this : [Rooms][Category][Filter][Create] and maybe add a |Move| button

[1] Click on |Move| to enable function and consequently |Move| again to exit the function (in the event you accidentally clicked on that button).
[2] Select each device one by one.
[3] As you select each device, the UI indicates (somehow; e.g. color change) that it’s selected.
[4] Once you’ve selected everything you want to move, click the drop down [Rooms] and select the room to move the devices to.

Thanks…

Edit, just checked and it seems my use of move caused a marquee… All fixed

How about a couple of buttons to set/clear ALL the days of the week check boxes for weekly timers?