Adapting the windblock

Damn it, I was more concentrating on the right hand boxes I didn’t notice that the left hand boxes already has the Average wind, so I now need to have a think on this one lol

Look back at Reply #7 above, you had average last minute working there.

echo '<!-- average speed 1 min-->
<div class="PWS_div_right" style="border-left-width: 1px;">'
        .$wnd_l.' ('.$avg_lc.'1min)'
        .'
<b >'.$wind_speed_avg_1m.' '.$units_l.'</b>' 
        .'</div>'.PHP_EOL;

Yeah, I think that will be the one :slight_smile:

Just in case anyone wants to do this, its actually


<div class="PWS_div_right" style="border-left-width: 1px;">'
        .$wnd_l.' ('.$avg_lc.'1 min)'
        .'
<b >'.$weather["wind_speed_avg_1m"].' '.$units_l.'</b>'
        .'</div>'.PHP_EOL;

Ah, yes. . . I forgot you didn’t define $wind_speed_avg_1m :oops:

I notice your small wind block title doesn’t mention Gust either. Is that because you changed $head_wind in PWS_blocks.php?


$head_wind      = lang('Wind') .' - '.lang($weather["wind_units"]); 
$head_wind_smll = lang('Max').' '.$head_wind ;

Because that changes $head_wind_smll, too. . .

Yes, i changed something for the heading (i couldnt tell ya what though but prob is what ya said) and removed gust, i felt just Wind was apt, I think i also added gust as a singular, i think, i cannot remember now, but it seems to work, or have you noticed something thats off?

Edit: for simple.php, i changed it from Gust to Current wind, that too seemed apt to me

Just that the small block apparently shows two max winds today. . . and two for Feb and two for 2022. The heading no longer explains that one is max wind and the other max gust.

Ah poop, i certainly didnt notice that, a bodgers work is never done lol, thank you, i think… :smiley:
Another job for the early hours… :slight_smile:

Thanks again for the heads up, i think i got it sorted now.
As for the double Feb business if its what i think you are on about, youre seeing 2 max’s because both happened this year and both in February.

I reset my wind for whatever reason a while back and lost my 75mph max that happened way back when, poss 2008ish, i would need to put that back in to WD, thats if i can even find it, so for now, this storm we recently had is my max winds, unless of course, i am misunderstanding what you’re on about?

If you really want to show 10-min average wind direction at bottom left you need to change a line in PWS_livedata.php clientraw section because you are currently showing the 1-min average:

$weather["wind_direction_avg"]  = $wd[117];

Change 117 to 176. Note that this will change the red arrow average on the dial, too: your choice :slight_smile:

I’ve been watching this and it’s not just because there’s no wind: see zero.png below from 2 March. It’s also been happening today and I don’t think you’ve had zero wind today?

There might be a clue in zerozero.png below, about 15 mins after zero.png: the block is “Offline”. When I was watching today the block went offline, the anomaly appeared, and then disappeared when the block came back online. BUT immediately after that the rain block went offline, and then the temp block went offline.

I would guess that WD has trouble creating and uploading a valid clientraw.txt as often as you want?

Anyway, try the wind block in Bashy.zip (make a copy of yours first!). I’ve stripped out all the conditionals, so you shouldn’t get the anomaly any more, and you can move the little boxes around as much as you like. (I tested it in my old version of the dashboard.) You still need to change PWS_livedata.php around line 1578 if you really want to show 10-min average direction, though.

And I put “Current Wind” in the middle, to help make it clear that the direction is current as well as the speed. The wind units are in the block header, and they change if a visitor changes units: “Current mph” would be confusing.


zero.png

Bashy.zip (7.75 KB)

Hi, thanks for taking the time to look in to this, i have to say that the “issue” gota lot worse after i messed with the Extra sensor block (bottom right) yesterday, the zeroing started happening all the time since then and i was going to revert that block this morning to see if that changes any, but after watching an unmolested older version , im not seeing the zero issue (was very light winds and it was dropping to zero anyway lol) nor the “issue” at hand, actually just sat on it for another 5 mins and the “issue” did present itself. but didnt happen on the older version i linked to.

I have figured out why it goes offline and may be causing the zeroing, i think its because WD stalls at the top of the minute, every minute and depending on the minute it can be as as little as 7 seconds to much as 30 seconds, this has gotten worse in part because i changed the webcam image size from 640x480 to 960x720, i was fed up of the rubbish quality image. so yeah, WD cannot handle the every 3 seconds at the top of the minute but then it also wouldnt make any difference if i changed it to every minute of 20 minutes becasue we would still see the issue. It only works as well as it does (every 2 seconds) because we are seeing it anything all the other times either side of the top of the minute stall, does that make sense? I think i managed at one time to get the top of the minute stall down to around 7 or 8 seconds and 16 seconds and a big one now i think its 12 seconds and around 30 for the big one. e.g. at 19 min past the hour the length of the stall is 12 secs, 20 min past is 16 secs, not sure when the big one is, i guess there maybe 2, 1 at 30 past the hr and 1 at the top of the hr. I know i can trim it down some but it would mean removing my Alexa skill from the skill store and of course reducing the webcam image.

Apologies for forgetting about your previous reply, with regards to the direction, i am 99.9% sure that i havent touched anything to do with that side of things, my focus was on the speed, or did i add the wording “avg 10 min” (cant remember now) to the speed and it inadvertingly copied to the wind as it used the same translation variable? Yeah, 10 minute avg would be better, so i will admend the PWS_livedata.php, thank you for both.

Its now 4:30am time to go back to bed, not had time to play with it yet, i will have a look later on if i can, thanks again for the help :slight_smile:

Found few spare mins and implemented both, so far so good, thank you :slight_smile:

Slightly edited

I use iSpy to upload the webcam, not WD. WD seems to have enough to do uploading clientraw every 20 secs and a customtext every minute, let alone every 3 secs 8O

And then realtimeftp fails and restarts about 20 times every day. . . The restarts take some time, so I upload an extra copy of clientraw every minute with the customtext: belt and braces.

P.S. the 10-min average for direction looks much better :slight_smile:

Its just handy with WD as does the capturing, overlay and upload.

You have a reolink? I am going to get one myself just not sure if to get the E1 Zoom and use that through a single pane of glass in my rear porch or the oudoor version of the E1 zoom, i want the zoom because i can the narrow the view down, im in a bungalow so its quite low to the ground and caputres too much of the ground when not zoomed it, such as it is now, thats the good thing about the Logitech Pro 9000, the zoom and WD uses the camera software. Not sure how that will work with the Reolink though, i may have to go with Ispy or i could have it running through one of mytablets and use TinyCam, thats a decent app, i use that already for my front E1 Zoom (security only). In 2 minds at present, one is my bandwidth, im only on an 72/20mbs connection, so thats about 6-7mb/s down and 2mb/s up i think it is, so it doesn leave me a lot spare.

As for the realtimeftp, that shouldnt be failing, ever, you have sommat wrong there, the only time mine ever fails is if my t’interweb fails of the lappy connection has a chicken fit, both rare, when its back, any realtimeftp’s that are open finish and it carries on as normal…

Ya know, re the direction, i would never have noticed, thanks again, whilst the direction helps me a lot re raining and needing to shut the back lean to door if its coming from the w/n/e, my prevailing is s/w so normally ok on that score :slight_smile:

I am a little confused though, when you say realtimeftp, i take it your on about the clientraw ftp, i actually though you was on about the main wd ftp, not sure why lol, but still, its the same there, it auto closes and restarts, granted, i have noticed now and again that ive needed to close it myself, thats normally if im playing between different version of WD and im workng faster than the programs allow and i get frusted and cause it to crash, but thats just me, you shouldnt be having that many issues a day, id be unlucky if its 20 times a year, so year, so yeah, deffo sommat amiss there, could it be the conenction to your FTP not allowing as many connections in X amout of time perhaps? although that normally bans the IP addy, thats how my server is setup, but then i just add my IP to the CPHulk and firewall whitelist, i could run 10000 realtimeftp and have no issues, one of the benefits of having your own server, not checp though, about £60 a month with Cpanel on top, cpanel is the exensive part… however, that may have to go cause of these damn prices for everything else at the minutes is just a joke. Ok, im waffling now, but ya really ned to look into that issue, prob an easy fix, hopefully!

Of course, I don’t do the overlay.

You have a reolink?

No, one like this on an upstairs window sill, looking through a double-glazed window :slight_smile:

The IP camera would upload by itself, but gives each uploaded pic a new file name instead of overwriting the last one.

And I disabled the IR. . .

Ah, yes, I see now, just looked at your night image, had it been dark when I looked before I would have known it wasn’t a reolink, they are really good at night, even with the IR off, they show the clouds and stars, my window reolink is the same idea, or off due to the double glazing, here’s mine, I just took a a quick photo of the tablet on my bedside table, the camera is a 5mp I think but I have it set on the lowest quality, anything higher and my BB can’t handle it too well, it delays its and gets worse the higher the quality, I prefer live live lol

.

That’s running through tinycam Pro, the other good thing about reolink is that you can have 20 streams on 1 camera, 2 at max quality and 18 on low, cheaper cameras like tplink only allowed 2, that wasn’t enough, so now I can have the camera showing on 4 tablets all the time in low quality and still access it on my phone and fire cube and any of my echo shows. Whilst reolink are a little more expensive, they are worth if if ya BB can handle it. That’s why I am in 2 minds on a 2nd, I think I would be peeing into the wind with my BB, unless I use ethernet, only one way to find out I spose, good old amazon lol

I don’t think any camera facing north over the rest of Edinburgh, with 3 street lights in the immediate foreground, is going to show clouds and stars at night. And who cares, anyway?

You’d be surprised what can be seen by the Reolinks, they are great low light cameras, the slightest light makes them work incredibly well at night, mine is pointing toward Brandon town a mile away, thats whats lighting up those low clouds, the light on my drive is from my door light, its a 9w LED bulb set at 20% and goes to 100% when motion is detected, in the image its at 20%. The image below is the door light at 100%. theres 1 or 2 stars in the image, the white lining of my curtains really does not help though as its reflected in the window :confused:



BTW i wasnt suggesting you get a Reolink, i was interested in yours as it wasnt showing any weather overlay, hence why i initially thought it may have been a Reolink. I was merely waffling about my experiences with the camera as i cannot praise them enough. Yes, theres a slight chance that if you ever got a Reolink you may have to raise the shot slighty just so that the bulb is out of shot to get the best sky conditions, i do not know that for a fact but after seeing others including a night shot of a city you may not have to. Mine doesnt pick up all the stars, just the brightest bodys, a handful at most, it would need to have the Reolink Starlight sensor if i wanted to see many more stars, now thats a mighty fine night shot :slight_smile:

Seen as you asked, I thought the whole the idea of a weather camera is to gauge the sky conditions and perhaps even more so at night because folks looking out their window just doesnt cut it at night. I think youd be suprised who would care because I think any visitor to your site would prefer to see the night sky instead of bulb, thats the only reason i want to swap out my aging webcam for a Reolink. Use what is best for you, i wouldnt dream of telling you otherwise, like i said, I was just waffling about my experiences brought on by what i thought your camera may have been based on the overlay or lack of.

Anyhoo, i best stop talking now before another of my threads gets split again, thanks again for all your help on the wind block.