Connecting a scale or balance to a Raspberry Pi: project ideas

On digitalscalesblog.com, I showed how easy it can be to send the weight from a scale to a Python script running on a Raspberry Pi (if you choose the right scale). As I had never used Python before, all the script did was print the weight data. That doesn’t mean you have to stop there. Here a some ideas and links to get you going.

  • Use the Raspberry Pi as a serial device server (from RS-232 to TCP/IP over Ethernet or WiFi). Code examples can be found in the pySerial documentation.
  • Build a protocol converter. Most scales use proprietary protocols, but you can convert the data to MQTT or other protocols as shown here. Do not say that you have developed a protocol converter, call it an IoT gateway to get more attention.
  • Use speech synthesis to output the weight as spoken words for visually impaired users.
  • Use speech recognition to send commands to the scale (e.g. the tare command).
  • Install a Pi Camera Module and take a picture of the user every time the scale is overloaded.
  • Turn the scale into a checkweigher by comparing the weight with preset values and making under/accept/over LEDs light up.
  • Transform the weight into a proportional analog signal (voltage) because… I have no idea! Why do people keep asking for weighing scales with an analog output? Seriously, if you know the answer, please tell me.
  • Trigger an alarm or something worse when an object is removed from the scale:
Raiders of the Lost Ark IMAX Movie CLIP – Throw Me the Idol (2012) – Harrison Ford Movie

Solution: Your administrator has blocked this application because it potentially poses a security risk to your computer

The Problem: Your administrator has blocked this application…

You’re trying to install a ClickOnce application and get an error message saying: “Your administrator has blocked this application because it potentially poses a security risk to your computer”:
Your administrator has blocked this application because it potentially poses a security risk to your computer

You are the administrator and don’t remember blocking any applications (if you’re not the admin, contact them instead of reading this article).

The reason this is happening

The ClickOnce trust prompt is disabled on your operating system, so instead of a dialog (prompt) which allows you to either proceed with the installation or not, you just get the message above.

The solution

You can change the ClickOnce trust prompt behavior by editing the registry subkeys under:

\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\.NETFramework\Security\TrustManager\PromptingLevel

There should be five subkeys, one for each security zone:
Registry trustmanager promptinglevel

Each subkey can have one of the following values:

  • Disabled: No trust prompt is shown, instead you get the error message above.
  • Enabled: A trust prompt is shown.
  • AuthenticodeRequired: A trust prompt is shown only for signed applications (other applications cannot be installed).

Trust prompt example

If the application you’re trying to install has been published on the Internet, you’ll want to set the Internet subkey to “Enabled” (or to “AuthenticodeRequired” if the application has been digitally signed). You should then see a trust prompt instead of the “your administrator has blocked this application” error:
Trust Prompt - do you want to install this application

Free Trust Prompt Tool

As an alternative to editing the registry manually, you can also use a free trust prompt tool I wrote:
Trust Prompt Tool

It allows you to easily display and modify the trust prompt configuration.

Notes:

  • If you don’t trust yourself or other people using your PC, you can change the respective zone setting back to “Disabled” after installing the ClickOnce application. The trust prompt configuration has no effect on installed applications and their updates.
  • You could also add the publisher’s site to your trusted sites and only enable trust prompts for the TrustedSites subkey.
  • Are you wondering why all your trust prompt settings have been changed to “Disabled”? Unfortunately, I have no idea. I’ve had this happen on multiple PCs and I’m pretty sure I didn’t do this myself.

Solution: Windows 10 uses two display languages (at once)

When taking screenshots for a tutorial on how to connect a scale to a network, I came across this curious mixture of both English and German in the network adapter settings:Network adapter properties in German and English

I confirmed that the Windows display language was set to English. I tried  deleting the German language pack, but it did not make a difference: my Windows was still bilingual.

Eventually, I found the solution :

  1. Open to the (legacy) Control Panel, click on Clock, Language and Region, then click on Region.
  2. In the Region dialog, select the Administrative tab.
  3. Click on Copy settings…
  4. You’ll probably see that the Display Language under Current User is not the same as the Display Language under Welcome screen:windows welcome screen and user account settings
  5. This can be fixed by checking the Copy your current settings to: Welcome screen and system accounts checkbox, then clicking on OK:
    windows welcome screen and user account settings monolingual

After restarting, the dialog appeared completely in English:network adapter properties in english

How to use a Transferwise borderless account to get paid by FastSpring

We use FastSpring to sell our software, which means that our account balance is in USD. FastSpring can pay out in EUR to a SEPA bank account, but new FinTech companies seem to offer better exchange rates.

Transferwise is one of these companies. Their bordereless account (which is not the same as their regular account) makes it possible to get paid by FastSpring to a US bank in USD (for free), convert the payment into EUR at Transferwise’s advantageous rates and withdraw it to a EUR account.

1. Sign up for a Transferwise borderless account

Click here and apply (this should direct you to the borderless signup page). You can also click on this affiliate link to get a free transfer and to support this blog, but please note that this will send you to the regular Transferwise signup page.

It took quite a while for Transferwise to open our borderless account. If you don’t hear from them within a few business days, I recommend logging in to check if further documents are required.

2. Activate USD as a currency and get your bank details

Transferwise activate currency

After logging in to your borderless account, you’ll be able to activate currencies. Obviously, you’ll need USD to get paid by FastSpring. Activating USD as a currency also gives you your USD bank details.

Transferwise borderless account USD bank details

I strongly recommend clicking on the “How do I use these?” link to learn more about using your USD bank details.

3. Enter your bank details in your FastSpring account

Things get a bit more difficult here. In your FastSpring account, go to “Payment Methods”, set the bank country to “United States” and click on “Enter Direct Deposit (ACH) Information”:

 

FastSpring payment methods
Note that these are the instructions for FastSpring’s “Classic Springboard”, things will look different if you’re using the more recent “contextual” dashboard.

Transferwise gives you all the bank details you’ll need to enter with the exception of the bank’s name. However, you can easily find the name by either entering your wire routing number (a.k.a ABA routing number) on this website or by entering your ACH routing number here. In our case, both numbers returned “Community Federal Savings Bank” as the bank’s name.

To make things more confusing, FastSpring asks for a “Routing / ABA (9 digits)” number. Do not actually enter the wire routing number (a.k.a ABA routing number) here! Instead, enter the ACH routing number (FastSpring customer support has confirmed that this is correct).

Transferwise recommends choosing “checking” and not “savings” as the account type, so I selected “Business checking”.

My completed form (colors match the colors used above):
FastSpring direct deposit ACH information using Transferwise borderless account

4. Add your EUR bank account to Transferwise

Transferwise will notify you when you’ve received a new payment. In order to withdraw it, you first have to add a bank account:

Transferwise add EUR account

5. Convert and withdraw your money in EUR

You can then convert your USD to EUR and send them to your account in one step:

Transferwise send money

Transferwise will show you the exchange rate and the fees (1% for USD to EUR). Soon afterwards (on the next business day in our case), your money will show up in your EUR bank account.

How to share your Office 365 Skype minutes with your own (separate) Skype account

The problem: Some Office 365 subscriptions include a certain number of  monthly Skype minutes. You want to use these with your existing Skype account, but you can’t find a way to connect it to your Office 365 account.

The reason it doesn’t work: A Skype account is also a Microsoft account. You cannot merge two Microsoft accounts, therefore you can also no longer merge or connect your Skype and Microsoft (Office 365) accounts.

The workaround: If your Office 365 subscription can be shared with other Microsoft accounts, you can also share it with your own Skype account.

This is how you share your Office 365 subscription and free Skype minutes with yourself (as of March 2018):

If you go to your Skype account settings, you’ll see an option to “connect a Microsoft account”:
Skype connect Microsoft account

What this actually does (instead of connecting a Microsoft account and Skype account) is to redirect you to account.microsoft.com where you can sign in using your Skype credentials (because, as mentioned, your Skype account is already a Microsoft account). I you’re asked to add a phone number or e-mail, you’ll notice that you can’t use the e-mail address of your existing Microsoft account. Enter a different e-mail instead.

Verify your e-mail, then sign out of your Skype/Microsoft account and log in to your Microsoft account with the Office 365 subscription. Share the entire Office 365 subscription with your Skype/Microsoft account using the e-mail address you provided in the previous step:
Share Office 365 subscription
Sign out, accept the invitation using your Skype/Microsoft account, then activate your free Skype minutes in your new Office account:
Activate your free Skype minutesJust click on “activate” (or waste a lot of time reading outdated information about linking accounts, then come back and click on “activate”):
Just click on activateYou should now see the subscription in your Skype account settings, too:
Skype subscription

Notes:

  • Instead of signing in and out of your accounts you could stay signed in on two different browsers (or using incognito mode).
  • If your Office 365 subscription does not allow sharing (or if you’ve already used all invitations), you can obviously not use this method. I don’t know of any alternative methods you could use.
  • If you’re reading this article in the future… as opposed to reading it in the past… The method I described worked for me in March 2018. Things will look different and work differently at some point in the future.
  • In the comments below, feel free to rant about Skype and Microsoft, say nice things about me or propose your own solution to the problem. Don’t ask me to fix your issues! Think about it, Microsoft is a large and immensely wealthy company while I’m just some poor blogger. Ask them for support, not me.