This is an old thread, but I just became a new victim of the “Cassandra timeout” this week.
My “JJ’s Test2” smartapp WHICH HAD BEEN RUNNING FINE FOR 2 YEARS, failed to execute on thursday (it runs every 5 days to dump my temperature snapshots history).
I tried to run it in the simulator, and got either of those 2 errors, at each unsuccessful try :
“java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra timeout during read query at consistency LOCAL_ONE (1 responses were required but only 0 replica responded) @ line 112"
or
"java.lang.reflect.UndeclaredThrowableException @ line 112”
Considering that line 112 is the line where the “JJ’s Test2” smartapp extracts the list of events to send (see below), it looks clearly like the SmartThings cloud servers are overloaded (again) or like somebody changed a timeout value for a much lower one.
This is corroborated by the fact that the SAME smartapp works fine in the simulator for only 1 or 2 temperature sensors, but fails beyond (I have 11).
--------------------- abstract from “JJ’s Test2” smartapp ---------------------
111 for (tempSens in temperatureSensors) {
112 def allEvents = tempSens.eventsBetween(startDate, endDate, [max:2000]).findAll{it.name == “temperature”}
I notified support of the problem, but as soon as they saw “custom Smartapp”, they considered it was not their responsibility.
This looks highly disingenuous to me, since this Smartapp has been perfectly working for 2 years, and only a change or overload in the SmartThings cloud servers could explain its present faulty behavior.
According to Tim Slagle, “this is THE number one priority” since April…
…but in April I never had the problem, but I do have it NOW !
.
=> I have 2 questions :
- could I somehow rewrite lines 111-112 to work around this problem ?
- who is in charge, and who should be notified, in case of cloud overload ?
This smartapp is +++ESPECIALLY CRITICAL FOR ME+++ since it is the one which I rely upon to download all my temperature measurements every 5 days (SmartThings cancels all events history beyond 7 days).
I have 11 Temperature Sensors at “Le Puits Jamet” location, each producing about 8 snapshots per day, so I download about 450 events every 5 days.
Dumping history for 1 sensor instead of 11 would multiply the integration work I do manually in Excel by 11, soon becoming a nightmare.
Thanks for your help