GhostXML and PostgreSQL
Posted: Fri Mar 08, 2024 2:29 pm
Why do GhostXML "devices" not post to the Postgres data base? I use GhostXML to query my local Davis weather station's API, which I query query every 5 minutes with http://<IP of Station>/v1/current_conditions and get back :
that ghost properly breaks down into states in the DavisWeather device. For the most part, Indigo treats this as any other device, allowing the states to be used in triggers and displayed in control pages. But when I attempted to look at the history in Postgres last week, I found that although the device table exists, the only headings were device online, timestampupdated, devicetimestamp, and deviceError and parse error. All the device_condition_0 items shown in the dialog were missing and there was no data in the table. Is this an oversight or a bug?
- {"data":{"did":"001D0A71869D","ts":1709929205,"conditions":[{"lsid":568740,"data_structure_type":1,"txid":2,"temp": 76.1,"hum":54.5,"dew_point": 58.5,"wet_bulb": 63.0,"heat_index": 76.6,"wind_chill": 76.1,"thw_index": 76.6,"thsw_index":null,"wind_speed_last":0.00,"wind_dir_last":0,"wind_speed_avg_last_1_min":0.75,"wind_dir_scalar_avg_last_1_min":29,"wind_speed_avg_last_2_min":2.81,"wind_dir_scalar_avg_last_2_min":7,"wind_speed_hi_last_2_min":9.00,"wind_dir_at_hi_speed_last_2_min":360,"wind_speed_avg_last_10_min":0.87,"wind_dir_scalar_avg_last_10_min":25,"wind_speed_hi_last_10_min":9.93,"wind_dir_at_hi_speed_last_10_min":4,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":2,"rain_storm":0,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":2,"rainfall_monthly":2,"rainfall_year":1350,"rain_storm_last":195,"rain_storm_last_start_at":1707578461,"rain_storm_last_end_at":1707757261},{"lsid":568738,"data_structure_type":4,"temp_in": 78.6,"hum_in":54.0,"dew_point_in": 60.6,"heat_index_in": 79.0},{"lsid":568737,"data_structure_type":3,"bar_sea_level":29.731,"bar_trend":-0.029,"bar_absolute":29.508}]},"error":null}
that ghost properly breaks down into states in the DavisWeather device. For the most part, Indigo treats this as any other device, allowing the states to be used in triggers and displayed in control pages. But when I attempted to look at the history in Postgres last week, I found that although the device table exists, the only headings were device online, timestampupdated, devicetimestamp, and deviceError and parse error. All the device_condition_0 items shown in the dialog were missing and there was no data in the table. Is this an oversight or a bug?