bpennypacker / WeatherFlow-Indigo-Plugin

Indigo Plugin for obtaining weather from WeatherFlow
GNU General Public License v2.0
3 stars 2 forks source link

New WeatherFlow #1

Closed jrickmd closed 4 years ago

jrickmd commented 4 years ago

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:

Screen Shot 2020-05-23 at 7 58 30 PM

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

bpennypacker commented 4 years ago

Hi Rick,

"device_type": "ST",

Given the above I'm guessing you likely have one of the newer "Tempest" WeatherFlow systems, is that correct? I've not seen this device type before, as my older WeatherFlow has different "Sky" vs. "Air" devices that appear as different device types.

I'd been led to believe that there would be no significant differences (like this) in the WeatherFlow API once the Tempest model came out. I guess they weren't entirely accurate on that part... I'll need to update the plugin to support this new device, and that will take a little bit of time on my part.

jrickmd commented 4 years ago

Correct. Brand new tempest. Let me know anything I can do to help.

Rick Sent from my iPhone

On May 23, 2020, at 20:53, Bruce Pennypacker notifications@github.com wrote:

 Hi Rick,

"device_type": "ST", Given the above I'm guessing you likely have one of the newer "Tempest" WeatherFlow systems, is that correct? I've not seen this device type before, as my older WeatherFlow has different "Sky" vs. "Air" devices that appear as different device types.

I'd been led to believe that there would be no significant differences (like this) in the WeatherFlow API once the Tempest model came out. I guess they weren't entirely accurate on that part... I'll need to update the plugin to support this new device, and that will take a little bit of time on my part.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bpennypacker commented 4 years ago

Thanks. I should be able to get the Websockets stuff working by using the device ID for your Tempest. That'll at least get initial support working. I may have to make some assumptions/guesses regarding local (UDP) device support, so I could probably use a hand testing that once I have it ready. I'll let you know as soon as I have the initial Tempest support ready.

Koreysherwin commented 4 years ago

HI Bruce,

Your plugin has been working flawlessly since I installed it on the night of Dec 24! I am using it in UDP mode.

Now for some feature requests!

How about having the state info populated with a drop down box in the preferences for what to display?

Is it possible to select knots / MPH / KPH for wind speed?

Metric / Imperial for Temperature as well.

Also how about having the wind direction selectable from degrees to cardinal direction?

THANKS!

On May 24, 2020, at 9:08 AM, Bruce Pennypacker notifications@github.com wrote:

Thanks. I should be able to get the Websockets stuff working by using the device ID for your Tempest. That'll at least get initial support working. I may have to make some assumptions/guesses regarding local (UDP) device support, so I could probably use a hand testing that once I have it ready. I'll let you know as soon as I have the initial Tempest support ready.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bpennypacker commented 4 years ago

Hi @Koreysherwin. Glad to hear UDP mode is working for you! I'm actually working on Tempest Websocket support right this very moment. Once get that squared away I do plan on adding support for different display preferences. Hopefully sooner rather than later!

bpennypacker commented 4 years ago

@jrickmd Try v0.0.2 of the plugin that I just published. It defines devices for the Tempest and also extends the existing Rapid Wind device to work with the Tempest as well.

jrickmd commented 4 years ago

Still not having anything show up in the configure device “select an item” list… Here’s the latest debug info on startup:

WeatherFlow Smart Weather Debug Error: Unrecognized type 'SmartWeatherAirUDP' WeatherFlow Smart Weather Debug {"type": "listen_start", "id": "indigo-", "device_id": ""} WeatherFlow Smart Weather Debug adding device -SmartWeatherAirWS WeatherFlow Smart Weather Debug Error: Unrecognized type 'SmartWeatherSkyUDP' WeatherFlow Smart Weather Debug {"type": "listen_start", "id": "indigo-", "device_id": ""} WeatherFlow Smart Weather Debug adding device -SmartWeatherSkyWS WeatherFlow Smart Weather Debug Starting UDP listener loop on port 50222 WeatherFlow Smart Weather Debug added device serial number ST-00003004

FYI, I have one of every kind of device defined in my indigo devices… none of them will allow a selection in the configuration drop down.

Rick

On May 24, 2020, at 4:04 PM, Bruce Pennypacker notifications@github.com wrote:

@jrickmd https://github.com/jrickmd Try v0.0.2 https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/releases/tag/v0.0.2 of the plugin that I just published. It defines devices for the Tempest and also extends the existing Rapid Wind device to work with the Tempest as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-633299563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KIJGHQLU7R4AVPSV63RTGDVFANCNFSM4NIVQ7OA.

Koreysherwin commented 4 years ago

Thanks Bruce!

Works well!

I have both a smart Weather original and a Beta test Tempest.

Not seeing the Tempest Rapid wind in V .002

