Controlling EasyDAQ via Python Question

Posted on
Tue Jul 11, 2017 11:20 am
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Controlling EasyDAQ via Python Question

From the scripting shell, I can see that the EasyDAQ description looks like what's at the bottom of this post. How do I go about turning a specific relay on and off via a Python script given this?

Thanks,
Blaine

Code: Select all
address : /dev/cu.usbserial-A50169OP
batteryLevel : None
buttonGroupCount : 0
configured : True
description : 8 channel relay + 8 relay or DIO card + 8 DIO  (240VAC @ 10A)
deviceTypeId : easyDaq16r8io
displayStateId : allChannels
displayStateImageSel : None
displayStateValRaw : 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1
displayStateValUi : 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 0
globalProps : MetaProps : (dict)
     com.perceptiveautomation.indigoplugin.easydaq-usb-relay-cards : (dict)
          channel01.label : Relay 1 - Main Cistern Pump to Day Tank (string)
          channel02.label : Relay 2 - First Flush Pump (string)
          channel03.label : Relay 3 - Day Tank Pump (string)
          channel04.label : Relay 4 - First Flush 3-Way Valve - Sediment Purge (string)
          channel05.label : Relay 5 - First Flush 3-Way Valve - Cistern Fill (string)
          channel06.label : Relay 6 - ET Water Rain Sensor Simulator (string)
          channel07.label : Relay 7 (string)
          channel08.label : Relay 8 - Computer Online Indicator (string)
          channel09.label : IO 9 - First Flush 3-Way Valve Sediment Purge Position (string)
          channel09.type : isInput (string)
          channel10.label : IO 10 - First Flush 3-Way Valve Cistern Fill Position (string)
          channel10.type : isInput (string)
          channel11.label : IO 11 - Day Tank Empty Float (string)
          channel11.type : isInput (string)
          channel12.label : IO 12 - Day Tank Full Float (string)
          channel12.type : isInput (string)
          channel13.label : IO 13 - Day Tank Pump Pressure Sense (string)
          channel13.type : isInput (string)
          channel14.label : IO 14 (string)
          channel14.type : isOutput (string)
          channel15.label : IO 15 (string)
          channel15.type : isOutput (string)
          channel16.label : IO 16 - Cistern Main Pump Pressure Sense (string)
          channel16.type : isInput (string)
          channel17.label : IO 17 - Cistern Empty Float (string)
          channel17.type : isInput (string)
          channel17to24label :  (string)
          channel18.label : IO 18 - Cistern 1/3 Full Float (string)
          channel18.type : isInput (string)
          channel19.label : IO 19 - Cistern 2/3 Full Float (string)
          channel19.type : isInput (string)
          channel1to8label :  (string)
          channel20.label : IO 20 - Cistern Full Float (string)
          channel20.type : isInput (string)
          channel21.label : IO 21 - First Flush Empty Float (string)
          channel21.type : isInput (string)
          channel22.label : IO 22 - First Flush 1/3 Full Float (string)
          channel22.type : isInput (string)
          channel23.label : IO 23 - First Flush 2/3 Full Float (string)
          channel23.type : isInput (string)
          channel24.label : IO 24 - First Flush Full Float (string)
          channel24.type : isInput (string)
          channel9to16label :  (string)
          devicePort_serialConnType : local (string)
          devicePort_serialPortLabel :  (string)
          devicePort_serialPortLocal : /dev/cu.usbserial-A50169OP (string)
          devicePort_serialPortNetRfc2217 : rfc2217:// (string)
          devicePort_serialPortNetSocket : socket:// (string)
          devicePort_uiAddress : /dev/cu.usbserial-A50169OP (string)
          sep2 :  (string)
          sep3 :  (string)
          sep4 :  (string)
