SharePoint Online Site Design powered by PowerShell

It’s important to keep branding consistent across SharePoint Sites. Family members can create travel sites and it will be provisioned with the correct colors, icons and travel lists.

We have crated a Site Script and a site design and deployed it to the SharePoint site for D365 Family Engagement Hub. When a family is planing a new vaication or travel they can create a new site that already have lists they need to plan their stay.

Site Script

First we set the script by identifying the lists with name, description and fields.

Then the final line to add the script

Add-SPOSiteScript -Title “Family Travel Site” -Content $site_script -Description “Create a list for to keep up with traveling family memebers”

The response was a site script with ID

The ID we used in the adding a site design with the site script

Add-SPOSiteDesign -Title “D365 Family Engagement Hub – Travel Site” -WebTemplate “64” -SiteScripts “1131785c-864c-4262-a3ae-b2c9664bfcb6” -Description “The travel site is for planning a trip or travel for the family”

Response

The result was a site design that we can use from the user interface or use another live of powershell to set on a site:

Add-SPOSiteDesignTask -SiteDesignId c56a394b-a99b-4b75-8e93-01a927b7ccf6  -WebUrl “https://crm017179.sharepoint.com/sites/family

The result was a report of what design, web and site was combined:

When we visit the site we can see that it has two new lists:

The packing list contain the fields that we set:

IF family members want to create new sites they can now choose this travel site design:

That is good user experience!

Used this guide for PowerShell scripts: Get started creating SharePoint site designs and site scripts | Microsoft Docs

Grant access to user group

This script will exclude access to all users but those who are members of this specific user group (email enabled) “family Members”

Doing the Get to validate that the permissions were set.

When the users NOT in this group try to use the site design they will not see it – making it possible to family users only to access the site script and site design.

We claim these badges

and for the category

Power BI med input fra Power Virtual Agent (Sharepoint) og Dataverse

Dashboard på gang med personlig utvikling for brukeren. Vi jobber med å hente inn data fra ulike kilder, og foreløpig henter denne rapporten inn “antall pushups”, dagsform og produktivtet. De to siste kategoriene innhentes fra vår chatbot, der bruker får spørsmål om dette. Data sendes så over til Sharepoint med en Power Automate Flow. Pushups-data blir generert i vår egen app, og lagret i Dataverse. Øverst har vi lagt på et par filter for brukervennlighet.

Vi vil ha inn flere ting også, men se gjerne hva vi har fått på plass så langt i skjermbildene nedenfor. Hva synes du vi bør få inn i dashboardet?

Prøver med dette å oppnå badge for Dash It Out!

Forretningsverdi i Dynamics 365 Family Engagement

Alle modulene som Klossmajorene leverer i den store pakken Dynamics 365 Family Engagement bygger på samme plattform og jobber sammen. Navet er Microsoft 365, Power Platform, Dataverse og Azure AD. Identitet til de forskjellige medlemmene i familien er sentralt, og familierelasjoner er håndteres gjennom relasjoner i Dataverse-databasen slik at alle moduler entydig kjenner disse relasjonene. Eksterne applikasjoner som kobler seg på kan kjenner også disse familierelasjonene via det eksterne API-et eksponert gjennom Azure API Management.

Alle modulene vi lager spiller rundt grunntanken om å forenkle hverdagen for en familie med barn der man ser behovet for støttesystemer som både hjelper med daglige gjøremål med gamification av oppgaver, men også mer lek og moro som legobyggespill.

I modulen for oppgaver i hjemmet kan barn både med og uten egen mobil få påminnelse om hva de skal gjøre med infoskjerm med oppgaver og opplesing av oppgaver på Sonos.

Som en tilleggsmodul som ikke er utviklet ennå ser vi for oss at man kan håndtere utbetaling av ukepenger eller betaling for oppgaver via Vipps.

Vi ser for oss at med disse verdipakkene så vil det kunne være en viss betalingsvillighet for å kjøpe Dynamics 365 Family Engagement. Dette kan enten være betalt av arbeidsgiver eller kjøpt av den ansatte selv.

Kategorier:

Lego Shark Tank

Simple lego figure building game

When your cohabitant or kids are annoying you while you’re trying to work it can be nice to give them a challenge or two as a distraction. Make them do some simple lego challenges for example!

Simple lego figures

By using AI-builder on the Power Apps platform we can teach an AI-model to recognize some simple lego figures to validate if the challenge is completed. To do this you have to build the lego figures, take a minimum of 15 images of each figure, tag which figure or figures that are in each image and feed this into the AI-builder using the ObjectDetection AI-model. It is recommended to use more than 50 images of each object.

To teach the AI-model we have to manually tag a set of images with the figures shown in the images

More tagged images means a better calibrated AI-detector. The AI calculates a score on the image taken from 0-100%. 30% means the AI think it might be detecting the right object. 90% means the AI is pretty certain it has recognized the right object.

  • AI-builder
  • Object Detection
  • Power Apps
  • Power Platform

Where is my dog?

Do you ever wonder where your dog are when you are out of the house? Ask boten Anna and get an answer.

Traning images for AI

We are working on a solution using AI to find where the family dog are in different surveillance camera images, and notifying the user where the dog are.

This solution will be expanded to also detect mess, to see if the kids have been cleaning their room.

We are creating micro services for analysis, using Azure Functions, Logic App, APIM and CI/CD through devops.

We are aming for the existensial risk.

Knowledge is everything – Human behaviour analysis

We are able to retrieve tracked the family’s physical exercise with our great workout registration app, and with our Anna-bot, we are retrieving the users own perception of the currents day physical form.

SharePoint Storage
Microsoft Dataverse

Physical activity data is tracked in Dataverse, while form data from the bot is stored in SharePoint. We have built a model gathering this information and are now working reports in PowerBI to illustrate how the perception of the daily physical form affects the ability in number of pushups a family member can do every day.

This post is related to Lego Power Bricks and we are aiming for the Dash It Out badge and this blogpost will be continued.

SkillTripAdvisor

Har du ikke vært ute av huset på 2 uker? Begynner du å miste dine sosiale kunnskaper?

Vel, da bør du komme deg UT PÅ TUR!(Med et familiemedlem eller en kollega)

SkillTripAdvisor er løsningen!

Med SkillTripAdvisor kan du finne personer i din organisjasjon eller i din familie som er i nærheten. Man kan også sende en forespørsel til dem om de har lyst til å gå tur med deg. Velg en tur i appen og kom deg ut!

Appen er en PowerApp med PowerAutomate Flows i bakkant. Med Dataverse som datalag er denne løsninge NoCode!

Appen henter ut GPS koordinater fra GPS i telefonen eller IP-location og kalkulerer lengde mellom GPS koordinatene til kolleger og familiemedlemmer.

Ps, appen er work in progress.

  • Lego Shark Tank
  • Power User Love

#Vipps payment API smackdown

Vi har vært så heldige å få tilgang til APIene hos Vipps og som første mann til å gjennomføre en betaling vha APIet ble det hettegenser i gave =)

Tankerekke for å rekke å betale for hettegenseren får noen andre kjøpte den var:

  1. Vi har fått opplyst at en egen utvikler-vipps-app må installeres, ok da gjør vi det.
  2. Åpne githup repo’et til vipps og let etter “Getting started”:
    https://github.com/vippsas/vipps-developers#vipps-developers
  3. Les med en gang “Get an access token”, bra da åpner vi “Postman” for litt rask testing.
  4. Lag et nytt POST request i postman med linken beskrevet og parameterne med nøkler som trengs.
POST med nøkler i header og mottak av access_token (bearer)
  1. Finn ut hvordan man gjør en betaling… sjekk github igjen.
  2. Åj.. hmm.. “Swagger” (generert dokumentasjon for faktiske API kall), klikk på den
  3. “Initiate Payment”… jaaa den er det nok
    • Da dupliserer vi kallet vi har i Postman
    • Legger inn en Authorization header med “bearer ” + access tokenet vi fikk
Initiate Payment API swagger documentation
  1. Legger i tillegg inn en “body”, hva som skal stå i body finnes det et eksempel på i swagger dokumentasjonen, eneste man MÅ endre der er “merchantSerialNumber” og “mobileNumber”, med det gjort er det bare å klikke “Send”…
  1. Kopier ut verdien til “url” feltet som kom i retur.
  2. Test i en nettleser.
  1. NÅ trengs mobilen 🙂 et varsel kommer inn på mobilen, godkjenner betalingen der og vipps var vi i boks.
  2. Nettleseren blir nå sendt over til adressen oppgitt i “callback url” spesifisert i body’n.
  3. Fiks ferdig, betalt og genser i posten 🙂

IOT: Reading out messages on Sonos from Dataverse

When tasks are created in our nice little family the kids often doesn’t respond when their parents are sending out push notifications to their devices.

As a way to remind the kids on their tasks we have developed a system that reads out the tasks on the sonos speakers in the house

This setup requires the following components

  • Dataverse Tasks table
  • Power Automate Flow with “Common Data Service (current environment)” and “Service Bus” steps
  • Azure Service Bus
  • Talkity.com free text to speech subscription
  • Some device able to run Python on the same local netwok as the Sonos devices. E.g. a Raspberry PI
  • One or more Sonos Speakers

Power Automate Flow to put messages on Azure Service Bus Queue

Text to speech using Talkify

We have investigating several services for Text to Speech. Azure Cognitive Services have some, but we went the easy route and found one where it was possible to just compose a long url and post it directly and get a MP3 file with the speech back. https://talkify.com

The URL is on the format https://talkify.net/api/speech/v1?text=Clean your room&rate=2&format=mp3&voice=Microsoft Hazel Desktop&fallbackLanguage=English&key=xxxxxxx

The paid verison of Talkify also supports Norwegian, but as we are using the free version only English are supported

Our initial idea was to have a power automate flow step to do fetch the MP3 and upload the MP3 somewhere readable for Sonos (like Azure Blob Storage), but when it was as easy as calling an GET URL we can send that URL directly to Sonos.

Subscribing to the Azure Service Bus Queue and triggering the Sonos Speakers using Python running on a Raspberry PI

So playing files on the Sonos isn’t THAT difficult – especially when the sound files are from publically available URLs

The following Python script is using the SoCo Sonos Library (https://soco.readthedocs.io/en/v0.21/releases/0.13.html) and Azure Sevice Bus SDK v7.

The python script is deployed to a local raspberry Pi that can works as a local controller of the Sonos System.

Note: as long as you are on the same network as a Sonos speaker you can control it without any authentication. Tip for practical jokes 👌👍


from azure.servicebus import ServiceBusClient, ServiceBusMessage

from soco import SoCo
import soco
import urllib

sonos = SoCo('192.168.x.x') #kontor
print(sonos.player_name)

with ServiceBusClient.from_connection_string("Endpoint=sb://acdctaskservice.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xxx=") as servicebus_client:
        print("ok")

        while True:
                try:
                        receiver = servicebus_client.get_queue_receiver(queue_name="taskqueue", max_wait_time=5)
                        with receiver:
                                for msg in receiver:
                                        print(msg)
                                        sonos.volume = 10
                                        url = "https://talkify.net/api/speech/v1?text="+ str(msg) +"&rate=2&format=mp3&voice=Microsoft Hazel Desktop&fallbackLanguage=English&key=xxx"
                                        print(url)
                                        sonos.play_uri(url)

                                        track = sonos.get_current_track_info()
                                        print(track)
                                        receiver.complete_message(msg)

                except Exception as e:
                        print( "Error: %s" % e )	
Bilderesultater for raspberry pi
Bilderesultater for sonos 1

Hopes for (some of) the following badges:

Embedding Numbnut

Go with the flow

Right now (uses service bus to send events directly)

Thieving Bastards (uses 3rd party SoCo Sonos library and shady text to speech service)

Nasty hacker (sends in the composed text-to-speech url with subscription key and everything to sonos)

And maybe a point or two in the categories

Blow my Mindstorm

Lego Autobots

Lego Shark Thank