more G-Labs products

Author Topic: ZWave Lights Randomly Turning On  (Read 4525 times)

December 12, 2014, 04:00:58 AM
Read 4525 times

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
I'm having an issue with lights turning on randomly.  Yesterday, I had two lights turn on (when I loaded the interface, the timestamps were 4:24 and 3:48 PM - I don't know if that indicates that those are the times they turned on).  Today, I had one of the same lights turn on at 6:02 PM (I was home this time to see it turn on).

On one of the two lights, I have scheduled on/off enabled but with a blank entry for time on (I also modified that program to explicitly handle empty strings (ie !string.IsNullOrEmpty(schedexpr)), and the other light does not use scheduled on/off.  Both lights have level poll and level memory (both are dimmers) enabled.

I took a shot at restarting the service tonight, but other than that, I'm at a loss.  I had the first light come on randomly about a week ago (which was when I added the empty string check).

I've seen similar topics posted before, but I didn't see any posted resolutions.

December 12, 2014, 05:42:33 AM
Reply #1

RoChess

  • ***
  • Information
  • Full Member
  • Posts: 61
Try running HomeGenie in console mode so that you get higher detail of logging. This will allow you to see exactly what is happening.

December 13, 2014, 06:20:33 PM
Reply #2

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
I have asked the googles and searched the forums, but I'm still not sure what console mode is.  Is it a setting, or do I just need to launch HG from a console instead of as a background service?

Also, I have not had any strange behavior since I restarted the service (no lights randomly turned on yesterday).

December 13, 2014, 06:38:43 PM
Reply #3

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Which environment do you use : Linux or Windows ?

Under Windows :
 - you have to stop the service
 - run HomeGenie.exe in Terminal

Under Linux :
$ sudo service homegenie stop
$ cd /usr/local/bin/homegenie
$ sudo /usr/bin/mono HomeGenie.exe

Cheers
Dani


December 13, 2014, 08:14:55 PM
Reply #4

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
I'm running it in Linux, but thanks for posting both!

December 13, 2014, 11:30:56 PM
Reply #5

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I modified the startup.sh script to redirect the output to a log file instead of /dev/null.  That way I have access to all the data from HG whenever I need it.  If you are just debugging one thing, running in console mode work fine too.

December 16, 2014, 12:56:37 AM
Reply #6

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
I'm not sure I want to store those logs indefinitely (I get an awful lot of Program.Status Idle), but thanks for the idea of piping the output to a file.  I'll report back if I figure something out that may benefit other users.  Thanks again for all of the tips.

December 16, 2014, 05:18:34 PM
Reply #7

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I'm currently storing these logs and the file has gotten pretty big in the last couple months (10MB).  I don't intend to keep it set up this way indefinitely, but for now (while I'm verifying 100% system function) it's nice to be able to see exactly what HG sees and does as compared to my much smaller logs for individual scripts.

I have noticed that while the files are still written to, accessing these on Windows sometimes only provides the first portion of a file (cached?) rather than the whole thing.  But, if I view the file via nano on the Raspi it does show everything.  If I were going to keep such a log file permanently, I'd most likely write to a file for a week, then archive it and start a new one.  But again, that is not my long term goal.

December 19, 2014, 02:08:09 AM
Reply #8

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
I wonder if I might have something set wrong somewhere, then.  My log for the past 3 days is just over 100MB.

December 19, 2014, 02:10:35 AM
Reply #9

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
Ok, so for the first time I had a light that I have scheduled to turn on at a certain time not turn on.  It has worked flawlessly since I set up HG (so a few weeks).  It is showing in the log that HG ran the program to turn it on.  I assume this is more of a ZWave issue than an HG issue, but I just wanted to post this in case anyone had any insight.

*Edit*
It turns out I currently have no control from HG
« Last Edit: December 19, 2014, 02:15:00 AM by ahill44 »

December 27, 2014, 06:12:33 PM
Reply #10

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
For future reference, after I lost HG control, I restarted the service and took the available update.  This only made things worse, so I nuked the setup and completely rebuilt the server from scratch.  Since that time, I have not experienced any issues (knock on wood), so it seems that something had gotten messed up somewhere along the line.

March 11, 2015, 01:51:02 AM
Reply #11

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
Quick update: I have since set up a cron to restart the service daily.  This seems to have helped significantly, but I still experience issues randomly (it seems to happen shortly after an HG update, but I suspect this is largely coincidental).  After some picking around and testing, my best guess is that this is a Linux/Mono issue (since it doesn't seem to be much of an issue for most users, and I assume the majority are on Windows).  Hopefully, one day we will be able to migrate off of Mono onto whatever the result of MS open sourcing .NET is.  Until then, I'll continue to post if I'm better able to track down what is causing the issue.

March 11, 2015, 06:05:59 PM
Reply #12

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I would have guessed that the majority of users are on Raspberry Pi based on threads posted on the forum.  If downloads count as actual users and the current version (r482) is typical, then there are 53% Linux (Debian installer) and 47% Windows.

I don't expect HG to migrate from Mono as Gene has made no mention of a major upgrade, but it's possible if Mono gets deprecated.  I would guess there's something specific to your installation that is causing these peculiar issues.  I'm not sure what that would be, but since there is becoming quite a large user base and only one report, I'd say that points in that direction.  I'm sure the issue can be sussed given enough testing and details.

March 11, 2015, 08:05:16 PM
Reply #13

ahill44

  • *
  • Information
  • Newbie
  • Posts: 23
I just made an assumption.  I would not have expected so many Linux users.  Thanks for the data!  As far as mono/.net, it would surprise me if mono wasn't abandoned in favor of "real" .net at some point (that's a separate discussion entirely), but I didn't mean to imply that I expected HG to change any time soon.

I have rebuilt my HG server a couple of times, so I don't mind doing that again.  Like I said, it seems to happen after running an update on HG.  The only other difference that I might have is that I'm running HG in a VM, but I'm guessing I'm not the only one with that setup either.  I'm also open to trying it on a raspberry pi.

tl;dr

Unless you think I/we/the community would be better served to work on my current configuration, I'm inclined to rebuild my server again as the first step.

March 11, 2015, 10:15:06 PM
Reply #14

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I'd say that since we haven't heard about similar issues that it's likely an isolated case.  Go ahead and try rebuilding to see if that fixes it.  If you can determine the cause of the issue, I'm sure it would be beneficial to someone down the road!