Newbie questions

About two weeks ago I set up a new Raspberry PI3 with OpenLuup and AltUI. After tinkering with it for a while I am beginning to understand it a little, but now I have some questions.

  1. I have created a couple scenes locally in AltUI. They fire and operate as expected, BUT I have no history when I click the little calendar icon.
  2. I’m still struggling with how to set up Variable Watches and Triggers. ALTUI > More > Table Watches and ALTUI > More > Triggers. Both return empty pages but not sure how or where to define those variables
  3. When I go ALTUI > Misc > Reload Luup Engine I always get the message “Controller did not respond”
  4. Directory structure question. In the OpenLuup documentation it states:
[b]openLuup directory structure and ancillary files[/b] Some of this structure is already created by the install process, other parts are totally optional, some are required by particular plugins. - /etc - /cmh - ui - /cmh-lu - /cmh-ludl - /usr - /bin - GetNetworkState.sh

However in my RPI I have:
/home (at the root level)
– /pi
– – /cmh-ludl
– – – /backup
– – – /files
– – – /icons
– – – /logs
– – – /openLuup

Am I missing something or is what I have the minimum required structure?

  1. Lastly, how can I make the PI start openLuup on reloads. I have tried to use the examples shown in the openLuup documentation but ALL the files in the root level (where the script needs to be edited) are locked. Is there a way to get root user access? Currently I ssh into the PI as user [PI], not as user [root]. I could not find anything on how to log in as root in any of the documentation.

I’m sorry that these questions spanned two different programs and two different authors but I’m hoping that someone here can shed some light on what I’m missing. Thanks

[quote=“kartcon, post:1, topic:198522”]About two weeks ago I set up a new Raspberry PI3 with OpenLuup and AltUI. After tinkering with it for a while I am beginning to understand it a little, but now I have some questions.

  1. I have created a couple scenes locally in AltUI. They fire and operate as expected, BUT I have no history when I click the little calendar icon.[/quote]
    check your log configuration with akboer, ALTUI history comes from /var/logs/cmh log files but you need to make sure the folder exist, the rights are correct and the log are created

these pages show existing ones. to create them you must be in the scene editor in the “event” section where you can choose between classical VERA style event or ALTUI device watch event style

that is the normal message when contact with the server is lost ( during a reload or reboot for instance ), you should have a few occurences of that message until it comes back. you can clear the message

[quote=“kartcon, post:1, topic:198522”]4. Directory structure question. In the OpenLuup documentation it states:

[b]openLuup directory structure and ancillary files[/b] Some of this structure is already created by the install process, other parts are totally optional, some are required by particular plugins. - /etc - /cmh - ui - /cmh-lu - /cmh-ludl - /usr - /bin - GetNetworkState.sh

However in my RPI I have:
/home (at the root level)
– /pi
– – /cmh-ludl
– – – /backup
– – – /files
– – – /icons
– – – /logs
– – – /openLuup

Am I missing something or is what I have the minimum required structure?[/quote]
openluup question, the openluup forum or akboer should be able to help you with that

same, several users proposed ways to make this happens. this is openluup specific and unix guru ( not me :frowning: ) to help you here

hope that helps

OK, I think that some of this, at least, is a bit more openLuup-related than AltUI, so I will give a partial response.

AltUI’s history id, AFAIK (please correct me @amg0!), extracted from the log file in /var/log/cmh/LuaUPnP.log which you can view the most recent part of from the Misc > OsCommand > Tail Logs button in AltUI. This log gets rotated from time to time, so the only history that you will see is that contained in the current log file. I get, in openLuup, entries like this (showing two scene executions and some variable changes):

08	02/06/18 15:02:46.128 Scene::RunScene running 6 Ping Poll <0x0>
06	02/06/18 15:02:58.170	Device_Variable::m_szValue_set device: 20365 service: urn:micasaverde-com:serviceId:ZWaveDevice1 variable: ePollOke was: 472896 now: 472897 #hooks: 0 
06	02/06/18 15:03:03.630	Device_Variable::m_szValue_set device: 20336 service: urn:akbooer-com:serviceId:EventWatcher1 variable: eMemAvaile was: 34200 now: 34188 #hooks: 1 
06	02/06/18 15:03:03.631	Device_Variable::m_szValue_set device: 20431 service: urn:akbooer-com:serviceId:DataYours1 variable: eAppMemoryUsede was: 1681 now: 1472 #hooks: 0 
08	02/06/18 15:03:04.491 Scene::RunScene running 7 luup.scene test <0x0>

If your /var/log/cmh/ directory was not created or does not have the right permissions, then you may not see anything.

HOWEVER

I’ve just checked out scene history on openLuup (something I’ve never done before!) and I, too, see nothing. So we need @amg0 to explain to me what 's wrong in this log for scene entries. Variable histories seem to work just fine.

3. When I go ALTUI > Misc > Reload Luup Engine I always get the message "Controller did not respond"

What versions of AltUI and openLuup are you running? There may be an incompatibility if you’re not up to date.

4. Directory structure question. In the OpenLuup documentation it states:
[b]openLuup directory structure and ancillary files[/b] '''

However in my RPI I have:
‘’’

Am I missing something or is what I have the minimum required structure?

This part of the documentation is, alas, not quite clear / up-to-date. Your file structure should be fine (for all but the most exotic plugins) and is what has been created by the openLuup_install process. The thing not on here, and mentioned above, is the /var/log/cmh/ directory. I have already got an updated document ready for the upcoming next master release of openLuup (but that doesn’t help you right now!)

4. Lastly, how can I make the PI start openLuup on reloads. I have tried to use the examples shown in the openLuup documentation but ALL the files in the root level (where the script needs to be edited) are locked. Is there a way to get root user access? Currently I ssh into the PI as user [PI], not as user [root]. I could not find anything on how to log in as root in any of the documentation.

This is not my area of expertise, alas, and that part of the documentation relies heavily on others’ effort. However, I do have this working. The key, perhaps to accessing root files is to prefix your editing command with ‘sudo’ (q.v.) I have no idea what the root password is to my RPi!

I'm sorry that these questions spanned two different programs and two different authors but I'm hoping that someone here can shed some light on what I'm missing. Thanks

No, I’m sorry too. We do try very hard to coordinate and inform each other of various changes to make this as seamless as possible, but it doesn’t always work perfectly. Vera is a moving target, AltUI has to track it (and does so, very rapidly,) I am just a bit slower.

You’ll notice that I’ve avoided point #2, which I leave for others.

HTH

[quote=“akbooer, post:3, topic:198522”]OK, I think that some of this, at least, is a bit more openLuup-related than AltUI, so I will give a partial response.

AltUI’s history id, AFAIK (please correct me @amg0!), extracted from the log file in /var/log/cmh/LuaUPnP.log which you can view the most recent part of from the Misc > OsCommand > Tail Logs button in AltUI. This log gets rotated from time to time, so the only history that you will see is that contained in the current log file. I get, in openLuup, entries like this (showing two scene executions and some variable changes):

08	02/06/18 15:02:46.128 Scene::RunScene running 6 Ping Poll <0x0>
06	02/06/18 15:02:58.170	Device_Variable::m_szValue_set device: 20365 service: urn:micasaverde-com:serviceId:ZWaveDevice1 variable: ePollOke was: 472896 now: 472897 #hooks: 0 
06	02/06/18 15:03:03.630	Device_Variable::m_szValue_set device: 20336 service: urn:akbooer-com:serviceId:EventWatcher1 variable: eMemAvaile was: 34200 now: 34188 #hooks: 1 
06	02/06/18 15:03:03.631	Device_Variable::m_szValue_set device: 20431 service: urn:akbooer-com:serviceId:DataYours1 variable: eAppMemoryUsede was: 1681 now: 1472 #hooks: 0 
08	02/06/18 15:03:04.491 Scene::RunScene running 7 luup.scene test <0x0>

If your /var/log/cmh/ directory was not created or does not have the right permissions, then you may not see anything.

HOWEVER

I’ve just checked out scene history on openLuup (something I’ve never done before!) and I, too, see nothing. So we need @amg0 to explain to me what 's wrong in this log for scene entries. Variable histories seem to work just fine.

3. When I go ALTUI > Misc > Reload Luup Engine I always get the message "Controller did not respond"

What versions of AltUI and openLuup are you running? There may be an incompatibility if you’re not up to date.

4. Directory structure question. In the OpenLuup documentation it states:
[b]openLuup directory structure and ancillary files[/b] '''

However in my RPI I have:
‘’’

Am I missing something or is what I have the minimum required structure?

This part of the documentation is, alas, not quite clear / up-to-date. Your file structure should be fine (for all but the most exotic plugins) and is what has been created by the openLuup_install process. The thing not on here, and mentioned above, is the /var/log/cmh/ directory. I have already got an updated document ready for the upcoming next master release of openLuup (but that doesn’t help you right now!)