— Korey Sherwin SherwinSound.com 702-239-1195

On May 24, 2020, at 2:04 PM, Bruce Pennypacker notifications@github.com wrote:

@jrickmd https://github.com/jrickmd Try v0.0.2 https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/releases/tag/v0.0.2 of the plugin that I just published. It defines devices for the Tempest and also extends the existing Rapid Wind device to work with the Tempest as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-633299563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGOXROJLJUQ3HGMRQFCNHLRTGDVFANCNFSM4NIVQ7OA.

jrickmd commented 4 years ago

Correction, I was able to add a Rapid Wind Websocket, but none of the other web sockets are able to find a device to select in the configuration window.

Rick

On May 24, 2020, at 4:04 PM, Bruce Pennypacker <notifications@github.com mailto:notifications@github.com> wrote:

@jrickmd https://github.com/jrickmd Try v0.0.2 https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/releases/tag/v0.0.2 of the plugin that I just published. It defines devices for the Tempest and also extends the existing Rapid Wind device to work with the Tempest as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-633299563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KIJGHQLU7R4AVPSV63RTGDVFANCNFSM4NIVQ7OA.

jrickmd commented 4 years ago

Sorry, I’m a dummy. The Tempest was a separate selection 😊

I’ll let you know how it goes…

Rick

On May 24, 2020, at 5:01 PM, J. Rick Adams jrickmd@gmail.com wrote:

Still not having anything show up in the configure device “select an item” list… Here’s the latest debug info on startup:

WeatherFlow Smart Weather Debug Error: Unrecognized type 'SmartWeatherAirUDP' WeatherFlow Smart Weather Debug {"type": "listen_start", "id": "indigo-", "device_id": ""} WeatherFlow Smart Weather Debug adding device -SmartWeatherAirWS WeatherFlow Smart Weather Debug Error: Unrecognized type 'SmartWeatherSkyUDP' WeatherFlow Smart Weather Debug {"type": "listen_start", "id": "indigo-", "device_id": ""} WeatherFlow Smart Weather Debug adding device -SmartWeatherSkyWS WeatherFlow Smart Weather Debug Starting UDP listener loop on port 50222 WeatherFlow Smart Weather Debug added device serial number ST-00003004

FYI, I have one of every kind of device defined in my indigo devices… none of them will allow a selection in the configuration drop down.

Rick

On May 24, 2020, at 4:04 PM, Bruce Pennypacker <notifications@github.com mailto:notifications@github.com> wrote:

@jrickmd https://github.com/jrickmd Try v0.0.2 https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/releases/tag/v0.0.2 of the plugin that I just published. It defines devices for the Tempest and also extends the existing Rapid Wind device to work with the Tempest as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-633299563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KIJGHQLU7R4AVPSV63RTGDVFANCNFSM4NIVQ7OA.

bpennypacker commented 4 years ago

@Koreysherwin The existing Rapid Wind device should let you select either a SKY or a Tempest device.

jrickmd commented 4 years ago

It’s raining here today and I’m having a hard time believing that there is not some sort of accumulation of rain data. I’ve perused the documentation and your code and looked at the raw data coming through. The Tempest UDP has the 18 values as assigned in your code. The Websocket has 4 additional values reported after those 18...

8.437427, null, null, 0

Index ’18’ appears to be today’s accumulation of precipitation (in mm) as it tracks with what I see on the web. The rest I’ll watch and see if I can help with what they are as it does not appear this is documented in the APIs anywhere yet.

Rick

On May 24, 2020, at 7:29 PM, Bruce Pennypacker notifications@github.com wrote:

@Koreysherwin https://github.com/Koreysherwin The existing Rapid Wind device should let you select either a SKY or a Tempest device.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-633323686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KIOL6LZMUNOEXUIKMTRTG3XDANCNFSM4NIVQ7OA.

bpennypacker commented 4 years ago

Can you confirm your station ID is 19260? I believe that's what I saw in your original post but want to be absolutely certain. I'm monitoring that station with full debug logging to see what events it generates.

jrickmd commented 4 years ago

Confirmed

Rick


J. Rick Adams, M.D. Sent from my iPad

On May 24, 2020, at 20:12, Bruce Pennypacker notifications@github.com wrote:

 Can you confirm your station ID is 19260? I believe that's what I saw in your original post but want to be absolutely certain. I'm monitoring that station with full debug logging to see what events it generates.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

bpennypacker commented 4 years ago

The Tempest UDP has the 18 values as assigned in your code. The Websocket has 4 additional values reported after those 18... 8.437427, null, null, 0 Index ’18’ appears to be today’s accumulation of precipitation (in mm) as it tracks with what I see on the web.

That's good to know. I haven't been able to locate any websocket-specific documentation for the Tempest. They do have the UDP events documented here (see the 'obs_st' documentation). I may need to ping them on their own forum for details on those last four values. I'm hesitant to use fields that are undocumented as they have made significant changes to undocumented fields over time, so something that works now could very well vanish without much warning...

Koreysherwin commented 4 years ago

Only shows the existing sky unit, Tempest is not available in drop down list.

— Korey Sherwin SherwinSound.com 702-239-1195

On May 24, 2020, at 5:29 PM, Bruce Pennypacker notifications@github.com wrote:

@Koreysherwin https://github.com/Koreysherwin The existing Rapid Wind device should let you select either a SKY or a Tempest device.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-633323686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGOXRMN2IX5AZ3ZSVW2MCTRTG3XDANCNFSM4NIVQ7OA.

jrickmd commented 4 years ago

I’m going to need some kind of cumulative data for this to be useful to my intended purposes. Would rather not have to write the calculations for that myself. :) It does appear that further data shows the cumulative data is in that index 18 spot. The next 3 haven’t changed at all…

{"summary":{"pressure_trend":"steady","strike_count_3h":0,"precip_total_1h":0.0,"strike_last_dist":41,"strike_last_epoch":1590402737,"precip_accum_local_yesterday":8.530843,"precip_accum_local_yesterday_final":14.719287,"precip_analysis_type_yesterday":1,"feels_like":29.5,"heat_index":29.5,"wind_chill":27.8},"serial_number":"ST-00003004","hub_sn":"HB-00023026","type":"obs_st","source":"mqtt","obs":[[1590433028,0.0,0.13,0.98,0,3,1005.8,27.8,63,137692,11.02,1147,0.0,0,0,0,2.55,1,6.439721,null,null,0]],"device_id":65669,"firmware_revision":129}

The summary JSON is really intriguing. Would love to “easily” access that precip_accum data, too. Again, I’m sure I could go about writing some python to do it, but would prefer it be part of a device custom state that I could write change triggers on.

Thanks for writing this plug-in, and let me know how I might help.

Rick

On May 24, 2020, at 9:13 PM, Bruce Pennypacker notifications@github.com wrote:

The Tempest UDP has the 18 values as assigned in your code. The Websocket has 4 additional values reported after those 18... 8.437427, null, null, 0 Index ’18’ appears to be today’s accumulation of precipitation (in mm) as it tracks with what I see on the web.

That's good to know. I haven't been able to locate any websocket-specific documentation for the Tempest. They do have the UDP events documented here https://weatherflow.github.io/SmartWeather/api/udp/v119/ (see the 'obs_st' documentation). I may need to ping them on their own forum for details on those last four values. I'm hesitant to use fields that are undocumented as they have made significant changes to undocumented fields over time, so something that works now could very well vanish without much warning...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-633342766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KKR3IJMRDFEYLFQUELRTHH6JANCNFSM4NIVQ7OA.

bpennypacker commented 4 years ago

I've been poking around the Weatherflow website and finally stumbled across where they document those last few fields. They don't bother documenting it in their Websocket reference where one would expect to find it, but they do have it documented here. Those last 3 fields in the observation apparently include:

19 - Rain Accumulation Final (Rain Check) (mm)
20 - Local Day Rain Accumulation Final (Rain Check) (mm)
21 - Precipitation Aanalysis Type (0 = none, 1 = Rain Check with user display on, 2 = Rain Check with user display off)

Given that they do indeed document these, albeit in a somewhat hidden location, I'll work on adding them to the plugin.

bpennypacker commented 4 years ago

As far as that "summary" data in the JSON goes, I'm disinclined to support it directly in the plug-in. This post on the WeatherFlow board includes this comment from WeatherFlow staff:

These summary fields have evolved over time to support our app requirements. We left them out of the documentation because we don’t consider them stable. They will likely go away after a while so I would not count on them!

This is one reason why I make the full raw content of the data available through the plug-in. If you really want access to that data then you can do it, but there's no guarantee that data will continue to exist even an hour from now should the WeatherFlow team decide to modify it in any way.

I might be able to figure out a dynamic way to expose whatever fields are there, but it would be entirely up to you to handle them properly, understand that they could change or vanish without notice, etc.

jrickmd commented 4 years ago

Sounds like the right decision. Thanks for doing the extra research! I get the feeling the API documentation has taken a back seat to getting the Tempest out the door. Looking forward to testing new versions.

Rick


J. Rick Adams, M.D. Sent from my iPad

On May 26, 2020, at 13:11, Bruce Pennypacker notifications@github.com wrote:

 As far as that "summary" data in the JSON goes, I'm disinclined to support it directly in the plug-in. This post on the WeatherFlow board includes this comment from WeatherFlow staff:

These summary fields have evolved over time to support our app requirements. We left them out of the documentation because we don’t consider them stable. They will likely go away after a while so I would not count on them!

