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

Go with the FLOW

The harbor master is a social character needing to speak to as many pirates as possible and in general handle most day-to-day issues at the dock. This means that he is not always in front of his computer and is capable of receiving information on what is happening with the voyages.

Ship ready to leave

When the captain has received his crew from the harbor master and the voyage is ready to leave, the captain closes the voyage and the speakers in the harbor sound out a sweet farewell on the SONOS 🎵Reidar reiser snart🎵.

The flow

Smack my JSON up – and why size matters

Power Automate loves talking to API’s. API’s love talking in JSON. Because why not, we’re in 2023 where curly braces are the equivalent of the human hug – just embrace it already, and grab what you need 3 levels deep. Dot, dot dot. Easy as a dot.

But what happens when you embrace too much? I mean, we’re in 2023 where size has grown (out of proportion) compared to the skinny 70’s. And we’re talking simplistic CSV files here in case your mind was wandering into the land of political correctness. Just saying.

Either way. If the body of JSON is too large, a tad over 0.5MB, Power Automate nullifies it, which prevents you from getting to the property you want. That’s quite the statement.

Fortunately JSON has a string body, and strings can be cut at the front and the back, scissor scissor, slice slice. Let’s strip the away the bloat, grab the good meat, and let JSON be JSON for the time being.

We’re willing to debate if string manipulation is a nasty hack, but this is what PirateGPT has to say about that: “Arrr, string manipulation be a nasty hack in 2023, as it be a shortcut that don’t stand the test of time. It be a quick fix, but be sure to find a more permanent solution before ye be walkin’ the plank!”

And there is no question it’s retro, or as PirateGPT says: “Arrr, ye scurvy dogs! String manipulation may be a tried and true technology, but it’s been outdone by more modern techniques like natural language processing and machine learning. So in 2023, it’s a bit of a retro technology.”

Using Power Automate to create Pirate Names using OpenAPIs Davinci model

Bacground: When recruiting potential pirates we want to give them proper pirate names. Pirates 365 is a service oriented platform, and the recruitment frontend posts potential new pirates through a Pirate

Our solutions is using Power Automate and the HTTP Trigger to accept new pirates

