Installing Hass.io on a Raspberry Pi 3 with a RaZberry Z-wave card

I was helping a friend today getting his Raspberry Pi prepped for running Hass.io. He mentioned that he could not get it to boot correctly and thought that it had to do with his laptop not being able to create the boot image correctly so I thought I would see it I could help.

Turned out the issue was not the image… When I opened the lid of the Pi I noticed that it had a RaZberry card installed… so I did what any PC tinkerer with a non-booting PC does… rip everything out and start with the bare essentials. Presto… it booted 🙂

Apparently the built in Bluetooth on the Pi 3 is interfering with the RaZberry card and you have to tweak the HassOS image in order to get it working.

First you add this to the config.txt in the root of the boot volume (you need to insert the card in a PC)

dtoverlay=pi3-miniuart-bt

And then you add the following to the configuration.yaml file of Hass.io (the easiest way I found to get to it is installing the Samba plugin from whitin Hassio)

zwave:
  usb_path: /dev/ttyAMA0

And then it boots… Happy Days

/Johan

Links
https://www.home-assistant.io/hassio/zwave/
https://www.automatiserar.se/razberry-och-z-wave-me/#Vad_Behovs

Friday Flow: Using Microsoft Forms with Power Automate

At the company where I work we regularly have knowledge transfer sessions called Brown Bag Lunches (BBLs) which I think is a great way to share and give back. I am in charge of scheduling these.

I wanted automate the process for planning these sessions and give my colleagues a way to submit suggestions for content. I started by setting a simple Microsoft Form for them to add suggestions

Sorry about the Swedish 🙂

Microsoft has a page for looking at the results of the form submissions which I could have used to get the subjects and plan them manually… but where is the fun in that :-). My solution was to add a flow that is triggered every time a form is submitted which adds it to an excel spreadsheet and adds a todo task in my todo list of choice Todoist.

The result from Forms is in a JSON format so the first thing we need to do is to parse the JSON message.


The parsing of the JSON also means that we can use the content as dynamic content and add it without having to write an expression… the No-Code way. The JSON message also only contains the response id so we will have to use a “Get response details” block to get the actual information of the form.

The reason we are extracting the information is to put it in the Excel file… The response only contains the submitting users email adress so to get the excel file to look a bit nicer I use the Get User Profile block to look up the users real name from the Azure AD/SharePoint. This is a really cool block since it can get a whole lot of cool info from you organization such at a users manager etc.

Finally I add a line to an excel file and put a reminder i my todo list

I would really continue building this logic to automate the planning even further… I might have to revisit this in a later post 🙂

Have a nice weekend

Johan

Säker USB från Kingston

Vi i podden hade förmånen att komma i kontakt med Kingston i samband med ett frukostseminarie där de presenterade sina lösningar för säker lagring på arbetet. I samband med det fick vi möjlighet att testa deras DataTraveler 2000.

Stickan är en 16 GB lagrings enhet som kopplas till datorn med USB 3.0. Det som skiljer den från de flesta andra USB-stickor är att den är krypterad. Nu tänker du att “Jag kan ju kryptera vilken sticka som helst med Bitlocker To Go i Windows, FileVault i MacOS eller [insert random disk encryption tool here] på i princip alla platformar. Det finns även USB lagring med kryptering som kräver att mjukvara installeras på datorn för att komma åt det som är lagrat på disken. Detta gör att information en på USB-minnet är säkert om stickan är urpluggad men denna metod gör lösningen lite komplicerad och kommer att ställa till det lite om man t.ex vill använda det på en enhet som man inte kan installera mjukvara på.

Kingston har istället löst det i DT2000 genom att hantera all kryptering (AES 265 bitar i XTS Mode enligt Kingston) helt på stickan med hjälp av ett litet numeriskt tangentbord där man kan knappa in en kod. Det var lite knepigt att byta kod till att börja med, det finns en bra beskrivning som medföljer minnet men det var en hel del tryckande som var tvunget att göras under en viss tidsbrist. När detta väl var klart funkar stickan galant och finessen här är att operativsystemet i vilket man pluggar in minnet inte har en aning om att det är krypterat och så fort man rycker ut det så krypteras det igen. Minnet behöver dock inte vara inpluggat för att “låsas upp” då det innehåller ett batteri som håller det upplåst om koden knappas in i frånkopplat läge. Detta är en bra funktion om minnet skall kopplas in i en svårtillgänglig USB port t.ex.

Prestandamässigt håller minnet absolut måttet och levererar i mina mätningar en skrivhastighet på mellan 50 och 65 MB per sekund och läshastighet på runt 155 MB per sekund vilket är en bit över vad Kingston själv uppger.

Som jag nämnde i början levereras minnet endast med USB 3.0 vilket innebär den har en USB typ A kontakt och den leveras inte med USB Type C kontakt. Anledningen till detta är dels att det fortfarande finns mest USB typ A kontakter i världen och att USB typ C kontakten inte är lika stabil och eftersom minnet är ganska stort ville Kingston inte riskera att man skadar kontakten i datorn.

På det hela taget är Kingston DT2000 en mycket trevlig USB sticka med bra prestanda för den som lagring med extra säkerhet. Rekommenderas!!

Getting Workflow Editor and Management Reporter Editor to work in Chromium Edge

When running Dynamics 365 for Finance and Operations there are some legacy software built in. These are packaged as ClickOnce applications and will be downloaded every time you run them. In Internet Explorer and the old version of Microsoft Edge this worked out of the box since these are .Net aware out of the box. When is comes to the all new chromium based Microsoft Edge and Google Chrome this is not the case. In order to get these working we will need a plugin installed in the browser.

