Jump to content

Please do not power off/unplug message (repeatedly)


Recommended Posts

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.)

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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. ;(

Link to comment

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?

Link to comment

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.

Link to comment

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.

Link to comment

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

Link to comment

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

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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

Link to comment

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.

Link to comment

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.

Link to comment

Archived

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


×
×
  • Create New...