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
Writing hardware plugins (IHC Support)
Moderators: leecollings, remb0
- gizmocuz
- Posts: 2350
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: Writing hardware plugins (IHC Support)
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
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
Quality outlives Quantity!
-
- Posts: 19
- Joined: Tuesday 09 February 2016 23:19
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Writing hardware plugins (IHC Support)
Excellent, thank you! I think the pTypeGeneral* types will suit my needs, so I'll use those as a first go
BR Jonas
BR Jonas
Who is online
Users browsing this forum: Google [Bot] and 1 guest