PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
- ThibmoRozier
- Offline
- Elite Member
9 years 6 months ago #1184
by ThibmoRozier
Replied by ThibmoRozier on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Might be indeed.
One thing on my list is making a log with errors occurring during the running of pyradmon.
If it takes some time to recover, yes it is a network drop, that's part of the script, the timeouts are rather strict but wide enough for even a 64-bit modem.
I am trying to make time to work on the project again, also my apologies for making you wait for a reply.
One thing on my list is making a log with errors occurring during the running of pyradmon.
If it takes some time to recover, yes it is a network drop, that's part of the script, the timeouts are rather strict but wide enough for even a 64-bit modem.
I am trying to make time to work on the project again, also my apologies for making you wait for a reply.
Please Log in or Create an account to join the conversation.
9 years 5 months ago #1222
by jnissen
Replied by jnissen on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Yes a log of errors from Pyradmon would indeed be a great improvement. I have still been struggling with the application dropping out from time to time. Lately it runs fine for about three or four days but thern goes off track. I have the wlan tools in place to restart the network in case it gets dropped and I can occasionally see it does indeed get dropped and restarts. I have a feeling it is in this time frame that the app detects no communication and gets hung up, stops, ???. I see it as an active process so I believe it's running. I can WiFi "rsh" into the thing so I know the wifi is again working! Just troubling to see the process running yet noting is being updated. Likely some timeout value being hit with respect to the network restarting???
Please Log in or Create an account to join the conversation.
- ThibmoRozier
- Offline
- Elite Member
9 years 5 months ago #1223
by ThibmoRozier
Replied by ThibmoRozier on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
I set the timeout as a fail-safe, without it Python will get a brain-fart and just stop running, I am afraid.
I am always looking for ways to improve the basic functionality of PyRadmon.
The logging versions are all up now, by the way.
I am always looking for ways to improve the basic functionality of PyRadmon.
The logging versions are all up now, by the way.
Please Log in or Create an account to join the conversation.
9 years 5 months ago - 9 years 5 months ago #1224
by jnissen
Replied by jnissen on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Great, Let me grab the latest code and see how it does. Does it log in the local directory where it is launched from or is it a specific directory?
Last edit: 9 years 5 months ago by jnissen.
Please Log in or Create an account to join the conversation.
- ThibmoRozier
- Offline
- Elite Member
9 years 5 months ago #1225
by ThibmoRozier
Replied by ThibmoRozier on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Yes, so not in some shady unable-to-find-dir, but just where you put the script.
For the log to be 100% securely written the code must either end with an exception or shut down the standard way.
It will append into the same log as of right now, I might separate that to per-start-date logs, yet that would clutter up your directory, which is useless.
Also, I didn't yet implement a file-size cap for the log file, and it does store every upload success/failure and oddities in the code where ever it happens.
It might be a good idea to throw away the log every now and then.
It will create the log automatically.
For the log to be 100% securely written the code must either end with an exception or shut down the standard way.
It will append into the same log as of right now, I might separate that to per-start-date logs, yet that would clutter up your directory, which is useless.
Also, I didn't yet implement a file-size cap for the log file, and it does store every upload success/failure and oddities in the code where ever it happens.
It might be a good idea to throw away the log every now and then.
It will create the log automatically.
Please Log in or Create an account to join the conversation.
9 years 3 months ago #1324
by jnissen
Replied by jnissen on topic PyRadmon install and set up on Raspberry Pi (Wheezy Raspbian)
Been fighting an issue lately with the send from the Pyradmon script to the server. I recently ran it in a shell to see all of the error codes and communications. Is getting hung up here:
---SNIP---
Waiting 60 seconds => geiger 1
Geiger sample => geiger 1: CPM = 11 2015-08-12 02:57:35.118250
Geiger sample => geiger 1: CPM = 13 2015-08-12 02:58:06.264030
Average result => geiger 1: CPM = 12 2015-08-12 02:58:06.264030
Connecting to server => geiger 1
Sending average sample => geiger 1: 12 CPM
Server response => geiger 1: HTTP/1.1 200 OK
Waiting 60 seconds => geiger 1
Geiger sample => geiger 1: CPM = 13 2015-08-12 02:58:37.410011
Geiger sample => geiger 1: CPM = 13 2015-08-12 02:59:08.552683
Average result => geiger 1: CPM = 13 2015-08-12 02:59:08.552683
Connecting to server => geiger 1
Sending average sample => geiger 1: 13 CPM
NOTE NO RESPONSE HERE
Geiger sample => geiger 1: CPM = 11 2015-08-12 02:59:39.698423
Geiger sample => geiger 1: CPM = 11 2015-08-12 03:00:10.845905
Geiger sample => geiger 1: CPM = 18 2015-08-12 03:00:41.992641
Geiger sample => geiger 1: CPM = 21 2015-08-12 03:01:13.137856
Geiger sample => geiger 1: CPM = 16 2015-08-12 03:01:44.283194
Geiger sample => geiger 1: CPM = 14 2015-08-12 03:02:15.427886
...SNIP...
Continues like this and never reports back into the web. Was expecting to get a server response. I think it is the line in the code like this:
---SNIP---
request=url+"\r\nHost: www.radmon.org\r\nUser-Agent: pyRadMon "+VERSION+"\r\n\r\n"
print "Sending average sample => geiger 1: "+str(sampleCPM)+" CPM\r\n"
#print "\r\n### HTTP Request ###\r\n"+request
--> s.send(request)
data = s.recv(BUFFER_SIZE)
httpResponse=str(data).splitlines()[0]
print "Server response => geiger 1: ",httpResponse,"\r\n"
What would cause the script to no longer report in correctly. Is it a server issue? Script issue that should retry?
---SNIP---
Waiting 60 seconds => geiger 1
Geiger sample => geiger 1: CPM = 11 2015-08-12 02:57:35.118250
Geiger sample => geiger 1: CPM = 13 2015-08-12 02:58:06.264030
Average result => geiger 1: CPM = 12 2015-08-12 02:58:06.264030
Connecting to server => geiger 1
Sending average sample => geiger 1: 12 CPM
Server response => geiger 1: HTTP/1.1 200 OK
Waiting 60 seconds => geiger 1
Geiger sample => geiger 1: CPM = 13 2015-08-12 02:58:37.410011
Geiger sample => geiger 1: CPM = 13 2015-08-12 02:59:08.552683
Average result => geiger 1: CPM = 13 2015-08-12 02:59:08.552683
Connecting to server => geiger 1
Sending average sample => geiger 1: 13 CPM
NOTE NO RESPONSE HERE
Geiger sample => geiger 1: CPM = 11 2015-08-12 02:59:39.698423
Geiger sample => geiger 1: CPM = 11 2015-08-12 03:00:10.845905
Geiger sample => geiger 1: CPM = 18 2015-08-12 03:00:41.992641
Geiger sample => geiger 1: CPM = 21 2015-08-12 03:01:13.137856
Geiger sample => geiger 1: CPM = 16 2015-08-12 03:01:44.283194
Geiger sample => geiger 1: CPM = 14 2015-08-12 03:02:15.427886
...SNIP...
Continues like this and never reports back into the web. Was expecting to get a server response. I think it is the line in the code like this:
---SNIP---
request=url+"\r\nHost: www.radmon.org\r\nUser-Agent: pyRadMon "+VERSION+"\r\n\r\n"
print "Sending average sample => geiger 1: "+str(sampleCPM)+" CPM\r\n"
#print "\r\n### HTTP Request ###\r\n"+request
--> s.send(request)
data = s.recv(BUFFER_SIZE)
httpResponse=str(data).splitlines()[0]
print "Server response => geiger 1: ",httpResponse,"\r\n"
What would cause the script to no longer report in correctly. Is it a server issue? Script issue that should retry?
Please Log in or Create an account to join the conversation.
Moderators: Gamma-Man
Time to create page: 0.235 seconds