-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this for loggin noise? #3
Comments
I've used @ciembor 's work to successfully connect a gm1356 to a device running Ubuntu server. Once connected you should be able to run I've used this repository to gain access to the output, then build upon that to store the output in a database, so I can then report on the data: |
owh that is nice! The local government decided to place a disco next to my house at 100mtr. I asked them to come and measure the sound, they told me it was to expensive. Now I am here.... I know it is not a valid measuring, but should be enough to make them come and measure themself. |
@HaasNL2 I started work on system for measuring environmental noise. I calculate Equivalent Continuous Sound Level (LAeq) for each hour based on Polish indicators. I think they should be similar or the same in all EU countries. It's here: https://github.com/ciembor/dobra-noc I don't have currently time for development. I have to work on commercial project. But it looks that my friend will continue it. The goal is to have a platform with clients installed on Raspberry PI. Currently it's standalone app, so you can connect sonometer to the laptop, run Dobra Noc (Good Night :)) and the results will be stored to the database. In the same time it is possible to display them in a browser for each recorded hour. Feel free to test it, report what you need and create some GH Issues. Or maybe even pull requests? If you want to learn some Ruby / Vue.js, we need some contribution. It's not rocket science and it looks there are many people in a similar situation to yours. I found a lot of them in my city already :(. |
Funny enough, I have this setup for a similar purpose. The local council have said that the graphs/charts on thier own could not be used as evidence, however, they have sent out diary sheets to complete, and they said the charts will complement the diary entries. I've used a Ruby on Rails app to do the charts above. Would that be of any use to you? As I could look to move the code into a public repos, however, it would require some knowledge to get it up and running. An alternative option (which I did first) would be to capture the output from EDIT: @HaasNL2 I forgot to mention that the local coucil have not shown much interested in doing anything, however it may be worth searching for the 'Environmental Health' department within the council, as they have been very helpful in my area. They are the ones who have sent out diary sheets etc. |
@davegudge maybe we could merge our apps into one and make it useful for more people? |
Nice work all of you I need some time to process all that information. About my issue with the council. The guy who was responsible about the measuring, said to me it was to expensive to mount a fixed measuring device. And I then asked him how much it would cost. Instead of giving me a euro figure he told me "it didn't work that way". I now assume he didn't even bothered to check the costs. He told me that in a phone call which I was recording and now I have made an official complain against him. Fun times! |
@HaasNL2 That's awesome, I was thinking how to protect it from rain :). |
@ciembor It's certainly an option.
This sounds interesting. I've had to do some research into sound/decibels etc I kind of feel the graph should be a reverse logarithmic to give a more accurate representation of the increasing levels of sound. e.g. the y-axis would be scaled like this: I couldn't find any charting tools to create that, so I did experiment with colours: @HaasNL2 The case is really cool. Much better than the piece of plastic I am currently using! |
@ciembor I think https://github.com/ciembor/dobra-noc might be private as it presents a 404. |
@davegudge I use Chart.js and they also don't have it. They have only logaritmic scale. But the numbers don't lie and are more important as an evidence. You are right, I made it public :). |
I've been using Chart.js too (via chartkick), the coloured chart was experimenting with highcharts.
RoR and 5.2 too 👍 I'll have to find some time to take a look. The rails app I've created so far is over on bitbucket, it was hosted before github allowed private repos for free. I'll look to move it over onto github and make it public too. It's still on 5.1 at the moment 😢 Never enough time to spend working on these side projects. |
@davegudge Yes, not enough time for side projects and writing tests for them :D. |
🤣 |
@davegudge did you succeed to display graph in inverted logarithmic (exponential) scale? I found this: https://github.com/holtalanm/chartjs-exponential-scale |
@ciembor I haven't managed to invert a logarithmic scale so far, and tbh, I haven't looked into it (again) since we discussed above. When I did look into it, I had a play with Logarithmic axis in highcharts, however, this obviously didn't present the data in the way required for a db scale. There is a option to invert the y-axis, however, that still doesnt acheive the desired affect, I ended up with an upsidedown chart 😆 Nice find on the plugin above. I think that could be used as a based to create a scale that could be used for db scale. I don't think it's possible to use logarithmic in it's standard form, but I could be wrong! |
Hi, i also have a gm1356 sound meter and was trying to run this on a ubuntu server. EDIT: Im running ubuntu server in vmware which seems to be causing the error, if i pass the gm1356 through vm remote console it works fine. What would be the best way to record the output to a file? |
@stoney321 What do you mean by output? Records with sound pressure levels? If you think about recording sound, we are going to connect a microphone to our RaspberryPI and record the loudest parts. The easiest way to save records is to run If you need more sophisticated format, you could load the library in your ruby script and pass a block. I think I should add the usage section to the readme. |
@ciembor I do just need to save the records as a log file as you have shown. 👍 |
@stoney321 I was having issues where by the output was stopping after a random duration, but no error was output. I believe this is because the process is using a Perhaps try using the modification I have suggested in #2 i.e. if an error occurs whist processing, pass it back from the thread to the process that created the thread. Hopefully you'll then get an handle on the issue? |
HI @davegudge i did have a look at that but i have no clue what to do with it. Do i need to modify a file? or create a new? My knowledge is very limited on this. EDIT: Just tried dedicated psu and still errors :( |
@davegudge I will merge it to master and check it later |
@davegudge @stoney321 I published version |
I've added an additional comment to the PR. You should not find any difference if things are running as expected, but with the change in the PR, you should find the root cause (exception) is output if the process fails. |
I think I will have to rewrite the code, the problem is in data synchronization. I should read data from device to the buffer and then access it from a buffer instead of accessing packets directly. Packets are sometimes corrupted, because they sometimes have not proper length (when data is split in two packets). |
That does make sense based upon some of the exceptions I've seen. Rather than trying to fix it, I took the approach of "if it failed, just try it again, and again until is worked!" 😆 |
just installed version 0.0.4 but still the same problem, i think i had already modified |
which is:
right? |
correct |
Just to confirm, the I then build upon that (from within a separate Ruby on Rails application) to say: run GM1356, if it errors, run GM1356, if it errors, run... etc |
I kind of got what you were doing, just not a clue about automatically re-running gm1356 when it errors. |
Running directly from the terminal, perhaps you could do something like https://superuser.com/a/569595 EDIT: I was thinking the executable was a bash, it's ruby which does make life easier! |
Would it be worth me looking to use ruby on rails for this? |
No need to know Ruby on Rails, Ruby is enough, and it's quite nice language to learn :). If you want to learn it a bit I can send you some resources, this script should be quite easy. If you don't I can write it for you but I don't know when I will have time. We can even meet on google hangouts and I will show you how I write it, so you will know why it works and how it works :). you need to:
Then you can handle errors using |
This is the part from a If there is an exception I close the device. But you can handle this exception however you want. And you can save it to the file directly instead of printing it. |
I haven't tested this but as @ciembor suggested, simply modifying the https://github.com/davegudge/gm1356/commit/f80f19f5e9d36e5685a69da50ca9080928795864 ^ I've moved the logic outlined above into a method, and upon failure, instead of raising the exception (causing an exit), it's simply output, and the method is called again. It may be a good stating point for what you're looking to achieve. |
Thanks guys, its giving me something to look at |
Pff I am waaaaaaaaaaaaaaaay over my head here, trying this out. |
If running via an app is a bit tricky at the moment, maybe a good starting point is to record the output above to a |
I made a Pull request, changing puts to print makes the Output Parsable. I make a Box recording the DBA, and when the DBA is over some Value the Box plays an mp3 "To Loud". I use it for education. Our Children forget not to shout at each other. So the Box remember them to keep Quit I Start it with : And an Python Script to react on Values from the Log:
|
@tyl0re It's very nice to hear that you found such interesting usecase! I didn't expect too many people will use this driver and how many possibilities it gives :). |
Hey,
I also have this meter, first I was just going to use Windows. But the lack of any autmated logging is a bit worrying.
Can you use this to log the data? Can I send it to a webserver?
The text was updated successfully, but these errors were encountered: