Tuesday, December 27, 2016

Page alert

Another option named page alert is now functional in firmware 1.7.5. What it does, it takes telephone number and ring it for 15 seconds, then hangs up. It is efficient way to inform you about urgent alerts along with SMS, or as separate alert. But it is meant only for high importance alerts, since it needs to wait for GSM modem to dial, ring and hang up. It is processed at last in alerting thread, but stop processing of alerts for long time, especially when there are more then one telephone number to page/call.

Friday, December 16, 2016

Gateway setup

Just created new section on right called How to start and Gateway setup describing what hardware you would need to get started with OHS. And later first configuration of gateway.

Sunday, December 11, 2016

Email alerting

Some time ago email alerting was added, along to SMS, to send email to predefined contacts. I have been thinking what would be easy to achieve it for me, but also for other users. And although I have small server running at home, I have opted for service available for free online. I have found nice service offered by smtp2go.com, they have free plan service for 1,000 emails per month or 25 emails maximum per hour. That would be sufficient for any even heavy usage for a single gateway. Service is available on port 2525 and they ask for user credential encoded by base64. Simple enough to add into existing alerting thread. Just fill email user and email password in Global section and choose which type of alert is to be send via email. No fancy text is sent through email, just subject with same info as for SMS, and it is send to all recipient that match as single email. It works fast enough and seems efficient for alerts that have less importance.

Friday, December 2, 2016

Timers

Timers are new feature present on gateway firmware 1.7.4. As name suggest it allows you to manage remote nodes relays or any outputs by time schedule.

I was inspired to add timers to GW by repetitive resets of my stand alone digital timer outlet bought in hobby supermarket. This nice looking power outlet with relay and display is able to create 8 different schedules based on time and day of week. But sadly it randomly reset it self every 1~2 months, and leaves me to re-program it by its little buttons. After year or so I toss it away, and soldered another wireless node with relay output and started to add the scheduler to GW. 

There are 10 separate timers present in firmware, or more if you recompile it. The overview is present in following table:
As always all setting of timers is available over the GW web interface. Timers are divided to two different kinds. One called Period and other Calendar. The main difference between them is how they handle days of week. Calendar based timer can run only once a day at any given start time you provide. And you can select what day of week it will run. Period timer will run repetitively at every period time starting at given start time. Period time can range from 1-255 seconds, minutes, hours or days. Both of types of timers have in common run time setting which specify the time between On and Off signal to remote node. It again ranges from 1-255 seconds, minutes, hours or days.

All setting for timers are shown on right screen shot. Every timer can be identified by name, and can be turned On or Off at any time. There must be taken some caution when turning Off timer that is triggered, it would disable the Off signal sent to remote node and it will be left On. Then there is the mentioned Period and Calendar switch, and later on seven switches for every day of Calendar timer. These day switches have no functionality for Period timers. Start time on the other hand has meaning for both, Calendar timer will trigger exactly on this given time at any selected day. And Period timer uses the Start time as offset of its first calculated period interval. Period time and Period interval together make the desired scheduled start for Period based timer. And Run time and Run interval make the desired scheduled end for both types of timers. To address selection lets you assign any node in your wired or wireless network that is capable of input function. Then Constant On and Off are the values that are sent to such node at start and stop time.

I have made small demo video of four Period timers set with Period time to 2, 4, 8 and 16 seconds and Run time set to 1, 2, 4 and 8 seconds. As you see it on LEDs, they create a nice binary counter :). Just to say, the code of below wireless node is only capable to listen to commands from GW, and turn the attached relays On or Off based on received value. So no need to reprogram it in case of changes.