ccutrer / balboa_worldwide_app

Ruby library for communication with Balboa Water Group's WiFi module or RS-485
99 stars 27 forks source link

Process takes ~100% cpu #18

Closed konsulten closed 3 years ago

konsulten commented 3 years ago

Current platform where Im running it is a raspberry pi 3 +. Directly after starting it takes up 100% cpu and stays there. Question is if there is some while loop without proper sleep or something missing?

konsulten commented 3 years ago

It seems like its in the poll function in client, if read is used it does not block until data is available. and thus spinning on reading 0 bytes. Added a if @buffer.length = 0 sleep (0.1) end which seems to have done the trick

ccutrer commented 3 years ago

Were you using the master branch when you reported this, and using RS-485? If not, you should either do that, or update to the 1.2.0 release which I just pushed. There were problems with the old serial library that it would return immediately when there was no data. I switch the serial library backend and it fixed the problem. It's been running for months at my house with no issues; I apologize for not getting around to releasing a new version.

konsulten commented 3 years ago

I were using the master branch when I reported this. Will check if it was any updates with your 1.2.0 rel. mån 21 dec. 2020 kl. 17:41 skrev Cody Cutrer notifications@github.com:

Were you using the master branch when you reported this, and using RS-485? If not, you should either do that, or update to the 1.2.0 release which I just pushed. There were problems with the old serial library that it would return immediately when there was no data. I switch the serial library backend and it fixed the problem. It's been running for months at my house with no issues; I apologize for not getting around to releasing a new version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ccutrer/balboa_worldwide_app/issues/18#issuecomment-749068422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3FNEMA3GLYH4UEM3PIYRDSV53B5ANCNFSM4UTAM75A .

ccutrer commented 3 years ago

Serial or WiFi?

konsulten commented 3 years ago

Oh, sorry. Rs-485

mån 21 dec. 2020 kl. 18:10 skrev Cody Cutrer notifications@github.com:

Serial or WiFi?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ccutrer/balboa_worldwide_app/issues/18#issuecomment-749090344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3FNEN3PDHUJ3XCRUGVCRLSV56R5ANCNFSM4UTAM75A .