For Microsoft (Chromium) Edge
To install in Edge the process is almost the same as for Google Chrome but with an additional steps prior to starting

  • Now go directly to step 3 below

Tip: you can bookmark the URL to the Google Chrome Store to have it around

For Google Chrome
1. Go to the Chrome Web Store by going to Extensions in the Settings menu

2. Click the Chrome Web Store at the bottom of the page

3. Search for ClickOnce and Install ClickOnce for Google Chrome

Verify all installed hotfixes in AX 2009

Today I need to handle an older system… I need to verify if a hotfix is installed in and older AX 2009 system. I found this instruction online (link below): Here is another way to get the list of installed KBs in AX 2009:

  1. Start the AOT (Ctrl + D)
  2. Go to Classes – SysHotfixManifest and expand it
  3. Select a methods and press Ctrl + A to select all methods
  4. Right-click and click Add-Ins – Copy – Name
  5. Paste into Wordpad (Notepad does not handle the CRs very well)
  6. Search for the KB number you want to find

That’s it

Johan

Links
https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/76061/finding-which-hotfixes-are-installed/212528

Issues with blocked cookies in Chromium Edge

I have an issue with cookies… And I do have an issue with real cookies… especially oat cookies… but we will not go into that today.

Today we are talking about browser cookies. Sometimes they are sort of creepy and sometimes they are absolutely essential for things to work. I ran inte one of the latter this week and I thought I had allowed all cookies for the specific site. Turns out I did not.

The site in this case is a customers help desk system and I had added the domain but I still got an error saying I needed to enable cookies. In order to find which cookies to allow you just do the following:

  1. Click on the padlock to the left of the adress bar
  2. Select Cookies
  3. Go to Blocked
  4. Select the items in the list one-by-one
  5. Click Allow

Note: This is of course not the customers site… this is my WordPress site for illustration

Flow Friday: Troubleshooting ‘shared_sharepointonline’ doesn’t exist

When trying to build a flow yesterday I got a confusing error:

Unable to process template language expressions in action ‘Create_Sprint_Period_in_Sharepoint’ inputs at line ‘1’ and column ‘2778’: ‘The template language expression ‘json(decodeBase64(triggerOutputs().headers[‘X-MS-APIM-Tokens’]))[‘$connections’][‘shared_sharepointonline’][‘connectionId’]’ cannot be evaluated because property ‘shared_sharepointonline’ doesn’t exist, available properties are ‘shared_office365, shared_todoist’. Please see https://aka.ms/logicexpressions for usage details.’.

The reason for this error is that you are test running the flow using data from a prior test from before you added the missing component (in this case sharepoint). You simply need to trigger the flow again med fresh data and it will work

Johan

Flow Friday – Troubleshooting Tips

This weeks Flow Friday is a bit late… Sorry…

Sometimes it can be a bit tricky troubleshoot flows… espesially if you are not fluent in JSON (I’m not). Trying to figure out exactly how to write the formula might sometimes require a couple of tries and my first solution to this was to send my self an email.

There is a better solution… You can use the compose function to get everything working. Just add the function you want to test in the Compose Window

The formula I added was this one

adddays(triggerOutputs()[‘body’][‘date’],1,”)

I am just trying to add one day to a date field that I input manually in the previous step.

When you have run the Flow you can just look in the run history for the output of the compose step

Issues importing Data Package

In one of our environments we had an issue where we were not able to import a data package from a file. When trying the import it simply did not list the entities included in the package. So we tried the usual; restarting the DIXF service, Restarting the VM…. No luck.

Looking in the Event Viewer we found an error from the Microsoft Dynamics AX DIXF Service Runtime Provider:

Error In SSIS Execution

System.Exception: SYS105313 —> System.InvalidOperationException: The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine. at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at Microsoft.Dynamics.AX.Framework.Tools.DMF.DriverHelper.DMFOdbcDriver.GetSheetNamesFromExcel(String sourceFileURL) — End of inner exception stack trace — at Microsoft.Dynamics.AX.Framework.Tools.DMF.DriverHelper.DMFOdbcDriver.GetSheetNamesFromExcel(String sourceFileURL) at Microsoft.Dynamics.AX.Framework.Tools.DMF.SSISHelperService.Service.ServiceHelper.GetSheetNamesFromExcel(String sourceFile)

I used a bit of Google-Fu and found that this is probably an issue with the Access Database engine. Since all Dynamics 365 FO VMs are deployed as ready-made VMs and we are not responsible for any installation the alternative to fixing this issue is to just redeploying the VM. In this case I tried to fix it. I downloaded this install file from Microsoft and ran a repair.

This solved the issue and re-registered the DLLs needed.

Links:
https://www.mikesdotnetting.com/article/280/solved-the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-mach

Changing branches for a new sprint

In the project I am working on right now we are maintaining two release branches. One for sprint release and one for hotfixes. Every time we release a sprint we are re-targeting the the build pipelines to point to the new branches for the next sprint. This article is a short description for where you need to change path (mostly for me to remember):

  1. Log into Azure DevOps
  2. Go to Pipelines – Builds
  3. Select the Pipeline you want to change and click Edit
  4. Go to Get Sources and change the two fields under Server Path

  5. Select the workflow item called Build the solution and change to the correct path in Project

  6. Save the pipeline.

    Note that when you are looking at the pipeline you will not see the correct branch until you have actually run the build successfully once

That is it for today…

Johan