Closed petrklus closed 10 years ago
And I've seen in the logs a message from the packets being received when the light switches were flipped too..
On Mon, May 5, 2014 at 5:42 PM, Petr Klus petr@klus.co.uk wrote:
If I have, it needs to be the default setting :). Yes, Europe - Spain to be specific (bought from zwave.es).
On Mon, May 5, 2014 at 5:11 PM, Chris Jackson notifications@github.comwrote:
On 5 May 2014, at 16:07, petrklus notifications@github.com wrote:
Ok, sounds interesting when I get more zwave devices, that I will link them together internally. Also, how come that my light switches on OH user interface got updated even without the association groups?
Maybe you have polling enabled? Or some switches will send a message even without associations - these mostly seem to be used in the USA from what I’ve seen (I’m guessing you’re in Europe somewhere?).
— Reply to this email directly or view it on GitHubhttps://github.com/openhab/openhab/issues/1044#issuecomment-42198071 .
Hi, small update - after a few days, the switch is still yellow.. is it going to stay this way?
Hmmm - I must say its not immediately obvious why this is still yellow. I assume you’ve refreshed the interface recently - just in case it’s just not updated?
Looking at the code, and the dates in your screen dump, I don’t think it should be yellow, but maybe there’s something wrong with my logic. I’ll take a look when I get a chance (I’m away from home at the moment).
Cheers Chris
Could it be because the 3am daily heal fails? And yes, I've re-freshed...
On Thu, May 8, 2014 at 5:23 PM, Chris Jackson notifications@github.comwrote:
Hmmm - I must say its not immediately obvious why this is still yellow. I assume you’ve refreshed the interface recently - just in case it’s just not updated?
Looking at the code, and the dates in your screen dump, I don’t think it should be yellow, but maybe there’s something wrong with my logic. I’ll take a look when I get a chance (I’m away from home at the moment).
Cheers Chris
— Reply to this email directly or view it on GitHubhttps://github.com/openhab/openhab/issues/1044#issuecomment-42563413 .
No - I don’t think so.
The code is below - it only uses the last dead time (which was 3 days ago) and the retry count (which is 20, and 20 * 100 / 2200 is < 5). So, both of these checks (I believe) should be ok I think.
Date lastDead = node.getDeadTime();
Long timeSinceLastDead = Long.MAX_VALUE;
if(lastDead != null) {
timeSinceLastDead = lastDead.getTime() - System.currentTimeMillis();
}
if(node.getDeadCount() > 0 && timeSinceLastDead < 86400000)
record.state = OpenHABConfigurationRecord.STATE.WARNING;
else if(node.getSendCount() > 0 && (node.getRetryCount() * 100 / node.getSendCount()) > 5)
record.state = OpenHABConfigurationRecord.STATE.WARNING;
else
record.state = OpenHABConfigurationRecord.STATE.OK;
break;
Shouldn't it be:
timeSinceLastDead = System.currentTimeMillis() - lastDead.getTime();
instead of
timeSinceLastDead = lastDead.getTime() - System.currentTimeMillis();
Because the statement is always negative, as the System.currentTimeMillis() is always larger than any dead time. Therefore, it is always smaller than 86400000 and thus if there is any dead time recorded, it always resolves to WARNING.
On Thu, May 8, 2014 at 6:27 PM, Petr Klus petr@klus.co.uk wrote:
Shouldn't it be:
timeSinceLastDead = System.currentTimeMillis() - lastDead.getTime();
instead of
timeSinceLastDead = lastDead.getTime() - System.currentTimeMillis();
On Thu, May 8, 2014 at 5:34 PM, Chris Jackson notifications@github.comwrote:
No - I don’t think so.
The code is below - it only uses the last dead time (which was 3 days ago) and the retry count (which is 20, and 20 * 100 / 2200 is < 5). So, both of these checks (I believe) should be ok I think.
Date lastDead = node.getDeadTime(); Long timeSinceLastDead = Long.MAX_VALUE; if(lastDead != null) { timeSinceLastDead = lastDead.getTime() - System.currentTimeMillis(); } if(node.getDeadCount() > 0 && timeSinceLastDead < 86400000) record.state = OpenHABConfigurationRecord.STATE.WARNING; else if(node.getSendCount() > 0 && (node.getRetryCount() * 100 / node.getSendCount()) > 5) record.state = OpenHABConfigurationRecord.STATE.WARNING; else record.state = OpenHABConfigurationRecord.STATE.OK; break;
— Reply to this email directly or view it on GitHubhttps://github.com/openhab/openhab/issues/1044#issuecomment-42564945 .
Hmmm - yes, that looks better! I’m from New Zealand - I was thinking upside down :)
I’ll change this when I get a chance - either tonight when I get back from dinner (depending on how many German beers I drink) or tomorrow when I get home).
Cheers Chris
I cannot count how many times things like this caught me out so I am always on a lookout.
Cool, let me know when I can get the latest binding.. no rush I think as this one is really just a matter of cosmetics.
By the way - will be extending my zwave network soon, going for switches/dimmers + some contacts, my idea is to go with Fibaro mainly, any other brands you think work best? What do you use in your setup?
Not sure that after-beer code changes are the best idea :beers: :smile:
I use mostly Fibaro devices - I think they make some nice innovative stuff and it generally seems to work pretty well. I’ve got a few other bits and pieces, but all my light switches are now Fibaro, along with door sensors, and their new little motion sensor seems to be pretty cool (I’ve only just started playing with it, but it seems really nice, and it’s pretty small compared to other devices out there).
Chris
guys, could you advice me how to proceed with this issue? Any PR to refer to?
@cdjackson I have to rely on you for the PR ids but in terms of functionality, it is all working with code I snatched from your repository.
I still occasionally get DEAD nodes, meaning that the node colour turns to yellow from time to time, however, no functionality is affected that I can tell - it still sends/receives all commands without any trouble
@cdjackson what about the configurable parameter of packet timeout? I think that 5s seems a bit long...
It is configurable, but I've not told people how to set it because there's some more investigation required to make sure there's no nasty side effects. However, that's another 'issue' - this one wasn't about making the timeout configurable, so I think that this can be closed.
1058 and #1075 cover this I think. @petrklus - any comment?
since both PRs are merged i'll close this for now. Please feel free to reopen in case. Best, Thomas E.-E.
State right after OH restart, log when flipping a switch (and the light goes on and off):
However, later it stops working (same command issued, however, no corresponding zwave binding activity):
What is going on? Why does the binding not create and enqueue the new commands?
The PING goes through just fine:
Why is the ping still working but normal commands are not sent out?