EASYDAQ Plugin with NET16PRM

Posted on
Wed Apr 29, 2020 4:01 pm
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

EASYDAQ Plugin with NET16PRM

Hi,

My first time with non z-wave hardware and I am struggling to find the right answers.

I have NET16PRM linked with plugin. The board is visible, and I now it is working from a little test python script.

BUT; ... as soon as I set up the board in the plug in it seems to start collecting a random set of relay on and off values; it floods the log file with constant stream of entries and once it has "gone" I can't stop it either by disabling the plug in or by deleting the device ... or even by unplugging the power to the board. It just keeps generating what seems like a random stream of data.

Been banging my head all day on this one and I just can't see what I am doing wrong.

Help gratefully received.

Thanks

Chris
Last edited by ChiefMonk on Thu Apr 30, 2020 3:53 am, edited 2 times in total.

Posted on
Wed Apr 29, 2020 4:13 pm
matt (support) offline
Site Admin
User avatar
Posts: 21055
Joined: Jan 27, 2003
Location: Texas

Re: Plugin with NET16PRM

So the python script is just for testing and not related to Indigo or Indigo's plugin?

Copy/paste what you are seeing in the Event Log into a reply for us when the flooding starts.

Image

Posted on
Thu Apr 30, 2020 2:46 am
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASTDAQ Plugin with NET16PRM

Yes the python script was just a little bit that Easydaq have on their site for testing, completely outside Indigo.

So starting from scratch, rebooted and left everything to settle down over night.
went to .....

Enabled Plugin
New Device

EasyDAQ relay card
NET16PRM

network socket
socket://192.168.10.150:10001

.... as soon as I press save the bottom left of screen starts flying around with input data and the log starts going crazy with this


EasyDAQ Relay Card received "new device 1 - IO 11" update to on
EasyDAQ Relay Card received "new device 1 - IO 12" update to on
EasyDAQ Relay Card received "new device 1 - IO 14" update to on
EasyDAQ Relay Card received "new device 1 - IO 17" update to off
EasyDAQ Relay Card received "new device 1 - IO 19" update to off
EasyDAQ Relay Card received "new device 1 - IO 21" update to off
EasyDAQ Relay Card received "new device 1 - IO 24" update to off
EasyDAQ Relay Card received "new device 1 - Relay 2" update to off
EasyDAQ Relay Card received "new device 1 - Relay 4" update to off
EasyDAQ Relay Card received "new device 1 - Relay 5" update to off
EasyDAQ Relay Card received "new device 1 - Relay 8" update to off
EasyDAQ Relay Card received "new device 1 - IO 9" update to on
EasyDAQ Relay Card received "new device 1 - IO 10" update to on
EasyDAQ Relay Card received "new device 1 - IO 13" update to on
EasyDAQ Relay Card received "new device 1 - IO 15" update to on
EasyDAQ Relay Card received "new device 1 - IO 16" update to on
EasyDAQ Relay Card received "new device 1 - IO 18" update to off
EasyDAQ Relay Card received "new device 1 - IO 20" update to off
EasyDAQ Relay Card received "new device 1 - IO 21" update to on
EasyDAQ Relay Card received "new device 1 - IO 24" update to on
EasyDAQ Relay Card received "new device 1 - Relay 6" update to off
EasyDAQ Relay Card received "new device 1 - Relay 7" update to off
EasyDAQ Relay Card received "new device 1 - IO 18" update to on
EasyDAQ Relay Card received "new device 1 - IO 20" update to on
EasyDAQ Relay Card received "new device 1 - Relay 3" update to on
EasyDAQ Relay Card received "new device 1 - Relay 4" update to on
EasyDAQ Relay Card received "new device 1 - Relay 6" update to on
EasyDAQ Relay Card received "new device 1 - IO 9" update to off
EasyDAQ Relay Card received "new device 1 - IO 11" update to off
EasyDAQ Relay Card received "new device 1 - IO 13" update to off
EasyDAQ Relay Card received "new device 1 - IO 16" update to off
EasyDAQ Relay Card received "new device 1 - IO 18" update to off
EasyDAQ Relay Card received "new device 1 - IO 20" update to off
EasyDAQ Relay Card received "new device 1 - IO 21" update to off
EasyDAQ Relay Card received "new device 1 - IO 24" update to off
EasyDAQ Relay Card received "new device 1 - Relay 1" update to on
EasyDAQ Relay Card received "new device 1 - Relay 2" update to on
EasyDAQ Relay Card received "new device 1 - Relay 5" update to on
EasyDAQ Relay Card received "new device 1 - Relay 7" update to on
EasyDAQ Relay Card received "new device 1 - Relay 8" update to on
EasyDAQ Relay Card received "new device 1 - IO 10" update to off
EasyDAQ Relay Card received "new device 1 - IO 12" update to off
EasyDAQ Relay Card received "new device 1 - IO 13" update to on
EasyDAQ Relay Card received "new device 1 - IO 16" update to on
EasyDAQ Relay Card received "new device 1 - IO 10" update to on
EasyDAQ Relay Card received "new device 1 - IO 12" update to on
EasyDAQ Relay Card received "new device 1 - IO 19" update to on
EasyDAQ Relay Card received "new device 1 - IO 20" update to on
EasyDAQ Relay Card received "new device 1 - IO 23" update to off
EasyDAQ Relay Card received "new device 1 - Relay 1" update to off
EasyDAQ Relay Card received "new device 1 - Relay 3" update to off
EasyDAQ Relay Card received "new device 1 - Relay 5" update to off
EasyDAQ Relay Card received "new device 1 - Relay 8" update to off
EasyDAQ Relay Card received "new device 1 - IO 10" update to off
EasyDAQ Relay Card received "new device 1 - IO 12" update to off
EasyDAQ Relay Card received "new device 1 - IO 13" update to off
EasyDAQ Relay Card received "new device 1 - IO 16" update to off
EasyDAQ Relay Card received "new device 1 - IO 17" update to on
EasyDAQ Relay Card received "new device 1 - IO 18" update to on
EasyDAQ Relay Card received "new device 1 - IO 21" update to on
EasyDAQ Relay Card received "new device 1 - IO 23" update to on
EasyDAQ Relay Card received "new device 1 - IO 24" update to on
EasyDAQ Relay Card received "new device 1 - Relay 2" update to off
EasyDAQ Relay Card received "new device 1 - Relay 4" update to off
EasyDAQ Relay Card received "new device 1 - Relay 5" update to on
EasyDAQ Relay Card received "new device 1 - Relay 8" update to on
EasyDAQ Relay Card received "new device 1 - IO 14" update to off
EasyDAQ Relay Card received "new device 1 - IO 15" update to off
EasyDAQ Relay Card received "new device 1 - Relay 2" update to on
EasyDAQ Relay Card received "new device 1 - Relay 4" update to on
EasyDAQ Relay Card received "new device 1 - IO 11" update to on
EasyDAQ Relay Card received "new device 1 - IO 12" update to on
EasyDAQ Relay Card received "new device 1 - IO 14" update to on
EasyDAQ Relay Card received "new device 1 - IO 17" update to off
EasyDAQ Relay Card received "new device 1 - IO 19" update to off
EasyDAQ Relay Card received "new device 1 - IO 21" update to off
EasyDAQ Relay Card received "new device 1 - IO 24" update to off
EasyDAQ Relay Card received "new device 1 - Relay 2" update to off
EasyDAQ Relay Card received "new device 1 - Relay 4" update to off
EasyDAQ Relay Card received "new device 1 - Relay 5" update to off
EasyDAQ Relay Card received "new device 1 - Relay 8" update to off
EasyDAQ Relay Card received "new device 1 - IO 9" update to on
EasyDAQ Relay Card received "new device 1 - IO 10" update to on
EasyDAQ Relay Card received "new device 1 - IO 13" update to on
EasyDAQ Relay Card received "new device 1 - IO 15" update to on
EasyDAQ Relay Card received "new device 1 - IO 16" update to on
EasyDAQ Relay Card received "new device 1 - IO 18" update to off
EasyDAQ Relay Card received "new device 1 - IO 20" update to off
EasyDAQ Relay Card received "new device 1 - IO 21" update to on
EasyDAQ Relay Card received "new device 1 - IO 24" update to on
EasyDAQ Relay Card received "new device 1 - Relay 6" update to off
EasyDAQ Relay Card received "new device 1 - Relay 7" update to off
EasyDAQ Relay Card received "new device 1 - IO 18" update to on
EasyDAQ Relay Card received "new device 1 - IO 20" update to on
EasyDAQ Relay Card received "new device 1 - Relay 3" update to on
EasyDAQ Relay Card received "new device 1 - Relay 4" update to on
EasyDAQ Relay Card received "new device 1 - Relay 6" update to on
EasyDAQ Relay Card received "new device 1 - IO 9" update to off
EasyDAQ Relay Card received "new device 1 - IO 11" update to off
EasyDAQ Relay Card received "new device 1 - IO 13" update to off
EasyDAQ Relay Card received "new device 1 - IO 16" update to off


Thanks


Chris

Posted on
Thu Apr 30, 2020 2:49 am
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASTDAQ Plugin with NET16PRM

..... and so I have deleted the device, and disabled the plugin.

the bottom left of the screen is still constantly showing as input still coming from EasyDAQ and this is what is in the log

EasyDAQ Relay Card received "new device 1 - IO 11" update to off
EasyDAQ Relay Card received "new device 1 - IO 13" update to off
EasyDAQ Relay Card received "new device 1 - IO 16" update to off
EasyDAQ Relay Card received "new device 1 - IO 18" update to off
EasyDAQ Relay Card received "new device 1 - IO 20" update to off
EasyDAQ Relay Card received "new device 1 - IO 21" update to off
EasyDAQ Relay Card received "new device 1 - IO 24" update to off
EasyDAQ Relay Card closed connection to device "new device 1"
Disabling plugin "EasyDAQ Relay Card 2.0.3"
Stopping plugin "EasyDAQ Relay Card 2.0.3" (pid 745)
Stopped plugin "EasyDAQ Relay Card 2.0.3"

Cheers


PS - even 5 mins on this is what is on the screen - see attached screen shot
Attachments
Screenshot 2020-04-30 at 09.50.32.png
Screenshot 2020-04-30 at 09.50.32.png (487.94 KiB) Viewed 2946 times

Posted on
Fri May 01, 2020 3:41 am
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASYDAQ Plugin with NET16PRM

Todays Update;-

I have reinstalled everything, including Indigo. with no change.

I did go on to set up an EasyDAQ mirror device for relay 1, and it is showing that it is constantly flicking from on to off consistent with the data stream and the log file.

BUT, if I click on the on or off buttons for that device, you can hear the relay clicking, so the basic connectivity and communication is there, but it seems to be picking up spurious data from somewhere else as the relays are not actually clicking on and off all the time, it is just the plugin creating that data.


Hope That helps


Chris

Posted on
Sat May 02, 2020 2:54 pm
matt (support) offline
Site Admin
User avatar
Posts: 21055
Joined: Jan 27, 2003
Location: Texas

Re: EASYDAQ Plugin with NET16PRM

Hi Chris,

Download and install this beta version of the EasyDAQ Plugin by double-clicking it twice (once to unzip, another time to install it). Then inside the Device settings dialog for your NET16PRM you'll see a new checkbox you can enable to Disable Channel Status Polling. That will prevent Indigo from trying to poll out the relay and input states from the module, which will at least get the relays working probably.

Can you copy/paste the python script you used with it? I'm wondering if it tries to poll out the relay and input states or not. We've had problems with some of the EasyDAQ modules just returning random bytes like what you are seeing, so it may not be supported.

Image

Posted on
Sun May 03, 2020 6:08 am
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASYDAQ Plugin with NET16PRM

Brilliant, Thanks --

I will get to your action plan later today, but you might be interested to know that .....

I have left it all just running for a couple of days, and the constant log overload and stream of updates has just gone away, I have changed absolutely nothing, and this system has virtually nothing in it as I am just starting from scratch with a new config for the house that we are building.

So on the mirror device, it does seem to be working, and then something strange is happening with the polling as you suspect. you can see below that using relay 1, it sends out the change and I can hear it activate, but then it randomly decides to change back a few seconds later and both the logs and the main divice and the mirror device all get updated.

Also, I think I have observed that ... When you action a change of state from the mirror device, although the relay clicks, the status of the mirror device does not update until the polling data comes back. I haven't done this enough to be certain, but I am pretty sure.

3 May 2020 at 12:58:41
EasyDAQ Relay Card sending "new device 2 - Relay 1" off
EasyDAQ Relay Card received "new device 2 - IO 9" update to on
EasyDAQ Relay Card received "new device 2 - IO 10" update to on
EasyDAQ Relay Card received "new device 2 - IO 11" update to on
EasyDAQ Relay Card received "new device 2 - IO 12" update to on
EasyDAQ Relay Card received "new device 2 - IO 13" update to on
EasyDAQ Relay Card received "new device 2 - IO 16" update to on
EasyDAQ Relay Card received "new device 2 - IO 17" update to off
EasyDAQ Relay Card received "new device 2 - IO 20" update to on
EasyDAQ Relay Card received "new device 2 - IO 21" update to on
EasyDAQ Relay Card received "new device 2 - IO 24" update to on
EasyDAQ Relay Card received "new device 2 - Relay 1" update to off. ******* this is when the mirror device actually changed status
EasyDAQ Relay Card received "new device 2 - Relay 2" update to off
EasyDAQ Relay Card received "new device 2 - Relay 4" update to off
EasyDAQ Relay Card received "new device 2 - Relay 8" update to off
EasyDAQ Relay Card received "new device 2 - IO 11" update to off
EasyDAQ Relay Card received "new device 2 - IO 12" update to off
EasyDAQ Relay Card received "new device 2 - IO 13" update to off
EasyDAQ Relay Card received "new device 2 - IO 16" update to off
EasyDAQ Relay Card received "new device 2 - IO 17" update to on
EasyDAQ Relay Card received "new device 2 - IO 21" update to off

3 May 2020 at 12:59:07
EasyDAQ Relay Card received "new device 2 - IO 9" update to off
EasyDAQ Relay Card received "new device 2 - IO 10" update to off
EasyDAQ Relay Card received "new device 2 - IO 20" update to off
EasyDAQ Relay Card received "new device 2 - IO 24" update to off
EasyDAQ Relay Card received "new device 2 - Relay 1" update to on. ******* and then ????????
EasyDAQ Relay Card received "new device 2 - Relay 2" update to on
EasyDAQ Relay Card received "new device 2 - Relay 4" update to on
EasyDAQ Relay Card received "new device 2 - Relay 8" update to on



Thanks again for your help

Chris

Posted on
Sun May 03, 2020 12:05 pm
matt (support) offline
Site Admin
User avatar
Posts: 21055
Joined: Jan 27, 2003
Location: Texas

Re: EASYDAQ Plugin with NET16PRM

Yes, when polling is enabled Indigo doesn't update its device states until the new value is received. If polling is disabled then Indigo updates its device states immediately (and never polls out anything).

Image

Posted on
Sun May 03, 2020 2:06 pm
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASYDAQ Plugin with NET16PRM

copy - Thx

C

Posted on
Mon May 04, 2020 5:16 am
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASYDAQ Plugin with NET16PRM

Hi Matt,

Sorry to be the bearer of bad tidings, but still some strange things going on and now I cant get the plugin to work at all. Here is how the story goes:-

1) loaded new plugin and it started running exactly same as before, as you would expect. Tried to go and use the new config option to stop polling, but there is no config option on the plugin menu, and if you go to the manage plugins screen, the configure button is greyed out. Consequently nothing changed and no way to change it.

2) so when I had this problem before (not being able to access the config option), I had to delete the entire plugin, and then when you load to an empty system you get the configuration option to set up the address and to configure the board.

3) So ... I
- deleted all the devices (main one and the one mirror I have)
- stopped Indigo
- deleted the plugin files (logs, plugin & perfs)
- restarted indigo to get ready to load new plugin

***** -- BUT the data was still pouring in, bottom left of the screen was still incessantly updating with the comms traffic " AC Relay System 1 - Relay x updated to ??"


4) So ... I
- stoped Indigo and rebooted computer
- started up Indigo to check that the system was clean for a new install, and found that the devices that I had previously deleted were still there.
- deleted the devices again (main device & one mirror)
- shutdown and restarted Indigo again ....

Finally I have a clean system (as best as I can tell)

5) So full of optimism :) I reloaded the updated plugin that you sent me,
- but the config screen does not come up when the plugin loads
- there is still no config option on the plugin menu, and the configure button is still greyed out on the manage plugins.


My feeble conclusion,
- there is something wrong in the UI as the configuration options are not accessible
- there are some buffers somewhere deep in the system that are getting overloaded and that persist even after Indigo is shut down, and to which it reconnects when it is restarted.
- somehow deleted devices that are linked to these comms modules are not actually deleted if there is still coms going on (they do reappear in red tagged plugin disabled)

Hope that helps ..... let me know if there is any other info I can get for you

Thanks again for you time

Cheers

Chris

Posted on
Mon May 04, 2020 6:59 am
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASYDAQ Plugin with NET16PRM

PS - you earlier asked about the python test routine I had earlier used, please see below. I got it from the EasyDaq website.

C

Code: Select all
# This short Python V2 demonstration program remotely controls a NET16PRMx board
# using TCP/IP and the normal EasyDaq command set, demostrating input and output.

import socket    # used for TCP/IP communication
import time      # used for display
import random    # generate pseudo-random numbers
import sys       # display of data read back from the board.
import signal    # intercept SIGINT (Ctrl-C) to end demo.
import sys

# Define the IP address of the NET16.
TCP_IP = '192.168.10.150' # Set this to the IP address of your NET16
TCP_PORT = 10001 # Do not change this - it is pre-defined in the Lantronix XPort module.
BUFFER_SIZE = 1 # How many bytes to read back from board

