Plugin request / questions

Python and python framework

Moderator: leecollings

Post Reply
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Plugin request / questions

Post by remb0 »

scale
daikin
miflora
presence detection..

the projects above are wonderful python project of members of this forum.
But very difficult to setup: everything in shell, you need writes,drivers, sh scripts, crontabs lots of prerequisites etc.

How difficult is this to (re)write it into the new framework?
and is this possible iwith all the prerequisites?
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Plugin request / questions

Post by Dnpwwo »

@remb0,

That's a fair question. It really depends on a few things:
  • How well the existing projects align to the framework design & constraints
  • The services and features it needs to operate
The key concepts of the framework are:
  • It is designed to map a single instance of a plugin to a single piece of external hardware that can be connected using either a Serial Port or TCP/IP. If you have more than one instance of the hardware, multiple instances of the same plugin can run.
  • A single plugin can map that external hardware to as many internal Domoticz 'devices' as it likes (up to 255 actually)
  • The framework should handle the connectivity and messages between Domoticz and the external hardware
I'm not familiar the projects you referred to but I moved two Python scripts that I used to use in a couple of hours each: Denon AVR amplifier and a RAVEn energy monitor. I also created a plugin for a DLink switch in about a day of effort for someone who exposed their switch to me over the internet. All of them are in the examples folder under plugins (https://github.com/domoticz/domoticz/tr ... s/examples).

If people are interested in moving something they already have I would suggest they create a new topic in this form and post what they have so that people who have played with the framework already can provide some feedback
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Re: Plugin request / questions

Post by blauwebuis »

@remb0

It might be a better idea to have other software that bridges those devices to MQTT. Then they can work with any home automation that supports MQTT. Standards FTW!

An example is the recently developed script that bridges RFLink to MQTT.
https://github.com/Phileep/rflink-to-mqtt

So in this case it might be good to have a Python-to-MQTT library, instead of a Python-to-domoticz plugin construction?

I did a quick search, and found a MiFlora-to-MQTT script for example:
https://github.com/marcelrv/miflora
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest