Development

/Development

envoy fix for serving big files from the backend / timeouts / aborted downloads

Customers were complaining about not being able to download big files from our websites (e.g. PiDoctor on PiCockpit.com). Initially I could not replicate the issue locally, the files seemed to be downloading fine.After further investigation I determined that the downloads were cutting out after a certain time – depending on your download speed, thus, for [...]

By | Juni 27th, 2020|Development|Kommentare deaktiviert für envoy fix for serving big files from the backend / timeouts / aborted downloads

Dealing with NIL in JSON::Any in Crystal Lang

One of the challenges when developing with Crystal is that it is not as forgiving about data types as, say, Python or Ruby.nil will keep you occupied.The following error message:cast from Nil to String failed, at /usr/share/crystal/src/json/any.cr:220:5:220can be solved by:# cast to string, THEN check if it is nil if !(shopify_data[spid]["billing_address"]["address2"].as_s? == nil)     name = [...]

By | Mai 30th, 2020|Crystal Language|Kommentare deaktiviert für Dealing with NIL in JSON::Any in Crystal Lang

Chromium exit code -5

While running Chromium with chromium-browser --display=:0 https://www.picockpit.comwill allow you to start Chromium from an SSH connection (and it will output to the main display in the X Server), this will fail when you try to run it with subprocess.Popen in Python:"command": ["chromium-browser", "--display=:0", “https://picockpit.com”](this is part of the JSON format I have specified for PiControl [...]

By | Mai 19th, 2020|Development|Kommentare deaktiviert für Chromium exit code -5

secure command execution with Python: subprocess.Popen

Security is important for me while developing the picockpit-client. The following applies to Linux systems (but probably is applicable to all Unix like systems, including macOS)Python allows to run external commands using the subprocess module.import subprocessIn the upcoming version of PiCockpit, users will be able to create their own buttons (simply editing a JSON file [...]

By | Mai 15th, 2020|Development, Python|Kommentare deaktiviert für secure command execution with Python: subprocess.Popen

TermiShell: a web-based shell for the Raspberry Pi (development notes)

IntroductionIn the course of development of PiCockpit, I am going to add a web-based Terminal called TermiShell.TermiShell icon, by: Stephanie Harvey via unsplash.com TermiShell is going to allow you to log into your Raspberry Pi using PiCockpit.com (and the picockpit-client) – no additional application required on either side. This should be very comfortable, especially when [...]

By | Mai 5th, 2020|Development, Python, Raspberry Pi Blog, Raspberry Pi Embedded Development|Kommentare deaktiviert für TermiShell: a web-based shell for the Raspberry Pi (development notes)

Creating configuration files in /etc in Debian packages

I am currently working on an updated picockpit-client version, which should add additional configuration files in /etc/picockpit-client for the individual modules (PiDoctor & PiControl).picockpit-client is a Raspbian package for picockpit.com, linking the Web platform with your individual Raspberry Pi.As Raspbian is based on Debian, the following information holds true for general packaging for Debian and [...]

By | April 5th, 2020|Development|Kommentare deaktiviert für Creating configuration files in /etc in Debian packages

Eclipse Paho MQTT JavaScript Documentation

Unfortunately the official Eclipse page which you  can easily find using Google does NOT link to the documentation proper (at least not as far as I can see it). The link to the documentation itself is this:https://www.eclipse.org/paho/files/jsdoc/Paho.MQTT.Client.htmlHappy coding.

By | März 11th, 2020|Development, MQTT|Kommentare deaktiviert für Eclipse Paho MQTT JavaScript Documentation

fixing z-index for v-menu and v-list: how to make a menu overlap your content in vuetify

I have the following menu setup, and I think you can see the problem immediately:As you can possibly see, I have a v-app-bar which contains the menu, and a main content area.The v-menu is being overlapped by the v-card in the content of the page. Trying to set the z-index property on v-menu did not [...]

By | März 8th, 2020|Tips & tricks, Vue.js|Kommentare deaktiviert für fixing z-index for v-menu and v-list: how to make a menu overlap your content in vuetify

Fixing Uncaught ReferenceError: Vue is not defined with webpack

I am moving to a workflow using WebPack, which bundles code. While transitioning, I stumbled across this error:Uncaught ReferenceError: Vue is not definedat eval (external "Vue"?548a:1)at Object.<anonymous> (pcp_mainbundle.js:172)at __webpack_require__ (pcp_mainbundle.js:20)at eval (pcpVue.js?6cb8:1)at Object.<anonymous> (pcp_mainbundle.js:196)at __webpack_require__ (pcp_mainbundle.js:20)at eval (pcpMain.js?814e:1)at Object.<anonymous> (pcp_mainbundle.js:189)at __webpack_require__ (pcp_mainbundle.js:20)at Object.<anonymous> (pcp_mainbundle.js:181)10000000111a2334:47 Uncaught TypeError: window.pcpRun is not a functionat 10000000111a2334:47I ensured that the [...]

By | Februar 27th, 2020|Vue.js|Kommentare deaktiviert für Fixing Uncaught ReferenceError: Vue is not defined with webpack

vue.js history vs hash mode on a subpath

In case you are mounting your vue Router not on the root page, but a “subpath”, there is an important difference in the behavior of Vue Router in history and hash mode.History modeIf you want, for example, to use https://picockpit.local/debug/ to have the Vue Router live on, in history mode:The following routes{ path: '/', component: [...]

By | Februar 24th, 2020|Vue.js|Kommentare deaktiviert für vue.js history vs hash mode on a subpath