Integrations and external data!

When you are a pirate, it is pretty usefull to know what kind of weather it is, right? And, when you first have your own Awesome Pirate Corp. app, this information should of course be available here (we know, it’s cold to be a Norwegain Pirate right now!):

To do this, we created a flow that gets your location data when you use the PowerApp, goes out and gets the weather where you are, and pushes it back to the PowerApp to show you:

The Orange Bandits shows and tells

An ERP implementation can be a complex and time-consuming process, but the benefits of improved efficiency, reduced manual labor, and enhanced data accuracy can be significant.

As part of our solution goals, we are focusing on 4 pillars, and we strongly believe that the first implementation of the Pirate Fleet Management hits all 4 pillars!

Check https://acdc.blog/avanade-2/the-jackpot-app-pirates-fleet-enlisting/

  • AI

The App uses a mix of built in and custom models in innovative way and yet makes the enlisting process easy and straightforward.

  • Sustainability

The use of a canvas app which is mobile-integrated (a device that everyone has) means that there is no need for extra devices and we are using available resources.

  • User Experience

The app is easy to use, straightforward and there is no need to punch any characters.

  • Scalability and integration

The app is scalable and can be used on any mobile device and integrates well with both our back-end CRM solution and external endpoints.

Let the machines work 🤖

We get satellite images from the Sentinel Hub API where we can get images from the coordinates we want. This makes it easy to compare images with AIS data from the same time period and coordinates.

Sattelite image of ships
Counting ships

To identify ships from the satellite images, we need more eyes than we have available. So what’s better than letting the machines do the work.
We have developed our own ML code in Python to recognize ships. This will make it much more efficient than manually reviewing all the images.
Currently, the machine has 99% confidence in recognizing ships. It then creates a heat map that shows where it thinks (with 99% probability) there are ships.
Then it counts the number of ships and sends it on.

Training the model to gain confidence

When we know how many ships are within a given area at a given time, it is easy to compare this with data from AIS.
Here we search through the API of the Norwegian Coastal Administration, where we can count the number of ships within the same time and area.

JSON from AIS data

Using external data in this way provides great value for our customers as the threat at sea is significantly lower 💾🏴‍☠️

🤖 Automatically Priming our SPA cannons with React and .NET ⛵️

Sailing is though, so you need to rigg your ship to your advantage, preferably automating your sales and having people walk the plank for making bad code. We chose to created a project with ASP.NET Core application running with React.js. The application is running on .NET version 7 and uses several technologies, both hip and retro.

Screen capture of the .net SPA application setup

Mapbox for Charting the Seven Seas

Our application uses Mapbox – a provider of custom online maps for websites and applications. The company provides APIs and SDKs to create custom maps, add markers and other map controls, and to handle user interaction with maps. This ease of use and their clean and well-structured documentation (docs.mapbox.com) made Mapbox our top dog for create, edit and manipulate maps in our service.

Map created using Mapbox’s API

Protecting your Shared Booty form the Crew

Any pirate needs a secure lair, a pirate code and ability to help other pirates in need. For this reason we created a repository in GitHub and implemented best practices for collaborating as developers, like proper branching, build pipelines, linting and pre-deploy checks. Like blocking ourselves from bloat because we can’t have unused code in the repository.

Snipet showing lint error for unused variable

Branching Strategy for Division and Conquering

The master branch contains the production code. All development code is merged from develop into master. Cutting corners in true hacker style we opted to not use feature branches, since, to be frank, the entire thing is a feature at this point.

What we all said when discussing feature branches

All branches are protected with protection rules. Due to the limited size of the project we can automatically merge features and bug branches directly to develop, but we can’t push directly to develop. Even that is too risky for this group of mad lags and girl. If you want to merge code from develop into master you need approval from at leaste one other developer and no changes requested to your merge, if all flags are green Github forcefully collides the code together and see what sticks (it’s actually more sophisticated than this, but you Judges know a lot more about this than we ever will, so we humbly just call it “magic” – just like magnets).

Parchment showing the Law of Protection for our Master Branch

Feel free to have a gander at our code repository to appreciate all the shiny details: github.com/TommyBakkenMydland/CaptaIN-Hack-Sparrow

Smooth Rigging with CI/CD and Github Actions

Github Actions is a now a CI/CD platform that allows developers to automate their software development workflows. This, for us, is a huge win because we want to do as little configuration as possible!

CI/CD github actions

The actions reduce the time and effort required for manual processes and enables us to release new features and bug fixes quickly and confidently – Harr harr, got you matey, you thought we will fix bugs! … But … for the sake of argument … if we were to fix bugs, this powerful tool for streamlining development workflows, enables us to deliver high-quality software more efficiently and effectively at lower cost – Better use of time, reduce waste of time (WoT) and better business value for the client. We used yaml to tell what GitHub actions should create:

Yaml file describing what GitHub actions should create

Creating Overly Complex Gadgets to Avoid Simple Tasks
(aka How we used ChatGTP to give us documentation on Pulumi)

Nobody likes to know stuff. Everyone loves AI. What about AI that knows stuff?! Sold!! We used the AI service to provide us with documentation on how to deploy infrastructure in Azure with code.

Asking the oracle about stuff we probably already should know

From this we were able to write code that could be executed in our CI/CD

Pulumi snippet for creating our environment: Infrastructure as code #retro

Resulting in a beautiful environment and ample time for coffee ☕️

Screen grab showing the employed resources in Azure
Screen grab showing ChatGTP making a meme about making memes about using ChatGTP. Very meta.
Mame created from ChatGPD’s instructions

Flows just makes everyones day better!

Our Pirates are not happy that all the tasks they get assigned in F&O only are available there. Why should they need to log in to F&O to see them or get an email notification that they have been assigned a new task? We all know that there are more than enough emails going around, so let’s make it easier for everyone. This flow automatically includes the tasks that are assigned to you for Onboarding or Offboarding processes in F&O directly to you Microsoft To-Do list through Planner. Then they pop stright up in you list, and you can handle it from there. Pretty cool, right?

Happy camp, happy pirate!

When planning for a ACDC Hackaton, we won’t just show up with our screens and work work work. It’s important to have fun too! We have planned for our “spot” in the room a long time before the event, and that’s why it looks as it does as well! 😊 And, of course we need matching clotes as well, we will feel like a very good team every hour and every day! And, just as a little extra setup as well, we have a cooler in place to make sure we always have cold, refreshing drinks to keep the spirit as good as we can! 😊

Because I care to share!

For this we deserve the “Community Champion” badge:

And “Sharing is caring”

On my way to solve the ongoing Head 2 Head Challenge I came across a blog article that might be a way of solving the challenge.

It’s more important to me that my fellow contestants and rivals learn more about Power Pages – then it is for me to win the challenge – I would like to share this blog article with you.

Hot tip for the next Head 2 Head challenge: When you google for answers, include the name of the person providing the challenge 😉

This will not take you all the way, but it’s a theoretical solution to the Head 2 Head Challenge.

Best of luck – and may the fastest developer win!

The dirty way

The idea of a map integration for our ships is pretty cool. We are already loading ships from Kystverkets api where we get the ship ids and store them in Dynamics. These ids can be used to lookup the specific ship and we have added an iframe to the lead form to generate the correct url. As it turns out, kystverket is not allowing us to show their website because… security 🙁

Nasty hacker to the rescue!

We discovered that you can add a chrome extension to ignore x-frame headers. By adding the attribute is="x-frame-bypass" to the iframe html element, the iframe now bypasses the X-Frame-Options: deny/sameorigin response header from kystverket. The result:

By this we claim the Nasty Hacker badge! #rocksolidgeekness

The Jackpot App :: Pirates fleet enlisting

The reason we are calling this the jackpot app because we believe that it’s hitting multiple score-points!

The idea of this app is to enlist pirates’ fleet without a single character punch!!! Aided and infused by AI Builder, external API’s and Power Automate Flows; this Power Apps canvas app is state of the art geekiness!

Although, registered vehicles are the last of our worries (as pirates), but hey we thought of doing it anyways 🙂 The app starts by taking a picture of the registration plate of the vehicle. the app will send the picture to the AI Builder through a power automate flow that process the image and read the registration plate and show it on the app for confirmation.

Once the you are satisfied with the result, you can check the vehicle against the national registry and search for more registration information. This indeed does check the car against the Norwegian car registry (Statens vegvesen) show if the vehicle is approved for going on the European roads (EU-godskjenning). Also least of our concerns!

Actual data from Statens Vegvesen
Crawling and datamining data from external sources

Now, after confirming and inserting car data into our system. We need to identify the vehicle type and compare with our collected data in our backend system. However, identify the care is a simple process that doesn’t need any text input from the user. One picture will do while the AI Builder will take care of identifying the type of the vehicle and insert it into our backend system.

Vehicle plate identification flow (calls another flow through HTTP)
AI Builder made as an endpoint (all AI Builder models and flow are on separate environment, as AI Builder
can’t be included in a solution for deployment)

We are using a mix of built-in and custom AI models to achieve efficiency and productivity in an innovative way.

AI Builder model

They see me flowin’ 🏴‍☠️🦜

When we need to merge things together, what could be easier than using Power Automate.
We have seen that there is a need for visual warning on board ships to be ready if pirates are coming.

Power Automate flow for Hue lights
Triggered 🤔


Therefore, we have connected a Zigbee light chain to a Philips Hue base, on which we use a Power Automate flow to activate a red alarm light.
This is done by calling an endpoint with ALERT in the body.
When the coast is clear again, we can send a “no danger” message and the light will return to green.
It is solved by calling the same endpoint with CLEAR.

Some code for sending alerts to Teams and lights

To make this work, we have connected a Raspberry Pi to the same local network as Philips Hue. We have used a Philips Hue connector from an independent developer.
Fine with everything that is ready-made from 3rd parties 😃

Raspberry PI connecting it all together