I'm So Confused by ST Development

After a number of months of dabbling, I was finally getting over the initial hurdle in writing a device handler. I got the Hub to send commands to a non-ST compatible device over my local network. And so when I finally start seeing some progress, I begin to also see some strange and inconsistent behavior between the simulator and my ST app on my phone. So, I pull out an older tablet that still has the classic app and it shows a different set inconsistencies. The initial confusion came primarily when initiating a state change in the simulator the new app would not respond to the change, but the classic app would. Even more strange, initiating in the simulator would cause the new app to set the primary attribute set 0, even though it had been clear set to something else on the simulator. On the other hand, when I use the tile to change the value via the new app, it would change in the simulator, but not in the classic. To compound things, when I would change the value in the classic app, it wouldn’t effect a change anywhere else, including the target device. Through this partial evidence, I began to wonder if I was developing for the classic app. I did some searching and found some documentation to that effect as well as an entirely new API that was REST/OAuth based and had an entirely new development environment. This seemed to suggest that my supposition about the classic app was at least somewhat correct.

The documentation for the new environment was just as terse and difficult to follow as the classic stuff. And finally, after blindly hobbling my way through some GUI tunnel for generating the device handler definition, I was was about to deploy to test. But, instead I received some arcane message: “Fail to call service API(Montage)”. Google cannot find that string on the entirety of the Internet. I was stopped dead in my track and after all of this I had little to convince me that the reward was going to be worth the effort.

I’ve spent scores of hours over this past year just trying to create a device handler that will let me let me adjust the volume of my network-accessible home theater receiver throughout SmartThings. I’ve poured through a bunch of code on Github, some very pertinent to my goal, some just for the examples of general device handler development. I’ve spend hours sifting through (what I see now is the classic) documentation. I’ve forced myself to slow and and just read it like a book, only to realize there are often chunks of detail missing that are cause to learn by trial and error rather than complete examples, tutorials or reference documentation. All I have to show for it is a clunky volume slider, that should also be showing other buttons, but for some reason it does not. The documentation is train wreck. The newer stuff certainly looks prettier and more like someone dabbled in something like Bootstrap, but it’s still unnecessarily terse, difficult to follow and the new IDE doesn’t seem to let me do what I want to in the end.

Between all that and some repeated recommendations and warnings that pop up in the new IDE, it really feels like Samsung wants developers who are financially funded and motivated working on their platform. That’s not me. This is just an evening hobby for me and I’m spending far more time figuring out how to use the platform rather than actually using the platform.

Unless someone can point out the super secret documentation and streamlined development environment that just works and lets me spend time developing for the platform rather than scratching my head, I think this ship is really starting to sail. Honestly, I’m really not whining or venting. This is more of a data point for Samsung. But after browsing this forum for quite sometime there seems a lot of sentiment that they are unconcerned. Well, then see post this as another wasted datapoint… unless of course, you have that easy button.

6 Likes

Tagging @jody.albritton

Hi @jasongabler,

Would you mind sharing with me your DTH repository and the name and model of the device you are trying to control, please? You can find me in github as nayelyzarazua-bluetrail.

2 Likes

I searched the same following string and only got this post as the result - “Fail to call service API(Montage)”

Not sure what’s going on. I can’t deploy my projects to test either.
I am also getting the same error while trying to delete some old projects…

I share your frustration. I have already begun to look into some alternatives…

This looks promising - https://developer.amazon.com/en-US/alexa/devices/connected-devices/development-resources/alexa-connect-kit

Hi @Shivam_Batra,

If you want, I can help you out. I just need this information:

  • The complete error message you mentioned when trying to delete your projects.
  • Your DTH’s repository (my user: nayelyzarazua-bluetrail)
  • The model of the device you are trying to integrate.
2 Likes

I was following this example:

and received the error '“Fail to call service API(Montage)” when i tried to deploy to test.

Logged a support ticket , but apart from that, i googled it and got zero too. ( I am guessing Montage is an internal name)

1 Like

@jasongabler Just FYI, the support people asked for some more info and http responses, they’re looking at it . When I hear back from them about the “Fail to call service API(Montage)” , I’ll post it here.

1 Like

Hi Nay,

Thanks for a prompt reply. I just logged back in today to check and it seems to have been fixed!

However, as mentioned by OP, I have myself been struggling for a while now because of lack of proper documentation/walkthroughs/samples in order to use the ST Device SDK for Directly Connected Devices.

It would be very helpful for beginners like us on the ST platform to have some proper walkthrough on how to go around coding the device using the SDK.

The following example that I used covers the Environment setup perfectly however lacks the explanation of the coding side - How to Build Direct Connected Devices

Here is an example form your competitor Amazon. They make it so simple to add new capabilities to your device using their ACK Device SDK - https://developer.amazon.com/en-US/docs/alexa/ack/steps-to-prototype-a-product.html

2 Likes

In the ST device SDK, you can find some configuration examples for the devices such as ESP8266.
In the repository, here are the access links. When you clone it, you can find the examples in the folder: st-device-sdk-c-ref/bsp/device/examples.
You can also find in the repo our capabilities samples for your reference.

We are constantly working to improve the documentation and samples, thanks for your input. We will take a look at this.
If you have more questions about that, you can open a new thread and we can continue our conversation there or in “How to Build Direct Connected Devices”.

2 Likes

@nayelyz

Yes, I did check them out already and flashed the sample code. However, I lack the knowledge on how to edit this code.

I think I say this for all us beginners on ST platform, if we can have like a live or even recorded coding session where you create/code a MCU start to finish showing how to add a few capabilities, it would be of tremendous help.

For example, we can have an ESP32 controlling say - two switches, a fan and maybe even displaying readings from temp/humidity sensor in a single device. A recorded demo of how would you go around coding this from scratch. Maybe even include how to integrate touch inputs etc… whatever common scenarios you can think of…

Thanks,
Shivam

EDIT - I have previously requested the same twice before, even offered to pay but not much help recieved -

  1. Need help with STDK coding of ESP32
  2. AlarmDecoder IoT Direct Connected Device Discussion

Hi @nayelyz,

Thanks for offering. I took a bit of a break and giving it another go. I’m not sure what sort of repo sharing you’re referring to, but here’s the URL of the device handler:

Jason

Hi, @Shivam_Batra,
How about to refer this page?
It describes how to write code for sending new device event.
Thanks.

1 Like

Hi @Levanterman,
There was some problem while deploying new feature. It has fixed now. Would you try it again?
Sorry for your inconvenience.

1 Like

Hi @Shivam_Batra ,
There was some problem while deploying new feature. It has fixed now. Would you try it again?
Sorry for your inconvenience.

1 Like

Hi

Thanks for the reply, I’ve tried it and the API works now, thanks a lot :slight_smile:

Regards

Nige.

2 Likes