Raspberry Pi Install - Embarrassing question?

Hi,

I’m looking to have a play and install OpenLuup onto my Raspberry PI, it’s already used as a HDMI switcher via Vera, so I’m not keen to use one of the images available (time saver as they are)

I’m sorry if this is an obvious question, and I’m embarrassed to say, but using the User Guide, I’m stuck after Step 2. :frowning:

I’ve run the lua installs, and created the directories, and downloaded the OpenLuup files from GitHub - but now what ?

I tried to copy elements over so I can run the required openluup_check and I’ve also done the transfer of file from my Vera - but I feel I’m missing something obvious :frowning:

Any help would be appreciated

No worries,

Perhaps have a quick review of the Linux_Aptitude guide and see if that helps answer your questions…
[url=http://forum.micasaverde.com/index.php/topic,36861.0.html]http://forum.micasaverde.com/index.php/topic,36861.0.html[/url]

[quote=“parkerc, post:1, topic:191960”]Hi,

I’m looking to have a play and install OpenLuup onto my Raspberry PI, it’s already used as a HDMI switcher via Vera, so I’m not keen to use one of the images available (time saver as they are)

I’m sorry if this is an obvious question, and I’m embarrassed to say, but using the User Guide, I’m stuck after Step 2. :frowning:

I’ve run the lua installs, and created the directories, and downloaded the OpenLuup files from GitHub - but now what ?

I tried to copy elements over so I can run the required openluup_check and I’ve also done the transfer of file from my Vera - but I feel I’m missing something obvious :frowning:

Any help would be appreciated[/quote]

[ul][li]You have, of course, read the guide through a couple of times before starting?[/li]
[li]Are you stuck on step 3, page 5?[/li]
[li]Have you taken a look at the “Suggested commissioning steps” on page 9 and following?[/li][/ul]

You should be at the stage of generating a ‘factory reset’ system and checking out the functionality there.

Thanks CudaNet, I’ll check your Linux_Aptitude guide out…

Hi @Akbooer :slight_smile: - I have read the guide a few times, hence I was embarrassed to raise this post, but felt I should…

I guess the gap for me is where to put all the files from the GitHub package, as thats not clear for me, here are my notes from following each step

Step 1 - Lua Install - Done
Step 2 - Create Host Tree - Done
Step 3 - AltUI - What, hold on, where/how do I do that, when all I have done is step 1 & 2 ?
Step 4 - Not applicable to me, not using Arduino
Step 5 - Vera Bridge - ok, I can do that as those files are in the GitHub package, so copied over - Done
Step 6 - Vera Get Files - ok, I can find the file OpenLuup_getfiles from the GitHub package, so I’ve run that - Done
Step 7 - Not sure what to do here, but will come back to it.

I hit this problem too

The problem the guide is fantastic and written by a genius…

However, us simpletons need to understand his logic… ;D
You might be using the pdf thats in the Github… Cudnet wrote a more detailed one…

Carry on through the guide and near the bottom you have this section
Suggested Commissioning Steps
Try that stuff and you will win
I have reattached CudaNets guide here

Thanks all,

Not being a Linux expert, I really do look to the guides to take me through every step, and looking at the OpenLuup User Guide compared to the Linux Apitude guide, the install requirements alone are different.

OpenLuup User Guide

apt-get install lua5.1

apt-get install lua-socket

apt-get install lua-filesystem

apt-get install lua-sec

Linux Apitude guide

apt-get install lua5.1

apt-get install lua-socket

apt-get install lua-filesystem

apt-get install lua-sec

sudo apt-get install lua-expat

sudo apt-get install luarocks

$ sudo luarocks install luafilesystem
$ sudo apt-get install openssl
$ sudo apt-get install libssl-dev
$ sudo luarocks install dkjson
$ sudo apt-get install curl

I’ve installed them all now, and am moving on to the folders, which I had created, yet the Linux_Appitude suggests a slightly different approach, which I will try to adapt to, but as I only use root, it suggests I will need to create a new user…

OpenLuup User Guide
/etc/cmh-ludl/
/etc/chh-ludl/icons/
/var/log/cmh/

Linux Apitude guide
/home/{user}/vera
/home/{user}/vera/cmh
/home/{user}/vera/cmh-ludl
/home/{user}/vera/cmh-ludl/icons
/home/{user}/vera/cmh-ludl/files

I’m not a UNIX expert at all, and in the guide I put only what I found necessary on the three very different systems I’ve tried: Mac OS, OpenWRT, Debian.

The additional ‘requirements’ from @CudaNet are mostly to do with both the install tools he’s actually using and to support some ‘exotic’ plugins. openLuup doesn’t, itself, need them.

It all depends what you want to do.

The difference in directory structure is simply that you can run from any base directory. The additional ones are created anyway by the openLuup utilities.

I’m not criticising, just explaining.

Hi @Akbooer

No critism taken, I had a Rasp Pi not doing much (other than acting as a HDMI switcher via Vera) so K thought I’d have a go and add OpenLuup to it too :slight_smile:

As I had already created directories in /etc/ based on the OpenLuup user guide, and imported the Vera files - I get the following when I copy over and run openLuup_check.lua ?

root@raspberrypi:/etc/cmh-ludl# lua5.1 openLuup_check.lua module 'mime' module 'socket' module 'socket.http' module 'ssl.https' module 'ltn12' module 'dkjson' not found: /www ... port 80 HTTP server may not work properly not found: /www/cmh/skins/default/icons ... UI5 icon directory missing not found: /www/cmh/skins/default/img/devices/device_states ... UI7 icon directory missing not found: user_data.json ... no user_data configuration file root@raspberrypi:/etc/cmh-ludl#

That’s an old version of openLuup_check. Port 80 is not used any more, nor /www, nor are the two icon directories. user_data.json should be created on the first run of openLuup.

Now for the Embaressing question, how do I first run OpenLuup?

The documentation says to do this.

$ cd /etc/cmh-ludl {user}@{hostname}:/etc/cmh-ludl $ lua openLuup/init.lua

^^^

Your asking all the questions I gave up on, might give it another go now.

[quote=“parkerc, post:10, topic:191960”]The documentation says to do this.

$ cd /etc/cmh-ludl {user}@{hostname}:/etc/cmh-ludl $ lua openLuup/init.lua
[/quote]

The doesn’t make any sense to me, I’ve no idea what the preamble is all about.

The User Guide section on “Suggested commissioning process steps” works for me.

Thanks , I’ll keep plugging away.

(FYI, the first task in the User Guide is to do the installation check, and to run openLuup_check which I had found in your GitHub - see page 9.)

INSTALLATION CHECK

From the /etc/cmh-ludl directory run > lua5.1 openLuup_check.lua

This may produce diagnostic warnings, but should not generate an error. If it does, some installation files are missing.

I’ve updated the openLuup_check version in the DEVELOPMENT branch. It has fewer checks now because there’s no dependence on a port 80 HTTP server and the ckassic icon directory structures are not needed either.

It turns out that it’s AltUI which now has a dependence on dkjson.

Ok, some progress has been made certain http requests (alive, user_data) are now returning information, which is good. The only thing that I can’t seem to make work is to get the AltUI (http://192.168.1.77:3480/data_request?id=altui)

That does not work for me.

Running $ ./openLuup_reload reset brings up

Sun Apr 10 21:35:04 2016 device 0 '_system_' requesting reload

And then if I keep sending http://192.168.1.77:3480/data_request?id=altui via the browser, I can see the progress bar hold for a while and then nothing is returned.

Looking at the command line, mentioned above more entries are added. (Example the same as in the Linux guide, but the dates and gap different, I allowed it to run for 10 plus minutes and did multiple reloads)

Sun Feb 28 21:35:04 2016 device 0 '_system_' requesting reload Sun Feb 28 21:35:50 2016 device 0 '_system_' requesting reload Sun Feb 28 21:35:50 2016 device 3 'ALTUI' requesting reload Sun Feb 28 21:36:08 2016 device 0 '_system_' requesting reload Sun Feb 28 21:36:34 2016 device 0 '_system_' requesting reload Sun Feb 28 21:37:27 2016 device 0 '_system_' requesting reload Sun Feb 28 21:38:47 2016 device 0 '_system_' requesting reload

Really need to see the last couple of versions of the whole log to understand quite what’s going on here.

Hi @akbooer

This is everything that is in the LuaUPnP log

06 04/13/16 21:01:01.393 Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: e[35;1mLocalHomee[0m was: now: #hooks: 0 06 04/13/16 21:01:01.409 Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: e[35;1mVersione[0m was: v1.15 now: v1.15 #hooks: 0 06 04/13/16 21:01:01.426 Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: e[35;1mDataStorageProviderse[0m was: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"default":1,"type":"number","key":"nodeid","label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} now: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"key":"nodeid","type":"number","default":1,"label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} #hooks: 0 06 04/13/16 21:01:01.437 Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: e[35;1mDataStorageProviderse[0m was: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"key":"nodeid","type":"number","default":1,"label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} now: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"default":1,"type":"number","key":"nodeid","label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} #hooks: 0 06 04/13/16 21:01:01.438 Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: e[35;1mVariablesToSende[0m was: now: #hooks: 0 06 04/13/16 21:01:01.439 Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: e[35;1mRemoteVariablesToWatche[0m was: now: #hooks: 0 06 04/13/16 21:01:01.440 Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: e[35;1mVariablesToWatche[0m was: now: #hooks: 0

Unfortunately, this is not a complete log.

However, it does show that AltUI is actually running, so it must have installed correctly.

Is the problem, in fact, that you are doing this:

http://192.168.1.77:3480/data_request?id=altui

When you should, in fact, be doing this?

http://192.168.1.77:3480/data_request?id=lr_ALTUI_Handler&command=home#

Hi,

Sadly neither of those URLs work, the first one at least seems to pause for a number of seconds.

These do.

http://192.168.1.77:3480/data_request?id=alive http://192.168.1.77:3480/data_request?id=user_data http://192.168.1.77:3480/data_request?id=exit

Can you post a complete log of the system from startup to exit, giving it a minute or two in between?

Also, a copy of the user_data.json file would be useful.

There is clearly something very basic we are missing here.