Edge Drivers: How Much Code?

Ok I’ll be the first to admit I have not spent all that much time exploring the rather disjointed docs on Edge, but I have looked at some of the code for drivers I would be interested in from the kind community members that made it available.

I’m a bit flabbergasted. Hundreds, if not thousands of lines of LUA and markup language in those packages. Is this actually the norm? Or did I just look at some drivers that are crazy versatile?

Not sure what you’re looking at. Lua and Edge are pretty succinct, especially for simple devices like ZigBee or Zwave switches. LAN devices might be more verbose with http POSTs or parsing XML.

Lua and it’s table structure is very tight and efficient both in code and runtime.

1 Like

First one was: GitHub - toddaustin07/webrequestor: Web Requestor Edge Driver

LAN service. Go look at a simple Zwave switch.

2 Likes

I will… but in a SmartApp I could do this in a couple of dozen lines of Groovy. )c:

I guess?

The edge lua libraries are probably more fleshed out for zwave and ZigBee currently. LAN protocol support will likely be enhanced soon.

The edge lua framework is more about device integration level, not smart apps.

1 Like

All of the LAN drivers have had to roll their own in edge. The SDK supports http sockets, but little else in terms of network support. That is why they are large. Zwave and Zigbee can often be done in a simple short file depending on the desired functionality.

2 Likes