Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dayrain missing from archive table? #3

Open
RangerRick opened this issue May 26, 2017 · 0 comments
Open

dayrain missing from archive table? #3

RangerRick opened this issue May 26, 2017 · 0 comments

Comments

@RangerRick
Copy link

I have your code plus weewx 3.7.1 installed and everything appears to be working except I appear to not have a dayrain column so error.log is throwing this:

2017/05/26 09:57:11 [error] 26806#0: *219 [lua] api.lua:46: view(): Failed SQL query:        SELECT
            datetime,
			date_trunc('second', age(NOW(), date_trunc('second', datetime))) AS age,
            dayrain        FROM archive        WHERE
        dayrain =
        (
            SELECT
                MIN(dayrain)
            FROM archive            WHERE         (
            datetime BETWEEN CURRENT_DATE            AND
            CURRENT_DATE + INTERVAL '1 DAY'
        )
                    LIMIT 1
        )
        AND         (
            datetime BETWEEN CURRENT_DATE            AND
            CURRENT_DATE + INTERVAL '1 DAY'
        )
                LIMIT 1
        , client: 192.168.211.236, server: localhost, request: "GET /api/record/dayrain/min?start=today HTTP/1.1", host: "weather:8080", referrer: "http://weather:8080/"

Any ideas how to go about fixing this query to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant