-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client Install Fails on Pi 4 #1
Comments
Thanks for bringing this forward. I don’t have a RPi4 to troubleshoot this but the logs seem to indicate it might be a python version issue. Sometime between the creation of this project and now, OS's started shipping with Python3 as the default. The log seems to be looking for a 'python2' executable and then falling back to 'python' (which is likely symlinked to python3). This explains why that print statement gives a syntax error as it's using the Python2 print syntax. The first thing I'd try is installing python2. |
Halted as in the process hung? For how long? Also is there any more to this error log? I'm not seeing any messaging indicating the issue. |
Sorry. Halted as in it errored out again. I will pull the error log and send it over soon. |
Sorry for the delay. Log file attached log.txt |
y'know I'm really not a npm expert, but going off the error at the top of that log: npm WARN EBADENGINE Unsupported engine { It looks like you need to downgrade your node version or upgrade the karma dependency. Funny enough, that version of karma appears to have a recently discovered vulnerability. So perhaps try manually upgrading it version 6.3.16 or later in client/package.json, like so: "dependencies": { |
Thanks for the guidance. I was able to get everything updated and running, but when I browse to the app it only seems to be pulling date and time correctly and not grabbing the weather or thermostat data. Is there a log somewhere where I can see if there are any errors? |
Great news! Please describe what changes you made for future readers. Consider making a PR as well. If you exit out of fullscreen (F11), you'll see the terminals running each component. There are also steps in the README to run each part separately. The server does require some setup/config for API access before it will serve up weather/thermostat data. |
I'm attempting to use the Pi as a web server to serve up the Weatherdash dashboard, so I'm not running it full screen on the pi and instead viewing it from a browser to the pi address. I have the server configured with the necessary tokens and API keys, and when the server starts up it says it's able to refresh and update successfully, so im assuming I have a disconnect between the client and server or something like that. |
Well, depending on how you launched the server component, the executable will log wherever you ran it. |
I used the npm start command. Would the info be in .npm logs or elsewhere? |
It should just be logging to stdout |
Hmmm. Server output seems fine. It's getting successful updates at regular intervals. |
Idk if this makes a difference, but if I try to run the startup bash script with both client and server running, it does show a connection error when trying to hit the server. |
The startup script launches everything (server, client host, and browser with client), so if you had those running already, an error doesn't seem too unexpected. If the server is fine, check the output for the client host process, and also the client itself (via the console in your browser's dev tools). |
I was thinking, does the ecobee portion have the ability to specify which thermostat its reading from? I have 2 in the house, which may contribute to why that part isn't populating. |
Yes. I believe I covered that in the Readme.
…On Fri, May 27, 2022, 8:05 AM bigbernmcraken ***@***.***> wrote:
I was thinking, does the ecobee portion have the ability to specify which
thermostat its reading from? I have 2 in the house, which may contribute to
why that part isn't populating.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH524WC7PMIMSRMI5YJ2HLVMDQCBANCNFSM5W5KTVRA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Oh. I'll have to look for that again. I've been looking through the responses in Chrome dev tools and it looks like even when my server is on it is refusing connection. I tried to hit one of the server api call endpoints directly and I get a "Cannot GET /api/settings" message. |
Sorry for all the messages. I think I'm getting closer but I need to make a config adjustment to how the API calls are made, specifically to change the CORS policy. Could you point me in the right direction of those calls? |
No worries. Sounds like you're really close, so I'm rooting for you. https://github.com/Mrjohns42/WeatherDash/blob/master/server/index.js#L31 |
That did it! She's running well now. Thank you so much for your help. I will work on putting together some documentation for the update steps I performed and such to help future users. One more question around functionality, though. Do you think it would be a huge lift to allow the app to make thermostat changes? I can tinker with it since I know the ecobee api allows for that functionality, but I didn't know if that's something you toyed with while working on this. Ideally I would love to turn this into something I can browse to on an old tablet and mount in the guest room so visitors can adjust the temp without having to go to another floor. |
So glad to hear! I will await your followup documentation before closing out this issue. Allowing the UI to make thermostat changes definitely seems doable. You'll have to make sure your Ecobee access token has the right permissions for that. Assuming you know a little Angular/HTML/CSS, you'd have to add a new UI element. Perhaps tapping the Target numbers brings up a dialog with options to turn your thermostat on/off and set a target temp. Check out the dialog when you tap to the location on the Outdoor section as an example: https://github.com/Mrjohns42/WeatherDash/blob/master/client/src/app/weatherdash/weatherdash.component.html#L80 The client would then need to issue a command to the server to use the Ecobee API to change the thermostat settings. If you know a little Node.js, then it'd be easy add a REST endpoint in the server to receive the command from the client, and then call the Ecobee API. Below is an example Ecobee API call: https://github.com/Mrjohns42/WeatherDash/blob/master/server/apis.js#L221 I'll happily consider your PR if you get it working. |
Going through the configuration steps on a Pi 4 with Rasbian, and once I attempt the 'npm install' command in the 'client' folder, the install will error out with python issues and invalid syntax messages. Before it errors out there are a lot of warnings of deprecated packages so some things may just need to be updated
.
The text was updated successfully, but these errors were encountered: