Elk M1 Read Temperature Jandy Aqualink Serial

craigm

New Member
I am communicating with my Jandy Aqualink system through the Elk M1 using the jandy serial adapter. I can send commands just fine to turn things on and off. Does anyone know if there is a way to receive the temperature text string from the Aqualink, extract the temperature, and store it in a counter?

For example (this syntax may be off a bit) I send a query:

"!00 SPATEMP?"

It replies

"!01 SPATEMP = 98F"

I want to extract that "98" and put it in a counter.
 
hi craigm, welcome to CT!

Unfortunately, extracting numbers like that is not something the M1 can do :( You would need another controller, or build an Arduino based project which can 'translate' this for you.
 
"!01 SPATEMP = 98F" . . . I want to extract that "98" and put it in a counter.
Dan is right that the M1 is not equipped to do this in the manner you describe. But if you can define your problem appropriately there is a half-way solution.

The idea is to have a discrete rule and a discrete text string for each of the possible temperatures. Each rule would look for the particular string and set the counter to the value, e.g.,

1. WHENEVER string="SPATEMP=98" THEN set counter x to 98
2. WHENEVER string="SPATEMP=99" THEN set counter x to 99
3. WHENEVER string="SPATEMP=100" THEN set counter x to 100
4. etc.

To discover values out of range, you need rules to look for missing updates. This is a somewhat bizarre solution but if you only have the M1 and if you have lots of spare rule space, then use what you have. Dan is correct that another controller is the best way to do this.
 
Lagerhead's approach is definitely worth a shot (probably your only solution without investing in other hardware), so I would give it a try. Do keep in mind that the M1 is picky about line termination when it comes to incoming ASCII messages (forgot the requirements, it's CR and/or LF, but it HAS to be terminated or it won't trigger), so keep that in mind while testing. Too bad the M1 doesn't support regular expressions, that would be fantastic ;)
 
The HAI has the same string handling limitations. I really miss that capability of my previous HomeVision based system. You could extract characters to put into variables and transmit serial strings based on values in variables. That's something the HAI and ELK systems could both use and would open up a whole new level of serial integration.
 
Back
Top