The best plugin example is the FakePlugin, which do nothing realistic in the domotic world, but implements all the concepts of a Yadoms plugin :
For all concepts (serial or network communication for example), see other plugins.
Wiki: Plugin development