Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Sensor process get sleeped #6

Open
lalo-uy opened this issue Jul 11, 2018 · 13 comments
Open

Sensor process get sleeped #6

lalo-uy opened this issue Jul 11, 2018 · 13 comments

Comments

@lalo-uy
Copy link

lalo-uy commented Jul 11, 2018

My setup consist of 8 DS18B20 on a bus.
For a second time this week a sensor process keep sleeped while the rest of the app runs ok.
Not the same sensor.
The sensor is readable on the filesystem.
You can see in the log that it stop updating al 15:33
Upon restart goes ok.

2018-07-10 15:31:13,6.0
2018-07-10 15:31:14,6.0
2018-07-10 15:31:22,5.937
2018-07-10 15:32:08,6.0
2018-07-10 15:32:24,5.937
2018-07-10 15:32:34,5.937
2018-07-10 15:33:03,5.937
2018-07-10 15:33:09,6.0
2018-07-10 15:33:21,6.0
2018-07-10 15:33:40,5.937
2018-07-10 15:33:52,6.0
2018-07-11 14:11:04,-0.375
2018-07-11 14:11:12,-0.375
2018-07-11 14:11:20,-0.375
2018-07-11 14:11:28,-0.375
2018-07-11 14:11:36,-0.375
2018-07-11 14:11:44,-0.375
2018-07-11 14:11:52,-0.375
2018-07-11 14:12:00,-0.375
2018-07-11 14:12:08,-0.375

Is there a way to check the sleeped threads ?

f5

@jangevaare
Copy link
Owner

Hello,
Are you using the latest version? The most recent commit a couple months ago, bdf93b0 did away with initiating a subprocess (within the plugin anyways) for getting a temperature reading. I can't speak to the threads CBPi may or may not implement beyond the scope of this plugin however.

If you want to receive notifications when a temperature reading is filtered, or can not be completed in the update interval (one of which I expect is your issue), make sure the notification duration is long enough for you to catch it. Either way you should see messages in the log if the plugin ran into issues - one of the two below:

https://github.com/jangevaare/cbpi-OneWireAdvanced/blob/master/__init__.py#L185

https://github.com/jangevaare/cbpi-OneWireAdvanced/blob/master/__init__.py#L196

@lalo-uy
Copy link
Author

lalo-uy commented Jul 11, 2018 via email

@jangevaare
Copy link
Owner

The plugin only stores a single "last temperature" between loops, and a "warning count" so there's nothing in it that would change with a long running duration (if you find different in the code, let me know, but it's a pretty simple plugin). I can't speak to the overall reliability of CBPi or your wiring of DS18B20 sensors. In my experience communication with these sensors is very sensitive to electromagnetic interference, and for the high reliability you are looking for it is essential that best practices are used for your control panel and sensors.

Anyways, turn on the logging for this plugin if you're trying to narrow down your issue - I hope that can help. For the number of sensors you have you may also have to increase the update interval as well.

@lalo-uy
Copy link
Author

lalo-uy commented Jul 12, 2018 via email

@jangevaare
Copy link
Owner

At 15 seconds I wouldn't think you'd have any issues. I thought maybe you were <2 seconds, as some people try to push it as far as they can this way.

I use a VFD with my system as well and it gave me a lot of temperature sensor issues at first. I had to address that with an EMI filter and better shielding. Now everything is good on my end.

BTW: I actually don't use CBPi anymore - I use a custom dashboard made with node-red .

@jangevaare
Copy link
Owner

jangevaare commented Jul 25, 2018

I'm going to close this - feel free to reopen if you have reason to believe it's an issue with this plugin's code. Hope you've managed to sort out!

@lalo-uy
Copy link
Author

lalo-uy commented Jul 25, 2018 via email

@lalo-uy
Copy link
Author

lalo-uy commented Aug 23, 2018

I don't know how to reopen this.
Still with problems with this.
Sensor value freezes and no more updates in that sensor log file.
Try to recover with:
`curl -X POST http://10.9.0.109:5000/api/sensor/1/action/stop

curl -X POST http://10.9.0.109:5000/api/sensor/1/action/init
`
but no luck.
The only way is opening the sensor in HW profile and click Update
Occurs on random sensors at random times.

@jangevaare jangevaare reopened this Aug 23, 2018
@jangevaare
Copy link
Owner

I'm sorry, I'm stumped as to what this could be. I don't see anything within the plugin code that would result in this - pretty basic plugin. If it is software, I would wager on it being an issue with CBPi itself, otherwise I'd guess intermittent hardware issue.

Have you looked to see if there's any log messages? This plugin does send some messages to the app logger if it encounters problems.

Have you tried the standard onewire plugin? Do you have the same issues with it? That would be my next suggestion.

@lalo-uy
Copy link
Author

lalo-uy commented Aug 23, 2018 via email

@lalo-uy
Copy link
Author

lalo-uy commented Aug 24, 2018 via email

@jangevaare
Copy link
Owner

If you are inclined to try this again @lalo-uy , I created a new branch (untested), that puts the temperature reading function in a try block.

https://github.com/jangevaare/cbpi-OneWireAdvanced/tree/trycatch

@lalo-uy
Copy link
Author

lalo-uy commented Oct 8, 2019

OK, will do it a run and keep you posted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants