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
  TTS Driver Error kblagron 7 768 03-03-2023, 01:05 AM
Last Post: kblagron
  Admin Interface Help Doesn't Work alexismtz13 1 647 04-28-2022, 01:14 PM
Last Post: Dean Roddey
  Driver for Amazon 4k Stick Darrie 3 898 01-15-2022, 02:21 PM
Last Post: znelbok
  CQSL Interface Driver connects but no control NightLight 3 950 10-26-2021, 01:12 PM
Last Post: NightLight
  6.0.0 Interface Viewer - Action Trace Mark Stega 1 864 03-09-2021, 06:39 PM
Last Post: Dean Roddey
  Cannot Bind Interface to 80 gReatAutomation 1 1,161 11-05-2020, 04:18 PM
Last Post: Dean Roddey
  ClickPLC driver now failing after upgrade znelbok 2 1,280 09-21-2020, 10:48 PM
Last Post: znelbok
  Pentair driver tom 5 2,436 08-02-2020, 11:29 PM
Last Post: kblagron
  Marantz receiver driver (IP) dlmorgan999 6 2,496 05-15-2020, 03:32 PM
Last Post: dlmorgan999
  Variables Driver Client gReatAutomation 4 2,039 04-25-2020, 12:46 PM
Last Post: gReatAutomation

Forum Jump:


Users browsing this thread: 1 Guest(s)