We are using the OpenAI (independent publisher) step found in Power Automate (https://learn.microsoft.com/en-us/connectors/openaiip/) since it is yet not so easy to get access to Azure Open AI which probably would be better.

We had to do some tuning to get a little bit different answers – at first it just returned “Captain firstname lastname”, but after some tuning by setting down the temperature from 1 to 0,7 and explicity saying not to use the word “captain” we got the desired result.

We are creating the new pirate recruits as Leads in Dataverse so the recruitment team can contact them for possible empolyment

Here is the lead created in Dataverse shown in the “Pirate 365 Manage”, ready to be qualified as a proper Pirate!

We aim for the badges “go with the flow” for using Power Automate Cloud Flows and “The Extstential Risk” for innovative use of AI

Go with the FLOW

We have a fully automated system for pizza order status. The purpose of the flow is to notify the users when the pizza order has been received by the system..

When a user orders a pizza through any application (web, chat or app), the order is stored in Dataverse. This is the beginning of all flows on the trigger (create).

From here it is picked up by Power Automate. Power Automate sends a trigger to Power Automate Desktop.

Power Automate Desktop sends information to raspberry pi via desktop flow. This was achieved by registering my machine as approved machine for Power Automate online. All because the firewall on prem was blocking direct traffic.

Raspberry PI triggers a Home Assistant flow that turns the light to blue. This is a lot like a Microsoft Power Automate flow that is a sequens of actions working to acheive communication with wireless devices onpremise.

Kjøleskapet kan se pt. 2

Nå har vi bygget videre og kommet opp med et mye mer robust kjøleskap. Flytteesker kan brukes til så mangt 😎 Fortsatt en del testing med forskjellige frukter (man tager hva man haver). Responsen er så som så, men vi er på god vei. Klementin ble tidligere eple (ref. https://acdc.blog/in2022/kjoleskapet-kan-se/), nå er appelsin appelsin, og eple er eple 🎉

Her har vi en appelsin innendørs i et kjøleskap med både vegger og gulv. Imponerende? Yes!!!
Og her er hva som ble tatt bilde av. 1-0 til AI

Oppsettet er som følger:
Webkamera montert i kjøleskapsdør, koblet til Raspberry PI.
Arduino med knapp (les mye frustrasjon med KNAPP!!!!) som trigger kamerabilde ved åpning av kjøleskapsdør.
Arduino styrer i tillegg en trinnmotor som spinner en kul 3D-printet bling på toppen av kjøleskapet (bling kommer, men se bilde).
Alt på Arduino styres av den samme Raspberry PI’en ved hjelp av Python.
Når bilde er tatt, sendes det til Azure Cognitive services for analyse, og responsen kommer som oppdagede objekter. Deretter matcher vi dette med vår egen ingrediensdatabase i Dataverse via en Power Automate flow (kjøres via en HTTP request trigger i flowen) som oppdaterer ingredienser med attributtet “In fridge” = True/False.

Bildet under viser flowen som trigges fra kjøleskaps-raspberryen. Deretter oppdateres status på hva vi har i kjøleskapet. Dette er deilig å slippe og gjøre manuelt.

Her har vi integrert rubbel og bit, og det fungerer!

Det vi frykter nå er at maskinene skal vende seg mot oss, og si at kjøleskapet er tomt til en hver tid. Da kan vi risikere å sulte i hjel foran kjøleskapsdøren.
Men inntil videre velger vi å stole på vår kjære Fridgitoid 9000

Bilde gjennkjenning

Vi i Munchmuseet er veldig glade for å kunne lansere en ny funkjsonalitet i Munch besøksappen: GiveMeMoreInfo!

Syns du at maleriene våre vekker interesse, men du skulle gjerne hatt enda mer informasjon om maleriet? Da har vi løsningen for deg!
GiveMeMoreInfo! gir deg mer informasjon om maleriet du ser på gjennom applikasjonen. Det eneste du trenger å gjøre er å ta et bilde av maleriet, og informasjonen hentes inn automatisk!

Link til video: https://youtu.be/DUkVdxUdlGI

Teknisk informasjon:

  • Vi bruker Ai Builder for å gjenkjenne ulike malerier. Denne har blitt trent ved bruk av ca. 15 bilder fra hvert maleri. (Litt Nasty??)
  • Vi bruker en Power Automate for å motta bilde fra Canvas Appen, sender bildet videre til AI modellen som returnerer hvilket bildet det kjenner igjen i fotografiet tatt fra Canvas Applikasjonen.

I fremtiden håper vi å kunne bruke appliasjonen for å:

  • Utvide til å gi tilpasset informasjon baser på alder f.eks
  • Gi informasjon om lignende mallerier du kunne ha likt som Museet også har inne eller i sin virtuelle samling
  • Gi forslag til besøk i andre museer basert på dine interesser.
  • Vise hvordan bildet faktisk så ut da den ble laget ( mallerier er ofte gule grunnet at coaten over har decomponert grunnet UV lys og ligende)

Go with the Flow!

Why wouldn’t you want to save time on a process that can (and to be honest should) be automated in all companies that uses Dynamics?
We have now created two different flow, where the first one creates a Azure AD user atomatically when you hire a new employee in Dynamics HR, and mark that the employee should have a user in AAD (Goes without saying, but for you that now wants to ask the question, yes, the flow assigns the created user to a group as well):

But why should we stop there? How many times haven’t new employees showed up at their first day of work, just to se that someone has forgotten to import you AAD user to the system, so you can’t log in? Don’t worry, this flow runs every night, finds the employees that have their first day of work the coming day, and gives the AAD user the right to log in to Dynamics 365 HR:

Middle-age Mutable Ninja Tuples is integrating with all the things!

The backend for the end-user mobile app (.NET MAUI) is integrating with Dynamics 365 via MS Dynamics Web API, to create SOS alerts and get status updates.

The backend for the Turtle back-office (Blazor web app) is communicating with Azure via MS Graph API to programatically create Azure AD users.

Both backends are retrieving access tokens for MS APIs using MS OAuth API.

The Turtle code-base (GitHub) is configured to automatically post events to Discord, such as commits and releases.

Test – data

We needed testdata to develop the functions, so we made a simple ADF pipeline that inserts “actions” every x sec (if we want to).. We also need a lot of data, since we are planning to run reports and AI, with this test-data function we can start develop.

The ADF-pipeline takes a few params so we can controll how many runs we get.

Source data:

  • SQL server
    • Table with first Names
    • Table with last names
    • Table with IncidentTypes
    • View generating random:
      • name: mixing firstname and lastname
      • incident types (as we make more incident types)
      • longitude: Random – 59.9000 – 59.9999
      • latitude: Random – 10.1000 – 10.9999

Assaults

Planned Work

TBC

Completed Work

TBC