Migrating from SmartThings to Hubitat, best practices?

Is this a port of something from SmartThings? If so, a link to the original or some functional minimal example might help.

Off the top of my head, it looks like you're trying to retrieve a device (really com.hubitat.app.DeviceWrapper or possibly ChildDeviceWrapper) object from state. On Hubitat, you can't store a reference to an object in state, but I'm pretty sure it works the same way in SmartThings, so I'm not sure why that would work there, either. Or I could be misinterpreting something in your snippet. If not, you'll have to find another way to get a reference to the device object, say by doing a find() with some known piece (like Hubitat device ID) on a setting (from a user input) or getChildDevices() or however you either selected or created these devices in the first place.

Yes this is a port from SmartThings. Here is a link to the original app.

Yeah, it looks like they are indeed trying to store a device in state. I don't think this worked on SmartThings, but it definitely doesn't work on Hubitat. You'd need to look at why they're doing that and how it could be worked around. I see there are also HTTP calls. On Hubitat, I'd recommend doing these as async calls instead (technically supported or at least in beta on SmartThings) unless you have a good reason not to, though either way would work. But these two things together might make this a bit more effort than your average port, so probably not a good place to start if you don't know Groovy and ST or Hubitat. :slight_smile: I could definitely attempt to throw something together, but I don't have these devices and would not be useful for testing. I'd see if there are any existing community (or native) integrations that might do what you want first.

Thanks

If you through something together, I could run your code on my system and post the debub log here.

Thanks,
Frederic

Any further luck? Note my fork of the Shwark Smartthings repo has a lot more information and documentation, and supports the vane control GitHub - jeabraham/smartthings-hunterdouglasplatinum: Hunter Douglas Platinum Gateway Integration with SmartThings Hub