Domoticz

Got a good idea? You can suggest new features here.
kalinkamaen
Experienced User
Posts: 133
Joined: Wed Dec 26, 2012 9:23 am

Domoticz

Post by kalinkamaen » Sun Feb 15, 2015 2:52 pm

Why isnt there any plugin for domoticz? Is it to difficult to do? I am just curious, i do not got the skillz my self.

Regards Kali

krambriw
Plugin Developer
Posts: 2569
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Domoticz

Post by krambriw » Sun Feb 15, 2015 7:24 pm

Why isnt there any plugin for domoticz? Is it to difficult to do?
My thoughts are that it is not because it is too difficult, simply there is no market for it. Domoticz is for HomeAutomation purpose and serves most likely many functions itself. Some overlap with EG can be seen, with dedicated plugins you can get almost the same functionality. Only reason to create a plugin to bind Domoticz tighter with EG would be some important use cases why both are needed (and dedicated plugin maker willing to spend time for free?). So far I have not seen those criteria fulfilled

Besides, if you are interested to try, the solution is really close and available for event exchange; I say no more than MQTT that is supported by both EG and Domoticz
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons

kalinkamaen
Experienced User
Posts: 133
Joined: Wed Dec 26, 2012 9:23 am

Re: Domoticz

Post by kalinkamaen » Sun Feb 15, 2015 11:10 pm

Thank you very much for your answear. The reason why I asked is because I was so suprised that there was no plugin at all.
I just bought my self a RFXcom 433mhz unit, and have started playing with domoticz. Coming from tellstick using
switchking,where I used the EG plugin allot. I am really amazed how good domoticz really are, but my own lack of programming/scripting
abillity makes me a little bit locked using Domoticz compared to Switchking combined with EG, where I was able to connect my sonos
player to my Nexa switch and etc.

Should I look for another software then domoticz, that will make it easier for me to integrate sonos,Usb uirt and etc? I really do not want to go back to tellstick now.

Any way, I will start reading a little bit about this MQTT thing and see if I can understand how it works!

Thank you

eddiex666
Posts: 41
Joined: Fri Sep 12, 2014 10:34 pm

Re: Domoticz

Post by eddiex666 » Sun Feb 22, 2015 12:04 pm

I would really like to send data/events/traps from domoticz to eventghost, (or maybe vize verca)...

Tips?

My eventghost is the best solution ever... but it need alot of pogramming/scripting...
Switchking its nice, it has an app and its easy to setup devices and units...I dont like the conditions rules on SK.

I just testet Domoticz and it looks great to "get" info from your devices... easy and good.
I havent testet scenarios and conditions...

WoLpH
Experienced User
Posts: 96
Joined: Mon Dec 10, 2012 3:57 am

Re: Domoticz

Post by WoLpH » Sat Aug 08, 2015 3:34 pm

Well, I don't really have a plugin for it but I do use eventghost to control my Domoticz installation.

It's fairly trivial to do.
In the following examples you will have to configure HOST, PORT and IDX.

To turn a light off :

Code: Select all

import urllib;urllib.urlopen('http://HOST:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=Off')
To turn a light on:

Code: Select all

import urllib;urllib.urlopen('http://HOST:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=On')
Perhaps I will create a plugin for it if the demand is there but it's fairly easy to do basic things without :)
Author of the book Mastering Python. Got Python questions? Perhaps I can help :)

kalinkamaen
Experienced User
Posts: 133
Joined: Wed Dec 26, 2012 9:23 am

Re: Domoticz

Post by kalinkamaen » Wed Oct 21, 2015 12:41 pm

I love both Domoticz and Eventghost. They are both really good softwares.
Its a shame that there is no plugins for this. I know that most of you guys do not
need a plugin, because you can send signals through scripting or XPL. But not
all of us is giftet enough to do so ;) hehe. Yeah i know :)

This is my workaround for now. Its working pretty good, but I know its not the
most reliable method!

http://www.domoticz.com/forum/viewtopic.php?f=4&t=8519

Regards Kali

krambriw
Plugin Developer
Posts: 2569
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Domoticz

Post by krambriw » Wed Oct 21, 2015 2:36 pm

Yes, it is maybe not optimized but hopefully someone with Domoticz will find it challenging...

Anyway, a maybe better way (still work-around) could be to have two RFXtrx's, one for Domoticz and one for EventGhost (using the RFXtrx plugin). Then you do not have to learn any devices, just enable the protocols in the RFXtrx and you will see events right away (also the RFXtrx has support for many more protocols)
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons

kalinkamaen
Experienced User
Posts: 133
Joined: Wed Dec 26, 2012 9:23 am

Re: Domoticz

