scrub this. found the problem with the "?". there was a space on the end of the URL in WST app. So that's OK now.
How trying to work out why WST isn't calling urls to change other variables properly...
Hi Derek
I'm trying to do some work on this project after a long time off. IFTTT has become too expensive for me, so I'm pulling the plug.
I'm using Wireless sensor Tags (https://wirelesstag.net/) and have been for years. They measure the temps of a couple of water tanks. Typically I've evaluated in IFTTT then written to variables in SQM but I'm now trying to bypass IFTTT.
However, I've ben trying to write the temps into SQM variables and it keeps adding questions marks to the end of the variable value. I think they then can't be used in <=> tests as they are seen as text, not values.
Any idea what I'm doing wrong?
Thanks!
scrub this. found the problem with the "?". there was a space on the end of the URL in WST app. So that's OK now.
How trying to work out why WST isn't calling urls to change other variables properly...
OK, another problem. I've been trying to find a work-around for a problem in having in the WST app where it's not calling URLs properly. Instead, I'm doing all the evaluation inside SQM using logic such as you'll find in "Agri-DHW-Tag evaluate" which examines an temperature variable and classifies a new variable as either hot/cold/normal etc. I plan to do this in a couple of places.
Looking at "Agri-DHW-Tag evaluate", somthings wrong though. It seems to be working OK according to the log:
Agri-DHW-Tag evaluate was triggered on Sun 26 May at 12:28:07.
Triggered manually by user
The value of Agri-DHW-test was changed from {empty} to 68.75 >>> this is a test line to make sure it's seeing the temp variable
The value of the variable Agri-DHW-temp was 68.75 (not below 45 - condition failed)
The value of the variable Agri-DHW-temp was 68.75 (not above 75 - condition failed)
The value of the variable Agri-DHW-temp was 68.75 (not above 70 - condition failed)
The value of Agri-DHW-Tag was changed from {empty} to NORMAL
So according to this it all worked brilliantly! Except...the variables Agri-DHW-test and Agri-DHW-Tag (which are supposed to be 68.75 and NORMAL according to the logs) are still empty !
What am I doing wrong? The weird thing is that if I log in from a different browser the values are correct, but could this really be a cache issue? reloading the variables page with a hard-refresh does nothing. It can take10+ mins for the variables page to catch up...no amount of logging in/out, refresh, deleting site data, nothing seems to make any difference. Bu after 10-15 mins, pop, and the data changes
OK, just ran another test, and after I ran the sequence, even querying the variable using the webhook (https://sequematic.com/variable-get/397/XXXXXXXXX/Agri-DHW-Tag) gave me the old value, not the just changed value. So there's some kind of delay between when the sequence runs, what the log thinks has happened, to what actually happens in the variable...
While I'm here, can I please make a suggestion? If I select a Sonoff 4ch switch as an action, can you please include the PROPERTY name in the description, because currently when you look at a sequence you can tell which switch is being changed,
e.g. "Turn on the eWeLink device Son.A switch 2"
Not just "Turn on the eWeLink device Son.A" as it is currently
Hi Simon, sorry for not replying sooner.
Is this still an issue? I can see in your sequence log the sequence has been running so I'm wondering if you've managed to get this doing what you need it to.
It shouldn't be a caching issue though - the variables page shows the live value of the variable. I'm wondering if the late change was due to a subsequent run of the sequence that looked like it might have been an earlier instance? I'm not sure though and would need to do some debugging, but wanted to check first if it's still a problem.
That's OK, Derek, i don't care how long it takes for you to reply. Your project is a life-saver for me, i literally don't know what I'd do without SQM, and I hope someone comes along and buys you out with a big fat cheque one day, because you have earned it.
So, I've just created a test variable, "A Derek test", and set the value to "test 1"
Then I ran the following url:
https://sequematic.com/variable-change/397/XXXXXXX/A%20Derek%20test/=test 2
The reply was:
{ "data": [ { "id": "1719297990", "status": "success", "previous_value": "test 1", "new_value": "test 2" } ] }
This suggests the url worked fine, and the log confims this:
Tue 25 Jun 8:46:30 | Variable webhook:A Derek test =test 2 | Success |
but...
The variable value remained test 1, even when i checked in a different browser, refreshed a bunch of times, etc
8 minutes later, and the value is still unchanged. I even checked using the url
https://sequematic.com/variable-get/397/XXXXXXXX/A Derek test
which returns a value of test 1
And this is still returning a value "test 1 " after 9 mins
25 mins later, and variable is still showing as test 1 on the variables page and the url call
Just to check, I manually changed the variable value to "test 3" on the variable page, called the url, and value showed as "test 3" 1st time.
just called the url "https://sequematic.com/variable-change/397/XXXXXXXXXXXXX/A%20Derek%20test/=test 4"
received reply : { "data": [ { "id": "1719299563", "status": "success", "previous_value": "test 3", "new_value": "test 4" } ] }
checked the variables page and it's still = test 3
calling url: https://sequematic.com/variable-get/397/XXXXXXXXXXXXXX/A%20Derek%20test returns a value of test 3
So yes, still a bug somewhere, sorry!
BTW, if you could also add the extra info for the Sonoff 4ch switches (i.e. the switch number) that would really help when reading back the sequences later:
If I select a Sonoff 4ch switch as an action, can you please include the PROPERTY name in the description, because currently when you look at a sequence you can tell which switch is being changed,
e.g. "Turn on the eWeLink device Son.A switch 2"
Not just "Turn on the eWeLink device Son.A" as it is currently
looks like you fixed the updating variable issue! Changing immediately in my test this morning. Excellent!