Resources for Learning question (2021)

Hi everyone!

I am definitely NOT a developer and inexperienced with coding but I would like to learn. I have seen some of you do amazing things!

I have been following the Edge, API and CLI discussions and feel like I have been learning a lot. I have a few specific questions about some of the Edge drivers I’ve seen, specifically by @TAustin, but don’t want to bog down the beta discussions with my inexperience (especially since it is beta).

That being said, does anyone have any suggestions, starting points or resources that would be a good place to learn from?

Go ahead and ask your questions! Glad to help you any way I can.

1 Like

I’m currently using a Roku smartapp to get status and control my Roku TV. Knowing groovy is going away I started looking into alternative integration.

I found your UPnP and Web Requestor drivers and am trying to figure out if either of those would work for my purpose. The Roku TV was found by the UPnP scan. I didn’t really understand what I was looking for so need to go back and look at the commands available.
Would either of these be a good option for on/off control and status of my TV?

I figured I’d start easy with a TV :slightly_smiling_face:

I’m a little confused about what it is that you’re trying to learn. :thinking:

Most people using smartthings don’t have to do any coding themselves, that was sort of the point of the platform.

You would only need to do coding if you want to write your own edge Drivers, your own Integration, or your own smartapps.

Edge drivers are written in Lua, which is a standard programming language, so if you want to learn that there are lots of resources on the web.

If you want to learn to do things specific to the smartthings platform, I would start with the tutorials section of this forum. There’s a lot of good stuff there, although most of it assumes that you do already know how to program.

You can also start your own thread under the “writing smart apps“ section of the forum if there’s any particular specific project you want to get started with. I would suggest one thread per project there.

If you run into any specific problems with the smartthings platform or the documentation for it, you can ask in the support section of the forum

If you’re just looking for beginning resources on working with the new platform, you can try the developers website. The documentation implies you have to be part of an “organization,“ but you can sign up as an individual as well.

https://smartthings.developer.samsung.com/

I know that’s a lot of different places to look and it’s not very well organized, but that’s sort of the state of things right now.

1 Like

You are right that Roku responds to UPnP searches, but unfortunately I don’t think they support any control via the UPnP interface.

However, they DO support control via simple http POST requests, which makes it really easy for you. Just use my POST/GET driver and you can configure it to send commands to your Roku. For example:

POST:http://192.168.1.105:8060/keypress/home

The other keypress commands it seems to support are:
Home
Rev
Fwd
Play
Select
Left
Right
Down
Up
Back
InstantReplay
Info
Backspace
Search
Enter
Lit_

See: A More Common Hades: Control Roku from command line

See: Roku

2 Likes

Honestly JD I’m not 100% sure either! :laughing:

I know that I have some custom DTH and Smartapps running that unless someone else decides to write Edge drivers for then I will loose the integrations.

That being said, I would like to be able to use the Rules API (I don’t know json well) enough to be confident in writing rules.
I’d like to get a better understanding of how to use the UPnP and webrequester apps mentioned above.

It looks like I have some more reading and rereading to do. Thanks so much for the links! It is much appreciated.

1 Like

If you want to get more sophisticated than the above commands, you could then get into actually writing your own driver to take advantage of all the control capabilities that Roku makes available. Note that POST requests just send commands, but don’t get any data back. There is also a GET request supported, but in my driver right now, any returned data is ignored.

1 Like

Eventually I will venture into that but all I need right now is On, Off and correct status.

So with your driver ATM I could send on/off POST commands and when data becomes usable could use GET requests to maintain staus?

POST:http://192.168.1.105:8060/keypress/power

I think that command will turn it on and off.

No way to get status at the moment. As I said earlier, GET requests don’t return data. I’m looking at maybe changing that to provide a text field to put any received data from a GET request. That might let you get status.

1 Like

To be honest, it looks like a Roku device would be a prime candidate to create a custom Edge driver for. If you’re looking to get into some coding, that might make a fun starter project.

4 Likes