Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Router reset at midnight from CR1000 control.


cellectronic Feb 3, 2016 12:37 PM

Hi All

My system consists of a CR1000 weather station with an NL115  wired into a wireless router .

The router connects via Wi-Fi to a local wireless hotspot and the system uploads data to weather underground.

All runs well but occasionally the router requires a reset which entails an hours drive for me ,just to reset the router.

I have considered using the PSW12 wired to the switched 12V of the CR1000 , but the switched 12V is used to power some sensors.

What I might be able to do is wire in the PSW12 in the GSM Tranceiver Control mode  and power the router from the output of the PSW12 and using C1 of the logger as the control .

Question is can I use this  setup to remove the router power for 1 minute so to enable a router reset every midnight ?

Maybe someone could suggest a few lines of CRBasic that would switch control port one , for 1 minute at midnight ! as programming is not my strong point , Thankyou.

Hope this makes sense  and thanks for any support .


JDavis Feb 4, 2016 09:53 AM

You can get some example code out of ShortCut. There is a 'Switched 12V Timed Control' in current versions of ShortCut. You can use that code, just changing it to switch the comport. It should work. Many wifi routers don't pull more than the 900mA the SW12 is fused at.

Some wifi routers have a setting in them to make them reboot on a schedule. It is worth looking into.


cellectronic Feb 4, 2016 02:12 PM

Hi Jacob

Many thanks for your reply.

The router is reflashed with DDWRT Firmware and set to reboot at midnight this did help the initial hangup , However occasionally I have to go onsite and pull the power on the router in order to restore communications. The router itself only draws about 300mA .

I will look into your suggestion and thanks for the email.

Kind regards , Steve.


smile Feb 6, 2016 04:13 AM

Hello everyone,

you could use with CRBasic, at predetermined intervals, maybe before and synchronous with your needs connection, the ping instruction, to check if your connection is active, and if you have problems, stop for a minute the router.

Use SW12 and C1..C8 port on CR1000, for doing this, is described in another your post.

Smile


Uri Feb 6, 2016 09:51 PM

Hi,

You can use this code to turn the CR1000 control port C1 on and off:

'Turn Port on at 24:01 and turn it back off at 24:02
If IfTime (001,1440,min) Then PortSet(1,1)
If IfTime (002,1440,min) Then PortSet(1,0)

The code switch C1 on to turn my cellular modem off because I use a NC (normaly closed) relay, and a minute later switch the port back to off to turn the cellular modem back on.

You can use the same code with SW12 by replacing the 'PortSet(port #,status 0/1)' with 'SW12 (status 0/1)' . But remember to  put 'SW12(0)' at 24:01 to turn it off and 'SW12(1)' at 24:02 to turn it back on.

Put the code at the end of your program, after the 'CallTable XXX' instruction, just before the 'NextScan' instruction. 

I recommend using a NC relay.

Log in or register to post/reply in the forum.