I'm trying to read modbus values with a lua script.
I have EMS and lua script running ok, and I can bind remote properties to a created thing.
The only problem I have is that I don't know where should I determine the modbus 'source'/host (I'm using a plc simulator on another computer).
Juho, you can set the host (host ip where your sim is running) under the scripts.modbus_handler section in your config.lua. It usually runs on port 502, the EMS should be able to pick it up.
Thank you for your quick response!
However, I'm getting following error codes when running luaScriptResource:
luaScriptProxy::execute:  Error executing script modbus_handler, Error = Error: error loading module 'socket.core' from file '/home/pi/micro/etc/community/clibs/socket/core.so':
/home/pi/micro/etc/community/clibs/socket/core.so: cannot open shared object file: No such file or directory
[WARN ] 2016-11-15 11:23:14,398 ScriptResource::executeScriptRequest: Path /scripts/modbus_handler/holding_register/1/40001/ not found
[ERROR] 2016-11-15 11:23:14,398 luaInterscriptBinding::l_executeCallback: Error executing callback 'modbus_handler//scripts/modbus_handler/holding_register/1/40001'
Returned: 404 /scripts/modbus_handler/holding_register/1/40001/ not found
It's obvious that I'm missing something crucial here, but what?