4. Lastly, how can I make the PI start openLuup on reloads. I have tried to use the examples shown in the openLuup documentation but ALL the files in the root level (where the script needs to be edited) are locked. Is there a way to get root user access? Currently I ssh into the PI as user [PI], not as user [root]. I could not find anything on how to log in as root in any of the documentation.

This is not my area of expertise, alas, and that part of the documentation relies heavily on others’ effort. However, I do have this working. The key, perhaps to accessing root files is to prefix your editing command with ‘sudo’ (q.v.) I have no idea what the root password is to my RPi!

I'm sorry that these questions spanned two different programs and two different authors but I'm hoping that someone here can shed some light on what I'm missing. Thanks

No, I’m sorry too. We do try very hard to coordinate and inform each other of various changes to make this as seamless as possible, but it doesn’t always work perfectly. Vera is a moving target, AltUI has to track it (and does so, very rapidly,) I am just a bit slower.

You’ll notice that I’ve avoided point #2, which I leave for others.

HTH[/quote]

it works on vera, I ll check tonight on openluup. the way it works is : ALTUI runs the following command on log file
“cat /var/log/cmh/LuaUPnP.log | grep '”+‘\t’+“Scene::RunScene running {0} '” where {0} is a num id

then read the result with the regexp
var re = /\d*\t(\d*/\d*/\d*\s\d*:\d*:\d*.\d*).Scene::RunScene running \d+ (.) <.*/g;

Vera logs look like

08	02/06/18 14:23:05.117	Scene::RunScene running 61 UpdateThingspeak <0x73357520>
08	02/06/18 14:31:00.209	Scene::RunScene running 49 Maison Avec Cam <0x73f57520>

OK, that’s fixed, thanks to @amg0’s enhanced perception of tabs versus spaces.

The latest development version (2018.02.06) fixes this.

Thanks both (the file logging module had not changed since 2016, so this has been a problem for a while!)

AK,

I think I see my problem. If it go Devices > openLuup > Console Interface > Logs > Log I can see the log data. But…
If I go Misc > OsCommands > Tail Logs > [Run] I see nothing. (path is: tail -n 50 /home/pi/cmh-ludl/logs/LuaUPnP.log)
However if I modify the path to read: tail -n 50 /home/pi/ect/cmh-ludl/logs/LuaUPnP.log I see the log data.

Question is how do I fix the configuration to reflect the correct path? I think this goes back to my install issue where it was installed in /pi/cmh-ludl instead of /pi/ect/cmh-ludl. I was able to move the subfolder into /ect but clearly the config has not updated itself. I have searched every menu command in ALTUI and openLuup but don’t see where I can modify the path. Any suggestions?

To answer your question from an earlier portion of this thread, yes, I am running the most current version. I will update to the one you just posted concerning the history, but I think my bigger issue is the base configuration of the install path.

[quote=“kartcon, post:6, topic:198522”]I think I see my problem. If it go Devices > openLuup > Console Interface > Logs > Log I can see the log data. But…
If I go Misc > OsCommands > Tail Logs > [Run] I see nothing. (path is: tail -n 50 /home/pi/cmh-ludl/logs/LuaUPnP.log)
However if I modify the path to read: tail -n 50 /home/pi/ect/cmh-ludl/logs/LuaUPnP.log I see the log data.[/quote]

No, don’t do that, or, at least, I don’t think you want to do that. The two files are different. The one written to /var/… is specifically for AltUI to use for history. The other one is a full log, but not compatible with the bizarre Vera format. Although there’s nothing to stop you from modifying or extending the OS Command list to do whatever you want.

Question is how do I fix the configuration to reflect the correct path? I think this goes back to my install issue where it was installed in /pi/cmh-ludl instead of /pi/ect/cmh-ludl. I was able to move the subfolder into /ect but clearly the config has not updated itself. I have searched every menu command in ALTUI and openLuup but don't see where I can modify the path. Any suggestions?

The path for the AltUI file is fixed, because that’s the location where it resides in Vera. The location in which openLuup runs is irrelevant, since these are full file paths. Your solution is to create /var/log/cmh/ with adequate (read/write) permissions.

To answer your question from an earlier portion of this thread, yes, I am running the most current version. I will update to the one you just posted concerning the history, but I think my bigger issue is the base configuration of the install path.

No, as above you can run openLuup anywhere you like, so long as it has your usual installed file structure beneath it.

[quote=“kartcon, post:6, topic:198522”]AK,

I think I see my problem. If it go Devices > openLuup > Console Interface > Logs > Log I can see the log data. But…
If I go Misc > OsCommands > Tail Logs > [Run] I see nothing. (path is: tail -n 50 /home/pi/cmh-ludl/logs/LuaUPnP.log)
However if I modify the path to read: tail -n 50 /home/pi/ect/cmh-ludl/logs/LuaUPnP.log I see the log data.
. . .[/quote]

kartcon,

I don’t want to muddy the water, but the above does not seem correct. Based on my recent 3 re-installs (goofing off mostly) of fresh builds of openLuup /AltUI , then “development” updates on the RPi 3, the OS Command > Tail Logs (unmodified) have always looked like the pic below.

ie. no references to /home, no /pi/, no etc just:

tail -n 50 /var/log/cmh/LuaUPnP.log

Both your default path, and your suggested modification path are trying to point to akbooer’s log not the intended amg0’s log
Logging onto the Pi using WinSCP I can drill down (I mean up?) above my home folder and see /var/log/cmh (a symlink I guess) /LuaUPnP.log

Of course, your raspberry build may have been built differently than mine (I used the guide & image by @CudaNet) and that build does have some permission issues (easily correctable)

In which case, “Never Mind” from the church lady applies, and just ignore me. :slight_smile:

Regards,
Chris

AK, Now I’m totally confused. In your response you stated “The one written to /var/… is specifically for AltUI to use for history.” however neither of the examples I posted pointed to a /var/ folder. What I was referring to was the addition of the /ect/ folder within the path automatically suggested by ALTUI.

tail -n 50 /home/pi/cmh-ludl/logs/LuaUPnP.log versus tail -n 50 /home/pi/[size=14pt]ect[/size]/cmh-ludl/logs/LuaUPnP.log. It is my assumption that this log file resides on the PI, not Vera, and AltUI ‘thinks’ its one one place when actually its in another.

I do understand this: “The location in which openLuup runs is irrelevant, since these are full file paths.” but still wonder why ALTUI suggests a different path. (missing the /ect/ folder part).

Then you wrote: “Your solution is to create /var/log/cmh/ with adequate (read/write) permissions.”. Would this be under the /home/pi/ folder or under the root folder of the PI. As I mentioned earlier, I am locked out of the root and can not add folders, modify permissions or edit files.

Would it be easier (better) to reinstall everything at this point? The more I learn about each platform the more things I see that don’t seem to work for me. I keep thinking it goes back to the initial install (and my utter newbie-ness). I take full responsibility for being a newbie and am willing to start over if I screwed up at step one.

The ‘automatic’ AtlUI suggestion is just whatever has been stored there - all user editable. I can only suggest that somehow this has been changed and is currently the wrong value…

tail -n 50 /home/pi/cmh-ludl/logs/LuaUPnP.log versus tail -n 50 /home/pi/[size=14pt]ect[/size]/cmh-ludl/logs/LuaUPnP.log. It is my assumption that this log file resides on the PI, not Vera, and AltUI 'thinks' its one one place when actually its in another.

As suggested by @ChrisTheC, both of these values are wrong. The place that AltUI ALWAYS looks for this file is /var/log/cmh/LuaUPnP.log, and again, as @ChrisTheC says, you can indeed make the directory path a symbolic link to anywhere you choose. However, all you really need to do is create that directory and the file will (after a reload) appear, and be used by AltUI to show history.

I do understand this: "The location in which openLuup runs is irrelevant, since these are full file paths." but still wonder why ALTUI suggests a different path. (missing the /ect/ folder part).

As above, I think this must have been edited manually somehow. ‘ect’ is NEVER going to be the right place, ‘etc’ was probably meant but still is incorrect in this context.

Then you wrote: "Your solution is to create /var/log/cmh/ with adequate (read/write) permissions.". Would this be under the /home/pi/ folder or under the root folder of the PI. As I mentioned earlier, I am locked out of the root and can not add folders, modify permissions or edit files.

It’s definitely at the top-level, which is why the path is absolute and starts with a ‘/’ instead of relative. Have you tried this?:

sudo mkdir /var/log/cmh
sudo chmod a+w /var/log/cmh

On my RPi, I used a symlink to a temporary folder in shared memory, rather than creating the directory:

pi@raspberrypi:~ $ ls -l /var/log/cmh
lrwxrwxrwx 1 root root 19 Jun  5  2017 /var/log/cmh -> /dev/shm/logs/altui
Would it be easier (better) to reinstall everything at this point? The more I learn about each platform the more things I see that don't seem to work for me. I keep thinking it goes back to the initial install (and my utter newbie-ness). I take full responsibility for being a newbie and am willing to start over if I screwed up at step one.

