hass-weatherflow2mqtt icon indicating copy to clipboard operation
hass-weatherflow2mqtt copied to clipboard

No high/low-values (sqlite & NoneType)

Open joachimtingvold opened this issue 2 years ago • 12 comments

Home Assistant Version?

2022.4.5

Add-On or Self Hosted?

HA Supervised (Add-On)

Weatherflow2MQTT version?

3.0.7

What happened?

Hi,

I experience the same as #103. Fresh install of both HA (Supervised) and weatherflow2mqtt.

I can, of course, delete the database (as was done in #103), but since this is a fresh install, I feel that this should have worked "out of the box"... maybe we should find the root cause and fix it?

Relevant log output

INFO:weatherflow2mqtt.weatherflow_mqtt:🏠 Home Assistant Supervisor Mode 🏠
INFO:weatherflow2mqtt.weatherflow_mqtt:Timezone is Europe/Oslo
INFO:weatherflow2mqtt.weatherflow_mqtt:Connected to the MQTT server at core-mosquitto:1883
INFO:weatherflow2mqtt.weatherflow_mqtt:The UDP server is listening on port 50222
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Hub sensor: Status
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Status
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Absolute Humidity
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Air Density
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Voltage
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Battery
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Battery Mode
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Beaufort Scale
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Cloud Base Altitude
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Delta T
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Dew Point
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Dewpoint Comfort Level
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Feels Like Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Freezing Level Altitude
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Illuminance
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count (Last hour)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count (3 hours)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count (Today)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Distance
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Energy
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Last Lightning Strike
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Precipitation Type
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Pressure Trend
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Duration (Today)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Duration (Yesterday)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Intensity
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Rate
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Last Rain start
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Today
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Yesterday
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Humidity
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Sea Level Pressure
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Solar Radiation
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Station Pressure
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Temperature Level
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: UV Index
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: UV Level
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Visibility
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wet Bulb Globe Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wet Bulb Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Bearing
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Bearing Avg
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Direction
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Direction Avg
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Gust
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Lull
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Speed
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Speed Avg
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'

joachimtingvold avatar Apr 22 '22 23:04 joachimtingvold

Does this error continue past midnight?

GlennGoddard avatar Apr 25 '22 15:04 GlennGoddard

The logs had wrapped around, and everything in it was that error line. Maybe it would be a good idea to add timestamp to the logs? (so you could know without having to restart it).

Seems to happen after a restart, at least. This is the log fresh after a restart;

INFO:weatherflow2mqtt.weatherflow_mqtt:🏠 Home Assistant Supervisor Mode 🏠
INFO:weatherflow2mqtt.weatherflow_mqtt:Timezone is Europe/Oslo
INFO:weatherflow2mqtt.weatherflow_mqtt:Connected to the MQTT server at core-mosquitto:1883
INFO:weatherflow2mqtt.weatherflow_mqtt:The UDP server is listening on port 50222
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Hub sensor: Status
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Status
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Absolute Humidity
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Air Density
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Voltage
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Battery
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Battery Mode
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Beaufort Scale
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Cloud Base Altitude
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Delta T
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Dew Point
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Dewpoint Comfort Level
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Feels Like Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Freezing Level Altitude
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Illuminance
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count (Last hour)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count (3 hours)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Count (Today)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Distance
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Lightning Energy
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Last Lightning Strike
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Precipitation Type
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Pressure Trend
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Duration (Today)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Duration (Yesterday)
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Intensity
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Rate
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Last Rain start
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Today
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Rain Yesterday
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Humidity
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Sea Level Pressure
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Solar Radiation
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Station Pressure
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Temperature Level
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: UV Index
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: UV Level
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Visibility
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wet Bulb Globe Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wet Bulb Temperature
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Bearing
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Bearing Avg
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Direction
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Direction Avg
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Gust
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Lull
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Speed
INFO:weatherflow2mqtt.weatherflow_mqtt:Setting up Tempest sensor: Wind Speed Avg
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'

joachimtingvold avatar Apr 25 '22 15:04 joachimtingvold

Do you have all the sensors showing up in HA? Can you tell if any of the High/Low data is not available (i.e. which sensor)? Just trying to narrow things down.

GlennGoddard avatar Apr 26 '22 13:04 GlennGoddard

I have 1 device + 1 entity for the hub (status). I have 1 device + 49 entities for the station.

That corresponds with the logs, at least (50 sensors in total). I assume this is default/correct amount?

The hub has "status 3 months ago", but that seems to be when it was initially set up, and does not change?

I see values for all of the 49 station sensors. Some of them has 0 as value (lightning count etc), but that is expected.

Is there an easy way to spot missing high/low data for all of the sensors? I know I can get them from the statistics sensor using value_min and value_max, but somewhat cumbersome to check all sensors that way.

joachimtingvold avatar Apr 26 '22 13:04 joachimtingvold

Number of entries checks out.

The easiest way (unless you already have a card setup with attributes) is to look at the dev tools for each of the sensors listed for High/low and see if you have those hi/low attributes: Sensor | high value| low value air_temperature | Yes | Yes dewpoint | Yes | Yes illuminance | Yes | No lightning_strike_count_today | Yes | No lightning_strike_energy | Yes | No rain_rate | Yes | No rain_duration_today | Yes | No relative_humidity | Yes | Yes sealevel_pressure | Yes | Yes solar_radiation | Yes | No uv | Yes | No wind_gust | Yes | No wind_lull | Yes | No wind_speed_avg | Yes | No

See if you are missing any of the above. This might take some time but I'm curious as to what is not recording (if anything).

GlennGoddard avatar Apr 26 '22 16:04 GlennGoddard

@joachimtingvold Any further information?

GlennGoddard avatar May 18 '22 21:05 GlennGoddard

Sorry, had some busy weeks. Uhm, I'm not that familiar with HA yet, so not sure where I would find those high/low values within HA?

"Developer Tools" -> "States / Entities" had no useful info.

Going to the "Attributes" section of the entities, shows some more, but not the "high/low value" as you show in your example;

image

joachimtingvold avatar May 19 '22 12:05 joachimtingvold

Ok, so at least it is picking up the MQTT auto generate for the attributes but it is not getting the data. Have you tried the 'debug' tag to get more information? @briis Any thoughts?

GlennGoddard avatar May 19 '22 15:05 GlennGoddard

Sorry for the long delay, also I have been busy (New job). This is back to the local WF2MQTT database, that for some reason has some invalid data. The best thing is to delete the database and then restart WF2MQTT to let it be reinitiated.

I hope I can find time this some to find a more stabile approach to this - long term stats in HA might be the solution, thus avoiding the database at all, but I think most people will need some help on how to get the data - so I need to spend some time on that.

briis avatar May 25 '22 12:05 briis

@joachimtingvold Do have the data now?

GlennGoddard avatar Jul 10 '22 20:07 GlennGoddard

@GlennGoddard, I have not done any changes (nor deleted any databases) since this issue was opened. The issue seems to be still present;

image

The goal for this issue, at least from my point of view, would be to avoid the need to manually delete the database to fix it (especially since there has been several reported cases of the same problem).

joachimtingvold avatar Aug 03 '22 19:08 joachimtingvold

Brand new install on a supervised x86:

ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'
ERROR:weatherflow2mqtt.sqlite:Could not write to High and Low Table. Error message: '>' not supported between instances of 'float' and 'NoneType'

Will try deleting db

zorrobyte avatar Oct 08 '22 13:10 zorrobyte