Wellcome aboard jimmy @Automated_House
Ummm, âlocalâ is the word of the day. And (among the 3 + 1 big players) was started by SmartThings when v2 was released. Then Amazon pushed for more, a while back. Google recently committed to local processing as well. With Edge, Samsung is just following the market trend, by taking it one step forward (some might say):
Letâs not forget that Amazon local control was announced in 2018:
Google made a big deal about local control last year:
Then Apple followed:
I get it - everyone wants local, but very few really deliver. My setup is mostly local - Hubitat + Node-RED with a little lagniappe of Home Assistant. Most of my automations run whether Cox favors me with internet access or capriciously takes it away.
My sole remaining cloud components are my Sleep Number bed, and Alexa.
I tried. All I wanted to do is to install Lua as that is claimed as a prequisite. I may not have worked for quite a few years but I do know what I am doing. I date from the days of rebuilding the 4.2 BSD kernel from source to partition a disc, and what I could do with a Unix command line was frightening. But all I have these days is a tired Windows laptop. So I go to the Lua site and look for the downloads but there arenât any binaries so I get directed to the binaries site. That is really to support a couple of obscure projects and doesnât have anything worth a spit either, just some out of context binaries with no documentation, and directs you to three other sites for a fuller installation. Lua for Windows with several years of dust on it, LuaDist which is defunct, and the other one is LuaRocks which doesnât seem to have the binaries either but does have some utterly bizarre instructions. So all I need is a completely new development environment and thatâll only cost me a few hundred thousand pounds (Iâd need a bigger house as well), but if I am going to have to faff around like that why would I be using SmartThings?
At the moment I seem to be hosed. Canât stay and canât go.
Iâve resolved to buying a modest notebook, to serve as dedicated t̶e̶r̶m̶i̶n̶a̶l̶
âŠ*err workstation. Not wanting do deal with cleaning up some botched installs on my general purpose.
I havenât coded using a command line since way back, using dBase, FoxPro⊠which I doubt anyone has ever heard of.
It may be this fall before I get down to it, as the weather will drive me inside, but I really intend to.
Thanks for sharing the hurdles you are encountering. I hope you find an easy way over them.
My only hope is if ST develop a sort-of-IDE along the lines of the Groovy IDE to try and shield users from all the unnecessary faffing about. However having seen what Iâve seen Iâm not sure I could have any confidence in the system ever again.
Bit modern for me âŠ
I havenât used windows in ages, but could you use WSL? Install WSL on Windows 10 | Microsoft Docs
Then youâd be able to just install lua from the âdistroâ's package manager.
I honestly had no idea the situation for Lua [edit: on windows] was so unfortunate.
And for the record, you donât need to install Lua to package drivers and otherwise use the CLI, you only need it if you want to run the code on your PC either for development (mostly lan drivers) or to run unit tests (mesh drivers).
LOL⊠I donât doubt it.
Well I could, but it is all rather tail wagging the dog.
I am sure it is a technically sound solution that ticks a lot of boxes, but quite honestly I wouldnât touch it with a bargepole as it is the boxes it doesnât tick that are worrying. Even when I first looked a month or two ago when I saw it mentioned in despatches, I just thought âNo, that canât be right, that would be far too risky.â
I couldnât see why you would need to either, but the documentation rather leads you in different directions, probably because it will go on to talk about the cases you mention.
Other than having a one-click installer for lua, what boxes do you see it not ticking right now? Iâm definitely interested in making the development experience as painless as possible.
I thought I scrubbed all the mentions of having to install lua from the docs and tutorials before everything was posted, where are you still seeing it say you need it?
My personal hope, based on nothing but blind optimism, is that what all of this plus Matter means is that a significant number of devices will just work out of the box in the future, no custom code required.
And that device manufacturers with a strong interest in the smartthings platform like Inovelli and Zooz will have a means for their programmers to provide easy to use edge drivers.
So that ultimately the only people other than device manufacturers who will need to write custom code will be people who are either creating their own hardware devices or their own add-on services. Or offering their programming services to device manufacturers who donât have their own smartthings - savvy staff. So the new Lua channels Will be very useful to people like @krlaframboise , @erocm1231 , and @RBoy , but most of the rest of us wonât need anything except a URL provided by one of those other groups.
But like I said, thatâs just optimism on my part.
So, âJust worksâ?
Sounds sort of Utopian, but Iâll offer up some positive vibes, in case that helps.
Ah, I did just find: Get Started with Hub Connected Devices | Developer Documentation | SmartThings
I saw the PR for that come up, but never actually reviewed it see where it was placed. I donât have the power to fix that on my own, but Iâve brought it up and will try to get that moved/fixed on Monday.
Edit: though still please let me know if youâve seen anything else.
Apart from seeming to lack interest in robust and polished distribution of their product, it is more the non-technical aspects of working with a language maintained without overt enthusiasm by an absolutely tiny University unit with a rather proprietorial approach to the code (they generously donât mind bugs being reported, but theyâll do all the fixing thanks). I can imagine techies going for it, but I can also imagine their managers being much less enthusiastic. I just wouldnât bet the shop on it.
To be fair, Iâve been reading documentation in all sorts of different orders and flitting around repositories in all sorts of different orders. So some are probably talking about an installation where you might need it. Iâd argue there is definitely one problem document though âŠ
The Developer Preview Development Tools page seems to talk of 1) using the CLI, and 2) Live Logging, which also uses the CLI. So basically the CLI right?
However that is closely followed by Set Up Your Development Environment which talks about LUA_PATH
, the Lua library release, luasocket
, luarocks
etc, and then jumps onto a discussion of auto-completion and your IDE - IntelliJ
or VSCode
being examples. So the presence of Lua could be inferred.
It follows that with the Hello World
example. That doesnât involve a Lua installation but is worth a digression. The first command is an instruction to âclone the repositoryâ with:
git clone git@github.com:SmartThingsDevelopers/SampleDrivers.git
Or as we used to say at one place I worked.
HOW TO CATCH A BEAR.
1) Find a bear.
2) ...
Even if knowledge of git
, GitHub, cloning and repositories are not critical to being able to type this command, why is there an assumption that command line git
is available? I certainly donât have it. The document is in a browser so at the very least it needs to link to a ZIP file.
Iâll leave you to decide whether LAN Edge Device Driver Development Guide really should come before the section on sharing your driver. It is a bit a leap.
Anyway, I think other examples are here and there. For example in Tutorial | Creating Drivers for Zigbee Devices with SmartThings Edge - Developer Programs / Tutorials - SmartThings Community I am not clear what to make of:
Connect to preview and make sure that SmartThings Lua libraries are available locally.
That might be an editors note or something that sneaked through, but nothing in the rest of the document seems to interest with the SmartThings Lua libraries (do they even exist to make available locally yet?).
UPDATE: It seems you found the main problem while I was knitting a flag here.
I can fix this. An earlier revision of the guide had more information about using the IDE extensions.
Not to put more fuel on this particular fire, but version control is a pretty core development skill, and the bar for getting command line tools is pretty low. (Even if you donât have a Mac or a Chromebook, a Pi will only cost a few bucks.)
With a few exceptions, it was the default way of distributing Groovy DHs and SmartApps, so they havenât really raised the bar for device development at all.
Oh I hope that too. My one big fear is that there could be a conflict in the quality control. My current irritation (OK then, ONE of my current irritations, and the âremainsâ rule in the Rules API is winding me up too) that I have mentioned previously is that an environmental sensor has been added to a stock handler with some supporting code mods. I donât really speak Zigbee but I look at the code and think âif that refresh worked, why doesnât the device report?â, and âthose two commands seem to have been cough and dropped from another manufacturerâs device specific code, is that really correct?â. Then I wonder why one of the commands that does work was set to configure the device to report at a minimum of one hour and a maximum of two hour intervals when it is reporting room temperature to a tenth of a degree. Would ST ever feel in a position to be able to say to a manufacturer âActually no, that driver simply isnât good enough for the users of our platformâ?.
Yes, this is pretty much why I negotiated my way out of being on the Edge alpha. Not only would I not have anything to work with (the Zigbee bits of my Aqara handlers are other peoples work, and everything else I have is trivial virtual handlers), but I didnât think my opinion actually mattered much to compared to theirs. Iâm just tinkering, they are doing it for real.
Clearly that doesnât stop me throw a wobbler when I forecast a loss of tinkering.
Itâs an anniversary cake. So you get it every year on the anniversary of the date when you first joined the forum.