failed outTemp crashes alarm and "standard" skin

48 views
Skip to first unread message

GBW

unread,
Nov 21, 2020, 3:27:39 AM11/21/20
to weewx-user
Recently the battery in my outside sensor (TE923 Nexus) providing data named 'outTemp' gave up. This then appears to have caused the evaluation of this value outTemp< 3.0 in alarm expression (error:  '<' not supported between instances of 'NoneType' and 'float' Exiting) to fail and no further pages were published. I disabled the alarm and restarted, but then at the next hourly publication, the 'seasons' skins was used, but with a mixture of images, some as in that skin, others from my 'standard' skin which was still enabled. Naturally I have now replaced the battery. All is fine but, how can I prevent that happening again?Screen Shot 11-20-20 at 09.08 AM.PNG
Screen Shot 11-20-20 at 05.15 PM.PNG

Tom Keffer

unread,
Nov 21, 2020, 7:25:18 AM11/21/20
to weewx-user
How to prevent what happening again? The TypeError? If so, use an expression such as

outTemp is None or outTemp < 3.0

Or, do you mean dealing with a bad battery? If so, if the TE923 emits a battery status, use the "lowBattery" module in the examples subdirectory to sense a bad battery.

Or, do you mean the mix of image types? You did not provide any information about your report configuration, but if you changed report types, then got an error, I can see that you'd end up with a mix of image types. Try deleting everything in the HTML directory. They will all be recreated afresh.

-tk

On Sat, Nov 21, 2020 at 12:27 AM GBW <gwal...@gmail.com> wrote:
Recently the battery in my outside sensor (TE923 Nexus) providing data named 'outTemp' gave up. This then appears to have caused the evaluation of this value outTemp< 3.0 in alarm expression (error:  '<' not supported between instances of 'NoneType' and 'float' Exiting) to fail and no further pages were published. I disabled the alarm and restarted, but then at the next hourly publication, the 'seasons' skins was used, but with a mixture of images, some as in that skin, others from my 'standard' skin which was still enabled. Naturally I have now replaced the battery. All is fine but, how can I prevent that happening again?Screen Shot 11-20-20 at 09.08 AM.PNG
Screen Shot 11-20-20 at 05.15 PM.PNG

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/7557e9b2-6e5f-4ec7-829b-d962604eb763n%40googlegroups.com.

GBW

unread,
Nov 22, 2020, 9:11:47 AM11/22/20
to weewx-user
1. Checking for a None value checks that there is a connection, I presume, so could I not get false frost alarms? Is it not possible to stop weewx crashing completely when "outTemp" is None (as I noticed in the loop)? I don't recall that happening before; there was just a gap in the graph, which prompted me to change the battery. Should I try the multiple alarm example too or are these exclusive under [Alarm]?
2. I notice the loop does report batteryStatus for the sensors, but I have never noticed any change to the reported (binary) value. I will try the suggested lowBattery module too, thanks.
3. Before replacing the battery, I first disabled Alarm resulting in the mixed report. The report publication reverted fully to my enabled "Standard" skin only after I had renewed the battery and rebooted, which suggests to me that alone the missing connection caused weewx to use the wrong skin until the fault was cleared. That never happened before (as there was no other default skin), which suggests to me that any error in the functioning of the "Standard" skin enables the default "Seasons" skin. Is that intended?

Tom Keffer

unread,
Nov 22, 2020, 9:21:02 AM11/22/20
to weewx-user
1. Depends on what you want. If you just want to keep the program from crashing when outTemp is None, you could use

outTemp is not None and outTemp < 3

3. There's no magic here. If you enable a skin, it will get processed. If you don't, it won't. There is no "default" skin. Look in [StdReport]. It's possible you have more than one skin enabled and they are overwriting each other.

Reply all
Reply to author
Forward
0 new messages