{"id":27743,"date":"2020-10-13T09:46:45","date_gmt":"2020-10-13T07:46:45","guid":{"rendered":"https:\/\/pi3g.com\/?p=27743"},"modified":"2020-10-13T09:46:45","modified_gmt":"2020-10-13T07:46:45","slug":"update-picockpit-client-for-compatibility-with-v2-0","status":"publish","type":"post","link":"https:\/\/pi3g.com\/de\/update-picockpit-client-for-compatibility-with-v2-0\/","title":{"rendered":"Update picockpit-client f\u00fcr Kompatibilit\u00e4t mit v2.0"},"content":{"rendered":"<p>The new <a href=\"https:\/\/picockpit.com\/\">PiCockpit<\/a> release has many new features, which require a new picockpit-client version (<strong>at least v2.0.1<\/strong>) for compatibility. <\/p>\n<h3><\/h3>\n<h3>What do you get by upgrading the picockpit-client \/ using <a href=\"https:\/\/picockpit.com\/\">PiCockpit<\/a> v2.0?<\/h3>\n<ul>\n<li><strong>GPIO: control GPIO pins<\/strong> (input \/ output \/ software PWM to dim LEDs for example)<\/li>\n<li><strong>PiControl: run commands on your Pi from the webinterface<\/strong> (you define the commands on the Pi in JSON files)<\/li>\n<li><strong>PiDoctor: significantly expanded debugging &amp; state info for your Pi<\/strong> (on-demand \u2013 including low power warnings, throttling warnings and much more)<\/li>\n<li><strong>PiStats: realtime statistics <\/strong>(CPU load \/ RAM usage \/ WiFi strength)<\/li>\n<\/ul>\n<p>And <a href=\"https:\/\/picockpit.com\/\">PiCockpit<\/a> is still free <strong>for up to 5 pis<\/strong>!<\/p>\n<p><a href=\"https:\/\/pi3g.com\/2020\/10\/07\/picockpit-v2-0-released-amazing-new-features\/\">Read all about the new PiCockpit v2.0 features here.<\/a><\/p>\n<h3>&nbsp;<\/h3>\n<h3>Why is the upgrade necessary?<\/h3>\n<p>picockpit-client needs to provide the functions which you can access from picockpit.com as friendly and easy to use Raspberry Pi web interface.<\/p>\n<p>Since many new functions were added, and PiStats has been renamed from the previous PiCockpit version (it used to be called \u201csensors\u201d), an upgrade of the picockpit-client is required.<\/p>\n<p>If you have a version <strong>lower than v2.0.1<\/strong>, you will need to upgrade to enjoy the new functions which <a href=\"https:\/\/picockpit.com\/\">PiCockpit<\/a> v2.0 and up have to offer. <\/p>\n<p>Starting with v2.0.1 you will be able to easily upgrade picockpit-client from your <a href=\"https:\/\/picockpit.com\/\">PiCockpit<\/a> webinterface.<\/p>\n<h3><\/h3>\n<h1>Upgrading from 0.15.16 and previous versions<\/h1>\n<p>If you have been a previous user of PiCockpit before v2.0 was released, and have installed the picockpit-client, you probably have version 0.15.16 or an earlier version.<\/p>\n<p><strong>Pre-requisites:<\/strong><\/p>\n<p>your Pi needs to run on Raspberry Pi OS <strong>Buster <\/strong>(previously called Raspbian Buster).<\/p>\n<blockquote>\n<p>cat \/etc\/os-release | grep VERSION=<\/p>\n<\/blockquote>\n<p>should give you the following output:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-45.png\"><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"35\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-44.png\" border=\"0\"><\/a><\/p>\n<p>The new <strong>picockpit-client release v2.0.1<\/strong> is not compatible with previous Raspbian releases. <\/p>\n<p><strong>Upgrade of picockpit-client:<\/strong><\/p>\n<p>Please log in to your Pi, using SSH or a terminal emulator. Run the following command:<\/p>\n<blockquote>\n<p>sudo nano \/etc\/apt\/sources.list.d\/picockpit.list<\/p>\n<\/blockquote>\n<p>replace the word \u201cstretch\u201d with the word \u201cbuster\u201d:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-46.png\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"57\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-45.png\" border=\"0\"><\/a><\/p>\n<p>to<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-47.png\"><img loading=\"lazy\" decoding=\"async\" width=\"460\" height=\"72\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-46.png\" border=\"0\"><\/a><\/p>\n<p>save the file (Ctrl + O) and exit nano (Ctrl + X).<\/p>\n<p>Run<\/p>\n<blockquote>\n<p>sudo apt-get update<\/p>\n<\/blockquote>\n<p>The output should contain a line like this:<\/p>\n<blockquote>\n<p><em>Get:1 <\/em><a href=\"http:\/\/repository.picockpit.com\/raspbian\"><em>http:\/\/repository.picockpit.com\/raspbian<\/em><\/a><em> buster InRelease [3,531 B]<\/em><\/p>\n<\/blockquote>\n<p>Now run the upgrade command:<\/p>\n<blockquote>\n<p>apt-get install &#8211;only-upgrade picockpit-client<\/p>\n<\/blockquote>\n<p>You\u2019ll see some output including the following:<\/p>\n<blockquote>\n<p><em>Unpacking picockpit-client (2.0.1) over (0.15.16) &#8230;<br \/>\nSetting up picockpit-client (2.0.1) &#8230;<br \/><\/em><\/p>\n<\/blockquote>\n<p>You will be presented with a question about your configuration file:<\/p>\n<blockquote>\n<p><em>Configuration file &#8216;\/etc\/picockpit-client\/picockpit-client.config.json&#8217;<br \/>&nbsp; ==&gt; File on system created by you or by a script.<br \/>&nbsp; ==&gt; File also in package provided by package maintainer.<br \/>&nbsp;&nbsp;&nbsp; What would you like to do about it ?&nbsp; Your options are:<br \/>&nbsp;&nbsp;&nbsp;&nbsp; Y or I&nbsp; : install the package maintainer&#8217;s version<br \/>&nbsp;&nbsp;&nbsp;&nbsp; N or O&nbsp; : keep your currently-installed version<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D&nbsp;&nbsp;&nbsp;&nbsp; : show the differences between the versions<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Z&nbsp;&nbsp;&nbsp;&nbsp; : start a shell to examine the situation<br \/>&nbsp; The default action is to keep your current version.<br \/>\n*** picockpit-client.config.json (Y\/I\/N\/O\/D\/Z) [default=N] ?<\/em><\/p>\n<\/blockquote>\n<p>Go with the default option of \u201cN\u201d<\/p>\n<p>Next, run <\/p>\n<blockquote>\n<p>service picockpit-client status<\/p>\n<\/blockquote>\n<p>If you see a <strong>failed<\/strong> here, we will need to reconnect the Pi to PiCockpit.<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-48.png\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"159\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-47.png\" border=\"0\"><\/a><\/p>\n<p>Run the following command:<\/p>\n<blockquote>\n<p>picockpit-client connect \u2013skipkey<\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-49.png\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"317\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-48.png\" border=\"0\"><\/a><\/p>\n<p>note that these are two dashes before skipkey (WordPress will likely mess up the formatting).<\/p>\n<p>This will re-establish contact with the MQTT server. This should probably only be necessary if you installed the old picockpit-client software release after PiCockpit v2.0 was released.<\/p>\n<p>This command will also automatically start the picockpit-client service on your pi. <\/p>\n<p><\/p>\n<p>The Pi should now be online in PiCockpit v2.0:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-50.png\"><img loading=\"lazy\" decoding=\"async\" width=\"457\" height=\"55\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-49.png\" border=\"0\"><\/a><\/p>\n<p>That\u2019s it \u2013 you\u2019re finished <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"\" alt=\"Smile\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/wlEmoticon-smile-1.png\"><\/p>\n<p><\/p>\n<h1>Upgrading picockpit-client from the webinterface (v2.0.1 +)<\/h1>\n<p>Note: You need to have at least v2.0.1 of the picockpit-client for this feature.<\/p>\n<p>Select your Pi, and click on <strong>PiControl<\/strong>:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-51.png\"><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"334\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-50.png\" border=\"0\"><\/a><\/p>\n<p>Click on <strong>Upgrade Client <\/strong>in Core commands:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-52.png\"><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"137\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-51.png\" border=\"0\"><\/a><\/p>\n<p>Stay on the page, and click on STATUS below Upgrade client:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-53.png\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"359\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-52.png\" border=\"0\"><\/a><\/p>\n<p>A checkmark in the upper right corner will indicate once the command has finished executing:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-54.png\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"450\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-53.png\" border=\"0\"><\/a><\/p>\n<p>This will run <\/p>\n<blockquote>\n<p>apt-get update<\/p>\n<\/blockquote>\n<p>and <\/p>\n<blockquote>\n<p>apt-get install &#8211;only-upgrade picockpit-client<\/p>\n<\/blockquote>\n<p>on your Raspberry Pi. (The second command is a variation of apt-get upgrade, to only upgrade one specific software package \u2013 in this case picockpit-client).<\/p>\n<p>Look at the output of the second command. As of writing this, picockpit-client v2.0.1 is still the newest version available (we\u2019re a couple of days after release!) <\/p>\n<p>In this case you will get: <\/p>\n<pre>picockpit-client is already the newest version (2.0.1).<\/pre>\n<\/p>\n<p>Otherwise, the upgrade process will be started.<\/p>\n<p><\/p>\n<h3>How do I find out which picockpit-client version I have?<\/h3>\n<p><strong>From the <\/strong><a href=\"https:\/\/picockpit.com\/\"><strong>PiCockpit<\/strong><\/a><strong> webinterface<\/strong><\/p>\n<p>Go to PiDoctor on your Pi, and the Software module:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-55.png\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"519\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-54.png\" border=\"0\"><\/a><\/p>\n<p>click the \u201cGo to software\u201d button to scroll down quickly to the software module:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-56.png\"><img loading=\"lazy\" decoding=\"async\" width=\"225\" height=\"63\" title=\"image\" style=\"margin: 0px; display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-55.png\" border=\"0\"><\/a><\/p>\n<p>You\u2019ll see the PiCockpit Client version of your Pi as first entry here:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-57.png\"><img loading=\"lazy\" decoding=\"async\" width=\"598\" height=\"148\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-56.png\" border=\"0\"><\/a><\/p>\n<p><strong>From the command line on your Pi:<\/strong><\/p>\n<blockquote>\n<p>picockpit-client version<\/p>\n<\/blockquote>\n<p>will give you the following output:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-58.png\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"154\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-57.png\" border=\"0\"><\/a><\/p>\n<p>which, as you see, also includes information about the latest available version and minimum recommended versions. <\/p>\n<p>You should always try to have at least the minimum recommended version, otherwise functionality might break. <\/p>\n<p>Note: if you have a version before 2.0.1 (the previous version was 0.15.16, released on 30th of October 2019), you will need to change the repository. This blog post explains how to do it. <\/p>\n<h3>How to identify that you have installed the old picockpit-client version<\/h3>\n<p>if you add the pi using <strong>picockpit-client connect<\/strong>, you will get the following error message:<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-59.png\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"112\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-58.png\" border=\"0\"><\/a><\/p>\n<p><em>Adding your Pi to picockpit.com as &#8216;Alethea&#8217; &#8230;<br \/>\nPiDoctor: privacy mode enabled.<\/em><\/p>\n<p><em><br \/>\n<\/em><\/p>\n<p><em>The following error was encountered:<br \/>\nERROR: [400] Please upgrade picockpit-client to be compatible with PiCockpit v2.0<br \/>\nTIP:&nbsp;&nbsp; Use the &#8211;verbose flag to get the server&#8217;s feedback<br \/>\nQuitting. Sorry \ud83d\ude41<\/em><\/p>\n<p>Follow the instructions in this blog post to upgrade your version of picockpit-client.<\/p>\n<p>Note that the Pi will still be added to your webinterface \u2013 you can simply upgrade.<\/p>\n<p><a href=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image-60.png\"><img loading=\"lazy\" decoding=\"async\" width=\"583\" height=\"161\" title=\"image\" style=\"display: inline; background-image: none;\" alt=\"image\" src=\"https:\/\/pi3g.com\/wp-content\/uploads\/2020\/10\/image_thumb-59.png\" border=\"0\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Das neue PiCockpit Release hat viele neue Funktionen, die eine neue picockpit-Client Version (mindestens v2.0.1) f\u00fcr die Kompatibilit\u00e4t erfordern. Was bringt ein Upgrade des picockpit-Clients \/ die Verwendung von PiCockpit v2.0? GPIO: Steuerung von GPIO Pins (Input \/ Output \/ Software PWM um z.B. LEDs zu dimmen) PiControl: Befehle auf dem Pi \u00fcber das Webinterface ausf\u00fchren...<\/p>","protected":false},"author":830,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[432],"tags":[903,902,681,871,422,363,901],"class_list":["post-27743","post","type-post","status-publish","format-standard","hentry","category-picockpit","tag-check-picockpit-version","tag-picockpit-v2-0","tag-picockpit-client","tag-raspberry-pi-os","tag-raspbian","tag-upgrade","tag-upgrade-from-the-webinterface"],"_links":{"self":[{"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/posts\/27743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/users\/830"}],"replies":[{"embeddable":true,"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/comments?post=27743"}],"version-history":[{"count":1,"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/posts\/27743\/revisions"}],"predecessor-version":[{"id":27744,"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/posts\/27743\/revisions\/27744"}],"wp:attachment":[{"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/media?parent=27743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/categories?post=27743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pi3g.com\/de\/wp-json\/wp\/v2\/tags?post=27743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}