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.

Get value from an xPL event.

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
nilsme
Posts: 3
Joined: Sat Apr 21, 2012 1:30 pm

Get value from an xPL event.

Post by nilsme »

Hi There!
Can someone please help me to code a simple pyton-script to get a value from a xPL message an insert it into a action in eventghost.

I use eventghost to controll a tellstick that controlls my light. I have homeseer as my primary software, and homeseer sends messages to eventghost via xPL.
Very easy to set up with on/off devices, but i need a script that gets a dimvalue from a xPL message and dims the light i eventghost to that level.

A xPL message sendt from homeseer to eventghost when i dim looks like this (dim to 70%)

xPL.XPL-TRIG:{:mi4-homeseer.computer_1.P:*:,State=ON,Level=70/100,Name=Stue Globelys,Location=Stue,


So the script now needs to take the value 70 from this message and insert it into the action "Dim" on the tellstick-plugin in eventghost.


Can someone please help me?
mukow
Posts: 2
Joined: Fri Aug 17, 2012 12:01 am

Re: Get value from an xPL event.

Post by mukow »

Hi Nilsme,

You should be able to use this example from DogHouseLabs.

http://doghouselabs.blogspot.com.au/200 ... r_982.html
Post Reply