vwout / docker-openluup

Dockerized openLuup environment with AltUI
https://hub.docker.com/r/vwout/openluup/
Apache License 2.0
3 stars 2 forks source link

Feature request: lxp/lom module #6

Closed RHCPNG closed 4 years ago

RHCPNG commented 4 years ago

Hi vwout,

I'm trying to install the Push Notifications plugin on openluup, but I'm getting the following error:

2020-11-01 12:56:35.626   openLuup.server:: GET /data_request?id=action&output_format=json&DeviceNum=0&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreateDevice&Description=PushNotifications&UpnpDevFilename=D_IosPush.xml&UpnpImplFilename=I_IosPush.xml&RoomNum=0&Reload=1 HTTP/1.1 tcp{client}: 0x561597b602f8
2020-11-01 12:56:35.627   luup.call_action:: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.CreateDevice 
2020-11-01 12:56:35.645   luup.create_device:: [84] D_IosPush.xml / I_IosPush.xml / D_IosPush.json   (urn:schemas-upnp-org:device:IOSPush:1)
2020-11-01 12:56:35.645   openLuup.chdev:: [string "I_IosPush.xml"]:5: module 'lxp/lom' not found:
    no field package.preload['lxp/lom']
    no file './lxp/lom.lua'
    no file '/usr/local/share/lua/5.1/lxp/lom.lua'
    no file '/usr/local/share/lua/5.1/lxp/lom/init.lua'
    no file '/usr/local/lib/lua/5.1/lxp/lom.lua'
    no file '/usr/local/lib/lua/5.1/lxp/lom/init.lua'
    no file '/usr/share/lua/5.1/lxp/lom.lua'
    no file '/usr/share/lua/5.1/lxp/lom/init.lua'
    no file '../cmh-lu/lxp/lom.lua'
    no file 'files/lxp/lom.lua'
    no file 'openLuup/lxp/lom.lua'
    no file './lxp/lom.so'
    no file '/usr/local/lib/lua/5.1/lxp/lom.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.1/lxp/lom.so'
    no file '/usr/lib/lua/5.1/lxp/lom.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
2020-11-01 12:56:35.645   openLuup.server:: request completed (64 bytes, 1 chunks, 18 ms) tcp{client}: 0x561597b602f8
2020-11-01 12:56:35.747   openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=231666517&Timeout=60&MinimumDelay=1500&_=1604231648510 HTTP/1.1 tcp{client}: 0x561597b602f8
2020-11-01 12:56:35.850   openLuup.server:: request completed (13182 bytes, 1 chunks, 102 ms) tcp{client}: 0x561597b602f8
2020-11-01 12:56:35.863   openLuup.server:: GET /data_request?id=user_data&output_format=json&DataVersion=231651936&_=1604231648511 HTTP/1.1 tcp{client}: 0x561597b602f8
2020-11-01 12:56:36.126   openLuup.server:: request completed (1368451 bytes, 86 chunks, 262 ms) tcp{client}: 0x561597b602f8
2020-11-01 12:56:36.206   openLuup.server:: GET /cmh/skins/default/icons/Data_Mine2.png HTTP/1.1 tcp{client}: 0x561597b602f8
2020-11-01 12:56:36.207   openLuup.servlet:: file not found:icons/Data_Mine2.png
2020-11-01 12:56:36.207   openLuup.server:: request completed (135 bytes, 0 chunks, 0 ms) tcp{client}: 0x561597b602f8
2020-11-01 12:56:36.208   openLuup.io.server:: HTTP:3480 connection from 192.168.1.130 tcp{client}: 0x5615995a8178
2020-11-01 12:56:36.208   openLuup.server:: GET /cmh/skins/default/icons/SysMon.png HTTP/1.1 tcp{client}: 0x5615995a8178
2020-11-01 12:56:36.208   openLuup.servlet:: file not found:icons/SysMon.png

Could you add the lua lxp/lom module, please?

RHCPNG commented 4 years ago

it seems to be the LuaExpat module

RHCPNG commented 4 years ago

I see that luarocks isn't installed. Although I'm not very familiar with lua and luarocks and don't know the consequences, but maybe that's useful to install too?

vwout commented 4 years ago

LuaRocks is a package manager for Lua. It performs the optional building of c libraries and installation. For this to work, development headers for multiple libraries need to be available. In order to keep the image size as low as possible, the development information, including a compiler (gcc) is not included in the image.

In the Alpine image, LuaRocks is installed, but in many cases will fail to install Lua modules, since it cannot compile sources. The Debian image does not use LuaRocks, but relies on Lua debian packages instead. On Debian this additionally ensures compatibility with other system libraries.

I will add luaexpat (and libexpat).

Which 'Push Notifications' plugin are you using? I attempted a test with https://github.com/jonferreira/Push-Notification-Plugin, but that plugins does not have a file called D_IosPush.xml and fails due to absence of CRC32. The CRC32 that this plugin uses however is not luacrc32.

RHCPNG commented 4 years ago

Clear explanation, thnx!

That is in origin the same plugin. However I have taken the files from my Vera, so from the Vera app store. I do have the D_IosPush.xml file. I will see what it does when I have luaexpat installed.

It probably will give me the same error then. But then I will ask Akbooer, because I know he has a working version of the plugin on openluup.

vwout commented 4 years ago

I also found the plugin in the MiOS app store. I installed the plugin and copied the files. That plugin does not run on OpenLuup (version 0.98). The version in the github repo of jonferreira (1.01) adds Boxcar support (announced in this post, but also does not work. On the Vera forum, there is mentioning of a version 0.999, so there should be other sources as well.

vwout commented 4 years ago

This ticket is solved by adding luaexpat in commit b14bc9d733be13d1dea448c3665c89b9a3998924.

I think I crafted a working version of the Push Notification plugin. See https://github.com/vwout/vera-push-notification

RHCPNG commented 4 years ago

Nice!!! I will test the plugin ASAP.

RHCPNG commented 4 years ago

The plugin installs fine now, so the module works. But the plugin doesn't. See the issue at the plugin git. This issue can be closed. Thnx!