No, please don’t do that. Despite appearances, the openLuup install is just a small collection of files and folders, and I don’t there’s anything wrong with them. This should be fixed easily.

Incidentally, as an addendum to the symbolic link to shared memory idea, I had forgotten that I now use shared memory discs for both regular and AltUI logs by using Lua Startup code!

See my recently added post in openLuup “Tips & Tricks”

AK, As always thanks for your help. Unfortunately, I continue to run into the same problem. Here is the results of trying to create the cmh folder in the root level (root/var/log/cmh).

pi@raspberrypi:~ $ sudo mkdir /var/log/cmh pi@raspberrypi:~ $ chmod a+w /var/log/cmh chmod: changing permissions of ?/var/log/cmh?: Operation not permitted

As you can see, it DID create the folder, but then failed at setting the permissions. I verified that the folder exists and also verified that I can NOT create any files within the folder. Drag & drop failed, File > Save As failed, Copy & Paste failed.

I have yet to try your other suggestion simply because I just don’t’ understand what it does yet.

pi@raspberrypi:~ $ ls -l /var/log/cmh lrwxrwxrwx 1 root root 19 Jun 5 2017 /var/log/cmh -> /dev/shm/logs/altui

FWIW, I’m running the latest version of Raspian Jessie, downloaded two weeks ago when I began my journey in RPI.

And just for giggles… I tried to Remote in to ALTUI today. Response back was “No Handler”.
Earlier in the thread amg0 stated that the “Controller not responding” message when attempting to Reload the Luup Engine in ALTUI, was transient and would resolve itself. Unfortunately, that has not been the case. I can NEVER run that command successfully.

Yes, some things work, but most don’t and I really don’t know what else to try. Sorry, just frustrated.

[quote=“kartcon, post:12, topic:198522”]AK, As always thanks for your help. Unfortunately, I continue to run into the same problem. Here is the results of trying to create the cmh folder in the root level (root/var/log/cmh).

pi@raspberrypi:~ $ sudo mkdir /var/log/cmh pi@raspberrypi:~ $ chmod a+w /var/log/cmh chmod: changing permissions of ?/var/log/cmh?: Operation not permitted

As you can see, it DID create the folder, but then failed at setting the permissions. I verified that the folder exists and also verified that I can NOT create any files within the folder. Drag & drop failed, File > Save As failed, Copy & Paste failed.

I have yet to try your other suggestion simply because I just don’t’ understand what it does yet.

pi@raspberrypi:~ $ ls -l /var/log/cmh lrwxrwxrwx 1 root root 19 Jun 5 2017 /var/log/cmh -> /dev/shm/logs/altui

FWIW, I’m running the latest version of Raspian Jessie, downloaded two weeks ago when I began my journey in RPI.

And just for giggles… I tried to Remote in to ALTUI today. Response back was “No Handler”.
Earlier in the thread amg0 stated that the “Controller not responding” message when attempting to Reload the Luup Engine in ALTUI, was transient and would resolve itself. Unfortunately, that has not been the case. I can NEVER run that command successfully.

Yes, some things work, but most don’t and I really don’t know what else to try. Sorry, just frustrated.[/quote]

Please note that Remote access is for vera. Not openluup. For openluup there are some ways that people shared in the openluup forum.

You left out the [tt]sudo[/tt] in front of [tt]chmod[/tt] ?

AK - OK, my bad. That worked. I will see if anything gets written to this location over the next 24 hours. Nothing in the first 30 minutes so far, so not very optimistic at this point. Does this change REQUIRE a reboot? Should i just leave the existing logs (located at root/home/pi/ect/cmh-ludl/logs) alone?

amg0 - You wrote “Please note that Remote access is for vera. Not openluup. For openluup there are some ways that people shared in the openluup forum.” Regardless, when i go to [url=https://remotevera.000webhostapp.com/veralogin.php]https://remotevera.000webhostapp.com/veralogin.php[/url] enter my credentials and select my controller, I still get “No handler”. I’m not sure how your answer addresses this issue. OK, after some thought prior to posting my response it occurred to me that possibly, the purpose of the Remote Login is to access ALTUI RUNNING ON the local Vera, not a RPi. If this is the case, it surely is not well explained or documented in manual, nor is it obvious at first glance to a new user.

I understand that ALTUI is a complex piece of software that has evolved over time and is used by many people. However, as a first time user in a basically foreign operating system, I rely heavily on documented material or concise explanations. To this end, I remain very frustrated.

It needs a Luup restart, not a system boot.

The other logs are the genuine ones to be used for diagnostic (and displayed by the console interface) so leave them be.