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.

Search found 13 matches

by Peter M
Fri Jul 12, 2019 1:23 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

Yes your code certainly helped. It pointed me to sockets for communication, whereas the help I was getting on the AVS Demopad thread was all about using urllib which doesn't appear to be able to do what I wanted. It's incredible what you can find freely available with a quick Google search. Once I ...
by Peter M
Thu Jul 11, 2019 12:29 pm
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

Final code -

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('192.168.0.56', 17494)) # connect to board
try:
s.sendall(b'\x24') # request status
f = s.recv(1024) # get feedback
except:
pass # ignore all exceptions
finally:
s.close() # disconnect from board
fbin ...
by Peter M
Thu Jul 11, 2019 10:27 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

I'm in Sydney - UTC+10

Very pleased to report that this is giving me the board status feedback I'm after -

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('192.168.0.56', 17494)) # connect to board
f = 'empty' # initialise feedback
try:
s.sendall(b'\x24') # request ...
by Peter M
Wed Jul 10, 2019 10:30 pm
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

No worries. I very much appreciate your help and there's no hurry.

Our time zone difference makes it a slow process !

Cheers,
Peter
by Peter M
Wed Jul 10, 2019 7:40 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

Trying to close the app window gave this log -

Traceback (most recent call last) (1722):
File "2", line 245, in on_close
File "2", line 56, in logout
File "<string>", line 1, in shutdown
error: [Errno 10057] A request to send or receive data was disallowed because the socket is not connected and ...
by Peter M
Wed Jul 10, 2019 7:38 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

Running the code and clicking on four separate buttons gave this log -

Socket Connection problem
Socket Connection problem
Socket Connection problem
Socket Connection problem
Socket Connection problem
None
Socket Connection problem
Socket Connection problem
Socket Connection problem
Socket ...
by Peter M
Mon Jul 08, 2019 10:33 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

I then commented out lines 2 and 164.

This time it ran and the application window opened. Clicking on a relay button gave this -

Traceback (most recent call last) (1722):
File "12", line 173, in on_relay_1
File "12", line 23, in fset
File "12", line 141, in send
AttributeError: 'NoneType ...
by Peter M
Mon Jul 08, 2019 10:28 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

I've copied and pasted the code. The board is configured to not require a password so I've commented out that line, but obviously there's more to be done as this is the resulting log -

Traceback (most recent call last):
Python script "10", line 258, in <module>
eg.globals.frame = Frame()
Python ...
by Peter M
Mon Jul 08, 2019 5:41 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board


ok so here is a code snippit you can paste into a python script and run.

You need to change the IP_ADDRESS variable to have the ip address of the relay board
If you have your device set up to use a password then you will need to change PASSWORD to be the password you are using

once you run the ...
by Peter M
Mon Jul 08, 2019 5:25 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board


I am going to hit you with the solution that you already stated... now don't smack your head to hard when i tell you this.


Data match just looks for a string match in the feedback and performs actions without extracting anything.


you have 8 relays. and 2 possible states.. ON and OFF. so that ...
by Peter M
Mon Jul 08, 2019 2:30 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

One thing I can see being really useful with the demopad would be htpc control. Because the demopad is touchscreen based you could use the demopad as a touchpad to control mouse movements on an htpc. This would be really useful.

I've not tried this but Demopad does allow X,Y tracking on buttons ...
by Peter M
Mon Jul 08, 2019 2:17 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

Re: IP controlled relay board

Demopad has three components -

1. A designer program which runs under Windows and is used to create the control system which is downloaded to -
2. An app that runs under iOS.
3. Hardware controllers (optional) which add functionality such as global variables for systems which include multiple ...
by Peter M
Sun Jul 07, 2019 6:44 am
Forum: General Support
Topic: IP controlled relay board
Replies: 21
Views: 2641

IP controlled relay board

Hi,

I'm quite new to EG and know no python at all. The last real coding I did was in Fortran under Unix on the first gen of Sun Sparcstations in the late 80's !! :shock:

I'm using Demopad to control a home theatre system and EG runs under Win10 on an Intel NUC. It's mainly used to control JRiver ...