more G-Labs products

Author Topic: I cant seem to get the basic stuff working could use some help  (Read 2844 times)

February 09, 2016, 11:35:43 PM
Read 2844 times

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
OK I install HG on windows. I am using a Zstick and it sees all of my devices.
I configure just 2 devices a light switch Dragon ws-100 binary switch device # 10  and a Ecolink pir-zwave2 sensor device #36.
First Issue:  the switch can be turned on and off from the HG interface. However, the status does not update if I manually activate the switch on its own mechanical button.
Second Issue: I can see the motion detector  detect  motion in HG if the tamper is tripped it does not reset.
Third Issue: I am using smart lights. when the pir detects motion it updates on the screen but the light does not turn on.

Any help with these issues would be appreciated

THANX
MITCH

February 10, 2016, 12:35:33 AM
Reply #1

Maximo

  • ***
  • Information
  • Full Member
  • Posts: 84
Issue one is very simple. X10 devices don't report their status, so doing a manual change outside of the HG interface isn't going to show up.

I can't help with tue other two issues, I'm sure someone will come along soon enough who can.

Regards,

Garry

February 10, 2016, 12:40:12 AM
Reply #2

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
Thanks Garry for the reply

All of the devices I am writing about are Z-wave and not X10 and I can Poll for status but it should not be necessary

Thanks again

February 10, 2016, 01:29:32 AM
Reply #3

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
1) I don't use ZWave, but it is my understanding that they should all send their status as you suggest and you can certainly poll them (though should not be necessary).  I don't know why they would not update as I've never used them.

2) I've seen reports that the tamper switch does not reset unless you do something to the module itself.  I don't know anything beyond that, but it's been reported in a couple threads, so you might be able to search and find some useful information.

3) Are you sure you have the smart lights set up correctly?  To make it work, you must have a motion sensor, a luminescence sensor, and a light of some kind.  You modify the smart lights settings for the light such that it triggers based on the motion sensor's name.  I don't remember how the lumin value is set in the code, so I can't help there.  Once you have it configured, make sure you select "UPDATE" or else settings will be lost.  Finally, if everything is configured correctly, you will have your lights turn on only when the lumens are below a threshold set in the APP.  Make sure it's dark enough.  Also, make sure the lumen sensor is not close to the light you are triggering or you will have a flashing light situation.

February 10, 2016, 02:33:40 PM
Reply #4

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
My understanding is that the luminescence sensor is optional and not required for it to work on motion alone. can someone verify this and also still looking for answers to my other 2 questions

THANX
MITCH

February 10, 2016, 04:54:08 PM
Reply #5

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Code: [Select]
          var da = GetDomainAddress(mod.Parameter(MOT_SENSOR_NAME).Value);
          if (da.Domain == module.Instance.Domain && da.Address == module.Instance.Address)
          {
            mod.Parameter(LAST_EVENT).Value = DateTime.UtcNow.Ticks.ToString();
            //if (mod.IsOff)
            {
              da = GetDomainAddress(mod.Parameter(LUM_SENSOR_NAME).Value);
              var lumsensor = Modules.InDomain(da.Domain).WithAddress(da.Address).Get();
              if (lumsensor.Instance != null)
              {
                var luminosity = lumsensor.Parameter("Sensor.Luminance").DecimalValue;
                if (luminosity < mod.Parameter(MIN_LUMINANCE).DecimalValue)
                {
                  Program.Notify("Smart Lights", module.Instance.Name + "<br>switched ON " + mod.Instance.Address + " " + mod.Instance.Name);
                  if (synchTimetable && mod.Parameter("TimeTable.Status").DecimalValue > 0)
                    mod.Level = mod.Parameter("TimeTable.Status").DecimalValue;
                  else
                    mod.On();
                }
              }
              else
              {
                Program.Notify("Smart Lights", module.Instance.Name + "<br>switched ON " + mod.Instance.Address + " " + mod.Instance.Name);
                if (synchTimetable && mod.Parameter("TimeTable.Status").DecimalValue > 0)
                  mod.Level = mod.Parameter("TimeTable.Status").DecimalValue;
                else
                  mod.On();
              }
            }
          }
  • find module
  • check state
  • check lumsensor is defined
  • if lumsensor not defined (else), set to timetable value or turn on

So, it appears that if you do not have a lumsensor defined and the timetable is not used then it should turn the light on when motion is sensed.  Are you seeing the notification?
Code: [Select]
Program.Notify("Smart Lights", module.Instance.Name + "<br>switched ON " + mod.Instance.Address + " " + mod.Instance.Name);
It should say:
title="Smart Lights"
text="<module name> switched ON <module address> <module name>"

February 10, 2016, 09:49:31 PM
Reply #6

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi,

First Issue:  the switch can be turned on and off from the HG interface. However, the status does not update if I manually activate the switch on its own mechanical button.
In HomeGenie configuration of the device, did you put the "GroupID" 1 to value 1.
Perhaps need the other GroupID 2,3,... to value 1 too. It depends of your device.
Second Issue: I can see the motion detector  detect  motion in HG if the tamper is tripped it does not reset.
Same behavior on my side with a Fibaro motion sensor (and a door sensor). Perhaps, HomeGenie need to reset because the device doesn't to send zwave packet to say "all fine now" ..
On my side, i don't care a lot of the "tampered" ;)

February 15, 2016, 08:24:33 PM
Reply #7

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
still looking for answers to all 3 questions
So far no suggestions worked.
But I wish to thank everyone for their input


February 15, 2016, 10:31:22 PM
Reply #8

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I tried to help you with question 3 but you either didn't see the question or didn't post the result from HG.

February 15, 2016, 10:55:28 PM
Reply #9

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
bkenobi

sorry I did not respond. just being new to this It did not seem to work
I have set up a test enviorment with just the 2 devices a switch and a motion sensor

The sensor shows motion on the widget. It also displays tamper.

The light does not turn on
you state "It should say:
title="Smart Lights"
text="<module name> switched ON <module address> <module name>"
I don't know where I should see those words. they do not show on the display. nor can i find them in the log (ATTACHED)

I have also attached the log file

February 16, 2016, 12:16:32 AM
Reply #10

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I can't help much on ZWave as I have never looked at it or the commands.  It looks to me as though HG is at least attempting communication with several nodeID's (0, 4, 10, 12).  NodeID 10 appears to be your motion sensor as it has the "AlarmTampered" parameter and a value of 255 (on) as well as "Battery".  HG is successful in sending and receiving data packets (outbound, inbound).  I do not know what is on either 4 or 12, but I don't see NodeID 36.  My only suggestion is to make sure your devices are set up correctly first and then we can try again.  It looks like you think 10 is your switch and it's really your motion sensor.  You certainly can't control the lights by sending anything to a motion sensor.

February 16, 2016, 03:05:43 PM
Reply #11

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
Again Thank you for the help here is an update

Node 10 is the echolink pir-zwave2 sensor and node 4 is the light switch dragon ws-100 that I am trying to control
here is the log entries
------
2016-02-16 08:55:54.5024 Debug 01-09-00-04-00-0A-03-30-03-FF-37                     
2016-02-16 08:55:54.5024 Debug ZWaveMessage (RawData=01-09-00-04-00-0A-03-30-03-FF-37)                     
2016-02-16 08:55:54.5024 Debug ZWaveMessage (Direction=Inbound    Header=SOF    NodeId=10    Type=Request    Function=ApplicationCommandHandler    CommandClass=SensorBinary)      
2016-02-16 08:55:54.5024 Debug 06                     
2016-02-16 08:55:54.5024 Debug NodeUpdated (NodeId=10    Parameter=SensorGeneric    Value=255)               
"2016-02-16 08:55:54.5024 Info HomeAutomation.ZWave   10   ZWave Node   Sensor.Generic   255"                     
"2016-02-16 08:55:58.1674 Info WebServiceGateway   192.168.16.4   HTTP   GET   200 /api/HomeAutomation.HomeGenie/Config/Interfaces.List/?_=1455572111507 [OPEN]"                     
"2016-02-16 08:55:58.1674 Info WebServiceGateway   192.168.16.4   HTTP   GET   200 /api/HomeAutomation.HomeGenie/Config/Interfaces.List/?_=1455572111507 [CLOSED AFTER 0 seconds]"                     
"2016-02-16 08:56:08.1079 Info WebServiceGateway   192.168.16.4   HTTP   GET   200 /api/HomeAutomation.HomeGenie/Config/Interfaces.List/?_=1455572111508 [OPEN]"                     
"2016-02-16 08:56:08.1079 Info WebServiceGateway   192.168.16.4   HTTP   GET   200 /api/HomeAutomation.HomeGenie/Config/Interfaces.List/?_=1455572111508 [CLOSED AFTER 0 seconds]"                     
"2016-02-16 08:56:12.5035 Info WebServiceGateway   192.168.16.4   HTTP   GET   200 /api/HomeAutomation.HomeGenie/Config/System.Configure/UpdateManager.UpdatesList/?_=1455572111509 [OPEN]"                     
"2016-02-16 08:56:12.5035 Info WebServiceGateway   192.168.16.4   HTTP   GET   200 /api/HomeAutomation.HomeGenie/Config/System.Configure/SystemLogging.IsEnabled/?_=145"      


It seems to me that the PIR state changes but there is no action taken by the smart lights I do not even see an entry for it in the log

February 16, 2016, 04:04:33 PM
Reply #12

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
I have solved Issue #3 on my list the Smart Lights issue

I have changed this line of code from
if (parameter.Name == "Sensor.MotionDetect" || parameter.Name == "Status.Level ")
to
if (parameter.Name == "Sensor.MotionDetect" || parameter.Name == "Status.Level "||parameter.Name == "Sensor.Generic")

which solved the issue

February 16, 2016, 04:26:30 PM
Reply #13

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
That works.  I use Status.Level in the Advanced Smart Lights code as X10 motion sensors do not use the MotionDetected parameter.  Even if the motion sensor did return that value, the Status.Level would also be set so I don't see any down side to using it instead.

The funny thing is that I thought Gene coded that up to work with Aeon brand sensors which are ZWave.  I would have assumed the Smart Lights code would work with all ZWave since that's what it was designed for.

February 19, 2016, 02:27:17 AM
Reply #14

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
As I stated I am using the Ecolink pir-zwave2
when it sees motion it does not set or change status.level the only change is sensor.generic

I have now determined that Smart Lights  is too basic for my needs and I am trying to get advanced smart lights working. However, I am not a coder and I am spending a lot mmore time on this project than I expected. I realy need to find an off the shelf solution to fit my needs. Any suggestions are welcome