Welcome, Guest
Username: Password: Remember me

TOPIC: Multiple counters with one script

Multiple counters with one script 3 years 18 hours ago #8

  • ThibmoRozier
  • ThibmoRozier's Avatar
  • OFFLINE
  • Elite Member
  • Posts: 182
  • Thank you received: 29
  • Karma: 9
Not really, python is one and the same thing, really.
But I tried it again, and here is some more proof.
It works here. :/
http://pastebin.com/r7LwsB0b
Or check attatchment for *.py file.

File Attachment:

File Name: MultiPyRadmon.zip
File Size: 6 KB



Console output with demo:
>>> 
Reading configuration:

	
	User name configured

	
	Password configured

	
	Serial port name configured

	
	Serial port speed configured

	
	Protocol configured

	

Using Demo mode for 1 => geiger 1


Reading configuration:

	
	User name configured

	
	Password configured

	
	Serial port name configured

	
	Serial port speed configured

	
	Protocol configured

	

Using Demo mode => geiger 2


Gathering data started => geiger 1


Gathering data started => geiger 2

No samples in queue, waiting 5 seconds => geiger 1



Geiger sample => geiger 1:	[34, datetime.datetime(2014, 10, 19, 12, 8, 33, 256000)] 


Geiger sample => geiger 2:	No samples in queue, waiting 5 seconds => geiger 2

[35, datetime.datetime(2014, 10, 19, 12, 8, 36, 248000)]
 


Geiger sample => geiger 1:	[38, datetime.datetime(2014, 10, 19, 12, 8, 38, 260000)] 


Average result => geiger 1:	CPM = 36 	2014-10-19 12:08:38.260000 


Geiger sample => geiger 2:	Connecting to server => geiger 1

[35, datetime.datetime(2014, 10, 19, 12, 8, 41, 260000)]
 


Sending average sample => geiger 1: 36 CPM


Server response => geiger 1:  HTTP/1.1 200 OK 


Waiting 30 seconds => geiger 1


Geiger sample => geiger 1:	[10, datetime.datetime(2014, 10, 19, 12, 8, 43, 264000)] 


Geiger sample => geiger 2:	[38, datetime.datetime(2014, 10, 19, 12, 8, 46, 284000)] 


Geiger sample => geiger 1:	[26, datetime.datetime(2014, 10, 19, 12, 8, 48, 264000)] 


Geiger sample => geiger 2:	[17, datetime.datetime(2014, 10, 19, 12, 8, 51, 346000)] 


Geiger sample => geiger 1:	[34, datetime.datetime(2014, 10, 19, 12, 8, 53, 326000)] 


Geiger sample => geiger 2:	[8, datetime.datetime(2014, 10, 19, 12, 8, 56, 412000)] 


Geiger sample => geiger 1:	[33, datetime.datetime(2014, 10, 19, 12, 8, 58, 392000)] 


Geiger sample => geiger 2:	[34, datetime.datetime(2014, 10, 19, 12, 9, 1, 472000)] 


Geiger sample => geiger 1:	[22, datetime.datetime(2014, 10, 19, 12, 9, 3, 452000)] 


Geiger sample => geiger 2:	[26, datetime.datetime(2014, 10, 19, 12, 9, 6, 539000)] 


Geiger sample => geiger 1:	[24, datetime.datetime(2014, 10, 19, 12, 9, 8, 459000)] 


Average result => geiger 2:	CPM = 35 	2014-10-19 12:08:36.248000 


Connecting to server => geiger 2


Geiger sample => geiger 2:	[37, datetime.datetime(2014, 10, 19, 12, 9, 11, 539000)] 


Sending average sample => geiger 2: 35 CPM


Server response => geiger 2:  HTTP/1.1 200 OK 


Waiting 30 seconds => geiger 2


Geiger sample => geiger 1:	[39, datetime.datetime(2014, 10, 19, 12, 9, 13, 523000)] 


Geiger sample => geiger 2:	[35, datetime.datetime(2014, 10, 19, 12, 9, 16, 543000)] 


Geiger sample => geiger 1:	[40, datetime.datetime(2014, 10, 19, 12, 9, 18, 553000)] 


Geiger sample => geiger 2:	[17, datetime.datetime(2014, 10, 19, 12, 9, 21, 545000)] 


Geiger sample => geiger 1:	[8, datetime.datetime(2014, 10, 19, 12, 9, 23, 555000)] 


Geiger sample => geiger 2:	[20, datetime.datetime(2014, 10, 19, 12, 9, 26, 552000)] 


Geiger sample => geiger 1:	[8, datetime.datetime(2014, 10, 19, 12, 9, 28, 562000)] 


Geiger sample => geiger 2:	[38, datetime.datetime(2014, 10, 19, 12, 9, 31, 552000)] 


Geiger sample => geiger 1:	[39, datetime.datetime(2014, 10, 19, 12, 9, 33, 562000)] 


Geiger sample => geiger 2:	[26, datetime.datetime(2014, 10, 19, 12, 9, 36, 552000)] 


Geiger sample => geiger 1:	[40, datetime.datetime(2014, 10, 19, 12, 9, 38, 562000)] 


Geiger sample => geiger 2:	[9, datetime.datetime(2014, 10, 19, 12, 9, 41, 590000)] 


Average result => geiger 1:	CPM = 27 	2014-10-19 12:09:38.562000 


Connecting to server => geiger 1


Sending average sample => geiger 1: 27 CPM


Server response => geiger 1:  HTTP/1.1 200 OK 


Waiting 30 seconds => geiger 1


Geiger sample => geiger 1:	[19, datetime.datetime(2014, 10, 19, 12, 9, 44, 350000)] 


Geiger sample => geiger 2:	[31, datetime.datetime(2014, 10, 19, 12, 9, 47, 434000)] 


Geiger sample => geiger 1:	[10, datetime.datetime(2014, 10, 19, 12, 9, 49, 354000)] 


Geiger sample => geiger 2:	[5, datetime.datetime(2014, 10, 19, 12, 9, 52, 435000)] 


Geiger sample => geiger 1:	[40, datetime.datetime(2014, 10, 19, 12, 9, 54, 415000)] 


Geiger sample => geiger 2:	[5, datetime.datetime(2014, 10, 19, 12, 9, 57, 502000)] 


>>> Geiger sample => geiger 1:	[14, datetime.datetime(2014, 10, 19, 12, 9, 59, 484000)] 


Geiger sample => geiger 2:	[30, datetime.datetime(2014, 10, 19, 12, 10, 2, 564000)] 




CTRL+C pressed, exiting program

	 


Gathering data from Geiger stopped => geiger 1


Gathering data from Geiger stopped => geiger 2



>>>
Last Edit: 3 years 18 hours ago by ThibmoRozier.
The administrator has disabled public write access.

Multiple counters with one script 2 years 11 months ago #79

  • ThibmoRozier
  • ThibmoRozier's Avatar
  • OFFLINE
  • Elite Member
  • Posts: 182
  • Thank you received: 29
  • Karma: 9
Oke, seems like it works now. :D
Geesh. ^_^
Now time to relax a bit and wait until the other script part comes in. :P
Hope there won't be any complications included with the script, if so, please provide the error message and a brief description
The administrator has disabled public write access.

Multiple counters with one script 2 years 9 months ago #510

  • Juzzie
  • Juzzie's Avatar
  • OFFLINE
  • Premium Member
  • Posts: 139
  • Thank you received: 20
  • Karma: 6
I cant get it to work. Below is the error message :

" Traceback (most recent call last):
File "multiPyRadmon.py", line 10, in <module>
import pyaudio
ImportError: No module named pyaudio "
Owner and operator of "southofhobart" monitoring stations.
The administrator has disabled public write access.

Multiple counters with one script 2 years 9 months ago #511

  • mw0uzo
  • mw0uzo's Avatar
  • OFFLINE
  • Moderator
  • Posts: 901
  • Thank you received: 185
  • Karma: 23
Have you installed pyAudio, the python audio library?
The administrator has disabled public write access.

Multiple counters with one script 2 years 9 months ago #512

  • ThibmoRozier
  • ThibmoRozier's Avatar
  • OFFLINE
  • Elite Member
  • Posts: 182
  • Thank you received: 29
  • Karma: 9
No wait, Dan. I'll upload one without audio for Juzzie. ^_^
The administrator has disabled public write access.
The following user(s) said Thank You: Juzzie

Multiple counters with one script 2 years 9 months ago #513

  • Juzzie
  • Juzzie's Avatar
  • OFFLINE
  • Premium Member
  • Posts: 139
  • Thank you received: 20
  • Karma: 6
nice. Im trying it out now....
Owner and operator of "southofhobart" monitoring stations.
The administrator has disabled public write access.
Time to create page: 0.078 seconds
Powered by Kunena Forum