Hi,
I'm new to Eventghost and at the moment I'm just using it to make use of my RFXtrx because there is no other compelling solution out there.
I'd like to pass all events that occur in EG over xPL to my network. Because I'm using Girder for the most of my automation and at the moment I've set up a manual xPL string for each and every event that should be forwarded to GIrder. But when I now want to add more sensors that fire to my RFXtrx I'd have to add more events manually.
And I thought there might be a better solution for this?
Thanks
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Pass All Events to XPL
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Pass All Events to XPL
Hello,
Welcome to EventGhost,
As you wrote, if you are looking for a specialized solution like the one you are describing, this is the way you normally would do it. One of the beauties is that you normally can do it, without software development, by pure configuration.
However, the configuration effort might grow and it becomes rather heavy. In those situations, you would create a small plugin that would take away the problem.
So in your specific case, just for my understanding, you are using the RFXtrx plugin and the xPL plugin?
You would like to map all received RFXtrx messages and just push them to your xPL network?
You might have an interest also to trigger some RFXtrx transmissions based on some xPL messages?
BestR Walter
Welcome to EventGhost,
As you wrote, if you are looking for a specialized solution like the one you are describing, this is the way you normally would do it. One of the beauties is that you normally can do it, without software development, by pure configuration.
However, the configuration effort might grow and it becomes rather heavy. In those situations, you would create a small plugin that would take away the problem.
So in your specific case, just for my understanding, you are using the RFXtrx plugin and the xPL plugin?
You would like to map all received RFXtrx messages and just push them to your xPL network?
You might have an interest also to trigger some RFXtrx transmissions based on some xPL messages?
BestR Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Pass All Events to XPL
Hi,
yes it's exatly what you're saying.
EG just has RFXtrx and XPL as active plugins. And at the moment the RFXtrx device is just receiving signals from motion sensors etc. and I just want to forward this as is to XPL.
At the moment the RFXtrx is not meant be act as a transmitter so for now it's not necessary to go from XPL to RFXtrx but that's for now
Thank you for your help
yes it's exatly what you're saying.
EG just has RFXtrx and XPL as active plugins. And at the moment the RFXtrx device is just receiving signals from motion sensors etc. and I just want to forward this as is to XPL.
At the moment the RFXtrx is not meant be act as a transmitter so for now it's not necessary to go from XPL to RFXtrx but that's for now
Thank you for your help
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Pass All Events to XPL
Well, I can't and will not promise anything, it is a rather large work to add proper xPL support to the RFXtrx plugin. Each received event has to be decoded and coded again into correct corresponding xPL messages. As example, one single event from an Oregon temp and humidity sensor would result in 3 new xPL messages.
Earlier I heard that the author of the xPLRFX software was working on a new version for RFXtrx that should support xPL. If this is still ongoing is unknown to me.
RFXCOM have a special firmware supporting xPL for one of their other products, the RFXLAN. If something similar will be developed also for RFXtrx is not known to me.
BestR Walter
Earlier I heard that the author of the xPLRFX software was working on a new version for RFXtrx that should support xPL. If this is still ongoing is unknown to me.
RFXCOM have a special firmware supporting xPL for one of their other products, the RFXLAN. If something similar will be developed also for RFXtrx is not known to me.
BestR Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Pass All Events to XPL
Actually, I made some stuff for you that you can experiment with.
Below you see 3 python scripts, one for xPL 'sensor.basic' messages, one for 'x10.basic' messages and one for 'ac.basic' messages.
From the pictures you can see that I created 3 separate macros, one for each script. Then I dragged the corresponding events from the log to the related macro as they happened.
It works actually very nice. On another PC in the network where I have installed the xPLHub and DCM, I see the events dropping in.
I do not know exactly what type of sensors and devices you have but it is rather easy to create additional macros with dedicated python scripts to match other types. I suppose you will get the idea after playing with this for a while
Kind regards, Walter
Script for xPL sensor.basic messages
Script for xPL ac.basic messages
Script for xPL x10.basic messages
The definition of the 3 macros with the events and python scripts
The final result showing xPL messages from the network
Below you see 3 python scripts, one for xPL 'sensor.basic' messages, one for 'x10.basic' messages and one for 'ac.basic' messages.
From the pictures you can see that I created 3 separate macros, one for each script. Then I dragged the corresponding events from the log to the related macro as they happened.
It works actually very nice. On another PC in the network where I have installed the xPLHub and DCM, I see the events dropping in.
I do not know exactly what type of sensors and devices you have but it is rather easy to create additional macros with dedicated python scripts to match other types. I suppose you will get the idea after playing with this for a while
Kind regards, Walter
Script for xPL sensor.basic messages
Code: Select all
#script for xPL sensor.basic messages
p = str(eg.event.suffix)
p = p.split(":")
q = str(eg.event.payload)
q = q.split(" ")
id = p[2].split(' ')[1]
td=''
hd=''
cd=''
sd=''
bd=''
try:
td = q[2] #temperature
except:
pass
try:
hd = q[6] #humidity
except:
pass
try:
cd = q[9] #comfort
except:
pass
try:
sd = q[11] #signal
except:
pass
try:
bd = q[13] #battery
except:
pass
if td <> '':
msg = 'device='+id+'\n'+'type=temp'+'\n'+'current='+td+'\n'+'units=c'
eg.plugins.xPL.sendxPL(u'xpl-trig', u'sensor.basic', u'*', msg)
if hd <> '':
msg = 'device='+id+'\n'+'type=humidity'+'\n'+'current='+hd+'\n'+'description='+cd
eg.plugins.xPL.sendxPL(u'xpl-trig', u'sensor.basic', u'*', msg)
if bd <> '':
msg = 'device='+id+'\n'+'type=battery'+'\n'+'current='+str(int(bd)*10)
eg.plugins.xPL.sendxPL(u'xpl-trig', u'sensor.basic', u'*', msg)
Code: Select all
#script for xPL ac.basic messages
p = str(eg.event.suffix)
p = p.split(":")
ad=''
ud=''
cd=''
try:
ad = p[2].split(' ')[1] #address
except:
pass
try:
ud = p[3].split(' ')[1] #unit
except:
pass
try:
cd = p[4].split(' ')[1] #command
except:
pass
if ad <> '' and ud <> '' and cd <> '':
msg = 'address='+ad+'\n'+'unit='+ud+'\n'+'command='+cd
eg.plugins.xPL.sendxPL(u'xpl-trig', u'ac.basic', u'*', msg)
Code: Select all
#script for xPL x10.basic messages
p = str(eg.event.suffix)
p = p.split(":")
hd=''
ud=''
cd=''
try:
hd = p[2].split(' ')[1] #house
except:
pass
try:
ud = p[3].split(' ')[1] #unit
except:
pass
try:
cd = p[4].split(' ')[1] #command
except:
pass
if hd <> '' and ud <> '' and cd <> '':
msg = 'device='+hd+ud+'\n'+'command='+cd
eg.plugins.xPL.sendxPL(u'xpl-trig', u'x10.basic', u'*', msg)
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Pass All Events to XPL
Thank you very much!
works like it should. Although my MS90 sensors transmit more " " (blank space) than necessary but I've figured that out.
But I had to experience that Girder doesn't accept Payloads when using a non-script tree macro with events which makes me going back to start because of GIrder.
But thank you very much for your support!
works like it should. Although my MS90 sensors transmit more " " (blank space) than necessary but I've figured that out.
But I had to experience that Girder doesn't accept Payloads when using a non-script tree macro with events which makes me going back to start because of GIrder.
But thank you very much for your support!
Re: Pass All Events to XPL
Hi
I've modified the code a little bit. Now the Command and the ID are forwarded in the first part. This may not match the conventions of xPL but it works for me...
After I manually added the event '*' in EG to this script I get all events broadcasted over xPL without adding them all manually and as I don't have other events in EG than the ones from my sensors I'm super
now!
I've modified the code a little bit. Now the Command and the ID are forwarded in the first part. This may not match the conventions of xPL but it works for me...
After I manually added the event '*' in EG to this script I get all events broadcasted over xPL without adding them all manually and as I don't have other events in EG than the ones from my sensors I'm super
Code: Select all
#script for xPL X10.security messages
p = str(eg.event.suffix)
p = p.split(":")
q = str(eg.event.payload)
q = q.split(":")
id = p[2].split(" status")[0]
cd=u''
sd=u''
bd=u''
try:
cd = p[3] #command
except:
pass
try:
sd = q[2].split(' ')[1] #signal
except:
pass
try:
bd = q[1].split(' ')[1] #battery
except:
pass
if cd <> '' and sd <> '' and bd <> '':
msg = 'command='+cd+'\n'+'device='+id+'\n'+'type=sensor'+'\n'+'battery='+bd+'\n'+'signal='+sd+'\n'
eg.plugins.xPL.sendxPL(cd+id+u'xpl-trig', u'sensor.security', u'*',msg)
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Pass All Events to XPL
OK, good, as long as it works for you as proprietary solution, it would be fine but can of course not be used 'in common'.
Anyway, this demonstrates very well the power & flexibility of EventGhost itself.
Best regards, Walter
Anyway, this demonstrates very well the power & flexibility of EventGhost itself.
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM