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.
i am not new to eventghost but i am new to scripting with python . The last days i worked hard on my home-automation and i am now at the point, where i want to get my call monitor (janrufmonitor) involved. I am now able the get this data sent to EG as payload: "MSN / Callername / Callernumer / time / date". But now i reached the end of my skills, because i have no idea how to parse the payload to assign each information to its own variable.
Therefore i really hope for your help.
Best regards,
Alex
PS: Sorry for my bad english skills - it is not my native language
s = eg.event.payload
res = s[0].split(',')
msn = res[0].split('/')[0]
name = res[1].strip()
phone = res[2].split('/')[1].strip()
date = res[2].split('/')[2]
time = res[2].split('/')[3]
thank you for your help, but obviously i am to stupid, to bring your explaination into my script. Can you help me please ?
I want to get rid off the [] and " u' " and the " ' " at the end.