Hue - Synology -error loading module 'socket.core'

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Hue - Synology -error loading module 'socket.core'

Post by bertbigb »

Hello,

information: I have a Synology 1515+ and I run domoticz beta V3.6708

I also have a few hue lights which I have connected to my domoticz.
In many places (also the Domoticz Hue wiki) i find the following commands which are necessary to make these scripts works

Code: Select all

   local http = require('socket.http')
   local ltn12 = require('ltn12')
   local json = require('dkjson')
 
However when I make use of these scripts I get an error:

Code: Select all

error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
/usr/local/lib/lua/5.2/socket/core.so: wrong ELF class: ELFCLASS32
Can anyone help me and point out what I should or could do to solve this error?

Many thanks already

Best regards,
Bert
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
TroisSix
Posts: 91
Joined: Monday 11 January 2016 9:29
Target OS: -
Domoticz version: 2022.2
Location: France
Contact:

Re: Hue - Synology -error loading module 'socket.core'

Post by TroisSix »

Hi bertbigb,
Did you found a solution?

If it helps you or others, I downloaded these two modules: usrlocalliblua5p2 and usrlocalsharelua5p2, and copied it in the good folders on my NAS. It should work for most of you guys.

But I'm having these errors now because I haven't the good two core.so files in "mime" and "socket" directories:

Code: Select all

Error: EventSystem: in scriptXXX.lua: error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
/usr/local/lib/lua/5.2/socket/core.so: invalid ELF header
I should get the good core.so for my Syno DS412+ (Atom 2700 cedarview = 64b I think?), but where can I find it?
If anyone has any idea please? :)
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Hue - Synology -error loading module 'socket.core'

Post by bertbigb »

Hi,

I didn't found a solution until now. Must admit that I didn't gave it much attention also in the meanwhile.

You wrote that you downloaded and installed usrlocalliblua5p2 and usrlocalsharelua5p2. Because I couldn't found out how you did it I googled and found this in domoticz EQ3 wiki when i was searching how to download and install the usrlocalliblua5p2 and usrlocalsharelua5p2

Code: Select all

First you need to update Lua to 5.2. and install some extra lua files.
sudo apt-get install lua5.2
sudo apt-get install lua-socket
sudo apt-get install luarocks
sudo luarocks install luasec
sudo luarocks install luasocket
sudo luarocks install basexx
Then check if they have all installed ok

luarocks list
Which should show

Installed rocks:
----------------
basexx
  0.3.0-1 (installed) - /usr/local/lib/luarocks/rocks
luasec
  0.6-1 (installed) - /usr/local/lib/luarocks/rocks
luasocket
  3.0rc1-2 (installed) - /usr/local/lib/luarocks/rocks
If you get a problem such as openssl.a or openssl.so or openssl.so.* not found
This may be an issue withe where different systems install/store files 
try

sudo apt-get install libssl-dev
sudo mkdir /usr/local/ssl
sudo cp /usr/lib/arm-linux-gnueabihf/libssl.* /usr/local/ssl
sudo luarocks install luasec OPENSSL_LIBDIR=/usr/local/ssl
then check

luarocks list
N.B. If you had lua5.1 installed you may need to copy some files across to lua5.2 as they appear to install differently.

sudo cp /usr/local/share/lua/5.1/*.lua /usr/local/share/lua/5.2
Hopefully, your system now has everything in place now
Could this probably help you (and me) --> https://www.domoticz.com/forum/viewtopic.php?t=10783
Her I find that it is depending on your processor

What I will try this evening when I'm home is:
sudo apt-get install lua5.2
sudo apt-get install lua-socket
sudo apt-get install luarocks
sudo luarocks install luasec
sudo luarocks install luasocket
sudo luarocks install basexx

And see what happens, will keep you informed
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
TroisSix
Posts: 91
Joined: Monday 11 January 2016 9:29
Target OS: -
Domoticz version: 2022.2
Location: France
Contact:

Re: Hue - Synology -error loading module 'socket.core'

Post by TroisSix »

Yep, that's the threads I read before, but no luck for me with the two files core.so incompatible with my DS412+ :(

In fact, I only downloaded the two .tar.gz here:
http://www.domoticz.com/forum/viewtopic ... 638#p22638
Then on the github zerobranestudio, I tried either the core.so for 32 and 64bits platforms, no luck :(

I will continue to search for a solution ;)
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
TroisSix
Posts: 91
Joined: Monday 11 January 2016 9:29
Target OS: -
Domoticz version: 2022.2
Location: France
Contact:

Re: Hue - Synology -error loading module 'socket.core'

Post by TroisSix »

Still searching for a solution...
I tried a few posts like this: http://www.domoticz.com/wiki/Upload_ene ... et_library and this: https://www.domoticz.com/wiki/Simple_sc ... Hue_status, but no luck :(
Has anyone any idea to have the good core.so files on Synology?
Thx for your help !
VM Debian - Domoticz stable v2023.1, RFXtrx433, Aeotec Z-Stick Gen5, APC ES700
- rts: dio, oregon, somfy
- zwave: fibaro fgs212, aeotec smart switch, vision ZG8101
- IO Homecontrol: Velux Connexoon
- logitech harmony hub, philips hue, gps Pilot
PaulM
Posts: 6
Joined: Friday 13 November 2015 20:50
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Hue - Synology -error loading module 'socket.core'

Post by PaulM »

A bit late but I solved it for my situation:

What I did:

Code: Select all

sudo apt-get install lua5.2
sudo apt-get install lua-socket
sudo cp /usr/lib/i386-linux-gnu/lua/5.2/socket/core.so /usr/local/lib/lua/5.2/socket/
sudo cp /usr/lib/i386-linux-gnu/lua/5.2/socket/core.so /usr/local/share/lua/5.2/socket/
sudo cp /usr/lib/i386-linux-gnu/lua/5.2/mime/core.so /usr/local/lib/lua/5.2/mime/
Since then the errors dissappeared.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests