Jump to content

Wind Direction condition always false


johnnyt
Go to solution Solved by bpwwer,

Recommended Posts

Posted

I have a program that checks for wind direction >=0, which should always be true but is always false.

Attached is screenshot of the program showing it's evaluated "false", screenshots of ISY GUI and NS Node value for wind direction.

I downloaded the log (attached) but it had no data (at warning level) going back 3 days or so, which seems strange. so I changed level to "debug" and restarted NS, and attached that second log after letting things run for a minute or two.

winddirgui.JPG.8171db65a0714d2310fdf3f02c6ff17c.JPGWindDirNodeServer.thumb.JPG.cdf54111e57ebe8cd0f7723a5790b05c.JPGTempestWindDirAlwaysFalse.thumb.JPG.03617ec9c4af66c81e671c3a2d19d70f.JPG

WeatherFlow_8-12-2022_103244_AM.zip WeatherFlow_8-12-2022_102852_AM.zip

Posted

 

Fri 08/12/2022 11:02:52 AM : [D2D EVENT   ] Event [n001_48711] [WINDDIR] [90] uom=76 prec=0
Fri 08/12/2022 11:02:52 AM : [  n001_48711]  WINDDIR  90 (uom=76 prec=0)
Fri 08/12/2022 11:02:52 AM : [D2D*CMP 000F] STS [n001_48711] WINDDIR B Cannot convert values (from=0E to=4C)
Fri 08/12/2022 11:02:52 AM : [D2D-CMP 000F] STS [n001_48711] WINDDIR op=5 Event(val=90 uom=76 prec=0) >= Condition(val=1 uom=14 prec=0) --> false
Fri 08/12/2022 11:02:52 AM : [D2D EVENT   ] Event [n001_48711] [GV3] [90] uom=76 prec=0
Fri 08/12/2022 11:02:52 AM : [  n001_48711]      GV3  90 (uom=76 prec=0)

This is what I see in the Event Viewer.  It looks like the IoP isn't handling the comparison of UOM for wind direction properly. 

@Michel Kohanim, @Chris Jahn

The WINDDIR status value is set to UOM 76 (wind direction degrees) but it seems to be comparing against UOM 14 (degrees) and failing.  My program is simply doing "if winddir >= 1".  Just like @johnnyt's program above.
 

Posted

Just caught a "West" report for wind direction that when back to degree on next update.

image.png.71ea4807864e67e773f1e879a81a2120.png

 

and the variable I try to set refuses to change (stays at 0)

 

Posted

I caught the following in the event viewer:

 

Sat 08/13/2022 11:41:54 AM : [ n006_207296]  WINDDIR 265 (uom=76 prec=0)
Sat 08/13/2022 11:41:54 AM : [D2D*CMP 036F] STS [n006_207296] WINDDIR B Cannot convert values (from=0E to=4C)

 

 

  • 4 weeks later...
Posted

Hi, I opened a support ticket for this and just got this response back:

Quote

 

Chris Jahn wrote:

This is a problem with the node server, it should not be using UOM 14 in (generic temperature degree) in the node definition, instead it should be using UOM 76 (wind direction 1-360 deg, 0 means no wind).

The ISY attempts to convert compatible UOM's but temperature and wind direction are obviously not compatible.

 

 

Posted
1 hour ago, bpwwer said:

Fixed in version 3.0.24 of the node server

ok, thanks. not seeing 3.0.24 in the node server store. Tried closing and reopening browser still only see:

 

image.thumb.png.a677f4486aecaaa62d7fc1698b485bee.png

Posted

Use the Refresh Store button to refresh the store listing.  Otherwise, it auto updates the list every 8 hours.

  • Like 1
Posted
10 hours ago, bpwwer said:

Use the Refresh Store button to refresh the store listing.  Otherwise, it auto updates the list every 8 hours.

There was a message this morning about the new version and that I needed to restart. I did so and am now at the latest version and see that the wind direction is now working. Thanks.

  • 3 weeks later...
Posted

I'm seeing the following message in event viewer:

Mon 09/26/2022 04:22:07 PM : [ n006_207296]  WINDDIR 267 (uom=76 prec=0)
Mon 09/26/2022 04:22:07 PM : [D2D*CMP 036F] STS [n006_207296] WINDDIR B Cannot convert values (from=0E to=4C)

There is data in the GUI and it matches what the tempest shows so I'm not sure what the second message is all about.

 

Posted

The only thing I do with wind direction is a program is store it in a state variable, i.e.

If
        'HVAC / Climate / WeatherFlow / ST-00061544' Wind Direction >= -1°
 
Then
        $sWeatherStation.WindDirection  = 'HVAC / Climate / WeatherFlow / ST-00061544' Wind Direction °
 
Else
        $sWeatherStation.WindDirection  = -1
 

That said, I see it isn't working. My state variable is '0' - the init value - and it hasn't changed since last reboot.

Could it be because it tries to store the "degree" character too?

image.png.d5077a29b34aaba44b68ba8cf9d9649e.png

Posted
On 9/26/2022 at 7:53 PM, bpwwer said:

I think it complaining that wind direction can't be compared with -1° so it does nothing.

Ok I changed the code and the error doesn't come up anymore, however the variable does not get set when it should.

Here's the new program logic (0 is converted to "No Wind")

If
        'HVAC / Climate / WeatherFlow / ST-00061544' Wind Direction > No Wind
 
Then
        $sWeatherStation.WindDirection  = 'HVAC / Climate / WeatherFlow / ST-00061544' Wind Direction °
 
Else
        $sWeatherStation.WindDirection  = 0

 

It evaluates True 

image.png.cb138add3f3edf352b5ebfdf37b74f6f.png

 

But the variable has not changed value since last reboot, when if was initialized to 0

image.thumb.png.d51bb0208a0400924abe0b942448def2.png

 

 

Here's a sampling of WINDDIR values over the past few hours  - none are 0

Wed 09/28/2022 05:12:34 AM : [ n006_207296   WINDDIR 359 (uom=76 prec=0)
Wed 09/28/2022 05:17:32 AM : [ n006_207296   WINDDIR 352 (uom=76 prec=0)
Wed 09/28/2022 05:19:30 AM : [ n006_207296   WINDDIR 350 (uom=76 prec=0)
Wed 09/28/2022 05:25:27 AM : [ n006_207296   WINDDIR 352 (uom=76 prec=0)
Wed 09/28/2022 05:27:27 AM : [ n006_207296   WINDDIR 359 (uom=76 prec=0)
Wed 09/28/2022 05:28:30 AM : [ n006_207296   WINDDIR 337 (uom=76 prec=0)
Wed 09/28/2022 05:33:23 AM : [ n006_207296   WINDDIR 348 (uom=76 prec=0)
Wed 09/28/2022 05:39:21 AM : [ n006_207296   WINDDIR 348 (uom=76 prec=0)
Wed 09/28/2022 05:40:20 AM : [ n006_207296   WINDDIR 335 (uom=76 prec=0)
Wed 09/28/2022 05:43:47 AM : [ n006_207296   WINDDIR 344 (uom=76 prec=0)
Wed 09/28/2022 05:53:43 AM : [ n006_207296   WINDDIR 358 (uom=76 prec=0)
Wed 09/28/2022 06:02:37 AM : [ n006_207296   WINDDIR 357 (uom=76 prec=0)
Wed 09/28/2022 06:06:35 AM : [ n006_207296   WINDDIR 343 (uom=76 prec=0)
Wed 09/28/2022 06:10:38 AM : [ n006_207296   WINDDIR 352 (uom=76 prec=0)
Wed 09/28/2022 06:12:32 AM : [ n006_207296   WINDDIR 335 (uom=76 prec=0)
Wed 09/28/2022 06:18:29 AM : [ n006_207296   WINDDIR 358 (uom=76 prec=0)
Wed 09/28/2022 06:35:20 AM : [ n006_207296   WINDDIR 352 (uom=76 prec=0)
Wed 09/28/2022 07:14:38 AM : [ n006_207296   WINDDIR 343 (uom=76 prec=0)
Wed 09/28/2022 07:19:34 AM : [ n006_207296   WINDDIR 357 (uom=76 prec=0)
Wed 09/28/2022 07:22:34 AM : [ n006_207296   WINDDIR 339 (uom=76 prec=0)
Wed 09/28/2022 07:26:31 AM : [ n006_207296   WINDDIR 346 (uom=76 prec=0)
Wed 09/28/2022 07:30:21 AM : [ n006_207296   WINDDIR 335 (uom=76 prec=0)
Posted
55 minutes ago, hart2hart said:

Is your weather flow set to measure the wind every 3 or 15 seconds?

where do I see / change that? I looked through the settings but didn't find one for this. It looks like it's every 3 seconds just from watching changes.

 

55 minutes ago, hart2hart said:

Try removing the else clause and see if the value is going back to 0 between actual samples.

Ok I did that and ran it (if) which ran true and stayed true with no change to the variable. I think if this had been the issue, the timestamp for the variable would not still be the time from the last reboot 8 days ago. 

Posted (edited)

Does running Then record a value?

The every 15  seconds is a battery saver feature.  Its under settings stations stations "your station name" Manage Devices Sky Advanced Power Save Mode turn it on.

 

You may have temptest where sky and air are in one device together so it may be a little different

In iOs app...

Edited by hart2hart
Posted
8 minutes ago, johnnyt said:

where do I see / change that? I looked through the settings but didn't find one for this. It looks like it's every 3 seconds just from watching changes.

You set this value in the node server configuration page.  In the Custom Configuration Parameters section, set Rapid Wind to true or false.

 

10 minutes ago, johnnyt said:

Ok I did that and ran it (if) which ran true and stayed true with no change to the variable.

FWIW, I wrote a program identical to yours quoted above, and the variable updates as expected.  Maybe there's something specific with your installation of the node server.

Posted
1 hour ago, hart2hart said:

Does running Then record a value?

The every 15  seconds is a battery saver feature.  Its under settings stations stations "your station name" Manage Devices Sky Advanced Power Save Mode turn it on.

 

You may have temptest where sky and air are in one device together so it may be a little different

In iOs app...

No, running then is no different than runnin if.

I have an all in one unit and looked again. don't see any option to change anything related to frequency of wind reports. I do know if the battery goes low, it will reduce itself to conserve energy from 3 secs to 6 secs to 1 min to 5 mins. https://help.weatherflow.com/hc/en-us/articles/360048877194-Solar-Power-Rechargeable-Battery 

 

Posted
1 hour ago, Bumbershoot said:

You set this value in the node server configuration page.  In the Custom Configuration Parameters section, set Rapid Wind to true or false.

The NS config 'Rapid Wind' option is/has been false. I set to true and restarted NS. The wind reports certainly accelerated as seen in NS log updates but the variable doesn't change either automatically or when I 'run then' using this config. 

Posted

So I created a new program from scratch (no copying) to do the same thing and it works fine. There's actually a visible discrepancy between the old and the new "action" statement

Here's the original action:

image.png.f1bf1bb885114ec0265588dbed5abf3d.png

        $sWeatherStation.WindDirection  = 'HVAC / Climate / WeatherFlow / ST-00061544' Wind Direction °

 

And here's the action for the new program: Check out the difference in last character.

image.png.87b297e3f9a6d400342d46fdfd32d6b6.png

        $sWeatherStation.WindDirection  = 'HVAC / Climate / WeatherFlow / ST-00061544' Wind Direction 
 
So then I created a copy of the original program and it had the extra character too but when I changed the equation to a different data element and back again, the extra character was no longer there.

 

Guessing this is a 1 in a million occurrence so won't both opening a ticket with UDI support but next time I have difficult to reconcile program logic I'll definitely look for this issue.

 

Posted

I should add that I originally had the units (in Tempest) as "cardinal", e.g. NW, W, etc. and changed them to degrees without actually changing the action statement so maybe that's what caused this.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...