Dreamscreen Python Automation

DreamScreenCommander-master.zip (5.9 KB)
Not sure if there are any Python developers in these forums. I would like to automation the turn on and off of my dreamscreen unit (LED around the border of the screen that react with video image). I have attached a Python script that apparently can do this but when i add my DS i.p address to the script as per the readme i get error
File “dreamscreen.py”, line 161
print “This has an error in your IP’s length”
and wondering if anyone might be able to help shed some light on why this might be occurring. Second area of question would be, can this procees be scripted to run in a vera Plus unit?

Appreciate any input you might be able to help with.

Hi Princess,

Looking at the script you either need to pass the ip address as a parameter or you enter it on line 22 in the script. It also seems to assume you include any leading zeros. I.e. use 192.168.001.001 and not 192.168.1.1.

Cheers Rene

Thanks Rene,
I have tried adding the i.p address in several variations, with and without the preceding zero’s and i keep getting the following error
File “dreamscreen.py”, line 161
print “This has an error in your IP’s length”
^
SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(“This has an error in your IP’s length”)?

:slight_smile:#####Edit these values as needed###############################################
#IP and group number here (see readme). Touch anything else at your own risk!
IP = “010.018.001.239” ##Put your IP address here
group = 0 ##Optional change only if you have group numbers assigned
#####End Editabe Values########################################################

Hi,
It seems there are a few things with the script. It works only on python 2, and it looks your system uses python 3. For the latter all print statements must be changed to print(“hello”), note the parentheses. E.g. line 161 should read:

print ("This has an error in your IP's length")

Second the test on line 155 is wrong, it should test for four tuples, not three. So try

if len(payload) == 4:

Success.

Bloody marvellous!
Looks like python version 2 did the trick.

Thanks again Reneboer!

Your mostly welcome, glad to hear it works.
Cheers Rene

© 2019 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy