[SOLVED}: Error messages - failed to read state for channel

Posted on
Mon May 30, 2016 1:12 pm
dcjackson offline
Posts: 12
Joined: May 29, 2016

[SOLVED}: Error messages - failed to read state for channel

I just connected/installed an EasyDAQ USBDIO24 card, and get voluminous error messages as per below.

How can I fix/workaround this?

Thanks

Code: Select all
 EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 17 to 24

May 30, 2016, 12:02:38 PM
  EasyDAQ Relay Card              received "dio - IO 17" update to on
  EasyDAQ Relay Card              received "dio - IO 19" update to on
  EasyDAQ Relay Card              received "dio - IO 22" update to off
  EasyDAQ Relay Card              received "dio - IO 23" update to off
  EasyDAQ Relay Card              received "dio - IO 24" update to off
  EasyDAQ Relay Card              received "dio - IO 1" update to on
  EasyDAQ Relay Card              received "dio - IO 3" update to on
  EasyDAQ Relay Card              received "dio - IO 6" update to off
  EasyDAQ Relay Card              received "dio - IO 7" update to off
  EasyDAQ Relay Card              received "dio - IO 8" update to off
  EasyDAQ Relay Card              received "dio - IO 9" update to on
  EasyDAQ Relay Card              received "dio - IO 11" update to on
  EasyDAQ Relay Card              received "dio - IO 14" update to off
  EasyDAQ Relay Card              received "dio - IO 15" update to off
  EasyDAQ Relay Card              received "dio - IO 16" update to off
  EasyDAQ Relay Card              received "dio - IO 17" update to off
  EasyDAQ Relay Card              received "dio - IO 18" update to on
  EasyDAQ Relay Card              received "dio - IO 19" update to off
  EasyDAQ Relay Card              received "dio - IO 21" update to off
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card              received "dio - IO 17" update to on
  EasyDAQ Relay Card              received "dio - IO 18" update to off
  EasyDAQ Relay Card              received "dio - IO 19" update to on
  EasyDAQ Relay Card              received "dio - IO 21" update to on
  EasyDAQ Relay Card              received "dio - IO 1" update to off
  EasyDAQ Relay Card              received "dio - IO 2" update to on
  EasyDAQ Relay Card              received "dio - IO 3" update to off
  EasyDAQ Relay Card              received "dio - IO 5" update to off
  EasyDAQ Relay Card              received "dio - IO 1" update to on
  EasyDAQ Relay Card              received "dio - IO 2" update to off
  EasyDAQ Relay Card              received "dio - IO 3" update to on
  EasyDAQ Relay Card              received "dio - IO 5" update to on
  Error                           resending previous command (busy or unexpected command)
  EasyDAQ Relay Card              received "dio - IO 1" update to off
  EasyDAQ Relay Card              received "dio - IO 2" update to on
  EasyDAQ Relay Card              received "dio - IO 3" update to off
  EasyDAQ Relay Card              received "dio - IO 5" update to off
  EasyDAQ Relay Card              received "dio - IO 1" update to on
  EasyDAQ Relay Card              received "dio - IO 2" update to off
  EasyDAQ Relay Card              received "dio - IO 3" update to on
  EasyDAQ Relay Card              received "dio - IO 5" update to on
  EasyDAQ Relay Card              received "dio - IO 1" update to off
  EasyDAQ Relay Card              received "dio - IO 2" update to on
  EasyDAQ Relay Card              received "dio - IO 3" update to off
  EasyDAQ Relay Card              received "dio - IO 5" update to off
  Error                           resending previous command (busy or unexpected command)
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 17 to 24
  EasyDAQ Relay Card              received "dio - IO 1" update to on
  EasyDAQ Relay Card              received "dio - IO 2" update to off
  EasyDAQ Relay Card              received "dio - IO 3" update to on
  EasyDAQ Relay Card              received "dio - IO 5" update to on
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 17 to 24
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 17 to 24
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 17 to 24
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card              received "dio - IO 1" update to off
  EasyDAQ Relay Card              received "dio - IO 2" update to on
  EasyDAQ Relay Card              received "dio - IO 3" update to off
  EasyDAQ Relay Card              received "dio - IO 5" update to off
  EasyDAQ Relay Card              received "dio - IO 1" update to on
  EasyDAQ Relay Card              received "dio - IO 2" update to off
  EasyDAQ Relay Card              received "dio - IO 3" update to on
  EasyDAQ Relay Card              received "dio - IO 5" update to on
  EasyDAQ Relay Card              received "dio - IO 1" update to off
  EasyDAQ Relay Card              received "dio - IO 2" update to on
  EasyDAQ Relay Card              received "dio - IO 3" update to off
  EasyDAQ Relay Card              received "dio - IO 5" update to off
  EasyDAQ Relay Card              received "dio - IO 1" update to on
  EasyDAQ Relay Card              received "dio - IO 2" update to off
  EasyDAQ Relay Card              received "dio - IO 3" update to on
  EasyDAQ Relay Card              received "dio - IO 5" update to on
  EasyDAQ Relay Card              received "dio - IO 1" update to off
  EasyDAQ Relay Card              received "dio - IO 2" update to on
  EasyDAQ Relay Card              received "dio - IO 3" update to off
  EasyDAQ Relay Card              received "dio - IO 5" update to off
  Error                           resending previous command (busy or unexpected command)
  EasyDAQ Relay Card              received "dio - IO 9" update to off
  EasyDAQ Relay Card              received "dio - IO 10" update to on
  EasyDAQ Relay Card              received "dio - IO 13" update to off
  EasyDAQ Relay Card              received "dio - IO 1" update to on
  EasyDAQ Relay Card              received "dio - IO 2" update to off
  EasyDAQ Relay Card              received "dio - IO 3" update to on
  EasyDAQ Relay Card              received "dio - IO 5" update to on
  EasyDAQ Relay Card              received "dio - IO 9" update to on
  EasyDAQ Relay Card              received "dio - IO 10" update to off
  EasyDAQ Relay Card              received "dio - IO 13" update to on
  Error                           resending previous command (failure response)
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 1 to 8
  EasyDAQ Relay Card Error        failed to read state from device "dio" for channel indices 9 to 16

