wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 21, 2021 9:15:59 GMT -8
 Up and running. Rack on deck needs to be moved to garden post. A little too snug in box to fasten down need to get smaller connectors, wish the box was 1/2" larger both directions. Box propped in window for some burn in. Camera needs color correction. Blynk working. Thinking about moving my SolarMax:Lead to Sky 2 and with all the config options wondering what else I could steal from my Sky1. This was so much easier than Sky1. Need to order more stuff and more Pi4s. Is there a way to start dash at boot? Thunder coming soon Need to install fan before summer. Is there a way to show wind direction with ordinals N,S,SSE in addition to degrees? Thinking about more panel design for dash. How are people sharing weather data with WU API obsolete? Just got to "Love" NOT Itty Bitty Machine Co. Well off to compare stats. W
|
|
|
Post by Jason on Feb 21, 2021 9:48:31 GMT -8
How are you starting SW2 at boot?
Jason
|
|
|
Post by Jason on Feb 21, 2021 9:50:44 GMT -8
It is absolutely possible to show direction as a string value but it will require some coding. I wrote a function in Node-RED to do the conversion and would be willing to convert to Python if you’re interested. Let me know.
Jason
|
|
wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 22, 2021 5:58:38 GMT -8
Jason, Would love the Python code for wind direction. Saw your post about wind chill.
Starting Sky2 rc.local
with provided code just removed the # comment cd /home/pi/SDL_PiSkyWeather2 nohup sudo python3 SkyWeather2.py & chmod 666 nohup.out
Thanks Wallace
|
|
wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 22, 2021 6:00:26 GMT -8
My photos are coming out with a red tint. Wondering if it is a reflection of the red LED. Thinking I might put a tube around camera. W
|
|
wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 22, 2021 6:03:33 GMT -8
Just in RPI 4 and having trouble with the USB C power connector. The USB C end of the short cable is too long to fit in box with the RPI 4 mounted. Even loose in box it strains cable. What I'd give for another 1/2".
|
|
wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 22, 2021 6:05:53 GMT -8
Tried to setup MQTT based on blog post and Config page but it failed. Have to play with it another day. W
Got this solved. Now to learn Node Red so I can use data. Jason where are you with this? Thanks W
|
|
wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 22, 2021 6:07:26 GMT -8
Thinking about moving SolarMAX LEAD from Sky1 to 2. Wonder what else I might repurpose. W
|
|
wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 22, 2021 6:10:27 GMT -8
Anybody else have trouble lining up the bolts on cover? One is not aligned even after a little drill action. W
Found tip that I expect will solve this. W
|
|
|
Post by Jason on Feb 22, 2021 7:17:29 GMT -8
Jason, Would love the Python code for wind direction. Saw your post about wind chill. Starting Sky2 rc.local with provided code just removed the # comment cd /home/pi/SDL_PiSkyWeather2 nohup sudo python3 SkyWeather2.py & chmod 666 nohup.out Thanks Wallace You should be able to do the same thing with the Dash app. cd /home/pi/SDL_Pi_SkyWeather/dash_app nohup sudo python3 index.py & Jason
|
|
|
Post by Jason on Feb 22, 2021 7:46:40 GMT -8
Jason, Would love the Python code for wind direction. Saw your post about wind chill. Starting Sky2 rc.local with provided code just removed the # comment cd /home/pi/SDL_PiSkyWeather2 nohup sudo python3 SkyWeather2.py & chmod 666 nohup.out Thanks Wallace I added the following function to weather_page.py: def calc_wind_quadrant(wind_dir): quadrants = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW", "N"] quadrant_size = 22.5
quadrant_num = round(wind_dir/quadrant_size, 0) quadrant_str = quadrants[int(quadrant_num)]
return quadrant_str Next you'll need to find the following line in weather_page.py: children=str(CWJSON["WindDirection"])+" deg", style={"font-size": maintextsize,"color":maintextcolor}), and replace it with the following line: children=str(CWJSON["WindDirection"]) + " deg " + calc_wind_quadrant(CWJSON["WindDirection"]), style={"font-size": maintextsize,"color":maintextcolor}), Now open index.py and find the function updateWeatherUpdate(). The function should appears as follows: def updateWeatherUpdate(n_intervals,id, value):
if ((n_intervals % (1*6)) == 0) or (n_intervals ==0): # 5 minutes -10 second timer #if ((n_intervals % (5*6)) == 0) or (n_intervals ==0): # 5 minutes -10 second timer #print("--->>>updateWeatherUpdateString", datetime.datetime.now(), n_intervals) #print("updateWeatherUpdate n_intervals =", n_intervals, id['index']) if (id['index'] == "StringTime"): UpdateCWJSONLock.acquire() weather_page.CWJSON = weather_page.generateCurrentWeatherJSON() UpdateCWJSONLock.release() value = str(weather_page.CWJSON[id['index']]) +" "+ weather_page.CWJSON[id['index']+'Units'] value = "Weather Updated at:" + value
return [value] elif id['index'] == 'WindDirection': wind_dir = weather_page.CWJSON[id['index']] wind_dir_str = weather_page.calc_wind_quadrant(wind_dir) value = str(wind_dir) + weather_page.CWJSON[id['index']+'Units'] + " " + wind_dir_str return [value] UpdateCWJSONLock.acquire() value = str(weather_page.CWJSON[id['index']]) +" "+ weather_page.CWJSON[id['index']+'Units'] UpdateCWJSONLock.release() else: raise PreventUpdate return [value] Jason
|
|
|
Post by SDL on Feb 22, 2021 13:09:12 GMT -8
Question: Thinking about moving SolarMAX LEAD from Sky1 to 2. Wonder what else I might repurpose. W
Answer: Yes, it should work. What Pi are you using? SolarMAX LEAD is a little marginal with a Raspberry Pi 4B, but will work with anything else.
We are coming out with a SolarMAX2 in April and that uses the new WeatherSense 433MHz system, a better processor, simpler wiring and will really support the 4B.
John
|
|
|
Post by Jason on Feb 22, 2021 15:56:36 GMT -8
Jason, Would love the Python code for wind direction. Saw your post about wind chill. Starting Sky2 rc.local with provided code just removed the # comment cd /home/pi/SDL_PiSkyWeather2 nohup sudo python3 SkyWeather2.py & chmod 666 nohup.out Thanks Wallace I found formulas for wind cool and heat index. The only problem with the formulas is that wind chill doesn’t calculate below wind speeds of 3mph and heat index doesn’t calculate below 80F. If folks are aware of better formulae, please share. Thanks, Jason
|
|
wshealy
Full Member
 
Posts: 187
Raspberry Pi: Yes
|
Post by wshealy on Feb 23, 2021 5:08:17 GMT -8
Thanks Jason, All your changes worked beautifully. W
|
|