Jump to content
AT&T to end email-to-text ×

programing for motion sensor


Recommended Posts

Posted

Anybody know what the programing content might be to put a motion sensor on a time of day schedule and to turn on a specific scene during that time frame.

Thanks

Posted (edited)

I have a similar program, for turning on a video fireplace if motion is detected between certain hours in the morning. It looks like this:

Ambiance turn on if MS morning - [ID 0037][Parent 0048]

If
        From     7:30:00AM
        To       9:30:00AM (same day)
    And 'MS LR-Sensor' is switched On
    And $s_fireplace_already_on is 0
     
Then
        $s_fireplace_already_on  = 1
        ...trigger fireplace on commands...

 
Else
   - No Actions - (To add one, press 'Action')
 

The $s_fireplace_already_on state variable is a flag to prevent it from triggering twice on the same day. It gets reset to 0 during the night.

 

I might add that if you use a flag variable like I did, then put the statement setting it to a new value as your last Then statement. I edited out some commands from my actual program for clarity.

Edited by Guy Lavoie
Posted
3 hours ago, sbooke said:

programing content might be to put a motion sensor on a time of day schedule and to turn on a specific scene during that time frame

Best bet is like @Guy Lavoie has is for the program to only be true during the time you want the scene to run AND when there is motion. Do you have a program you're trying to troubleshoot or starting from scratch? If you have an existing program you want some help with please be sure to include that in your post by right clicking the program, selecting "Copy to clipboard" then pasting in the port as text so that others can help edit/alter the program easily. Screen shots aren't as easy to help edit.

 

Posted

I am starting from scratch.  from what i can find, this is not intuitive.  the fire place example is just to turn on once and then off.

i would like the following:

Motion sensor to turn a scene or a controller on and off during a time period.