Posted on
Mon May 30, 2016 3:43 pm
dcjackson offline
Posts: 12
Joined: May 29, 2016

Re: Error messages - failed to read state for channel indice

Nevermind.

Apparently the problem was that somehow the VCP driver did not offer me the choice of an alternate device for the EasyDAQ, so it was on the same port as the Insteon PLM. That caused no end of problems. After some easydaq plugin disables, reboots, and moving the USB cable to the EasyDAQ to another USB port on the Mac, I was able to re-enable the EasyDAQ, got a choice of devices, selected the one that was NOT my Insteon PLM, and things are MUCH better now.

Sorry for the noise on this forum.

Posted on
Mon Dec 26, 2016 4:12 pm
Alain offline
Posts: 88
Joined: Apr 19, 2008

Re: [SOLVED}: Error messages - failed to read state for chan

I am starting to see this behaviour for the first time. All was working fine. i unplugged the card to add a few outputs, and now I am seeing this. Trying to enable/disable/reboot/change USB ports/do only the Insteon PLM then add the card, still not getting success.

Any systematic way of assigning the correct usb-serial port to the EasyDaQ card?

What about re-installing the drivers?

Thanks
Alain

edit - being more specific - I'm on a Mac Mini (recent) using Sierra.
the Daq card being used is the EasyDaq USB16PRMxN
If I reboot, and have only the Insteon PLM plugged in, I see its USB-serial virtual com part identifier.
When I plug in and enable the plugin for the EasyDaq I see a new identifier, but when I select it (under configuration of the card), I get these errors in the Log


Here is what the log shows me:

Enabling plugin "EasyDAQ Relay Card 2.0.2"
Starting plugin "EasyDAQ Relay Card 2.0.2" (pid 848)
Started plugin "EasyDAQ Relay Card 2.0.2"
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 9 to 16
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 17 to 24
EasyDAQ Relay Card Error failed to read state from device "Sprinkler" for channel indices 1 to 8

Posted on
Tue Dec 27, 2016 5:00 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: [SOLVED}: Error messages - failed to read state for chan

Did the problem start after upgrading to Sierra, or did it work for a while and stop working recently? If it is the former then it sounds like a Sierra/USB compatibility problem with the EasyDAQ. If it is the latter, then it sounds like the EasyDAQ may have malfunctioned.

Note I am using an EasyDAQ card with Indigo 7 without any problems. However, that Mac is not running Sierra and the EasyDAQ card is a different model (I have the USB4PRMx).

Image

Posted on
Wed Dec 28, 2016 10:34 am
Alain offline
Posts: 88
Joined: Apr 19, 2008

Re: [SOLVED}: Error messages - failed to read state for chan

Thanks for your reply.

I have upgraded to Sierra but it was working fine for a while.

Update: I have it working again. But to get it working, I have to do a crazy little dance: I reboot the Mini, with only the Daq board connected to a USB port (nothing else can be plugged in), and on a different port from the last time it was plugged in. Once the computer is up and running, I can then plug in my Insteon PLM and Z-stick. then all works OK. If I reboot, all is OK. But if I ever do anything out of the ordinary, I need to do this little dance to get things working again (and standing on one foot while I do it seems to help!).

I don't know if this is normal behaviour, but I have not had to worry about this before.

If anyone thinks this is a sign of something that needs to be dealt with, pleas let me know.

Thank you
Alain

Posted on
Wed Mar 06, 2024 8:45 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: [SOLVED}: Error messages - failed to read state for chan

Problem is definitely [NOT SOLVED].

I realize this is an extremely old thread, but the problem is current. I'm in the process of replacing a USB16PRMxN board that's been in production for 10 years due to some input errors. I purchased the exact same board as a replacement and am now getting bombarded by "failed to read state from device" errors. They're literally coming in about once a second and the errors are occurring on channel indices 1-8, 9-16 and 17-24. The original board did not have these errors whatsoever.

I'm in the process of working with EasyDAQ and may end up with a network version of the same board if we can't get to the bottom of things. EasyDAQ is not familiar with Indigo whatsoever, so that's not helping.

As for the environment, I'm testing the new board on a brand new Mac Mini M2 with the latest MacOS and version 2023.02 of Indigo. I really need to get this upgraded system into production for a client, but these errors are preventing me from doing so.

On a related note (and possibly the cause of my errors), it appears that there are no current versions of the FTDI VCP driver. I'm not even sure it's required as I had the board up and working prior to installing the beta version that I found through the link in the documentation. Are there other sources for current drivers?

Any insight into what's causing this would be greatly appreciated. I can't afford to play the "swap USB ports" game as this is not a personal system.

Posted on
Thu Mar 07, 2024 7:16 am
Alain offline
Posts: 88
Joined: Apr 19, 2008

Re: [SOLVED}: Error messages - failed to read state for chan

Since I switched to the network version the DAQ board has been working flawlessly, it's extremely reliable.

Posted on
Thu Mar 07, 2024 1:37 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: [SOLVED}: Error messages - failed to read state for chan

Alain wrote:
Since I switched to the network version the DAQ board has been working flawlessly, it's extremely reliable.


Before I start jumping through hoops to get the network-based card (which EasyDAQ is willingly facilitating), are you saying you also experienced the "failed to read state from device" errors and that switching to the network version solved the problem? EasyDAQ can get me the network card in a few days once I pull the trigger, but I want to make sure I'm not chasing my tail.

Thanks.

Posted on
Thu Mar 07, 2024 1:58 pm
Alain offline
Posts: 88
Joined: Apr 19, 2008

Re: [SOLVED}: Error messages - failed to read state for chan

Before I switched to the networked cards, I was constantly playing the game of switching USB ports, unplugging and replugging after a reboot just for the Mac to recognize the card, etc. It's not supposed to be that way, but I was always wasting energy doing that.

I also love the fact that the DAQ card can be anywhere on my LAN and it does not have to be physically wired directly to the Mac.

It runs my sprinkler system, it detects when someone rings the doorbell, it does a bunch of odd jobs, and it has been running great for at least 5 years now.

Posted on
Thu Mar 07, 2024 3:22 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: [SOLVED}: Error messages - failed to read state for chan

Alain wrote:
Before I switched to the networked cards, I was constantly playing the game of switching USB ports, unplugging and replugging after a reboot just for the Mac to recognize the card, etc. It's not supposed to be that way, but I was always wasting energy doing that.

I also love the fact that the DAQ card can be anywhere on my LAN and it does not have to be physically wired directly to the Mac.

It runs my sprinkler system, it detects when someone rings the doorbell, it does a bunch of odd jobs, and it has been running great for at least 5 years now.

Great... that's the kind of feedback I was hoping for. Not that this is an excuse for the USB card not working properly, but I at least have a solution. I'm going to have EasyDAQ swap my USB board for a network one.

Thanks.

Posted on
Thu Mar 07, 2024 4:13 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: [SOLVED}: Error messages - failed to read state for chan

Given that Indigo Domotics supplies, updates and maintains this plugin, I'm really hoping that someone there chimes in on this issue. Given what I'm going through, I'm perfectly willing to donate my time with them to get things working... it beats shipping and swapping boards with a supplier based in England.

In talking to EasyDAQ, the guy there, Nigel, says they've got the Indigo software and an old Mac to test it on, but they just don't have time to do the necessary testing. Always tough when two or more parties are involved in a working solution.

Posted on
Thu Mar 07, 2024 5:03 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: [SOLVED}: Error messages - failed to read state for chan

Out of curiosity, I examined the plugin code. Right at the top of easydaq.py there's this:

Code: Select all
# If this value is too short, then the hardware may miss consecutive commands (it
# has no buffering) which will totally break the communication (0.005 fails).
# Additionally, the shorter the value the higher CPU usage because the inputs
# require polling. On the flip side, if this duration is too large then momentariy
# input changes (changes that last less than this duration) may be missed. 11
# millisecs seems like a good balance.
SLEEP_BETWEEN_COMM = 0.011

# Extra sleep time used between polling values only used when the output queue
# is empty. This increases the latency between detecting input changes (and
# slighly increases the odds we will miss a very fast input toggle bounce),
# but it decreases the CPU usage per communication thread. The value can safely
# be lowered to 0 if CPU usage isn't a concern.
SLEEP_BETWEEN_IDLE_POLLS = 0.050

I tried changing SLEEP_BETWEEN_COMM to 0.020 and SLEEP_BETWEEN_IDLE_POLLS to 0.100. This resulted in no issues whatsoever, so I know it's a timing issue on polling values.

I'm going to try lowering these down until I start generating errors and then back it off. Something to consider.

Posted on
Thu Mar 07, 2024 5:25 pm
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: [SOLVED}: Error messages - failed to read state for chan

I've settled on 20 milliseconds for SLEEP_BETWEEN_COMM (vs. 11 default) and left the SLEEP_BETWEEN_IDLE_POLLS at 0.050 (50 milliseconds) at its default value. All good now and zero errors generated.

I personally feel that 20 milliseconds is an acceptable default value for what the vast majority of users are doing. I suggest that this value become a part of the plugin configuration.

Posted on
Thu Mar 07, 2024 5:44 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: [SOLVED}: Error messages - failed to read state for chan

Great find, Blaine. I'm glad changing that value removes the communication errors.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests