I have been using Smarthings for a few years via the Smartthings Classic App on my Android phone. Until now, I’ve never had a reason to access the IDE so I kind of forgot it was even there.
I am using the IDE now because I need to install a DTH and SmartApp in order to add a new device. I can see that this is one reason for using the IDE. I’m just wondering what else can and should be done via the IDE. I notice that you can add/edit devices, hubs etc. For those activities that can be done on the IDE and the mobile App, which should be used? Pros & cons? I’m just trying to get a feel of how other posters manage Smartthings with respect to using IDE and the mobile App.
Live Logging can be useful just to see things are happening. It is particularly handy for seeing the evaluation of the additional conditions on Smart Lighting automations such as start and end times.
The Devices tab is handy for creating virtual devices. Each device also has a ‘List Events’ link and with ‘All’ selected that is good for showing which automations sent commands to devices (some device handlers and apps turn off the ‘Displayed’ flag for some events so the events don’t appear in the mobile apps).
When you login to the IDE on a desktop browser you will see a menu across the top of the page with ‘Live Logging’ as the last entry. It sometimes gets obscured by a ‘Welcome Back’ message but it is there. On a mobile it is in a ‘hamburger menu’.
SmartThings doesn’t do historical logging so the only way you see logging messages from device handlers and smartapps is have the ‘Live Logging’ tab open in a browser. I believe device handlers running locally in the hub might not write to the log but I may be misremembering something.
In the Classic app you can get at the ‘Virtual Device Creator’ SmartApp in the MarketPlace and that can create a Virtual Switch or a Virtual Dimmer Switch. That’s it though. I don’t know if the ‘new’ app can do any more than that as I’ve never seen it. I always use the IDE to create simulated/virtual devices regardless.
Once I’ve created new devices in the IDE I usually ‘Add a thing’ in the Classic app and that will discover the new devices even though they are already being listed as things in the app. At some stage in the past I found things worked better if I do this. I can’t remember what didn’t work quite right if I didn’t.
I wish I could but the IDE can’t be used to put the hub into pairing mode and add devices, or indeed be used for very many other things that ought to be possible via a browser. It is totally bonkers that SmartThings actually REQUIRES mobile apps to be usable. There is a web ‘app’ in development and I am hoping that might put some functionality where it should have been all along.
Since this thread is active, thought this would be an appropriate question:
Is there any documentation on the IDE to allow things like search, replace, auto-fill, etc? I find such a basic IDE limiting for Groovy coding with all the professional editors that available. Searching I have found nothing! And if not, is there another compatible IDE that people use?
I’ve only just discovered the editor keymap settings. I wish I’d known I could use it like ‘vi’ as I was once extremely fluent in that. It was getting on for two decades ago mind you. I’ve no idea what the ‘default’ keymap is apart from the cursor keys working and <Ctrl>F bringing up search.
The complete editor documentation seems to be:
The SmartThings web editor allows you to edit code, and provides syntax highlighting for easy code readability.
You can choose from a variety of themes, key maps, and font sizes to suit your preferences by clicking on the IDE Settings button above the editor frame.