Jump to content

Please do not power off/unplug message (repeatedly)


Recommended Posts

Posted

I wrote a program to blink a light:

If
    Status 'Office Can Lamp' is 100%
Then
    Repeat 3 times
        Set 'Office Can Lamp' Off
        Wait 1 second
        Set 'Office Can Lamp' On
Else
    Repeat 3 times
        Set 'Office Can Lamp' On
        Wait 1 second
        Set 'Office Can Lamp' Off

Nothing calls this program (yet).

 

I right-clicked on the program in the list of programs and chose "Run (if)". The light did start blinking.  

 

HOWEVER, now a message, titled "System Busy" is repeatedly appearing in the console. It states, "Please do not power off/unplug the system or make adjustments to the linked/attached devices." Below that message are some hex numbers "[  27 3A 5 1]" and then "ST 0" or "ST 255". There is a progress bar. This message appears for a few seconds, goes away, and then appears again. This has been going on for about 10 minutes. It does seem like the progress bar increases a little bit each time the message box appears (it always starts at 0%). The light continues to blink.

 

Any ideas why this is happening? It feels like a circular loop, but nothing calls this program. Maybe the system is indeed updating? Should I wait it out? Pull the plug? (I tried clicking on the program and choosing Stop.)

Posted

This is happening because the ISY is an event-driven system -- so you have, indeed, created the equivalent of an infinite loop.

 

Your program is running - and each time the program reaches the point where it turns the lamp to 100% on and waits, the condition in the "if" becomes true - and the ISY dutifully restarts your program from the top.  This will continue until the ISY is power off, or fails from old age... so you probably need to stop it in some way.

 

There's probably a bunch of ways to do this, but I'd start by pulling the tab on the Insteon light switch out so that it no longer has power - that might be enough to stop the program from running, and is probably the easiest way.

Posted

Thanks, mwester. That stopped it.

 

I'm confused why the if() statement gets rerun when the light is turned on. I realize it is event driven system, and I realize turning the light on/off is an event, but I wouldn't expect the light on/off event to reevaluate the if statement.

 

Second question (which is more than just satisfying my curiosity), how would you suggest I avoid this? With a variable that I set before the Repeat which notes that I'm already in this program and shouldn't continue evaluating the if()?

 

Thanks again.

Posted

My reply has nothing to do with your primary question but wanted to call out that using the controller to flash any light or beep is a bad idea.

 

As you have quickly learned the reasons why . . .

 

Even if you manage to find a good balance of staving off the infinite loop. If you have lots of programs that make various Insteon devices beep / flash you will find the controller will be extremely slow or freeze.

 

Ultimately, Smartlabs needs to make the beep and flash native within the hardware which many of us have asked in the Insteon *Wish List* thread in their forums.

 

If you find value in this idea please show your support by selecting the *LIke* button to the request.

Posted

Got it. Thanks. I do see in the docs that, "The 'Repeat' command, when encountered during program execution, will cause the program's conditions to be reevaluated."

 

I'm going to try using a variable to block the recursion.

Posted

Has nothing to do with "repeat", though.

 

The IF will be re-evaluated every time the status of Office Can Lamp changes between 100% and not 100%.

 

Your program changes the status of Office Can Lamp.

 

The IF condition doesn't know or care WHY the status of Office Can Lamp changed. It doesn't know/care what is in the THEN or ELSE, if it was changed by another program, if it was changed by you pushing a button, etc. etc. etc.

 

