Frequently asked questions and possible issues you may face when working with Cloud4RPi:
How to avoid an Installation Error?
You can get one of the following errors while installing the Cloud4RPi client library using the
sudo pip install cloud4rpi command:
- InstallationError: Command "python setup.py egg_info" failed with error code 1
- Error while finding spec for 'pip.__main__' (<class 'ImportError'>: cannot import name 'IncompleteRead'); 'pip' is a package and cannot be directly executed
This happens because the setuptools and/or pip packages your Python interpreter uses are outdated. Update the packages with the following command:
sudo pip install --upgrade setuptools pip
After updating, reinstall cloud4rpi:
sudo pip install cloud4rpi
Raspberry Pi does not recognize my 1-Wire device
If you experience issues with the 1-Wire interface on Raspberry Pi, follow the instructions below.
sudo raspi-configand make sure that the 1-Wire interface is enabled (Interfacing Options | 1-Wire menu).
- Add the
dtoverlay=w1-gpiostring to your
echo dtoverlay=w1-gpio | sudo tee -a /boot/config.txt).
- Reboot (
Double-check the wiring and your device's operational voltage. The 1-Wire DATA bus should be connected to GPIO4 (Pin 7) and pulled up to VCC.
How to avoid the "Insecure Platform" warning?
InsecurePlatformWarning: A true SSLContext object is not available... notification appears when you run Cloud4RPi on a Python version lower than 2.7.9. Check your current Python version with the following command:
You can install the latest version using one of the following ways.
Where are the log files?
You can read the logs containing the service's output and errors using one of the following commands:
less /var/log/cloud4rpi.log— if your init manager is
initand you have left the service name and log path unchanged;
sudo journalctl -u cloud4rpi— if your init manager is
systemdand you have not changed the service name.
ps -p 1 command to see your operating system's init manager. If it differs from
systemd, refer to the documentation for your init manager to learn about its logging capabilities or contact us.
You can also call the following function at the beginning of your script to save the script output. It is useful if you do not run your Cloud4RPi-enabled script as a service:
How to update Cloud4RPi client installation?
sudo pip install --upgrade cloud4rpi
How to use the service installed using the service_install.sh script?
The default service's name is cloud4rpi (can be changed in service_install.sh:4). If your init manager is
init, you can use the following commands:
sudo service cloud4rpi start|stop|status|restart|uninstall
If your init manager is
systemd, you can use the same commands except for
uninstall. To remove the
systemd service, execute the following commands:
sudo systemctl stop cloud4rpi.service sudo systemctl disable cloud4rpi.service sudo rm /lib/systemd/system/cloud4rpi.service sudo systemctl daemon-reload