Post by kalinkamaen » Wed Oct 21, 2015 4:40 pm

Yes I do agree with you. I just used the parts I had to make it happen.

Hopefully some one have the time to do it. I am happy to do a donation to help out.
I wish I had ths skillz :)

kalinkamaen
Experienced User
Posts: 133
Joined: Wed Dec 26, 2012 9:23 am

Re: Domoticz

Post by kalinkamaen » Wed Sep 07, 2016 8:06 am

WoLpH wrote:Well, I don't really have a plugin for it but I do use eventghost to control my Domoticz installation.

It's fairly trivial to do.
In the following examples you will have to configure HOST, PORT and IDX.

To turn a light off :

Code: Select all

import urllib;urllib.urlopen('http://HOST:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=Off')
To turn a light on:

Code: Select all

import urllib;urllib.urlopen('http://HOST:PORT/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=On')
Perhaps I will create a plugin for it if the demand is there but it's fairly easy to do basic things without :)

Where do i put in this text? get an error when using it as an python command.

User avatar
kgschlosser
Site Admin
Posts: 2889
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Domoticz

Post by kgschlosser » Wed Sep 07, 2016 1:57 pm

i will make this a little easier for ya

in the code below you need to change the 4 variables at the beginning of the script

HOST, This is the IP Address of the Domoticz installation Replace the information between the quotes.
PORT, The port number of the Domoticz installation
DEVICE_NUMBER, I am assuming this is supposed to be a number, but this would be the Identifier of the light
LIGHTS_ON, If this is set to True it will turn the lights on, if this is set to False it will turn the lights off

copy and paste this code into a python script
for turning a light on and off

Code: Select all

HOST = "192.168.1.21"
PORT = 80
DEVICE_NUMBER = 10
LIGHTS_ON = True

import urllib2
from urllib2 import HTTPError, URLError

ERROR_REASON = (
    "We failed to reach a server.\n"
    "Reason: %s"
)

ERROR_CODE = (
    "The server couldn't fulfill the request.\n"
    "Error code: %d"
)


if LIGHTS_ON:
    LIGHTS = 'On'
else:
    LIGHTS = 'Off'
URL = "http://%s:%d/json.htm?type=command&param=switchlight&idx=%s&switchcmd=%s" % (HOST, PORT, str(DEVICE_NUMBER), LIGHTS)

try:
    urllib2.urlopen(URL)
except HTTPError as httpError:
    eg.PrintError(ERROR_REASON % httpError.reason)
    eg.PrintError(ERROR_CODE % httpError.code)
except URLError as urlError:
    eg.PrintError(ERROR_REASON % urlError.reason)
If you like the work I have been doing then feel free to Image

kalinkamaen
Experienced User
Posts: 133
Joined: Wed Dec 26, 2012 9:23 am

Re: Domoticz

Post by kalinkamaen » Thu Sep 08, 2016 9:37 pm

This works really well. Thank you very much :)

User avatar
kgschlosser
Site Admin
Posts: 2889
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Domoticz

Post by kgschlosser » Fri Sep 09, 2016 2:12 am

kalinkamaen wrote:This works really well. Thank you very much :)

You're welcome. If there is anything else don't hesitate to ask.

K
If you like the work I have been doing then feel free to Image

kalinkamaen
Experienced User
Posts: 133
Joined: Wed Dec 26, 2012 9:23 am

Re: Domoticz

Post by kalinkamaen » Sat Sep 10, 2016 8:07 am

Thank you.
Just a quick question. Is there a way to make switch in domoticz
To send a command into EG with a script similar to what you did here?

WoLpH
Experienced User
Posts: 96
Joined: Mon Dec 10, 2012 3:57 am

Re: Domoticz

Post by WoLpH » Sun Oct 02, 2016 8:33 pm

I've just added a domoticz plugin for eventghost :)

viewtopic.php?f=9&t=9105
Author of the book Mastering Python. Got Python questions? Perhaps I can help :)

User avatar
kgschlosser
Site Admin
Posts: 2889
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Domoticz

Post by kgschlosser » Mon Oct 03, 2016 5:05 am

I have not taken a look at the plugin WoLpH created. i do not know if he set up a polling loop to get status updates to trigger events if something changes or happens.

I do not own a Domotics don't even know what it is, i assume it's a lighting controller of sorts, but it does have some sort of API so chances are there is a command to get current variable states from the thing. so the loop would make the connection and read the states, and then ask for new states every so many milliseconds or seconds, whatever time period is best. then it would compare the data. the new vs the old. and if there is something different in the new to parse the new data and trigger an event based off of it.

i did the exact same thing with a MiCasaVerde Vera lighting controller.
If you like the work I have been doing then feel free to Image

Post Reply