# Introduction
print ("\nEasyDaq TCP/IP demonstration of the NET16 board")
print ("(Hit Ctrl-c to end)\n")
time.sleep(1)

# Open TCP/IP socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))

# Define a signal handler to catch when the user quits using Ctrl-C and then tidy up
def signal_handler(signal, frame):
 print('\n\n\n      *** Thank you for trying the EasyDaq NET16 *** \nFor further information please visit http://www.easydaq.co.uk\n')
 MESSAGE = '\x43\x00' # PIC port B to off
 s.send(MESSAGE)
 time.sleep(0.1)
 MESSAGE = '\x46\x00' # PIC port C to off
 s.send(MESSAGE)
 time.sleep(0.1)
 s.close()
 sys.exit(0)

signal.signal(signal.SIGINT, signal_handler) # Register the signal handler

# Configure the NET16 ports for input/output
MESSAGE = '\x42\x00\x45\x00\x48\xFF' # Set PIC port B,C to O/P, PIC port D to I/P
s.send(MESSAGE)
time.sleep(0.100) # Allow the board to settle.

# Send random numbers to RLY1 to RLY16, whilst reading from PIC port D and displaying value

while True:
 MESSAGE = '\x43'+chr(random.randint(0,255)); # Set PIC port B to a pseudo-random number
 s.send(MESSAGE);
 time.sleep(0.100);
 MESSAGE = '\x46'+chr(random.randint(0,255)); # Set PIC port C to a pseudo-random number
 s.send(MESSAGE);
 time.sleep(0.100);

 MESSAGE = '\x47\x00\x0D\x0A' # Set PIC Read port D;
 s.send(MESSAGE);
 sys.stdout.write("\r"+ time.ctime() + ":  " + format(ord(s.recv(BUFFER_SIZE)),'b').zfill(8));
 sys.stdout.flush()

# START OF CODE THAT I AM MESSAING ABOUT WITH
#print(random.randint(0,255));
#MESSAGE = '\x43'+chr(random.randint(0,255));
#s.send(MESSAGE);
#time.sleep(0.100);

#MESSAGE = '\x47\x00\x0D\x0A' # Set PIC Read port D;
#s.send(MESSAGE);
#sys.stdout.write("\r"+ time.ctime() + ":  " + format(ord(s.recv(BUFFER_SIZE)),'b').zfill(8));
#sys.stdout.flush()



# Tidy up...
MESSAGE = '\x43\x00' # PIC port B to off
s.send(MESSAGE)
time.sleep(0.1)
MESSAGE = '\x46\x00' # PIC port C to off
s.send(MESSAGE)
time.sleep(0.1)

s.close()
sys.exit(0)

Posted on
Mon May 04, 2020 11:16 am
matt (support) offline
Site Admin
User avatar
Posts: 21055
Joined: Jan 27, 2003
Location: Texas

Re: EASYDAQ Plugin with NET16PRM

ChiefMonk wrote:
but there is no config option on the plugin menu, and if you go to the manage plugins screen, the configure button is greyed out.

I don't believe this plugin has ever had plugin configuration UI / dialog. The option I added was to the device settings dialog:

Matt wrote:
Then inside the Device settings dialog for your NET16PRM you'll see a new checkbox you can enable to Disable Channel Status Polling.

Image

Posted on
Mon May 04, 2020 1:03 pm
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASYDAQ Plugin with NET16PRM

Sorry - must have been a previous life!

Working great thanks

Chris

Posted on
Tue May 05, 2020 4:56 am
ChiefMonk offline
Posts: 24
Joined: Nov 28, 2014

Re: EASYDAQ Plugin with NET16PRM

Hi Matt,

2 Things, first Thank you again for working on this for me.

Secondly (hopefully finally) I just cant make sense of the manual on how to command the plugin from a script. I dont seem to be able to figure out what the 'channelSel' parameter should be set to. I have tried every combination I can think of, but my tiny brain has crashed again ...

Cheers

Chris

Posted on
Wed May 06, 2020 4:39 pm
matt (support) offline
Site Admin
User avatar
Posts: 21055
Joined: Jan 27, 2003
Location: Texas

Re: EASYDAQ Plugin with NET16PRM

The best way to do it would be to create new EasyDAQ devices of type EasyDAQ Relay Output Mirror for every output you want to control. They basically control/mirror the output on the main device. You can then send those the generic Turn On/Off commands (and you can control them more easily from Indigo's UI and from Indigo Touch).

Image

Who is online

Users browsing this forum: No registered users and 1 guest