This is one reason why I make the full raw content of the data available through the plug-in. If you really want access to that data then you can do it, but there's no guarantee that data will continue to exist even an hour from now should the WeatherFlow team decide to modify it in any way.

I might be able to figure out a dynamic way to expose whatever fields are there, but it would be entirely up to you to handle them properly, understand that they could change or vanish without notice, etc.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

bpennypacker commented 4 years ago

Give v0.0.3 a try. The summary data is now available as described here.

jrickmd commented 4 years ago

Love the summary variables compromise! Will load this soon and let you know.

Rick

On May 27, 2020, at 10:33 AM, Bruce Pennypacker notifications@github.com wrote:

Give v0.0.3 a try. The summary data is now available as described here https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/wiki/Websocket-summary-data.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-634744067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KOCKFT6MIKWLFRA7Y3RTUXDXANCNFSM4NIVQ7OA.

jrickmd commented 4 years ago

Here’s what I get in the log:

' Started plugin "WeatherFlow Smart Weather 0.0.3" Error device "WeatherFlow" state key daily_rain_accumulation_final not defined (ignoring update request) Error device "WeatherFlow" state key rain_accumulated_final not defined (ignoring update request) SQL Logger creating table variable_history_1059552510 for "65669_precip_accum_local_yesterday" SQL Logger creating table variable_history_1772870056 for "65669_precip_accum_local_yesterday_final" SQL Logger creating table variable_history_1251676127 for "65669_feels_like" SQL Logger creating table variable_history_995306643 for "65669_strike_last_epoch" SQL Logger creating table variable_history_222910520 for "65669_wind_chill" SQL Logger creating table variable_history_294171674 for "65669_strike_count_3h" SQL Logger creating table variable_history_1077126278 for "65669_strike_last_dist" SQL Logger creating table variable_history_591111907 for "65669_heat_index" SQL Logger creating table variable_history_1046264155 for "65669_pressure_trend" SQL Logger creating table variable_history_1093693156 for "65669_precip_analysis_type_yesterday" SQL Logger creating table variable_history_66661261 for "65669_precip_total_1h" '

Variables look to be created. Don’t have any new states in the device, however.

Rick

On May 27, 2020, at 10:33 AM, Bruce Pennypacker notifications@github.com wrote:

Give v0.0.3 a try. The summary data is now available as described here https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/wiki/Websocket-summary-data.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-634744067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KOCKFT6MIKWLFRA7Y3RTUXDXANCNFSM4NIVQ7OA.

jrickmd commented 4 years ago

I went to the device dialog and re-configured the Tempest by Edit device settings and re-selecting the proper Tempest device… the new custom states were created with this appearing in the log:

‘ SQL Logger adding column "daily_rain_accumulation_final" to table device_history_367014068 ("WeatherFlow") SQL Logger adding column "precipitation_analysis_type" to table device_history_367014068 ("WeatherFlow") SQL Logger adding column "precipitation_analysis_type_none" to table device_history_367014068 ("WeatherFlow") SQL Logger adding column "precipitation_analysis_type_off" to table device_history_367014068 ("WeatherFlow") SQL Logger adding column "precipitation_analysis_type_on" to table device_history_367014068 ("WeatherFlow") SQL Logger adding column "rain_accumulated_final" to table device_history_367014068 ("WeatherFlow")

'

👍🏻

Rick

Here’s what I get in the log:

...

Variables look to be created. Don’t have any new states in the device, however.

Rick

On May 27, 2020, at 10:33 AM, Bruce Pennypacker <notifications@github.com mailto:notifications@github.com> wrote:

Give v0.0.3 a try. The summary data is now available as described here https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/wiki/Websocket-summary-data.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-634744067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KOCKFT6MIKWLFRA7Y3RTUXDXANCNFSM4NIVQ7OA.

bpennypacker commented 4 years ago

Nice. You getting a thunderstorm down there currently? Doing a little debugging using your Tempest as my data source and just got a flurry of lighting strike events.

jrickmd commented 4 years ago

Severe thunderstorm watch in effect until 9pm. Not bad right here, but surrounding area

On May 27, 2020, at 3:12 PM, Bruce Pennypacker notifications@github.com wrote:

Nice. You getting a thunderstorm down there currently? Doing a little debugging using your Tempest as my data source and just got a flurry of lighting strike events.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bpennypacker/WeatherFlow-Indigo-Plugin/issues/1#issuecomment-634914080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOR43KJPFQOVFRNLLYB5AATRTVX2RANCNFSM4NIVQ7OA.

bpennypacker commented 4 years ago

Just uploaded another update that lets you customize units for a number of the states. I'm going to close this issue out since I think things are in good shape now. If you run into any other issues don't hesitate to open a new issue.