Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serialization of CQC SMS Serial Interface Driver
#1
Is it possible to look in to serializing the SMS driver? Specifically, you cannot throw multiple SendMessage commands at the driver and have it process them.

Because of the way GSM modems work using AT commands you have to wait for the command to process before sending it another command.

Would be nice if in the CQC driver, the SMS SendCommand commands were serialized, objects then stored in the CQC database as a BLOB (or whatever is used), and then processed.

If I have a scheduled action that send an SMS message to more than one phone I currently have to put a System.Pause(5000) in between the sending of the SMS message. If a triggered event happens to run at the same time, one of the SMS messages will get dropped on the floor.

If not serializing the command/driver, perhaps adding a "Ready" boolean variable to the driver so that we could at least check that before issuing new SendCommand commands.
Reply
#2
Yeh, a busy or ready flag would be a good idea.
Dean Roddey
Explorans limites defectum
Reply
#3
Import this pack, and reconfigure the driver to pick up the change. I had to do this buy eye, but it's pretty straightforward so probably I got it right. It should set a Busy flag to true while the message is being sent.


Attached Files
.cqcdrvpack   SMS_WithBusyField.CQCDrvPack (Size: 8.44 KB / Downloads: 2)
Dean Roddey
Explorans limites defectum
Reply
#4
Did you get a chance to try the tweak above?
Dean Roddey
Explorans limites defectum
Reply
#5
Trying it now.
Reply
#6
I can see the field, but now have to think through how to use it effectively.

Basically:

If Busy, wait, then check again and repeat. When not busy, send message
Reply
#7
Use the Devices::WaitFieldValue (I think that's it.) It allows you to wait on a field to reach a value, or time out. That way you don't have to wait any longer than actually required.
Dean Roddey
Explorans limites defectum
Reply
#8
A little off topic but just started moving my sms and all SMTP forwarding to this service after noticing that IFTTT has a built in service for them also...
https://developers.clicksend.com/docs/
(Note: you may need to ask for a free short code to send from if you want to send to AT&T in the US. Guess carriers are trying to reduce spam... finally)

May be worth creating some kind of interface in CQC to send an SMS using clicksend via one of their api's?

thx 
Kevin
_______________
Denon 3808ci, 2112ci ,Sonos, NoVo Grand Concerto, Z-Wave(Lights,Locks), Hue, SmartThings,
iPads,Tivo,Hikvision,Elk-M1,TED5000,Somfy RTS blinds+ZRTSI, Amazon Echos+Dots, Polk XRT12,
Honeywell Wi-Fi 9000, Caleo Wi-Fi Thermostats, Rainmachine
Reply
#9
Thanks ClickSend looks ok but I do not want anything remotely dependent on an Internet connection. SMS works when the Internet connection is down and when there is a power outage.
Reply
#10
Quote:Dean Roddey

Use the Devices::WaitFieldValue (I think that's it.) It allows you to wait on a field to reach a value, or time out. That way you don't have to wait any longer than actually required.

Thanks. 

This seems to work. I've placed the WaitFieldValue off of the new Busy flag you added before each SMS command. I'll have to do this everywhere I am sending SMS messages. When testing one of my scheduled messages, I can see that the WaitFieldValue is between 2 - 3 seconds before it moves on to the next message.

[Image: Screen-Shot-2019-08-25-at-13-11-56.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot Bind Interface to 80 gReatAutomation 1 50 11-05-2020, 04:18 PM
Last Post: Dean Roddey
  ClickPLC driver now failing after upgrade znelbok 2 126 09-21-2020, 10:48 PM
Last Post: znelbok
  Pentair driver tom 5 743 08-02-2020, 11:29 PM
Last Post: kblagron
  Marantz receiver driver (IP) dlmorgan999 6 669 05-15-2020, 03:32 PM
Last Post: dlmorgan999
  Variables Driver Client gReatAutomation 4 565 04-25-2020, 12:46 PM
Last Post: gReatAutomation
  Check Box widget on WebRIVA vs Interface Viewer bryanb 1 342 04-23-2020, 06:15 AM
Last Post: bryanb
  Reconfig of Driver Causes Built In Triggers to Fire gReatAutomation 2 454 03-25-2020, 04:09 PM
Last Post: gReatAutomation
  Lutron RadioRA2 Driver and Lutron Visor Control gReatAutomation 29 6,005 03-19-2020, 01:03 PM
Last Post: gReatAutomation
  Timers Driver / Field Time Image / Seconds gReatAutomation 1 422 03-16-2020, 05:48 PM
Last Post: Dean Roddey
  Problem with Accesssing Variables Driver Client Interface kblagron 5 814 03-05-2020, 02:24 PM
Last Post: kblagron

Forum Jump:


Users browsing this thread: 1 Guest(s)