|
Post by pkelly517 on Nov 29, 2021 17:18:58 GMT -8
Now that that's fixed, I'm having an issue with SkyCam.
I think I need a different version of Pillow. I currently have 5.4.1 installed. Can someone confirm or deny if this is correct version? Here's the traceback in the log file Just needed to find the FreeSans.ttf and stick it in the right place. Now the SkyCam is working. Anyone know which library installs the fonts directly?
Traceback (most recent call last): File "/home/pi/SDL_Pi_Skyweather2/SkyCamera.py", line 53, in takeSkyPicture font = ImageFont.truetype("/usr/share/fonts/truetype/freefont/FreeSans.ttf", 25) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 280, in truetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 145, in __init__ layout_engine=layout_engine) OSError: cannot open resource
Thanks for any help
|
|
|
Post by pkelly517 on Nov 29, 2021 15:48:03 GMT -8
A couple of options available to you would be to downgrade dash or update the code to eliminate the use of no_gutters. The downgrade is not too difficult. Run sudo pip3 uninstall dash dash-bootstrap-components dash-core-components dash-daq dash-html-components dash-table followed by sudo pip3 install dash==1.21.0 dash-bootstrap-components==0.13.0 dash-core-components==1.17.1 dash-daq==0.5.0 dash-html-components==1.1.4 dash-table==4.12.0 As long as you avoid pip upgrading those packages, your Dash app should hopefully run okay. Unfortunately, there are a lot of breaking changes in the next versions of these libraries for the Dash apps. Thanks, Jason Boom! Fixed that problem. And I just dumped all of the software and versions into my own requirements.txt file. Now I just run sudo pip3 install -r requirements.txt and I keep the exact versions I need. If anyone else has suggestions for additional packages to include, I'd be happy to track them. Thanks! Jason
|
|
|
Post by pkelly517 on Nov 28, 2021 19:15:18 GMT -8
I finally got some free time to rebuild the SDcard in my setup. Finding a Buster image for non-desktop installs is non-trivial. Once I got the non-desktop image installed and updated, I built the rest of the software. Most things went well, eventually.
But, when I tried to run the dash app, I get this
insert cod2021-11-28 20:59:01,153] ERROR in app: Exception on /_dash-update-component [POST] Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/usr/local/lib/python3.7/dist-packages/dash/dash.py", line 1336, in dispatch response.set_data(func(*args, outputs_list=outputs_list)) File "/usr/local/lib/python3.7/dist-packages/dash/_callback.py", line 151, in add_context output_value = func(*func_args, **func_kwargs) # %% callback invoked %% File "index.py", line 137, in display_page myLayout = status_page.StatusPage() File "/home/pi/SDL_Pi_Skyweather2/dash_app/status_page.py", line 752, in StatusPage no_gutters=True, File "/usr/local/lib/python3.7/dist-packages/dash/development/base_component.py", line 388, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/dash_bootstrap_components/_components/Row.py", line 76, in __init__ super(Row, self).__init__(children=children, **args) File "/usr/local/lib/python3.7/dist-packages/dash/development/base_component.py", line 134, in __init__ ", ".join(sorted(self._prop_names)) TypeError: The `dash_bootstrap_components.Row` component (version 1.0.1) received an unexpected keyword argument: `no_gutters` Allowed arguments: align, children, className, class_name, id, justify, key, loading_state, style ^C^CError in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python3.7/logging/__init__.py", line 2038, in shutdown h.flush() File "/usr/lib/python3.7/logging/__init__.py", line 1017, in flush if self.stream and hasattr(self.stream, "flush"): File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 432, in __get__ obj = instance._get_current_object() File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 553, in _get_current_object if not hasattr(self.__local, "__release_local__"): # type: ignore e here Dash has been updated recently. This is the pip list
dash 2.0.0 dash-bootstrap-components 1.0.1 dash-core-components 2.0.0 dash-daq 0.5.0 dash-html-components 2.0.0 dash-table 5.0.0 Is there an image available for flashing the sdcard that has all the correct components? Maybe the image that SDL uses on the sdcard they sell? That would certainly help with all software/config questions if everyone is at the same place.
Thanks Peter
|
|
|
Post by pkelly517 on Nov 7, 2021 13:25:48 GMT -8
I'd suggest you reboot. This is a completely new error to me!
|
|
|
Post by pkelly517 on Nov 5, 2021 15:44:39 GMT -8
Everything has been running fine for weeks, but this morning I couldn't load the dash app. WeatherStem is still updating just fine. Here's the error I get when trying to run the index.py script as sudo, without the &.
Traceback (most recent call last): File "index.py", line 5, in <module> import dash_core_components as dcc File "/usr/local/lib/python3.7/dist-packages/dash_core_components/__init__.py", line 22, in <module> from ._imports_ import * # noqa: F401, F403, E402 File "/usr/local/lib/python3.7/dist-packages/dash_core_components/_imports_.py", line 9, in <module> from .Interval import Interval File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 724, in exec_module File "<frozen importlib._bootstrap_external>", line 857, in get_code File "<frozen importlib._bootstrap_external>", line 525, in _compile_bytecode ValueError: bad marshal data (unknown type code)
Nothing had changed. I just checked the dash info one morning, and it couldn't connect. Any hints?
|
|
|
Post by pkelly517 on Mar 4, 2021 11:48:35 GMT -8
I moved the station again, and started losing signal early the next morning. It ran for ~16 hours without issue. The status page did show a low/red indicator. However, when I logged in, killing the python scripts, it would not connect to the station within an hour. I tried hitting the reset button on the station, rebooting the pi, no effect. The inside sensitive sensor showed normal. I moved the station closer, and everything was back to normal. Green dots for both sensors.
Exactly which JSON message are you looking for, and which command should I run to get it? Running a tail on either of the nohup.Out files gives me what you need.
Which makes me think i should set debug flag. How would i do that? Edit the python script, or set something in Linux to enable extra logging?
Thanks fir the efforts
|
|
|
Post by pkelly517 on Feb 28, 2021 16:11:56 GMT -8
I saw the red dot on the dash SkyWeather Status page. Killing the python scripts and running testWireless...py showed the battery level on the F20T device as 'LOW'.
I moved the weather station closer to the pi, and the dot turned green. The F20T response showed 'OK'.
|
|
|
Post by pkelly517 on Feb 25, 2021 16:32:28 GMT -8
You are looking to connect to what with the antenna? A higher gain antenna for the 433MHz SDR receiver? That was my plan. Replace the antenna hooked up to the pi with something more sensitive. Since the battery level improved when I moved the station closer to the pi, I figured that a higher gain antenna may allow me to put the station in the better 'weather' spot, but worse ' transmitter to receiver ' spot.
|
|
|
Post by pkelly517 on Feb 24, 2021 11:31:08 GMT -8
I've got everything running, and running well. I wanted to get things going before the big storm moved through Houston, and I did it! And then no power for 3 of 4 days. Oh well. But I learned a few things.
I wanted to move the weather station to a better spot. I did, but a day+ later, I started missing readings in Dash. I noticed that the battery was Low/Red, so I replaced the batteries. Nothing improved. A couple hours later I moved the station back to its original location, and everything was fine. I read the data on the Pi, and it did come back as Low. I was under the impression that the Weather Station just sent the status of the battery as it read it. Does the Pi make an interpretation based on the radio signal?
On a clearly related note, I had seen in one of the many Setup guides a list of optional parts. This included a +10dB antenna that was ~$15 from Amazon. I cannot find it anymore. There was also an RF fitting that I think should have been required. Where did I see this information?
I haven't figured out how the Rain is calculated. I currently have 0.2" Total Rain, 0.0 Daily and Last 24 hours, -0.2 Last 7 days and -2.6 Calendar Month and last 30 days. This is all in the Dash screen. And it's been unchanged for a couple days. Is there a way to zero all of these numbers, just so I clean slate?
I'm learning Python now, so maybe I can answer these questions for myself someday soon (except the antenna link).
Finally, is the weather station capable of x.xx measurements? In the humid south, we get many days with quick afternoon showers. Sometimes 0.02, 0.04, 0.15, 0.22, etc. This last significant digit rounding error will add up over the course of a month.
Thanks for reading.
|
|
|
Post by pkelly517 on Feb 8, 2021 16:46:23 GMT -8
How about that?
That one command was the last one I was missing. Everything seems to be working now.
I'll let the system run for a day to make sure that there is information to display. The dash page is mostly blank for now.
Thanks for the help!
|
|
|
Post by pkelly517 on Feb 8, 2021 14:18:11 GMT -8
Hi all,
Up front, I did not buy the SDL SDcard. During the Kickstarter, I did not see it as necessary. I had at least half a dozen unused cards of 16GB of greater.
I've muddled through a good portion of the installation issues, but I'm stuck on the MySQL portion. What is required in the database? Currently, I'm getting these errors when starting the dash_app
Traceback (most recent call last): File "/home/pi/SDL_Pi_SkyWeather2/dash_app/weather_page.py", line 156, in generateCurrentWeatherJSON cur.execute(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/connections.py", line 259, in query _mysql.connection.query(self, query) MySQLdb._exceptions.ProgrammingError: (1146, "Table 'SkyWeather2.WeatherData' doesn't exist") Traceback (most recent call last): File "index.py", line 22, in <module> import weather_page File "/home/pi/SDL_Pi_SkyWeather2/dash_app/weather_page.py", line 1031, in <module> CWJSON = generateCurrentWeatherJSON() File "/home/pi/SDL_Pi_SkyWeather2/dash_app/weather_page.py", line 348, in generateCurrentWeatherJSON print("done generating CWJSON=", CWJSON) UnboundLocalError: local variable 'CWJSON' referenced before assignment and a new error in SkyWeather2.py
File "/home/pi/SDL_Pi_SkyWeather2/pclogging.py", line 52, in systemlog cur.execute(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/connections.py", line 259, in query _mysql.connection.query(self, query) MySQLdb._exceptions.ProgrammingError: (1146, "Table 'SkyWeather2.SystemLog' doesn't exist") Indoor Weather Sensors Found Traceback (most recent call last): File "/home/pi/SDL_Pi_SkyWeather2/pclogging.py", line 52, in systemlog cur.execute(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/connections.py", line 259, in query _mysql.connection.query(self, query) MySQLdb._exceptions.ProgrammingError: (1146, "Table 'SkyWeather2.SystemLog' doesn't exist") Main Weather Sensors Found Traceback (most recent call last): File "/home/pi/SDL_Pi_SkyWeather2/pclogging.py", line 52, in systemlog cur.execute(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/usr/local/lib/python3.7/dist-packages/MySQLdb/connections.py", line 259, in query_mysql.connection.query(self, query) MySQLdb._exceptions.ProgrammingError: (1146, "Table 'SkyWeather2.SystemLog' doesn't exist") I'm not a database guy at all. Should I try to get any further from random websites, I would expect to screw things up more than I'd fix.
And, as a suggestion, wouldn't it be worthwhile to put the SDL SDcard image on GitHub so that we all could start from a known point? Half of the questions in this forum wouldn't be necessary.
Thanks
Peter
|
|
|
Post by pkelly517 on Dec 11, 2017 19:13:25 GMT -8
I'll be sure to update when it arrives. By the way, the defective board is on the way, too. It should arrive by end of day Monday. Thanks again I finally received the replacement board the middle of last week. I got it installed over the weekend, and it appears to be working. 3 days and charging, solar voltage and current are reporting nominally. Thanks.
|
|
|
Post by pkelly517 on Nov 25, 2017 14:53:08 GMT -8
pKelly, I'll follow up on it. Do you have your RMA #? I'll give it cindy and we can see what we have. BP RMA #102417-01-A Thanks
|
|
|
Post by pkelly517 on Nov 22, 2017 10:45:16 GMT -8
The defective board was delivered October 30th, but I still haven't received a replacement. I received a note from customer service stating one would be sent, but that was over two weeks ago. Has the replacement been lost? Is it being tracked?
Happy Thanksgiving!
|
|
|
Post by pkelly517 on Oct 24, 2017 12:39:13 GMT -8
I'll be sure to update when it arrives. By the way, the defective board is on the way, too. It should arrive by end of day Monday.
Thanks again
|
|