Skip to content
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

How do I set it up..? #31

Open
oireajf opened this issue Jul 22, 2024 · 1 comment
Open

How do I set it up..? #31

oireajf opened this issue Jul 22, 2024 · 1 comment

Comments

@oireajf
Copy link

oireajf commented Jul 22, 2024

Hello all, this isn't really a problem, but I am having trouble will setting this up. I ssh'ed into the pi and pasted the command line to install everything, and that worked perfectly. Now I don't know what to do to get this working. after that I don't know what to do. I paste it into putty and it says that syntax error near unexpected token (' and syntax error near unexpected token p110.getEnergyData'. I have no idea whether im supposed to paste it in a config file on mainsail, or if im supposed to create a file through terminal and paste it in there. Any help would be greatly appreciated.

Cheers

`from PyP100 import PyP110

110 = PyP110.P110("myip", “myemail”, "mypassword")

#The P110 has all the same basic functions as the plugs and additionally allow for energy monitoring.
p110.getEnergyUsage() # Returns dict with all of the energy usage of the connected plug
p110.getEnergyData(1706825847, 1708643847, MeasureInterval.DAYS) # Returns power consumption per day since 1st Feb 24`

@solipsist01
Copy link

paste it in a file like "hello.py"

then run the py file with python3 hello.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants