RBoy
(www.rboyapps.com - Making SmartThings Easy!)
1
I would like to create a customized version of the default thermostat app. the existing app does not have a tile for battery status, I would like to include that.
Does anyone know how I can get the code for the existing thermostat app or use that as a base to create new one?
Go into the IDE and select the DeviceType tab. Create a new DeviceType giving it a name. After pressing the “Create” button, you should see a button above the simulator on right where you can see current DeviceTypes. Pick whatever device your CT100 is in ST and it will show you the code you can import into your code as a base.
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
5
Not DeviceType, but SmartApp. Anyways as @scottinpollock indicated above I may have to end up modifying the device and not the app here.
What @Sticks18 told you is correct and aligns with what @scottinpollock told you, which is also correct.
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
7
Okay now I’m a little lost here
I understand that one can use the IDE to create custom devices using templates as @Sticks18 pointed out but I’m looking at adding titles so I guess what you’re saying is that @scottinpollock is the correct answer for that right?
The tiles are generated by the Device Type settings. That’s not a SmartApp.
Mobile App = The SmartThings program you run on your SmartPhone
SmartApp = An applet that is installed using the Mobile App. These are used to perform functions like: “When I open this door, turn on this light and off that light.”
Device Type = the code that resides on the SmartThings IDE that controls how a device functions within the ST ecosystem. Think of it like drivers for devices on your computer. These control what the Mobile App (and the ST Cloud) thinks your device can do and what information should be displayed with this device in the Mobile App.
@scottinpollock told you that you need to create a customised Device Type handler (rather than a SmartApp) to add a tile to show the battery status. When you’re looking at a device in the SmartThings application, you’re looking at the interface to a device, not a SmartApp. That interface is implemented in a Device Type handler.
@Sticks18 told you how to create a customised Device Type handler based upon the existing Device Type handler code.
As an analogy - in Windows you have applications like Word and you have device drivers such as one that lets Windows (and applications) talk to your printer. Word doesn’t understand your printer, the device driver does.
When you go into Devices and Printers to manage your printer, it’s getting and setting information via the printer driver.
When you want to print from Word, the Word application is getting information about the printer and sending information to the printer via the printer driver.
If you wanted to manage details about how much toner is in your printer, that code would be in the printer driver, not in Word.
So - The toner level is your battery level, Word is a SmartApp and the printer driver is a Device Type handler.
I haven’t looked at your code, sorry (it’s 05:18 Sunday morning and I’m still trying to get to sleep, but I’m in no mood to code just now… :-/ )
However, some procedural questions before we start blaming the code:
Have you published your device handler for yourself ( “For me”) and
it succeeded?
Have you updated your devices to use your new Device Type handler
rather than the stock Device Type handler? (Changing the namespace
and name of the Device Type is the easiest way to keep track. In the
IDE, on the “Devices” page, the Device Type name will appear against
the device in the the “Type” column).
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
15
Wow you’re on a roll there buddy.
Yes I’ve been able to publish it. (didn’t see any error) and infact went one step ahead of refresh, removed the thermostat and repaired it and it detected it as my custom thermostat (different name) but still no custom tiles.