Using ZeroBrane Studio with dzVents
Posted: Tuesday 28 April 2020 12:02
I think it will be an interesting point for a lot of beginners to debug lua script in a modern style with stepping and watching variables, but I can't find anything in docs/tutorials or at this forum. It would be nice to have a step by step tutorial
. I will write it, if I succeed!
But the main question: Is there a way to make it running with ZeroBrane Remote Debugging!?!? Or am I going in a dead end?
My way:
I just started with domoticz and lua. My first steps I have done with a lua script and the built in editor. But I want to change to dzVents, because it seems to be a step ahead and also much better for object oriented programming.
Till now I helped me with print-commands to see whats going on. But in the long term I need a real debugger. I found ZeroBrane and that they provide remote debugging. But I'm very poor in Linux and all the other things around. So I didn't find a way to run it. But I found some post mention ZeroBrane, so I hope there is a way to use it with domoticz.
My environment:
- Running domoticz (V2020.1) on a headless Raspi 3+ with current Buster (Release 10).
- ZeroBrane installed on WIN 10
What I tried:
With help from internet I copied to ./domoticz:
'./socket.lua'
'./socket/init.lua'
'./socket.so'
But I'm not sure If the version is ok. I think, this is version lua 5.1 and domoticz using V5.3!? Also I'm not sure, if I found the correct init.lua!?
Now I get the following error:
2020-04-28 11:04:00.980 Error: EventSystem: in PowerCtrl: error loading module 'socket.core' from file './socket/core.so':
2020-04-28 11:04:00.980 ./socket/core.so: undefined symbol: luaL_checkint
What I need
Any help apreciated.
But what I really need is
- a step by step introduction to built the environment
- all the correct files I need for remote ZeroBrane on Raspi (socket.lua, init.lua, socket.so)
- perhaps how to adjust the LUA_PATH and LUA_CPATH
- an example how to debug than from ZeroBrane
Or is there any other way described to establish a well debug environment?
Many thanks
But the main question: Is there a way to make it running with ZeroBrane Remote Debugging!?!? Or am I going in a dead end?
My way:
I just started with domoticz and lua. My first steps I have done with a lua script and the built in editor. But I want to change to dzVents, because it seems to be a step ahead and also much better for object oriented programming.
Till now I helped me with print-commands to see whats going on. But in the long term I need a real debugger. I found ZeroBrane and that they provide remote debugging. But I'm very poor in Linux and all the other things around. So I didn't find a way to run it. But I found some post mention ZeroBrane, so I hope there is a way to use it with domoticz.
My environment:
- Running domoticz (V2020.1) on a headless Raspi 3+ with current Buster (Release 10).
- ZeroBrane installed on WIN 10
What I tried:
With help from internet I copied to ./domoticz:
'./socket.lua'
'./socket/init.lua'
'./socket.so'
But I'm not sure If the version is ok. I think, this is version lua 5.1 and domoticz using V5.3!? Also I'm not sure, if I found the correct init.lua!?
Now I get the following error:
2020-04-28 11:04:00.980 Error: EventSystem: in PowerCtrl: error loading module 'socket.core' from file './socket/core.so':
2020-04-28 11:04:00.980 ./socket/core.so: undefined symbol: luaL_checkint
What I need
Any help apreciated.
But what I really need is
- a step by step introduction to built the environment
- all the correct files I need for remote ZeroBrane on Raspi (socket.lua, init.lua, socket.so)
- perhaps how to adjust the LUA_PATH and LUA_CPATH
- an example how to debug than from ZeroBrane
Or is there any other way described to establish a well debug environment?
Many thanks