bpennypacker / weatherflow-indigo-plugin Goto Github PK
View Code? Open in Web Editor NEWIndigo Plugin for obtaining weather from WeatherFlow
License: GNU General Public License v2.0
Indigo Plugin for obtaining weather from WeatherFlow
License: GNU General Public License v2.0
Hi,
Is there a way to access the WeatherFlow forecast via the API.
Looking here: https://weatherflow.github.io/Tempest/api/swagger/#!/observations/getObservationsByDeviceId , it looks pretty complete - even if I would love to have a sandstorm Icon here in the south of Spain:-)
Any thoughts?
Hi
Thanks for this plugin - working really well with a Tempest device.
Except:
Have occasionally seen this error:
2022-06-25 04:32:56.098 Gecko inTouch Spa Plugin Debug GeckoSpaEvent.RUNNING_PING_RECEIVED: {'last_ping_at': datetime.datetime(2022, 6, 24, 18, 32, 56, 97528, tzinfo=datetime.timezone.utc)}
2022-06-25 04:33:22.299 WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 717, in runConcurrentThread
File "plugin.py", line 645, in _process_message
File "plugin.py", line 933, in process_ops_tempest
TypeError: list indices must be integers, not float
2022-06-25 04:33:22.300 WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
The corresponding data from the Tempest seems to be this:
2022-06-25 04:33:22.093 DEBUG Plugin._process_message: {
"device_id": 136314,
"firmware_revision": 165,
"hub_sn": "HB-00042529",
"obs": [
[
1656095598,
0.15,
0.98,
1.5,
182,
3,
1016.2,
13.9,
67,
0,
0.0,
0,
0.0,
0.0,
0,
0,
2.64,
1,
0.010278,
null,
null,
0
]
],
"serial_number": "ST-00053701",
"source": "mqtt",
"summary": {
"air_density": 1.23325,
"delta_t": 3.2,
"dew_point": 7.9,
"feels_like": 13.9,
"heat_index": 13.9,
"precip_accum_local_yesterday": 0.011252,
"precip_analysis_type_yesterday": 0,
"precip_minutes_local_day": 0,
"precip_minutes_local_yesterday": 8,
"precip_total_1h": 0.010278,
"pressure_trend": "steady",
"pulse_adj_ob_temp": 14.0,
"pulse_adj_ob_time": 1656095538,
"pulse_adj_ob_wind_avg": 1.0,
"raining_minutes": [
4,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"strike_count_1h": 0,
"strike_count_3h": 0,
"strike_last_dist": 37,
"strike_last_epoch": 1655805764,
"wet_bulb_globe_temperature": 14.9,
"wet_bulb_temperature": 10.7,
"wind_chill": 13.9
},
"type": "obs_st"
}
2022-06-25 04:33:32.499 DEBUG Plugin._process_message: {
"hub_sn": "HB-00042529",
"ob": [
1656095603,
1.05,
200
],
"serial_number": "ST-00053701",
"type": "rapid_wind"
}
Looks like everything is correct - from here:
https://weatherflow.github.io/Tempest/api/ws.html
Just seems like device is passing a 0.0 rather than a 0 - that or it is sending the wrong field in the incorrect index?
Checking the others index's compared to above - they all seem correct, just does seem to be precipation type as a 0.0 float for some reason?
Just received my new WeatherFlow today and got it set up. It's registered on the web, etc. I dowloaded your plugin (thanks!) but am having trouble with the setup. Looks like things are working but there is nothing selectable in the device configuration:
Same problem whether I choose UDP or Websocket.
Debug suggests that information is being received:
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-###",
"ob": [
1590280341,
0.8,
201
],
"serial_number": "ST-###",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug GET https://swd.weatherflow.com/swd/rest/stations/19260?api_key=20c70eae-e62f-4d3b-b3a4-8586e90f3ac8
WeatherFlow Smart Weather Debug response: 200
WeatherFlow Smart Weather Debug {
"stations": [
{
"devices": [
{
"device_id": 65668,
"device_meta": {
"agl": 1.8288,
"environment": "indoor",
"name": "HB-###",
"wifi_network_name": ""
},
"device_type": "HB",
"firmware_revision": "126",
"hardware_revision": "1",
"serial_number": "HB-###"
},
{
"device_id": 65669,
"device_meta": {
"agl": 1.8288,
"environment": "outdoor",
"name": "ST-###",
"wifi_network_name": ""
},
"device_settings": {
"show_precip_final": true
},
"device_type": "ST",
"firmware_revision": "127",
"hardware_revision": "1",
"serial_number": "ST-###"
}
],
"is_local_mode": false,
"last_modified_epoch": 1590278161,
"latitude": 29.72681,
"location_id": 19260,
"longitude": -95.77172,
"name": "Summits Edge Ln",
"public_name": "Summits Edge Ln",
"station_id": 19260,
"station_items": [
{
"device_id": 65669,
"item": "air_temperature_humidity",
"location_id": 19260,
"location_item_id": 157287,
"sort": 0,
"station_id": 19260,
"station_item_id": 157287
},
{
"device_id": 65669,
"item": "barometric_pressure",
"location_id": 19260,
"location_item_id": 157289,
"sort": 1,
"station_id": 19260,
"station_item_id": 157289
},
{
"device_id": 65669,
"item": "light",
"location_id": 19260,
"location_item_id": 157291,
"sort": 5,
"station_id": 19260,
"station_item_id": 157291
},
{
"device_id": 65669,
"item": "lightning",
"location_id": 19260,
"location_item_id": 157288,
"sort": 2,
"station_id": 19260,
"station_item_id": 157288
},
{
"device_id": 65669,
"item": "rain",
"location_id": 19260,
"location_item_id": 157290,
"sort": 4,
"station_id": 19260,
"station_item_id": 157290
},
{
"device_id": 65669,
"item": "wind",
"location_id": 19260,
"location_item_id": 157292,
"sort": 3,
"station_id": 19260,
"station_item_id": 157292
}
],
"station_meta": {
"elevation": 32.45418548583984,
"share_with_wf": true,
"share_with_wu": false
},
"timezone": "America/Chicago"
}
],
"status": {
"status_code": 0,
"status_message": "SUCCESS"
}
}
Thoughts on next steps?
Thanks again for the work!
Rick
this has been working fine but now I'm getting the same repeating error message:
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 717, in runConcurrentThread
File "plugin.py", line 645, in _process_message
File "plugin.py", line 945, in process_obs_tempest
TypeError: list indices must be integers, not float
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Not sure this is the place for this... I'm not too familiar with Github protocol, so forgive me if I'm making a mess.
Let me stay from the outset your plugin is wonderful! I had the Tempest setup with the hub, and got the plugin linked to the hub in less than 10 minutes. The Wiki was super easy to understand, not overly technical, and very easy to follow. I can now track all that data in Indigo, a good thing.
I am curious about rain accumulation. I did write to the Weatherflow folks who said that rain accumulation data was stored in the hub, so I'm assuming it is available for harvesting by the plugin. I don't pretend to understand how easy or hard that might be to implement, but that would be something I'd love to track, and I'm sure others probably would as well.
Even without that data, the plugin is GREAT!
Hi, I started getting this error when I moved to version 3.1. Unfortunately that is also the time I changed some of the settings and added some triggers. I also added a new tempest device. Then I noticed the errors. I deleted the tempest device from indigo. Disabled all the new triggers, but the error below keeps happening. New to GitHub so hope I'm putting this in the right spot. Any help would be appreciated (I'm not a programmer).
Error list with debug on listed below - included photo of my configuration.
Norm
`WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 714, in runConcurrentThread
File "plugin.py", line 610, in _process_message
File "plugin.py", line 786, in process_obs_sky
IndexError: list index out of range
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds.
WeatherFlow Smart Weather Debug {
"firmware_revision": 43,
"hub_sn": "HB-00013011",
"obs": [
[
1612973234,
4384,
0.14,
0.0,
0.35,
0.9,
1.37,
238,
2.851,
1,
36,
null,
0,
3
]
],
"serial_number": "SK-00019648",
"type": "obs_sky"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973235,
1.31,
189
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00015165",
"ob": [
1612973235,
0.0,
0
],
"serial_number": "ST-00021308",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973241,
1.43,
197
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00015165",
"ob": [
1612973241,
0.0,
0
],
"serial_number": "ST-00021308",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973244,
1.43,
194
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
} WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973247,
0.92,
99
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00015165",
"ob": [
1612973247,
0.0,
0
],
"serial_number": "ST-00021308",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973250,
1.29,
194
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"firmware_revision": 22,
"hub_sn": "HB-00013011",
"obs": [
[
1612973251,
1013.6,
1.66,
93,
0,
0,
3.387,
1
]
],
"serial_number": "AR-00008472",
"type": "obs_air"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973253,
1.42,
219
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00015165",
"ob": [
1612973253,
0.0,
0
],
"serial_number": "ST-00021308",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973256,
0.66,
270
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"firmware_revision": 134,
"hub_sn": "HB-00015165",
"obs": [
[
1612973255,
0.0,
0.0,
0.0,
0,
6,
1019.1,
0.62,
96.14,
3258,
0.23,
27,
0.0,
0,
0,
0,
2.425,
1
]
],
"serial_number": "ST-00021308",
"type": "obs_st"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973259,
1.47,
193
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00015165",
"ob": [
1612973259,
0.0,
0
],
"serial_number": "ST-00021308",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973265,
1.6,
194
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00015165",
"ob": [
1612973265,
0.0,
0
],
"serial_number": "ST-00021308",
"type": "rapid_wind"
}
WeatherFlow Smart Weather Debug {
"hub_sn": "HB-00013011",
"ob": [
1612973268,
1.45,
214
],
"serial_number": "SK-00019648",
"type": "rapid_wind"
}`
Loops over and over:
May 28, 2020 at 2:19:24 PM
Stopping plugin WeatherFlow Smart Weather (pid 21167)
WeatherFlow Smart Weather Error exception in deviceStopComm(WF Tempest 1): 'ST-00002899-SmartWeatherTempestUDP'
Stopped plugin WeatherFlow Smart Weather
Upgrading plugin WeatherFlow Smart Weather to newer version 0.1.0 (previous version moved to trash)
Loading plugin "WeatherFlow Smart Weather 0.1.0"
Starting plugin "WeatherFlow Smart Weather 0.1.0" (pid 65139)
Started plugin "WeatherFlow Smart Weather 0.1.0"
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 671, in runConcurrentThread
File "plugin.py", line 592, in _process_message
File "plugin.py", line 937, in process_rapid_wind
KeyError: 'key windspeed not found in dict'
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 671, in runConcurrentThread
File "plugin.py", line 592, in _process_message
File "plugin.py", line 937, in process_rapid_wind
KeyError: 'key windspeed not found in dict'
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Reloading plugin "WeatherFlow Smart Weather 0.1.0"
Stopping plugin "WeatherFlow Smart Weather 0.1.0" (pid 65139)
WeatherFlow Smart Weather Error exception in deviceStopComm(WF Tempest 1): 'ST-00002899-SmartWeatherTempestUDP'
Stopped plugin "WeatherFlow Smart Weather 0.1.0"
Starting plugin "WeatherFlow Smart Weather 0.1.0" (pid 65193)
Started plugin "WeatherFlow Smart Weather 0.1.0"
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 671, in runConcurrentThread
File "plugin.py", line 592, in _process_message
File "plugin.py", line 937, in process_rapid_wind
KeyError: 'key windspeed not found in dict'
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 671, in runConcurrentThread
File "plugin.py", line 592, in _process_message
File "plugin.py", line 937, in process_rapid_wind
KeyError: 'key windspeed not found in dict'
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
Hi
Well done on the Python3 version. All going well.
Yet - for sometime have been troubled with null/empty daily rainfall totals for Websocket Tempest
Had a look and stems from non-US location and likely affects all the sky devices as well.
Tempest (type="obs_st")
Observation Layout
0 - Epoch (Seconds UTC)
1 - Wind Lull (m/s)
2 - Wind Avg (m/s)
3 - Wind Gust (m/s)
4 - Wind Direction (degrees)
5 - Wind Sample Interval (seconds)
6 - Pressure (MB)
7 - Air Temperature (C)
8 - Relative Humidity (%)
9 - Illuminance (lux)
10 - UV (index)
11 - Solar Radiation (W/m^2)
12 - Rain Accumulation (mm)
13 - Precipitation Type (0 = none, 1 = rain, 2 = hail, 3 = rain + hail (experimental))
14 - Average Strike Distance (km)
15 - Strike Count
16 - Battery (volts)
17 - Report Interval (minutes)
18 - Local Day Rain Accumulation (mm)
19 - [NC Rain](https://help.weatherflow.com/hc/en-us/articles/360024436634) Accumulation (mm)
20 - Local Day [NC Rain](https://help.weatherflow.com/hc/en-us/articles/360024436634) Accumulation (mm)
21 - Precipitation Aanalysis Type (0 = none, 1 = Rain Check with user display on, 2 = Rain Check with user display off)
Index 19 and 20 - currently:
'report_interval': 17,
'rain_accumulated_final': 19,
in obs_tempest_map are the problematic ones.
The [NC Rain] is Neighborhood level rain - only available in US and Canada.
Changing the obs_tempest_map with rain_accumulated_final to index 18 (non NC Rain version) for those of us outside US/Canada fixes the rain_accumulation reporting in my testing.
Thanks
I have two devices I created under the WeatherFlow plug-in: Humidity and Temperature. Using either the web socket or UDP, I'm noticing that the temperature does not get updated in a timely fashion. It can go days without updating
Attached are images of both the debug output of the plugin that clearly shows the obs_st data (with temperature at 13.7C) and the other screenshot showing the device's last update time in the early morning today.
As Indigo leaves Python 2.x behind, I'm wondering if there are any plans to upgrade this plugin to the latest version of Python. I actually use this a lot with my Tempest, so am hoping that it will be updated to use Python 3.
Loading 0.1.0 get error message:
'
Started plugin "WeatherFlow Smart Weather 0.1.0"
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 671, in runConcurrentThread
File "plugin.py", line 612, in _process_message
File "plugin.py", line 785, in process_obs_tempest
KeyError: 'key temp not found in dict'
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
'
and doesn't load. This happens after multiple attempts to reload.
Rick
Thanks for the plugin! Will future versions include:
0.2.3 gives me an error
device "WeatherFlow" state key last_strike_formatted not defined (ignoring update request)
in the custom device states it is misspelled last_srike_formatted
Rick
Loving using 0.2. Thanks for your work!
Only thing I'm noticing that "might" be not working are the unit setting affecting the summary data. As an example, the "feels_like", "heat_index" variables both stay in C even when I have selected F as my unit of choice. Is this intentional to leave those alone?
Rick
`WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 681, in runConcurrentThread
File "plugin.py", line 622, in _process_message
File "plugin.py", line 827, in process_obs_tempest
File "plugin.py", line 124, in degrees_to_cardinal
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)`
Indigo 7.4
WF 0.2.1
Tempest
Hey Bruce, I don't see a description of that state. What I'm looking for is the daily total precip so that at 11:59PM I can save it off - I'm calculating a rolling 2 day precip window to use to determine if my sprinkler system should run and I'm not sure which field for my Tempest I should use. Thanks for a great plugin!
`WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 681, in runConcurrentThread
File "plugin.py", line 622, in _process_message
File "plugin.py", line 816, in process_obs_tempest
TypeError: float() argument must be a string or a number
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
`
Indigo 7.4
WF 0.2.1
Tempest
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 681, in runConcurrentThread
File "plugin.py", line 622, in _process_message
File "plugin.py", line 845, in process_obs_tempest
IndexError: list index out of range
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Indigo 7.4
WF 0.2.2
Hi Bruce,
Line 546 in your WeatherFlow plugin.py:
Change:
except:
to:
except Exception as e:
to prevent an error in the Indigo logs.
station ID: 15733
Traceback (most recent call last):
File "plugin.py", line 681, in runConcurrentThread
File "plugin.py", line 590, in _process_message
File "plugin.py", line 741, in process_obs_sky
TypeError: float() argument must be a string or a number
new Sky device - set display to 'precipitation accumulated'
I got my new WeatherFlow Tempest setup using the plug-in version 2022.1.0.
I setup a device for both UDP and WebSocket, and decided to display as the device state, Date/Time last observed.
When the device is first added, it seems to update every minute, but only for a few minutes. Then the device stops updating (I waited hours, data was still stale on both, and date stamp never changed).
I found if I disable and enable device communication, it updates again.
So for now I have a schedule to disable/enable the devices every 30 seconds, and all is good.
I'm not sure if this is a known issue, or if there is some troubleshooting I can do to assist tracking it down.
Thanks,
Chris
Hi,
First of all: thank you so much for the Tempest Indigo plugin. It's working perfect!
One question; in the settings of the Tempest app the units/scale of the Wind speed could be set into Beaufort (BFT).
When this is set, the app and web data are displayed in BFT units.
In the config of the Indigo plugin the Beaufort scale of the Wind Speed is not available.
Is it possible to add this?
Thanks in advance!
John
The barometric pressure readings are way off. The Tempest device displays 29.993 inHg and the plugin displays 39.09 inHg. Same problem if I switch units to millibars. Using version 0.2.1.
Your instructions state to run a terminal command to verify traffic.
The Mac Firewall now has 'NC' -Allow incoming connections.
Was this needed only for the test, and we can now delete/block? or does the plugin need allow to work?
Just just did the upgrade to the latest version of the plugin... managed to get my "token", (I'm assuming any text entered will create a valid token), but now this is the error message I get every 10 seconds:
WeatherFlow Smart Weather Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 718, in runConcurrentThread
File "plugin.py", line 646, in _process_message
File "plugin.py", line 849, in process_obs_tempest
KeyError: 'key mode not found in dict'
WeatherFlow Smart Weather Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Aside from the error message, I THINK it is working as it should in Indigo... jut a bit early to tell......And I don't see anything else on the config page that might cause an issue. I do have both UDP and Websocket enabled.
And your instructions to get both the Token and the station ID(which I already had), were PERFECT! Thank you for making it so easy.
ALSO: I don't know who is responsible for this but "View Wiki" link at the bottom of the config page doesn't work. Not sure if this is a plugin problem, or an Indigo one.. but... just wanted to mention it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.