id : 599215823
lastChanged : 2017-07-11 09:03:03
model : EasyDAQ USB16PRMxN / NET16PRMx (8 relays + 8 relays/DIO + 8 DIO channels)
name : USB16PRMxN - Rainwater Catchment Controller
ownerProps : com.perceptiveautomation.indigoplugin.easydaq-usb-relay-cards : (dict)
     channel01.label : Relay 1 - Main Cistern Pump to Day Tank (string)
     channel02.label : Relay 2 - First Flush Pump (string)
     channel03.label : Relay 3 - Day Tank Pump (string)
     channel04.label : Relay 4 - First Flush 3-Way Valve - Sediment Purge (string)
     channel05.label : Relay 5 - First Flush 3-Way Valve - Cistern Fill (string)
     channel06.label : Relay 6 - ET Water Rain Sensor Simulator (string)
     channel07.label : Relay 7 (string)
     channel08.label : Relay 8 - Computer Online Indicator (string)
     channel09.label : IO 9 - First Flush 3-Way Valve Sediment Purge Position (string)
     channel09.type : isInput (string)
     channel10.label : IO 10 - First Flush 3-Way Valve Cistern Fill Position (string)
     channel10.type : isInput (string)
     channel11.label : IO 11 - Day Tank Empty Float (string)
     channel11.type : isInput (string)
     channel12.label : IO 12 - Day Tank Full Float (string)
     channel12.type : isInput (string)
     channel13.label : IO 13 - Day Tank Pump Pressure Sense (string)
     channel13.type : isInput (string)
     channel14.label : IO 14 (string)
     channel14.type : isOutput (string)
     channel15.label : IO 15 (string)
     channel15.type : isOutput (string)
     channel16.label : IO 16 - Cistern Main Pump Pressure Sense (string)
     channel16.type : isInput (string)
     channel17.label : IO 17 - Cistern Empty Float (string)
     channel17.type : isInput (string)
     channel17to24label :  (string)
     channel18.label : IO 18 - Cistern 1/3 Full Float (string)
     channel18.type : isInput (string)
     channel19.label : IO 19 - Cistern 2/3 Full Float (string)
     channel19.type : isInput (string)
     channel1to8label :  (string)
     channel20.label : IO 20 - Cistern Full Float (string)
     channel20.type : isInput (string)
     channel21.label : IO 21 - First Flush Empty Float (string)
     channel21.type : isInput (string)
     channel22.label : IO 22 - First Flush 1/3 Full Float (string)
     channel22.type : isInput (string)
     channel23.label : IO 23 - First Flush 2/3 Full Float (string)
     channel23.type : isInput (string)
     channel24.label : IO 24 - First Flush Full Float (string)
     channel24.type : isInput (string)
     channel9to16label :  (string)
     devicePort_serialConnType : local (string)
     devicePort_serialPortLabel :  (string)
     devicePort_serialPortLocal : /dev/cu.usbserial-A50169OP (string)
     devicePort_serialPortNetRfc2217 : rfc2217:// (string)
     devicePort_serialPortNetSocket : socket:// (string)
     devicePort_uiAddress : /dev/cu.usbserial-A50169OP (string)
     sep2 :  (string)
     sep3 :  (string)
     sep4 :  (string)
pluginId : com.perceptiveautomation.indigoplugin.easydaq-usb-relay-cards
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
states : States : (dict)
     allChannels : 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1 (string)
     channel01 : on (on/off bool)
     channel02 : off (on/off bool)
     channel03 : off (on/off bool)
     channel04 : off (on/off bool)
     channel05 : off (on/off bool)
     channel06 : off (on/off bool)
     channel07 : off (on/off bool)
     channel08 : on (on/off bool)
     channel09 : off (on/off bool)
     channel10 : on (on/off bool)
     channel11 : off (on/off bool)
     channel12 : off (on/off bool)
     channel13 : off (on/off bool)
     channel14 : off (on/off bool)
     channel15 : off (on/off bool)
     channel16 : on (on/off bool)
     channel17 : on (on/off bool)
     channel18 : on (on/off bool)
     channel19 : on (on/off bool)
     channel20 : off (on/off bool)
     channel21 : on (on/off bool)
     channel22 : on (on/off bool)
     channel23 : on (on/off bool)
     channel24 : on (on/off bool)
subModel :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : 0

Posted on
Tue Jul 11, 2017 11:45 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Controlling EasyDAQ via Python Question


Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jul 11, 2017 11:47 am
BlaineM offline
Posts: 36
Joined: Jan 13, 2012

Re: Controlling EasyDAQ via Python Question

jay (support) wrote:

Ahhh... the old RTFM gig! Thanks... exactly what I was looking for.

--Blaine

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests