value showing as "undefined"

118 views
Skip to first unread message

wes...@gmail.com

unread,
Oct 11, 2021, 2:39:12 PM10/11/21
to weewx-user
i'm using the latest weewx and latest belchertown skin.

i have a new data type added to the database that we'll call "foo".  it is a floating point value. the values are in the loop records and recorded in the database.

i added the item to the station_observations and it appears on the home page.  when the static page appears in the browser it looks correct.  however when the skin updates the values via dynamic mqtt websockets then i get the string "undefined" appended to the value.  why do i get this displayed and how can i stop it??

wes...@gmail.com

unread,
Oct 11, 2021, 6:24:12 PM10/11/21
to weewx-user
ok, I got this resolved for now.  the "undefined" was caused by the fact that the new type did not have a measurement unit defined. i modified units.py to add the new database type and assign it to a "unit group".  now i don't see the "undefined".  

Karen K

unread,
Oct 12, 2021, 12:52:23 AM10/12/21
to weewx-user
You should not edit units.py, as this is overwritten at the next update. Instead, use user/extension.py. There your changes will be preserved.

Another point: New observation types need to be added to json/weewx_data.json.tmpl in the Belchertown skin directory.

Dirk Schieber

unread,
Sep 17, 2022, 2:02:57 PM9/17/22
to weewx-user


i have the same problem, since 2 days the units on the homepage are undefined 
when the live data are loaded, the website before show the right units.
it worked well the last year's without problems,
i don't change anything in config
what can cause this problem?
Screenshot_2022-09-17-19-40-45-13_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
Screenshot_2022-09-17-19-41-08-02_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
Reply all
Reply to author
Forward
0 new messages