Comments (9)
Ich vermute es liegt daran, dass das Plugin in der Startphase geladen wird und die
WMZ auslesen will
Wenn das nur eine Vermutung ist, weiss ich nicht ob wir sowas implementieren sollen. Klar wenn jemand Zeit und Lust hat, kann man das gerne mal tun. Um zu pruefen ob das tatsaechlich ein Problem ist, koennte man temporaer auch in das entsprechende Plugin eine Verzoegerung mal einbauen und damit erstmal testen. Damit waere dann sichergestellt, dass das auch etwas bringt.
Ich habe auch ein USB-Device, was ab und an mal nicht mehr funktioniert (aber ziemlich selten). Loesen laesst sich das auch nur mit aus- und wieder einstecken. Ich vermute aber, dass es nicht am Neustart liegt, sondern eher am Device oder den Treibern selber, die sich in irgendeiner Konstallaktion "verhaken" und dann einen "Reset" brauchen. Daher die Befuerchtung, dass die Verzoegerung nicht helfen wird.
from smarthome.
There is already the possibility to give the scheduler an offset. What needs to be done within each plugin is to put an offset in the plugin configuration and when scheduling the first query or interaction, we can pass the offset to the scheduler.
from smarthome.
So this is more a "first cycle update delay" for the mentioned plugin and not a general feature to delay the whole plugin startup (delay the start of a plugin thread).
I guess @cstrassburg thought about to have a general solution to delay the whole plugin startup instead of doing a delay within the plugin implementation when adding scheduler tasks. But the latter could also "solve" the problem from the reporter.
But: @cstrassburg did you checked if a delay really solve your problem?
from smarthome.
For me it looks like the solution could be implemented in the run method of the plugin that has this problem.
instead of setting self.alive = True
instantly, start a scheduler, that calls a methond run2
which then sets self.alive = True
.
from smarthome.
The feature request was created based upon an assumption which could completely be wrong. It's still not verified that the root cause is the system load. So I suggest to close this feature request if no body else requires such a plugin startup delay.
from smarthome.
The suggestion of @msinn makes sense to me. As @cstrassburg will be able to implement this by himself if he has some time again I will close this issue now and we can reawake it if needed later on.
from smarthome.
@bmxp will he?
from smarthome.
Nope. @msinn favours a solution within the core, not the plugins.
from smarthome.
And we should define the use-case more precise.
If you want a delay to startup different instances of a plugin to different times so message don't collide on the serial bus both instances share (eg. RS485), it might not be a good idea. On startup the collision is avoided, but it will hit during the runtime.
If you need a delay to ensure some other software or hardware has to become ready first, a delay might be a good idea. To get some control if the initialization is done, it should not be done in the plugins but it should be controlled by lib.plugin.
from smarthome.
Related Issues (20)
- Admin interface HOT 1
- Feature Request: Enable "Watch Attribute" in AdminIF in Logics Editor for Logic Parameters
- Feature Request: Add small graph in AdminIF / Items / Item Informationen for items having database enabled
- Bug: Eval Checker in admin interface can not handle result of sh.item.series HOT 7
- admin interface: Warning after changing plugin loglevel HOT 8
- shpypi exception on version check of "pymodbus" HOT 4
- implement suspend/resume for plugins HOT 8
- Startup problems on v1.9.4 HOT 23
- Admin interface: support new log levels HOT 1
- HTTP Module: improve handling of page length and responsive design HOT 2
- CherryPy ValueError on restart HOT 2
- cache value not converted to current item type
- Issues with (re)loading logics from the editor page of the admin gui HOT 7
- structs not checked for wrong configurations? HOT 1
- Issue with smartdeviceplugin with UTF-8 response HOT 1
- Requirements von Logiken und Userfunctions installieren beim Start? HOT 7
- Websocket crashed HOT 4
- Vorschlag zum besseren Handling von Items mit Datentyp 'dict' oder 'list' HOT 25
- Websocket Exceptions HOT 4
- struct names are applied to items including the struct
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smarthome.