I have been struggling with this for a while now. I want to create a new app for homey. Never really had the time, but now since I have a break from my work for 3 months i’m looking for something to do.
Previously I got the advise to start with just creating an app and start adding stuff. I tried that, and got an app. Created some flow cards, created a nice little page for settings but in all honesty I just don’t know what i’m doing (except for some HTML coding where I rely on my skills from when I did that for a living… which is like 15 years ago).
So I lack a total experience of coding. So I decided it would be good to start with a course. I started with the course at the codingacademy. I now have some basic knowledge of what things do and are, but putting that together where you actually create something needs experience.
I want to create a app for my APC UPS based on SNMP. Now I found net-snmp which seems to be needed. I get how SNMP works, so that’s great and all. But what’s the next step.
Could someone point me into the right direction, because i’m not seeing the forest in between of all the trees.
Maybe a ‘better’ course is recommended, or some books? Any thoughts in that?
Don’t start with an app at all, start with trying to get the basics running locally on your {lap,desk}top using the same version of Node.js that Homey runs (v12, the specific version probably doesn’t matter much). Once you have that up and running, try incorporating the code into an actual app.
I pretty much work the same, because app development for Homey is (still) a PITA: change code, upload to Homey, wait, find out that you made a tiny mistake, change code, upload to Homey, etc, etc.
So create a script using the SNMP module that will read the values from your UPS. Ideally, try and see if the UPS supports autodiscovery in some way, and incorporate that as well (because it will come handy in the next part).
Once that’s working, the next step would be to create an app with a simple driver. That way, you get the feeling on how apps, drivers and devices work in the Homey SDK.
When that works, try incorporating the local script into the driver/device code.
And is it maybe easier to start off with rewriting one of the SDKv1 apps to v3? There are a bunch of them not working anymore and I don’t want to immediately take over a app or something but just for myself to see if I can do that? Or doesn’t that work at all?
That could also be a good educational project Although you’d have the additional complexity of having to understand SDKv1 code, and I don’t know if SDKv1 is even still documented anywhere.
I also just started creating my own app (link). My knowledge about software coding is last used about 20 years ago. And no knowledge of jacascript yet.
What I did (also advised by @robertklep above)
This is a good starting point: https://developer.athom.com/
Choose “create your own app” and follow the described process.
This will result in having your first app running on homey. Without any functionality yet.
What I did to learn a bit more about javascript is: download the source code of an existing app from github. Pick an app that is already doing a bit what you want your new app to be doing.
And the nice thing about the forum is: theres always people willing to help
My first app is finished and published in the app store
I posted my app code on github.
So you can use the content to learn how to build an app
It might be the simplest app ever:
The app allows you to create flowcards with text.
The flowcards do not have any functionality (And Cards… always returns true, Then Card… does not perform an action).
I created the app to fill my need to add comments to flows (document it).
In the code itself I also added a lot of comments:
what does the codeline do
where in the SDK can you find more information on the code