Why do you use SUDO?
Without SUDO the result is:
pi@Geeetech:~ $ /home/pi/.platformio/penv/bin/activate
-bash: /home/pi/.platformio/penv/bin/activate: Permission denied
With this source
in command line the result is:
pi@Geeetech:~ $ source /home/pi/.platformio/penv/bin/activate
(penv) pi@Geeetech:~
But this source
is not contained in instruction quoted.
Now seems I’m working in VE because I can see (penv)
before each command line.
Anyway the result is the same.
( penv) pi@Geeetech:~ $ pio account token -p Mytoken
*********************************************************************************************************************************************************************************
If you like PlatformIO, please:
- follow us on Twitter to stay up-to-date on the latest project news > https://twitter.com/PlatformIO_Org
- star it on GitHub > GitHub - platformio/platformio-core: A professional collaborative platform for embedded development
- try PlatformIO IDE for IoT development > A professional collaborative platform for embedded development · PlatformIO
- support us with PlatformIO Plus > https://pioplus.com
*********************************************************************************************************************************************************************************
CorePackageManager: Installing tool-pioplus @ ^1.4.5
Downloading [####################################] 100%
Unpacking [####################################] 100%
tool-pioplus @ 1.4.8 has been successfully installed!
CorePackageManager: Installing contrib-pysite @ >=0.3.2,<2
Downloading [####################################] 100%
Unpacking [####################################] 100%
contrib-pysite @ 0.3.2 has been successfully installed!
(penv) pi@Geeetech:~ $ pio account show
(penv) pi@Geeetech:~ $ pio agent start
Usage: pio [OPTIONS] COMMAND [ARGS]...
(penv) pi@Geeetech:~ $ pio remote agent start
(penv) pi@Geeetech:~ $ pio remote agent list
(penv) pi@Geeetech:~ $ pio account login -u MyEmail -p MyPass
(penv) pi@Geeetech:~ $ pio account show
(penv) pi@Geeetech:~ $
Do you have right permissions for ~/.platformio
folder? It seems that you mixed ROOT/PI.
I recommend fully remove ~/.platformio
folder and repeat procedure WITHOUT sudo. I did that yesterday without sudo and it works.
Thanks!
In last attempt I did virtualenv /home/pi/.platformio/penv
without sudo
I think this is not an user problem.
It doesn’t works even using this script.
python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/develop/scripts/get-platformio.py)"
Sorry, that was our issue. We rebuilt PIO Plus Core with a support for ARMv6l. Please run pio update
. Everything should work now.
Hi!
Thanks for all your effort!
I got it working now and I have successfully updated the firmware of my 3D printer.
I had to reinstall everything again since just update PIO core doesn’t solve the problem.
This time I have installed using this command:
sudo python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/develop/scripts/get-platformio.py)"
Now I think only login with token is not working.
I got this message when not logged in:
PIO Plus (https://pioplus.com) v1.4.10
You are not logged in. Please log in to PIO Account using
PlatformIO IDE > PIO Home > Account or `pio account login` command and try again.
If you don't have PIO Account yet, please create it using
PlatformIO IDE > PIO Home > Account or `pio account register` command.
When I did login with email and pass then tried with token I got:
Error: [API] Account: Invalid password
But token is right I tried regenerate it too.
Best regards.
1 Like
How do you use this token?
pio account token -p Mytoken
Hi!
I can’t se any example of usage in docs.
I’m just following the help from the pio command.
pi@Geeetech:~ $ pio account token -h
Usage: pio account token [OPTIONS]
Options:
-p, --password TEXT
--regenerate
--json-output
-h, --help Show this message and exit.
As you can see in docs there’s no information about -p
option.
Best regards.
Now I just found by try and error that -p is to show the current token as string. Equivalent to this option in IDE.
So typing pio account token -p passwordUsedinPIOaccount
will return an output like this:
PIO Plus (https://pioplus.com ) v1.4.10
Personal Authentication Token: 7*************************************************9
I just would like to use this token following your advice here but I can’t see any way to place this token before start remote agent.
See PIO Token workflow:
You generate your own token
You put it to system environment variable PLATFORMIO_AUTH_TOKEN
Now, all PIO Plus commands work without authentication.
Hi!
Sorry by bother you but It is not clear to me.
if I have an auto start script like this where I’ll add this variable before start remote agent?
[Unit]
Description=pio remote agent
Requires=network-online.target
After=network-online.target
[Service]
Type=simple
# change to your user of choice
User=pi
Group=pi
WorkingDirectory=/home/pi
ExecStart=/usr/local/bin/platformio remote agent start
Restart=always
[Install]
WantedBy=multi-user.target
Because when the session is expired the agent won’t start to send this token.
Maybe is more simple add ExecStartPre=/usr/local/bin/platformio account login -u MyEmail -p MyPassword
for this script or something like this.
Also please add info about token -p
option to docs.
Best regards.
See systemd.service
Environment=“ONE=one” ‘TWO=two two’
ExecStart=echo $ONE $TWO ${TWO}
You need something like this
[Unit]
Description=pio remote agent
Requires=network-online.target
After=network-online.target
[Service]
Type=simple
# change to your user of choice
User=pi
Group=pi
WorkingDirectory=/home/pi
Environment="PLATFORMIO_AUTH_TOKEN=INSERT_TOKEN_HERE"
ExecStart=/usr/local/bin/platformio remote agent start
Restart=always
[Install]
WantedBy=multi-user.target
It worked!
Thank you very much for all your help!
After reboot I did:
pi@Geeetech:~ $ pio account show
PIO Plus (https://pioplus.com) v1.4.10
Logged as: token
PIO Plus Plan: PIO Plus Community
Group PIO Plus Community
------------------------
1 Like
gianiaz
November 6, 2018, 4:20pm
33
I’ve done the same steps multiple times to avoid errors, but I can’t get output from platformio.
On the develop machine I have done nothing and it works like a charm.
On raspberry I’ve tried with and without penv with same results.
gianiaz
November 6, 2018, 8:01pm
35
Don’t apologize, thanks for your quick response!!
1 Like