You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So Sometimes (rarely) i'll get an accepted command which comes through as ZXXX1 or ZXXX0, but most of the time texecom is sending a pre-fix as follows:
[8/1/2020, 6:40:45 PM] [Texecom] IP data received: t4w"Z0061
[8/1/2020, 6:40:45 PM] [Texecom] Unknown string from Texecom: t4w"Z0061
Which results in it not understanding which zone it is, most of the time it begins with a t but the 2nd & 3rd character is variabale. eg. t.2"Z0051.
Any Ideas?
The text was updated successfully, but these errors were encountered:
Just to follow up - when connected directly to the IP com in a TCP session the data looks like this?
t:³"Z0061
t; "Z0060
t<Ç"Z0061
t=•"Z0031
t>n"Z0060
t?ý"Z0061
t@Ú"Z0030
Ive looked at the code and this isn't expected behaviour. I changed "Startswith" "Z to "contains" which got me half way there but i can't chomp left as the characters aren't consistent. any ideas?
Fixed it: If anyone is interested/ has the same issue - I'm guessing to do with firmware of the Texecom Panel - here's the code you need to edit - i just changed the way the code processes the strings - this method should be backwards compatible too as it crops all the string including the Z using the between function.
function processData(data) {
// Received data is a zone update
if(S(data).contains('"Z')){
// Extract the data from the serial line received
var zone_data = Number(S(S(data).between('Z')).left(4).s);
// Extract the zone number that is being updated
var updated_zone = Number(S(S(data).between('Z')).left(3).s);
// Is the zone active?
var zone_active = S(zone_data).endsWith('1');
platform.log("Zone update received for zone " + updated_zone + " active: " + zone_active);
So Sometimes (rarely) i'll get an accepted command which comes through as ZXXX1 or ZXXX0, but most of the time texecom is sending a pre-fix as follows:
[8/1/2020, 6:40:45 PM] [Texecom] IP data received: t4w"Z0061
[8/1/2020, 6:40:45 PM] [Texecom] Unknown string from Texecom: t4w"Z0061
Which results in it not understanding which zone it is, most of the time it begins with a t but the 2nd & 3rd character is variabale. eg. t.2"Z0051.
Any Ideas?
The text was updated successfully, but these errors were encountered: