Page 1 of 1

Writing hardware plugins (IHC Support)

Posted: Monday 20 June 2016 0:04
by jbjalling
Hi,

As I have posted in another thread, I'm currently working on a new hardware plugin - namely support for LK/Schneiders IHC system.
However I'm a little unsure what the best approach is.
My current approach is to implement it using the existing hardware classes and subclases like 'Lighting 2', 'Dimmer' and the like, with the limitations that they have. I have done most of the work, but I'm not sure if it's the right way to do it.

Another approach is to write a new hardware class, with subclases that match the actual features of the IHC devices (like a dimmer with 100 steps instead of 16). I think this is the "right" way to do it, but do people agree?
I can't really find any developer guidelines for the project anywhere. Is this because you don't want to encourage people to develop their own plugins for Domoticz or is it because there hasn't been any interest?

Thanks,

Jonas

Re: Writing hardware plugins (IHC Support)

Posted: Monday 20 June 2016 8:34
by gizmocuz
You can use the pTypeGeneral,pTypeGeneralSwitch that has 100 steps dim level
If the code is specific for this hardware, i would indeed create a hardware class.
There are many examples in domoticz, and one probably match your class already pretty close
The already existing hardware classes are so small (well... most of them), you do not need documentation

But you can read
https://www.domoticz.com/wiki/Developin ... are_plugin

and extend if you like

Re: Writing hardware plugins (IHC Support)

Posted: Monday 20 June 2016 10:16
by jbjalling
Excellent, thank you! I think the pTypeGeneral* types will suit my needs, so I'll use those as a first go :)

BR Jonas