Home AMX User Forum NetLinx Studio
Options

Offline/online event

I am tired of sending techs out to reboot panels because of network issues, so I wrote an offline event for the panel to trigger a N.C. relay (reason I asked about the NO/NC relays) to hard reset the panel. The code works well but I was wondering if there would be anyway to prevent the offline event from triggering falsely if the network hick ups?

Comments

  • Options
    How about creating a wait during the offline event and give it a minute or so prior to rebooting it? If the device comes back online cancel the wait.

    --John
  • Options
    Spire_JeffSpire_Jeff Posts: 1,917
    Have you considered adding something along the lines of:
    define_constant
    integer RebootTimeline = 1;
    
    define_variable
    integer nRebootPanel[NUM_PANELS];
    long lRebootTimes[] = {1000};
    
    
    define_event
    
    data_event[dvPanels]{
    offline:{
      stack_var integer nPanel;
      nPanel = get_last(dvPanels);
      nRebootPanel[nPanel] = 1;
      if(!timeline_active(RebootTimeline))
         timeline.create(RebootTimeline,lRebootTimes,1,TIMELINE_RELATIVE,TIMELINE_REPEAT);
    }
    online:{
      stack_var integer nPanel;
      nPanel = get_last(dvPanels);
      nRebootPanel[nPanel] = 0;
    }
    }
    
    timeline_event[RebootTimeline]{
      stack_var integer x;
      stack_var integer y;
      y = 0;
      for(x=NUM_PANELS;x;x--){
         if(nRebootPanel[x]){
            nRebootPanel[x]++;
            y++;
         }
         if(nRebootPanel[x] >10){
           fnDoPanelReboot(x)
           nRebootPanel[x] = 0
         }
      }
      if(!y)
        timeline_kill(RebootTimeline);
    }
    
    

    I think that should work, but you may need to fix some errors as I wrote this here as opposed to in NS. This method will wait 10 seconds before rebooting the panel. If the panel comes online and then drops back offline during the 10 seconds, the timer is reset and it takes another 10 seconds to reboot.

    Jeff
  • Options
    ericmedleyericmedley Posts: 4,177
    I am tired of sending techs out to reboot panels because of network issues, so I wrote an offline event for the panel to trigger a N.C. relay (reason I asked about the NO/NC relays) to hard reset the panel. The code works well but I was wondering if there would be anyway to prevent the offline event from triggering falsely if the network hick ups?

    I'd write another routine with that tracks the state of the network. Then include that state in the 'whether or not ' to reboot the panels routine. I'd also do this at NI startup so you don't get a false reboot of panels simply because you restarted the NI master.
  • Options
    Thx's for the info, I added a 20 sec delay that is cancelled if the online event happens. I'd like to monitor our network and be able to sense if a reboot is required is required of the panel or if the whole network is just down.
  • Options
    Dang Jeff, you get extra points for getting the formatting all pretty in your post using only the 'reply to thread' window.

    I've mentioned synaccess a bunch of times in previous posts, but I think some type of network rebooter should be in every install if there's budget for them. They've saved us a lot of headache on far away and close-by projects. We use them to monitor if the network goes down, and even which segment so that modems, routers, switches, devices, etc. are automatically rebooted if a failure occurs. If there's an opportunity to spec those into the project it's a good extra profit item, but more importantly a valuable long term time and money saving device for the customer and installer.

    --John
  • Options
    ericmedleyericmedley Posts: 4,177
    Dang Jeff, you get extra points for getting the formatting all pretty in your post using only the 'reply to thread' window.

    I've mentioned synaccess a bunch of times in previous posts, but I think some type of network rebooter should be in every install if there's budget for them. They've saved us a lot of headache on far away and close-by projects. We use them to monitor if the network goes down, and even which segment so that modems, routers, switches, devices, etc. are automatically rebooted if a failure occurs. If there's an opportunity to spec those into the project it's a good extra profit item, but more importantly a valuable long term time and money saving device for the customer and installer.

    --John

    I can't let the cat out of the bag yet. But, our company is creating a product that should interest all of you in this regard. We showed it at CEDIA. It's supposed to hit the shelves (so-to-speak) in November. I'll post more when I get a green light to do so.
  • Options
    Sorry... Isn't CEDIA out of the bag already?
  • Options
    ericmedleyericmedley Posts: 4,177
    Sorry... Isn't CEDIA out of the bag already?

    Yes, my orders are my orders. I'm not saying their logical. Their just orders.

    :D
  • Options
    I'm excited.... I've been looking for a product to help me write pretty code inside a forum response box.
    :)

    --John
  • Options
    ericmedleyericmedley Posts: 4,177
    I'm excited.... I've been looking for a product to help me write pretty code inside a forum response box.
    :)

    --John

    :D that made me laugh! thanx
  • Options
    a_riot42a_riot42 Posts: 1,624
    I am tired of sending techs out to reboot panels because of network issues, so I wrote an offline event for the panel to trigger a N.C. relay (reason I asked about the NO/NC relays) to hard reset the panel. The code works well but I was wondering if there would be anyway to prevent the offline event from triggering falsely if the network hick ups?

    Maybe this is a stupid question, but why not fix the hiccups? I rarely see a touch panel go offline with a good network, so I am surprised to hear you have this problem. What kind of network issues are you having that requires rebooting panels?
    Paul
  • Options
    a_riot42 wrote: »
    Maybe this is a stupid question, but why not fix the hiccups? I rarely see a touch panel go offline with a good network, so I am surprised to hear you have this problem. What kind of network issues are you having that requires rebooting panels?
    Paul

    I have spent 2 years proving to our IT guys that the issue is on their side, problem is they control everything and it takes me 1 month just to prove 1 room. i have over 350 rooms...The problem only showed up 2-3 years ago, until then everything was rock solid.
  • Options
    ericmedleyericmedley Posts: 4,177
    a_riot42 wrote: »
    Maybe this is a stupid question, but why not fix the hiccups? I rarely see a touch panel go offline with a good network, so I am surprised to hear you have this problem. What kind of network issues are you having that requires rebooting panels?
    Paul

    We've struggled over the years. We put in very high-end enterprise level networking in our intstalls. (Our client, thankfully, can afford them.) We hire an EE to help setup the network. we have certified network people. etc...

    Having said all this, we find that in our market we will have issues due to the construction of the homes. Around here they are way overbuilt to handle the hurricanes. I have some houses that can have a WAP on one side of a wall be completely gone on the other. Also, we've found that building materials can play havoc. We had a house where they mixed in sand with the paint to create a stucco-ish look. the silica in the sand was almost completely radio opaque.

    Houses are a terrible place to set up a wireless network. That's my opinion.
Sign In or Register to comment.