Baffles me why you want to blink the lamp every time to office can lamp is turned on/off or dimmed. Hope you check medical history at the door, so that it does not trigger an epileptic seizure. ;(

Posted

Second question (which is more than just satisfying my curiosity), how would you suggest I avoid this? With a variable that I set before the Repeat which notes that I'm already in this program and shouldn't continue evaluating the if()?

 

What specifically do you want to occur?

Posted

Insteon signals are slow and can grind ISY to a halt waiting to get a word in edgewise.

 

Every signal is repeated on your mesh network three more times and the acknowledging device has to wait before sending it's ACK at which point everybody has to wait, again, for three more repeats of that.

Posted

I want to blink a light three times and have the light return to its previous state (I.e., on or off).

 

What is the event that starts the blinking?

Posted

You should never power off or unplug repeatedly. It's bad on power circuits.

 

S.A.T.T.P.

Best regards,

Gary Funk

Posted

You should never power off or unplug repeatedly. It's bad on power circuits.

 

S.A.T.T.P.

Best regards,

Gary Funk

 

Not so. Disconnect a device has absolutely no effect on the circuit. However, repeatedly powering on a device can affect the life of that device.

Posted

What is the event that starts the blinking?

 

The triggering event is the garage door opening. That causes my office light to blink, and I go greet my wife...

Posted

If

        garage door device sends an Insteon signal

   and Status 'Office Can Lamp' is not Off

 

Then

        Run 'Program On'  (Then path)

 

Else

       Run 'Program Off'   (Then path)

 

Program On

If

   - No Conditions - (To add one, press 'Schedule' or 'Condition')

 

Then

        Repeat 3 times
       
Set 'Office Can Lamp' Off
        Wait 1 second
       
Set 'Office Can Lamp' On

 

Program Off

        same logic

Posted

Not so. Disconnect a device has absolutely no effect on the circuit. However, repeatedly powering on a device can affect the life of that device.

I said repeatedly. You can blow fuses, fry power transistors, blow capacitors, etc, etc, etc.

 

S.A.T.T.P.

Best regards,

Gary Funk

Posted

Never, never by disconnecting a device no matter how heavy a load it it. Damage can be caused by repeatedly powering a device ON. In fact, disconnecting a device is one of the safest things to do in the event of an electric problem.

Posted

Inductors not properly discharged by unplugging devices can cause huge voltage surges and destroy themselves and other components. This is the main reason may relay coils have backEMF diodes across their coils and some have discharge resistors.

 

To make a blanket statement, as such is just wrong.

 

To be to unplug something repeatedly one would have to plug it back in. This was implied by any reasonable person using everyday logic. To be that picky of wording or grammar or logic, where it is only for the pupose of grandstanding ones stature, is just disruptive of the flow of conversation in any forum.

Posted

All electric devices are required to have a disconnect for safety. That disconnect may even be the circuit breaker. It's never unsafe to turn off a circuit breaker even if what is being supplied if on. Blanket statement.

 

That's not to say that sticking your fingers into a device after power is removed is always safe. Some device hold onto a charge. Some devices may continue to spin, for example, a fan.

Posted

I think Stu's account has been hacked. Stu would not be that wrong.

 

Or perhaps he didn't read my post correctly.

 

S.A.T.T.P.

Best regards,

Gary Funk

Posted

I said repeatedly. You can blow fuses, fry power transistors, blow capacitors, etc, etc, etc.

 

No matter how many times you say it, none of that can occur by cutting power. Any valid documentation?

 

All of what you mention can occur when power is applied, but not when power is removed.

 

Caveat: cutting power while writing to a hard drive, flash drive, updating BIOS or firmware or programs, backing up or restoring data or anything similar may cause damage to the data, but the hardware will remain intact.

Posted

No matter how many times you say it, none of that can occur by cutting power. Any valid documentation?

 

All of what you mention can occur when power is applied, but not when power is removed.

 

Caveat: cutting power while writing to a hard drive, flash drive, updating BIOS or firmware or programs, backing up or restoring data or anything similar may cause damage to the data, but the hardware will remain intact.

That's NOT what I wrote. I said REPEATEDLY. Read it again, REPEATEDLY.

 

If you REPEATEDLY turn a light switch off, on, off on, off, on, off, on and REPEATEDLY do so a several times a second you can cause an overload and will have problems, maybe like the problem you are having by being overloaded with logic.

 

S.A.T.T.P.

Best regards,

Gary Funk

Posted

That's NOT what I wrote. I said REPEATEDLY. Read it again, REPEATEDLY.

 

If you REPEATEDLY turn a light switch off, on, off on, off, on, off, on and REPEATEDLY do so a several times a second you can cause an overload and will have problems, maybe like the problem you are having by being overloaded with logic.

 

S.A.T.T.P.

Best regards,

Gary Funk

 

I absolutely agree. Even a few off, on's can cause problems and/or damage. It's the frequent ON that's the culprit. That's often the cause of damage with power surges, off then on repeatedly with practically no time between.

Posted

You should never power off or unplug repeatedly. It's bad on power circuits.

 

OK, one can't repeatedly power off a device without powering it on. But, t's the On that's a problem.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...