markruys / gw2pvo

GoodWe to PVOutput
MIT License
45 stars 29 forks source link

gw2pvo.service: Failed with result 'exit-code' #6

Closed Ralf7 closed 5 years ago

Ralf7 commented 5 years ago

Dear Mark, I've tried to use your script but I receive an error and have no idea why, I hope you can help me. I have no coding/programming skills. I'm using a Raspberry Pi 2+ with Raspbian Stretch installed. Python version is 3.5.3 and PIP version is 9.0.1 I followed all your instructions but at the line 'sudo systemctl status gw2pvo' I receive an error, see the attachment below: knipsel

markruys commented 5 years ago

Screenshot doesn't show a lot of info actually. Does /var/log/syslog show anything unusual? You could try to run the gw2pvo command directly and get some more understanding of what went wrong.

Ralf7 commented 5 years ago

Every 5 minutes this is written in the syslog file: knipsel 2 I searched using Google what it means, but I couldn't find a solution.

I don't exactly know what you mean by running the gw2pvo command directly, because I'm a beginner in Linux/Python. But maybe this attachment is useful. knipsel 3

eNeRGy164 commented 5 years ago

It seems something goes wrong when authenticating against the SEMS API. Is your account activated and can you login at https://www.semsportal.com/ with the same credentials you provide at the command line? The application doesn't use the older goodwe-power.com portal API anymore.

Ralf7 commented 5 years ago

I double checked and copy/paste it to make sure I didn't make a mistake. I can login using the new SEMS portal and am using exactly the same credentials in the gw2pvo.service script file. The gw-account is my emailaddress and the gw-password is obviously the password, which contains upper case, lower case, numbers and a under score symbol.

markruys commented 5 years ago

The logs show it can't find the program gw2pvo in /usr/local/bin. I suspect the installation went wrong. Can you please try again:

pip install https://github.com/markruys/gw2pvo/releases/download/1.2.1/gw2pvo-1.2.1.tar.gz

and show us the output? If it fails, you could try:

pip3 install https://github.com/markruys/gw2pvo/releases/download/1.2.1/gw2pvo-1.2.1.tar.gz

Also from this I would like to see the result.

Ralf7 commented 5 years ago

Only the command starting with pip3 works for me. This is the result: opnieuw installeren

I saved the screenshot of the initial installation on Saturday, see below: eerste installatie

After reinstallation I checked the gw2pvo.service file using sudo nano gw2pvo.service. Everything was still there, so I used CTRL+X to EXIT (or do I need to use a different command, I see for example READ?) Then I entered the systemctl commands, Unfortunately I'm still receiving exactly the same error at sudo systemctl status gw2pvo.

Do I need to upgrade my pip version? I have 9.0.1

markruys commented 5 years ago

No, pip3 is good. I haven't try at a RPi, but it looks like you're missing root privileges. So try this:

sudo pip3 install https://github.com/markruys/gw2pvo/releases/download/1.2.1/gw2pvo-1.2.1.tar.gz

Then running gw2pvo should give you some help screen. If that works, check /usr/local/bin/gw2pvo. If that's okay too, try sudo systemctl restart gw2pvo followed by sudo systemctl status gw2pvo.

Ralf7 commented 5 years ago

It looks like installing with sudo was the trick! When I run sudo systemctl status gw2pvo I don't receive an error and in my PVOutput account I see the live page with new data every 5 minutes. After following your commands in the previous post I entered sudo journalctl -u gw2pvo -f , just like mentioned on the code page. Thanks a lot for helping me out!

Ralf7 commented 5 years ago

The script runs now for almost 2 weeks and I didn't find any new problems, so I close this issue.

markruys commented 5 years ago

Okay, I've updated the documentation and added sudo.