The real live example is to turn on the lights in the bathroom for 5 minutes every time motion is detected during the day only. ( we don't want the lights to come on in the middle of the night)

I get how to add the motion sensor to a scene to control the scene on and off. I cant figure out how to make the motion sensor  turn on and off a scene/controller during a period.

 

Help is appreciated.

Posted

Well it's essentially the same program, but with an additional time period and then an off statement. I have several motion sensors that are used like that. No variable is used to control it otherwise.

MS basement kitchen - [ID 001B][Parent 006A]

If
         From     5:00:00PM
        To       10:30:00PM (same day)       

    And 'MS basement kitchen' is switched On
     
Then
        Set 'basement kitchen light' On
        Wait  5 minutes 
        Set 'basement kitchen light' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

Posted

I have tried this which does not work

 

image.png.f52937dd5220ad9ae05f469bec3654a7.png

 

MS works in a scene as a controller, but not in programs

Options for MS are factory defaults

Posted (edited)

Some versions may not have the Jumper Header. Just two solder pads where it was mounted on the PC board. In the early manuals.

Was to set the reduction in sensing field. Jumper On is reduced sensitivity. The small jumper block was many times on one of the two pins on the PCB.

Some have used the power connector in them to run them on an external USB power supply. They are supposed to not have to go into the power saving mode on an external supply.

Edited by Brian H
Add something.
Posted
On 3/31/2025 at 6:03 PM, sbooke said:

I have tried this which does not work

 

image.png.f52937dd5220ad9ae05f469bec3654a7.png

 

MS works in a scene as a controller, but not in programs

Options for MS are factory defaults

@sbooke, if your motion sensor CAN trigger a scene but CAN'T trigger a program:

  1. Your PLM can't hear the device 
  2. Your PLM isn't programmed to listen to the device
  3. You have too many link records in the PLM

Open the Event viewer to @Level3 and activate the motion sensor.  You should see communication similar to the following (with your device address).  If you do not see any activity, check your PLM link record count and review the following thread: https://forum.universal-devices.com/topic/45014-motion-sensor-only-works-in-scenes-not-programs/

Thu 04/03/2025 07:42:31 : [INST-SRX    ] 02 50 4A.6F.65 00.00.01 CF 11 01    LTONRR (01)
Thu 04/03/2025 07:42:31 : [Std-Group   ] 4A.6F.65-->Group=1, Max Hops=3, Hops Left=3
Thu 04/03/2025 07:42:31 : [D2D EVENT   ] Event [4A 6F 65 1] [DON] [1] uom=0 prec=-1
Thu 04/03/2025 07:42:31 : [  4A 6F 65 1]      DON   1

 

  • Like 3
Posted

ok thanks

Motion does not show up in the event view after a trigger.

I only have 48 links

I am going to bale on using motion in programs, to much trouble

Posted

Don't give up. You just need to learn a few basics.

Start with a simple program that just increments a variable. Look for the "control" event instead of status. Like this:

MS entrance on - [ID 009F][Parent 006A]

If
        'MS Entrance-Sensor' is switched On                 (notice "is switched" instead of status, because I used control)
 
Then
        $s_Entrance_ms  = +1
 
Else
   - No Actions - (To add one, press 'Action')
 

Posted

@sbooke I just went through this exact same issue. My ISY also said I had 44, or 28, or 109 links. I deleted the motion sensor and related program, deleted a very large scene to reduce the link count to see if it was too many links, then added back the motion sensor. Tried a program and all worked well.

  • Like 1
Posted (edited)
16 hours ago, sbooke said:

ok thanks

Motion does not show up in the event view after a trigger.

I only have 48 links

I am going to bale on using motion in programs, to much trouble

@sbooke, 48 links is VERY few and somewhat doubtful.  I single Keypadlinc with a few scenes can consume 20 link records.  

If you can't see the motion sensor communication in the Event viewer, your program WILL NOT trigger.  The PLM either does not have the correct link records (programmed incorrectly) or the link record is outside of the range the PLM can access.  

The last condition (link record outside the access range) is what @gregkinney encountered.  As he indicated, deleting scenes can help reduce things below the 1024 1000 link limit.

If you believe that you have nowhere near that # of devices/links (I also don't), please post back.  If you have recently upgraded (Polisy to Eisy, etc) it's possible that something went South, and you don't have the correct links in the PLM.  

It is also possible that your PLM is having issues and is loosing it's links records.  Let us know the vintage (date code/rev level).

Edited by IndyMike
Posted

I've been seeing this mention of excessive links a lot recently, in various forum threads. I realize that the PLM supports up to 1000 links, but how many devices or scenes does it take to get there? I have a moderately sized system and if I go view the PLM link table, I get 367, so nothing to worry about. Maybe this is something we need to check every now and then.

Posted

The link limit has been around in various forms since the start of Insteon.  The original 2412S PLM had more memory, but had issues utilizing higher addresses - presumed to be due to speed limitations.

There is a fair amount of Smartlabs documentation stating that the 2413S PLM supports 2000 links.  Per the following, both @Brian H and @ELA verified that actual hardware from 2017 only supported 1000 links (https://forum.universal-devices.com/topic/24278-anyone-have-a-recent-2413s-plm/).

Like you, I have a link count in the middle 300's.  That's with ~66 Insteon devices.  At one time I had roughly 2x that number and I was pushing the limit. 

It's interesting to note that PLM memory utilization isn't all that efficient.  When devices are deleted, the memory isn't necessarily reclaimed.  As I mentioned in a previous thread, I recently "recovered" 150 link records by performing a "restore modem".

Finally, the Link Table Read function can be rather intermittent for some giving wildly different counts.  The actual reading is performed by a PLM function "Get Next All Link Record".  Unfortunately, during certain communication events, the PLM can loose track of where it is in the read process.  

I can normally get good PLM table reads in the early morning, but others have real issues getting consistent results.  As I'm writing this my family is moving around tripping the various motion sensors upstairs.  My link table counts are - 178, 919, 263, and 473.  None of these are correct. 

 

  • Like 1
  • Thanks 1
Posted

sorry plm links show 148 items in count

Esiy upgrade was 4 months ago prior to the motion sensor install.

 

i dont see where to grab the infor on the plm? It was replaced a year ago.

image.png.524f242f45a2b6df669f4b8c64664514.png

 

Posted

@sbooke, I'm guessing that something went sideways during your upgrade to the EISY.  Your PLM sounds as if it's relatively new.

The table below shows the entries in my PLM for my MS-II sensor @4A.6F.65.  In order for the PLM to hear the motion sensor, the circled link MUST be present.  If it is not, the PLM will ignore motion on/off communication from the sensor.

We need to figure out whether your PLM contains this link for your Motion Sensor.  If the link is present, you are having communication errors with the device.  If the link is not present, you'll need to remove/re-add the device OR restore a backup.  

Please save your PLM contents to a .XML file (see 2nd graphic) and upload to the forum.  Please also provide the Address of your Motion Sensor.  I will sort your PLM contents and try to find the links associated with the sensor.

image.png.e3c6d64ac5b0fcf2b43b50d8151c8976.png

 

image.thumb.png.6ca501226435b3d063fd6bac877d7e8e.png

Posted

That worked, and your PLM does have the link records for your device.  If your MS II is communicating (you said you were able to trigger scenes with it), your PLM should see group 1 communication from this device.

Your event viewer should show the following when triggered (updated with your device address).  Make sure that the Event Viewer is set to level 3.  

If you cannot see the communication in the event viewer either you have communication issues with that device (noise, etc) or the device itself isn't programmed correctly. 

  1. If you changed PLM's recently, it's possible that the Motion Sensor does not have the correct PLM address in it's link memory.  To verify, place the Sensor in programming mode and perform a Link Table Read +  compare.
  2. It's possible that the MS-II Options are not set correctly.  Verify that "Conditioin, Report, and Sensitivity" are set correctly (see below)

Event Viewer Showing MS-II on trigger

[INST-SRX    ] 02 50 4D.EF.5F 00.00.01 CF 11 01    LTONRR (01)
[Std-Group   ] 4D.EF.5F-->Group=1, Max Hops=3, Hops Left=3
[D2D EVENT   ] Event [4D EF 5F 1] [DON] [1] uom=0 prec=-1
[  4D EF 5F 1]      DON   1

 

Your PLM link record for the Motion Sensor

image.png.68824b76d99ad31dc86efe5c94b2af0c.png

 

Motion Sensor Link Table Read + Compare

image.thumb.png.fae8b2f1d33f305bf21c0a8bfd3ec19f.png

 

MS-II Device Options

image.thumb.png.af7388e1a4884eff6a37b51a35fa9b0e.png

  • Like 1
Posted

ok so the options matched and here is the event viewer log.

The last couple of lines are a battery out then in restart of the motion sensor.

Why is the plm ignoring the motion sense?

In the main tab i am there are 3 entries for the motion sensor.  Motion bath motion.1 motion; 4d.ef.13 motion enable; 4d.ef.13 tamper

 

again the program is: there have been a few versions of the set to command is default correct?

image.png.0ac2fbf70b739ad11252b154c4bac729.png

 

image.thumb.png.8eee1d01b39ecc1d733dc594381d7dde.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...