Announcement

Collapse
No announcement yet.

Updated and consistant SDK with examples

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updated and consistant SDK with examples

    Does it exist an updated and consistant SDK for HomeSeer? Im not trying to be rude, just constructive, but I dont feel HomeSeer does a good job of making the SDK look clear and consistant.

    It might be because of the SDK, but things like making a web UI thing seem over complicated with calls lift and right, having to build so many small things it seems like a hazzle.

    Why no make it more simple with for example on call to make a device, one call to make a link, one call to make a website, instead of having to join 30 lines just to make a device?

    I started with an overlayAPI to (in my mind make it easier to create devices, but its a very personal approach using OO methods to expand a class.

    For example to create a device with buttons (dropdown would be addDropdown etc), more ped fields, addPED and so on, where in the background it setup relationship, check if exists, recreate if deleted and so on, so all the code needed is what you see there

    Code:
     
      Device OperationalModeDevice = new Device(HS, RootDevice)             {                 Name = "Operational mode",                 Unique = (string)device.DeviceID              }             .addPED("DeviceId", device.DeviceID)             .addPED("Type", "OperationMode")             .CheckAndCreate((double)device.Device.OperationMode)                     .AddButton(1, "Heat", $"images/HomeSeer/contemporary/Heat.png")                     .AddButton(2, "Dry", $"images/HomeSeer/contemporary/water.gif")                     .AddButton(3, "Cool", $"images/HomeSeer/contemporary/Cool.png")                     .AddButton(7, "Fan", $"images/HomeSeer/contemporary/fan-on.png")                     .AddButton(8, "Auto", $"images/HomeSeer/contemporary/auto-mode.png");
Working...
X