I just got my C5 hub and am working on moving devices over from my ST hub. The first device I'm trying to move is a HomeSeer HS-FS100+
They have a ST Device Handler for it on the homeseer website at /support/HS200-ST/HS-FS100_DeviceHandler.txt
I could sit down and re-write it from scratch for Hubitat but I was wondering if there is a guide on the API differences from ST to make porting easier.
Lots of great info in this post about porting...
I thought I'd jot down a few of the driver porting changes I've encountered. Please add additional ones you find to this list.
Replace physicalgraph with hubitat
Replace variables beginning with data with device.data
Add to params calls that give a java error the following before headers:
requestContentType: "application/json",
Replace pause(int) with pauseExecution(long) (units are milliseconds)
include ‘asynchttp_v1’ is not supported - comment this out and replace affected code with syn…
For most apps, all that is needed is to replace physicalgraph with hubitat and see how it goes.
1 Like
Thanks! I missed that one in my searching.
What I normally do to start:
Remove:
a. capability "Health Check"
b. ping function
c. Tiles sections
d. Simulator sections
Check if it has BUTTON capability, as that has to be redone in hubitat (button functions work differently)
Replace physicalgraph with hubitat
Then see if it will save in Hubitat. If not, start working through the errors.
By the way, this driver will save in Hubitat with those mods. No idea if it works though, as I don't have this device.
3 Likes
That worked, got the handler saved and it appears to be reporting data correctly. Thanks!
For anyone interested in the future this is the set of changes I've made so far: Modify handler for Hubitat · edalquist/hubitat@15a8140 · GitHub
1 Like