SmartThings Community

FAQ: When a community created device type is changed,do I have to manually update it myself?


(dino) #1

Hello everyone, forgive me if this is covered, my search skills may be lacking. I’m an ST noob but been in IT for quite a while so not completely hopeless.

I have some questions about updating code for community made device/apps. I am slightly confused with the changes and updates and how to apply them. When someone updates the code for a device, I manually copy/paste and publish. I see some posts saying that people need to remove then add device for code to work and others do not. My question is what is the easiest way to stay updated on code changes for devices and apps? Does it have to be manually done or can you publish automatically from the developers changes? Thanks in advance.


[RELEASE] Iris Smart Plug (3210-L) Zigbee Plug with Z-wave Repeater
#2

That’s a great question!

I think there are two situations, one where the device will have to be re-configured in order to use the new code, and one where it doesn’t.

I think you still have to do the manual cut-and-paste yourself, though, both cases. It’s just a question of whether you also have to remove the device from the network and re-pair it in order to force a configure as well.

But I may be wrong.

@Sticks18 or @tgauchat or @garyd9 or one of the other master coders who do a lot with device types should know. :sunglasses:


(Chrisb) #3

I’d love to know the answer on this as well.

I suspect that anything that isn’t officially a published SmartApp or DeviceType would need to be manually updated, but I’m not sure if even published app/types update automatically. It would be nice to get to the point where, like on Google Play Store (and presumably the AppStore for iOS) that you can go to one area and tap to update any published apps/types that need to be updated.


(Mike Maxwell) #4

With custom device types the end user needs to replace the current device code with the updated code in the IDE, then save and publish for me, that’s all that needs to be done.
Well that’s all I’ve needed to do for device types that I’ve developed.
The app will then use the new device code the next time the device is activated or in anyway interacted with.


(Brice; SmartRulesApp.com) #5

Yes, I believe @JDRoberts is right. For unofficial device types, you will definitely have to re-copy and paste the code into your account and republish. Then, some devices that perform special tasks during initialization may need to be re-configured. Official devices should get updates automatically but may still need to be reconfigured in some cases.


(Scott G) #6

I concur that new code just needs to be copied and published for me to start working. If new settings/device features are added you may need to re-configure, but not just for new commands or UI designs.

Note: It is possible to utilize the GitHub integration to quickly update code from connected repositories including custom user repositories if their GitHub structure conforms to the ST structure.

SmartApps are a bit different. When updating SmartApp code, you will want/need to open each SmartApp instance and press Done to re-initialize the SmartApp. This is particularly true if the updated code pertains to subscriptions or schedules.


(dino) #7

Thanks everyone for the responses. Sounds pretty much as I figured but I wanted to be sure. Some devs put “change log” remarks in their code and some do not. Either way once you get quite a few devices it’s difficult to keep up. Thanks again everyone.


(Chrisb) #8

I would like to know if this is different for officially published apps through. For example @geko’s SmartAlarm or @obycode’s ObyThing Music app… if they make changes to their apps, do those get automatically updated if you have them installed? Obviously in this case the end user isn’t added the code as a personal smart app, so can’t copy and paste new code, then open/close the app to make it use the new code.


(Brice; SmartRulesApp.com) #9

Yes, if an update is pushed to an officially published app or device, then that new code will be live for all users. The problem though is when the change includes something new that needs to happen at installation/configuration time. If that is the case, then some additional step (such as editing the SmartApp options, or re-installing the device) may need to be taken.


(Geko) #10

Are you sure about that? As fas I know, If I make changes to my local instance of the SmartApp, it does not affect other users who installed it from the Marketplace. You can’t just “push” your changes to SmartThings repo either. You could send a pull request, but it’s up to them to merge it.


(Brice; SmartRulesApp.com) #11

Oh, yes, I agree. When I said “if an update is pushed…” I meant when an update is officially pushed by SmartThings after the update has been resubmitted, not just by the developer publishing a new version locally.


(Jason "The Enabler" as deemed so by @Smart) #12

I’m not real sure about this, but I can throw this out there…

Someone told me, and I can’t remember who, but battery operated devices must be excluded and repaired for the new device type to take affect.

I can say for certain this is the case for the iris contact sensors.

I changed the code for the sensor in my freezer, excluded and reinstalled the sensor and it is running of the new code. All of my other sensors are still running off of the original.


(Scott G) #13

Depends on what changed in the code. If you are just switching the main tile from contact status to temp reporting, no reset necessary.

In general, most of these battery operated devices are considered security devices and need particular commands during the join process, which is why a reset/re-pair may be needed (at least for Zigbee based sensors).

Also, battery operated devices are much more likely to be sleepy and need to be woken up to receive new hardware settings such as reporting intervals - which also tend to be part of the configure() section - and sometimes the only way to guarantee they are awake is to reset/re-pair.


(Jason "The Enabler" as deemed so by @Smart) #14

Yeah! What he said! ! ! ! And stuff!


(Chuck) #15

Is there an official install process for the new Iris Contact sensors with ST? How do I add them to ST?
Thank you!
Chuck


(Scott G) #16

Check out this thread:

There’s a custom devicetype for them in the 2nd post. You’ll want to get that installed in the IDE prior to pairing them with ST.

If you need help getting the custom code loaded, check out this FAQ: