From 38936e09b4c7ca96e8f97a2d97a3983142404852 Mon Sep 17 00:00:00 2001 From: agrzybowski Date: Fri, 14 Aug 2026 14:09:28 +0200 Subject: [PATCH 1/2] [20019] CSP fixes --- docs/stylesheets/extra.css | 5 ++--- mkdocs.yml | 4 +--- overrides/main.html | 10 +--------- overrides/partials/footer.html | 4 ---- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index b9f2b1eb8..37e45ff6e 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -1,4 +1,3 @@ -@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap'); .topLinePageInfo { @@ -11,7 +10,7 @@ .topLinePageInfo__text { color: #000; font-size: 16px; - font-family: Roboto; + font-family: Roboto, sans-serif; font-style: normal; line-height: 32px; letter-spacing: 0.15px; @@ -63,7 +62,7 @@ transition: .2s; text-decoration: none; cursor: pointer; - font-family: Roboto; + font-family: Roboto, sans-serif; background-color: #ffd100; border: 2px solid #ffd100; color: #000; diff --git a/mkdocs.yml b/mkdocs.yml index abd3199b3..baf339df2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,6 +2,7 @@ site_name: IoT Developer Zone theme: name: material custom_dir: overrides + font: false logo: assets/images/logo.svg favicon: assets/favicon/favicon-32x32.png features: @@ -46,9 +47,6 @@ plugins: hooks: - main.py -google_analytics: - - UA-25246208-6 - - auto nav: - 'Getting Started': diff --git a/overrides/main.html b/overrides/main.html index 6e76729d7..59953623f 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -12,15 +12,6 @@ - - - {% endblock %} @@ -120,6 +111,7 @@

{{ page.title | d(config.site_name, true)}}

{% block site_meta %} + {{ super() }} {% endblock %} diff --git a/overrides/partials/footer.html b/overrides/partials/footer.html index 51786347a..62bcbce25 100644 --- a/overrides/partials/footer.html +++ b/overrides/partials/footer.html @@ -63,7 +63,3 @@ - - - - From 42c6550e96684bc267afae008da9c3e7b67deb9f Mon Sep 17 00:00:00 2001 From: agrzybowski Date: Mon, 24 Aug 2026 14:23:24 +0200 Subject: [PATCH 2/2] [20019] CSP fixes - review change - separate scripts and add css classses --- .../Cloud_integrations/cloud-integrations.md | 2 +- .../Coiote_IoT_DM/Release_Notes/v2022.13.5.md | 2 +- docs/LwM2M_Client/ESP32/M5Stick.md | 2 +- docs/LwM2M_Client/Nordic/nRF7002DK.md | 6 +- docs/LwM2M_Client/Nordic/nRF9151DK.md | 4 +- docs/LwM2M_Client/Nordic/nRF9160DK.md | 4 +- docs/LwM2M_Client/OpenThread/Adding_device.md | 18 ++--- .../OpenThread/OTBR_with_svetovid.md | 2 +- .../B-L462E-CELL1-TYPE1SC.md | 2 +- .../STMicroelectronics/B-L475E-IOT01A.md | 4 +- .../STMicroelectronics/B-U585I-IOT02A-BG96.md | 2 +- .../STM32L496G-DISCOBG96.md | 2 +- docs/academy/exercise2a.md | 6 +- docs/academy/exercise2b.md | 6 +- docs/academy/exercise3a.md | 26 +++---- docs/academy/exercise3b.md | 22 +++--- docs/academy/exercise4a.md | 4 +- docs/academy/exercise4b.md | 14 ++-- docs/academy/exercise5.md | 20 ++--- docs/academy/index.md | 4 +- docs/academy/module2.md | 4 +- docs/academy/module4.md | 2 +- docs/academy/module5.md | 2 +- docs/index.md | 12 +-- docs/javascripts/analytics-init.js | 33 ++++++++ docs/javascripts/material-init.js | 11 +++ docs/stylesheets/extra.css | 54 ++++++++++++- mkdocs.yml | 4 +- overrides/assets/images/logo.svg | 4 +- overrides/main.html | 78 ++++++++++++++++++- overrides/partials/footer.html | 4 + overrides/partials/header.html | 2 +- 32 files changed, 267 insertions(+), 95 deletions(-) create mode 100644 docs/javascripts/analytics-init.js create mode 100644 docs/javascripts/material-init.js diff --git a/docs/Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md b/docs/Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md index 2fef4504a..ee2ea5c47 100644 --- a/docs/Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md +++ b/docs/Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md @@ -8,7 +8,7 @@ These guides will take you on a step-by-step journey to seamlessly activate the See guides in Coiote DM User Documentation to learn how you can get started with the {{ coiote_short_name }} – Azure IoT integration: -[Azure IoT Hub](https://{{coiote_server}}/doc/user/integrations/how-to-guides/hyperscaler-integrations/azure-iot-hub/integrate-with-azure-iot-hub/){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} [Azure IoT Central](https://{{coiote_server}}/doc/user/integrations/how-to-guides/hyperscaler-integrations/azure-iot-central/integrate-with-azure-iot-central/){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} [Azure DPS](https://{{coiote_server}}/doc/user/integrations/how-to-guides/hyperscaler-integrations/integrate-with-azure-dps/){: .md-button .md-button--big } +[Azure IoT Hub](https://{{coiote_server}}/doc/user/integrations/how-to-guides/hyperscaler-integrations/azure-iot-hub/integrate-with-azure-iot-hub/){: .md-button .md-button--big .button-row-item} [Azure IoT Central](https://{{coiote_server}}/doc/user/integrations/how-to-guides/hyperscaler-integrations/azure-iot-central/integrate-with-azure-iot-central/){: .md-button .md-button--big .button-row-item} [Azure DPS](https://{{coiote_server}}/doc/user/integrations/how-to-guides/hyperscaler-integrations/integrate-with-azure-dps/){: .md-button .md-button--big } ## AWS integration diff --git a/docs/Coiote_IoT_DM/Release_Notes/v2022.13.5.md b/docs/Coiote_IoT_DM/Release_Notes/v2022.13.5.md index a3bc0bd30..e52e44f10 100644 --- a/docs/Coiote_IoT_DM/Release_Notes/v2022.13.5.md +++ b/docs/Coiote_IoT_DM/Release_Notes/v2022.13.5.md @@ -13,7 +13,7 @@ We have introduced the new Device Center for effective management of single devi - Quickly check connection status and parameters - See basic device info - ![Device Center sidebar](images/DC_sidebar.PNG "Device Center sidebar"){:style="float: left;margin-right: 1077px;margin-top: 17px;margin-bottom: 17px"} + ![Device Center sidebar](images/DC_sidebar.PNG "Device Center sidebar"){: .content-image-float .content-image-float--release-note .content-image-float--spaced} - Overview tab - Display widgets related to device status and connectivity diff --git a/docs/LwM2M_Client/ESP32/M5Stick.md b/docs/LwM2M_Client/ESP32/M5Stick.md index 39d22c1e5..b519ad956 100644 --- a/docs/LwM2M_Client/ESP32/M5Stick.md +++ b/docs/LwM2M_Client/ESP32/M5Stick.md @@ -52,7 +52,7 @@ Integrate your ESP32-based device to manage it via {{ coiote_short_name }}. python nvs_partition_gen.py generate nvs_config.csv nvs_config.bin 0x4000 ``` -![Client configuration](images/nvs_config.png "Client configuration"){: style="float: left;margin-right: 1177px;margin-top: 17px;"} +![Client configuration](images/nvs_config.png "Client configuration"){: .content-image-float .content-image-float--wide} ## Step 3: Add device to {{ coiote_short_name }} diff --git a/docs/LwM2M_Client/Nordic/nRF7002DK.md b/docs/LwM2M_Client/Nordic/nRF7002DK.md index 3c7dc5bc4..5ba51683d 100644 --- a/docs/LwM2M_Client/Nordic/nRF7002DK.md +++ b/docs/LwM2M_Client/Nordic/nRF7002DK.md @@ -78,18 +78,18 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co To show available subcommands, use the **Tab** key. 0. Check your default credentials by following the instructions in the program: - ![Anjay configuration](images/anjay_config.png "Anjay configuration"){:style="float: left;margin-right: 1177px; margin-top: 7px; margin-bottom: 17px;"} + ![Anjay configuration](images/anjay_config.png "Anjay configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} !!! note Use the `anjay stop` command to stop LwM2M Client if you are going to change credentials. If your default credentials are different from device credentials provided in {{ coiote_short_name }}, change them using the `anjay config set ` command.
- ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. The **nRF7002 DK** connects to the Internet via a Wi-Fi network. Remember to set the credentials of your network using `anjay config set wifi_ssid ` and `anjay config set wifi_password `. - ![Set WiFi credentials](images/set_wifi_credentials.png "Anjay set configuration"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Set WiFi credentials](images/set_wifi_credentials.png "Anjay set configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. Use the `anjay start` command to run the Client. 0. Go to {{ coiote_short_name }} to check if your device is connected. Click **Next**, then **Go to Summary**, then **Finish**. You should see your device registered. diff --git a/docs/LwM2M_Client/Nordic/nRF9151DK.md b/docs/LwM2M_Client/Nordic/nRF9151DK.md index d23d4bf4a..afdfbcc2e 100644 --- a/docs/LwM2M_Client/Nordic/nRF9151DK.md +++ b/docs/LwM2M_Client/Nordic/nRF9151DK.md @@ -83,14 +83,14 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co To show available subcommands, use the **Tab** key. 0. Check your default credentials by following the instructions in the program: - ![Anjay configuration](images/anjay_config.png "Anjay configuration"){:style="float: left;margin-right: 1177px; margin-top: 7px; margin-bottom: 17px;"} + ![Anjay configuration](images/anjay_config.png "Anjay configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} !!! note Use the `anjay stop` command to stop LwM2M Client if you are going to change credentials. If your default credentials are different from device credentials provided in {{ coiote_short_name }}, change them using the `anjay config set ` command.
- ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. Use the `anjay start` command to run the Client. diff --git a/docs/LwM2M_Client/Nordic/nRF9160DK.md b/docs/LwM2M_Client/Nordic/nRF9160DK.md index 793a89e65..a9f70516e 100644 --- a/docs/LwM2M_Client/Nordic/nRF9160DK.md +++ b/docs/LwM2M_Client/Nordic/nRF9160DK.md @@ -83,14 +83,14 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co To show available subcommands, use the **Tab** key. 0. Check your default credentials by following the instructions in the program: - ![Anjay configuration](images/anjay_config.png "Anjay configuration"){:style="float: left;margin-right: 1177px; margin-top: 7px; margin-bottom: 17px;"} + ![Anjay configuration](images/anjay_config.png "Anjay configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} !!! note Use the `anjay stop` command to stop LwM2M Client if you are going to change credentials. If your default credentials are different from device credentials provided in {{ coiote_short_name }}, change them using the `anjay config set ` command.
- ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. Use the `anjay start` command to run the Client. diff --git a/docs/LwM2M_Client/OpenThread/Adding_device.md b/docs/LwM2M_Client/OpenThread/Adding_device.md index 2c34551a5..0579bb706 100644 --- a/docs/LwM2M_Client/OpenThread/Adding_device.md +++ b/docs/LwM2M_Client/OpenThread/Adding_device.md @@ -26,9 +26,9 @@ When you are connected you should see the OpenThread main page: ### Creating an OpenThread network -On the left side, select the ***Form*** option, and a new page will be displayed for the network creation. After providing required credentials, click the **FORM** button and a message should pop up to let you know about the operation's success. ![Form Network](images/form_network.png "Form Network"){:style="float: left;margin-right: 1177px;margin-top: 17px; margin-bottom: 17px;"} +On the left side, select the ***Form*** option, and a new page will be displayed for the network creation. After providing required credentials, click the **FORM** button and a message should pop up to let you know about the operation's success. ![Form Network](images/form_network.png "Form Network"){: .content-image-float .content-image-float--wide .content-image-float--spaced} -On the left-side menu, click ***Topology*** to see the role of Border Router. ![Border Router topology](images/border1.png "Border Router topology"){:style="float: left;margin-right: 1177px;margin-top: 17px; margin-bottom: 17px;"} +On the left-side menu, click ***Topology*** to see the role of Border Router. ![Border Router topology](images/border1.png "Border Router topology"){: .content-image-float .content-image-float--wide .content-image-float--spaced} ### Commissioning process @@ -46,7 +46,7 @@ To start the commissioning process click ***Commission*** on the left-side menu
For more information check [here](https://openthread.io/guides/border-router/external-commissioning/prepare?hl=en#prepare_the_joiner_device). -Click **START COMMISSION** button, and a message should pop up to inform you about the operation's success. ![Start commission](images/commision.png "Start commission"){:style="float: left;margin-right: 1177px;margin-top: 17px; margin-bottom: 17px;"} +Click **START COMMISSION** button, and a message should pop up to inform you about the operation's success. ![Start commission](images/commision.png "Start commission"){: .content-image-float .content-image-float--wide .content-image-float--spaced} ### Device configuration @@ -122,32 +122,32 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co 0. Use the `anjay stop` command to stop LwM2M Client and change credentials. 0. Check your default credentials by following the instructions in the program: - ![Anjay configuration](images/anjay_config.png "Anjay configuration"){:style="float: left;margin-right: 1177px; margin-top: 7px; margin-bottom: 17px;"} + ![Anjay configuration](images/anjay_config.png "Anjay configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} !!! note If your default credentials are different from device credentials provided in {{ coiote_short_name }}, change them using the `anjay config set ` command.
- ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. Use the `anjay start` command to run the Client. 0. In logs, you can find information about status of the device. There will be information about success or failure in joining the connection and the current role of your device in the OpenThread network. - ![Connected as a child role](images/connected_child.PNG "Connected as a child role"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Connected as a child role](images/connected_child.PNG "Connected as a child role"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. Go to OpenThread main web page, on the left-side menu click ***Topology*** to see connected device. - ![Connected device as a child](images/border2.png "Connected device as a child"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Connected device as a child](images/border2.png "Connected device as a child"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} !!! Note The node should join the OTBR Thread network automatically. Within two minutes its state should change to `router`. - ![Connected device as a router](images/border3.png "Connected device as a router"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Connected device as a router](images/border3.png "Connected device as a router"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. Go to {{ coiote_short_name }} to check if your device is connected. Click **Next**, then **Go to Summary**, then **Finish**. You will see your Device Center view: - ![Registered device](images/registered_device.png "Registered device"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Registered device](images/registered_device.png "Registered device"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} !!! note When Anjay has no connection with the server or network for a long time, warning diff --git a/docs/LwM2M_Client/OpenThread/OTBR_with_svetovid.md b/docs/LwM2M_Client/OpenThread/OTBR_with_svetovid.md index 9a89b7f16..729ca671e 100644 --- a/docs/LwM2M_Client/OpenThread/OTBR_with_svetovid.md +++ b/docs/LwM2M_Client/OpenThread/OTBR_with_svetovid.md @@ -152,7 +152,7 @@ After that you can run your image in a new container: ## Configure your Border Router through {{ coiote_short_name }} After a while (about 10 minutes) you should see that your Border Router successfully connected to server. Now you can click **Next**, then **Go to Summary**, then **Finish**. You will see your Device Center view. -![Registered device](images/registered_device.png "Registered device"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} +![Registered device](images/registered_device.png "Registered device"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} Now you can switch to **Data model** tab. Here you can find objects related to **OpenThread Border Router**: diff --git a/docs/LwM2M_Client/STMicroelectronics/B-L462E-CELL1-TYPE1SC.md b/docs/LwM2M_Client/STMicroelectronics/B-L462E-CELL1-TYPE1SC.md index c3f51b1b4..b09d58630 100644 --- a/docs/LwM2M_Client/STMicroelectronics/B-L462E-CELL1-TYPE1SC.md +++ b/docs/LwM2M_Client/STMicroelectronics/B-L462E-CELL1-TYPE1SC.md @@ -63,7 +63,7 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co ``Press any key in 3 seconds to enter config menu...`` 3. Press any key and in the configuration menu, change the default credentials to your data by following the instructions presented in the program and save it. - ![Client configuration](images/config_menu1.png "Client configuration"){: style="float: left;margin-right: 1177px;margin-top: 17px;margin-bottom: 17px;"} + ![Client configuration](images/config_menu1.png "Client configuration"){: .content-image-float .content-image-float--wide .content-image-float--spaced} !!! important APN (Access Point Name) is the name of a gateway between a GSM, GPRS, 3G and 4G mobile network and another computer network. If you use built-in eSIM card Truphone then change APN to **iot.truphone.com**. diff --git a/docs/LwM2M_Client/STMicroelectronics/B-L475E-IOT01A.md b/docs/LwM2M_Client/STMicroelectronics/B-L475E-IOT01A.md index 00cd517a9..278bb83e4 100644 --- a/docs/LwM2M_Client/STMicroelectronics/B-L475E-IOT01A.md +++ b/docs/LwM2M_Client/STMicroelectronics/B-L475E-IOT01A.md @@ -73,14 +73,14 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co To show available subcommands, use the **Tab** key. 0. Check your default credentials by following the instructions in the program: - ![Anjay configuration](images/anjay_config.png "Anjay configuration"){:style="float: left;margin-right: 1177px; margin-top: 7px; margin-bottom: 17px;"} + ![Anjay configuration](images/anjay_config.png "Anjay configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} !!! note Use the `anjay stop` command to stop LwM2M Client and change credentials. If your default credentials are different from device credentials provided in {{ coiote_short_name }}, change them using the `anjay config set ` command.
- ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){:style="float: left;margin-right: 1177px;margin-top: 7px; margin-bottom: 17px;"} + ![Anjay set configuration](images/anjay_config_set.PNG "Anjay set configuration"){: .content-image-float .content-image-float--wide .content-image-float--compact .content-image-float--spaced} 0. Use the `anjay start` command to run the Client. 0. Go to {{ coiote_short_name }} to check if your device is connected. Click **Next**, then **Go to Summary**, then **Finish**. You will see your Device Center view: diff --git a/docs/LwM2M_Client/STMicroelectronics/B-U585I-IOT02A-BG96.md b/docs/LwM2M_Client/STMicroelectronics/B-U585I-IOT02A-BG96.md index 3b7f70e8b..09bc26877 100644 --- a/docs/LwM2M_Client/STMicroelectronics/B-U585I-IOT02A-BG96.md +++ b/docs/LwM2M_Client/STMicroelectronics/B-U585I-IOT02A-BG96.md @@ -80,7 +80,7 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co !!! tip LwM2M Server URI, endpoint name and other information you can be found in the **configuration** tab. - ![Client configuration](images/config_menu1.png "Client configuration"){:style="float: left;margin-right: 1177px;margin-top: 17px;margin-bottom: 17px;"} + ![Client configuration](images/config_menu1.png "Client configuration"){: .content-image-float .content-image-float--wide .content-image-float--spaced} !!! important APN (Access Point Name) is the name of a gateway between a GSM, GPRS, 3G and 4G mobile network and another computer network. If you use a built-in Truphone eSIM card, change the APN to **iot.truphone.com**. diff --git a/docs/LwM2M_Client/STMicroelectronics/STM32L496G-DISCOBG96.md b/docs/LwM2M_Client/STMicroelectronics/STM32L496G-DISCOBG96.md index 9ec9bdd02..01fa528db 100644 --- a/docs/LwM2M_Client/STMicroelectronics/STM32L496G-DISCOBG96.md +++ b/docs/LwM2M_Client/STMicroelectronics/STM32L496G-DISCOBG96.md @@ -74,7 +74,7 @@ To connect the board, log in to the platform and follow [onboarding guide]({{ co ``Press any key in 3 seconds to enter config menu...`` 0. Press any key and in the configuration menu, change the default credentials to your data by following the instructions presented in the program and save it. - ![Client configuration](images/config_menu1.png "Client configuration"){:style="float: left;margin-right: 1177px;margin-top: 17px;margin-bottom: 17px;"} + ![Client configuration](images/config_menu1.png "Client configuration"){: .content-image-float .content-image-float--wide .content-image-float--spaced} !!! important APN (Access Point Name) is the name of a gateway between a GSM, GPRS, 3G and 4G mobile network and another computer network. If you use a built-in Truphone eSIM card, change the APN to **iot.truphone.com**. diff --git a/docs/academy/exercise2a.md b/docs/academy/exercise2a.md index 6c70fc8da..2510c0df9 100644 --- a/docs/academy/exercise2a.md +++ b/docs/academy/exercise2a.md @@ -38,7 +38,7 @@ The Resources which are configured for the Security Object are: - **Resource `/0/x/0`**: **LwM2M Server URI**. This Resource defines the address of the LwM2M Server. - **Resource `/0/x/2`**: **Security Mode**. This Resource defines the security mode. In this application, the NoSec (no security) mode is used. By changing this parameter, other security modes can be used, including Pre-Shared Key mode and Certificate mode. -

main.c

+

main.c

``` // Installs Security Object and adds an instance of it. // An instance of Security Object provides information needed to connect // to LwM2M server. @@ -81,7 +81,7 @@ The Resources which are configured for the Server Object are: - **Resource `/1/x/5`**: **Disable Timeout** - This Resource controls the time period after which, the LwM2M Client will re-register to the server. In this application, we use “-1” which means the Disable Timeout is disabled. When this Resource is not set, the default timeout value of 86400 seconds (1 day) is used. - **Resource `/1/x/7`**: **Binding** - This Resource sets the preferred transport method. In this application, it is set to UDP. The LwM2M standard provides the option to set the binding to TCP, SMS, LoRaWAN, CIoT, or WebSockets. -

main.c

+

main.c

``` // Installs Server Object and adds an instance of it. // An instance of Server Object provides the data related to a LwM2M @@ -128,7 +128,7 @@ It is also used for invoking a device **Resource `/3/x/4`**: **Reboot** or **Res After the `setup_server_object()` and the `setup_security_object()` have been added to the **main.c** file, these Objects need to be initiated using `anjay_task()`. This is done using the code below. -

main.c

+

main.c

``` void anjay_task(__unused void *params) { diff --git a/docs/academy/exercise2b.md b/docs/academy/exercise2b.md index 1057a0e5a..a0ba065f2 100644 --- a/docs/academy/exercise2b.md +++ b/docs/academy/exercise2b.md @@ -47,7 +47,7 @@ Open the **main.c** file in a code editor (e.g. VS Code). In this file, modify the `setup_security_object()` function to change Anjay’s security settings and add the configuration of PSK-based encryption. This can be done using the code below. -

main.c

+

main.c

``` static int setup_security_object() { if (anjay_security_object_install(g_anjay)) { @@ -78,7 +78,7 @@ static int setup_security_object() { Next, open the **CMakeLists.txt**, change the file names and add the required information about the PSK mode. -

CMakeLists.txt

+

CMakeLists.txt

``` cmake_minimum_required(VERSION 3.13) @@ -112,7 +112,7 @@ pico_add_extra_outputs(psk-mode) ``` At the end of the file add the mention about subdirectory to the general CMakeLists.txt. -

Anjay-pico-client/CMakeLists.txt

+

Anjay-pico-client/CMakeLists.txt

``` add_subdirectory(psk-mode) diff --git a/docs/academy/exercise3a.md b/docs/academy/exercise3a.md index e759063c6..c9625ea1a 100644 --- a/docs/academy/exercise3a.md +++ b/docs/academy/exercise3a.md @@ -62,7 +62,7 @@ Start by adding some variables responsible for the state of our Time Object Inst !!! Note There is also a second array for keeping a backup of the Application Type - this will be required for the implementation of transactions. We will get back to it at the end of this exercise. -

time_object.c

+

time_object.c

``` typedef struct time_instance_struct { anjay_iid_t iid; @@ -90,7 +90,7 @@ In this case, all we have to do is initialize the Application Type with some val - rid - Resource ID - riid - Resource Instance ID -

time_object.c

+

time_object.c

``` static int init_instance(time_instance_t *inst, anjay_iid_t iid) { assert(iid != ANJAY_ID_INVALID); @@ -103,7 +103,7 @@ static int init_instance(time_instance_t *inst, anjay_iid_t iid) { The next function to implement is `instance_reset()` which resets the Instance to its default state. In our case, this means we clear the Application Type. -

time_object.c

+

time_object.c

``` static int instance_reset(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, @@ -121,7 +121,7 @@ static int instance_reset(anjay_t *anjay, We can also disable the presence of one of the Resources in the `list_resources()` function. It is done by changing `ANJAY_DM_RES_PRESENT` to `ANJAY_DM_RES_ABSENT` in the `anjay_dm_emit_res()` call. This change will simplify the implementation of the Read Handler and Observe/Notifications support in the next section. -

time_object.c

+

time_object.c

``` static int list_resources(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, @@ -155,7 +155,7 @@ Now we are ready to implement `resource_read()` and `resource_write()` handlers. The `resource_read()` operation on Current Time resource should return current time in seconds since January 1, 1970, UTC. To get this value, we can use the preimplemented `avs_time_real_now()` function. The same operation on Application Type resource should return the `time_instance_t::application_type` string. Because we’ve made the Fractional Time resource absent, we won’t perform any actions on this resource during `resource_read()` operation. -

time_object.c

+

time_object.c

``` static int resource_read(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, @@ -191,7 +191,7 @@ static int resource_read(anjay_t *anjay, As discussed, we only implement the Read operation on the Current Time Resource, so the Write operation is only implemented on the Application Type Resource. -

time_object.c

+

time_object.c

``` static int resource_write(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr, @@ -221,7 +221,7 @@ static int resource_write(anjay_t *anjay, ## Initialize the Object There is one function left to implement: `time_object_create()`. This function uses `add_instance()` to create an Object Instance, allowing data to be read by the LwM2M Server. -

time_object.c

+

time_object.c

``` const anjay_dm_object_def_t **time_object_create(void) { time_object_t *obj = (time_object_t *) avs_calloc(1, sizeof(time_object_t)); @@ -245,7 +245,7 @@ const anjay_dm_object_def_t **time_object_create(void) { The last thing to do is to create the header file `time_object.h` for the implemented object, include the header file in the **main.c** and update the **CMakeLists.txt** file. -

time_object.h

+

time_object.h

``` #pragma once @@ -256,7 +256,7 @@ void time_object_release(const anjay_dm_object_def_t **def); ``` -

main.c

+

main.c

``` void anjay_task(__unused void *params) { init_wifi(); @@ -289,7 +289,7 @@ void anjay_task(__unused void *params) { Include the `time_object.h` file on the top of the *main.c* file. -

time_object.c

+

time_object.c

``` #include #include @@ -303,7 +303,7 @@ Include the `time_object.h` file on the top of the *main.c* file. #endif ``` -

CMakeLists.txt

+

CMakeLists.txt

``` cmake_minimum_required(VERSION 3.13) @@ -339,7 +339,7 @@ pico_add_extra_outputs(time_object) At the end of the file add the mention about subdirectory to the general *CMakeLists.txt*. -

Anjay-pico-client/CMakeLists.txt

+

Anjay-pico-client/CMakeLists.txt

``` add_subdirectory(time_object) ``` @@ -354,7 +354,7 @@ By default, transaction handlers are set to `anjay_dm_transaction_NOOP` and do n Go back to the *time_object.c* file and update the file using the following code block: -

time_object.c

+

time_object.c

``` static int transaction_begin(anjay_t *anjay, const anjay_dm_object_def_t *const *obj_ptr) { diff --git a/docs/academy/exercise3b.md b/docs/academy/exercise3b.md index f3659507d..ef53204eb 100644 --- a/docs/academy/exercise3b.md +++ b/docs/academy/exercise3b.md @@ -39,7 +39,7 @@ In the *lm35.c* file we need two functions: - The `lm35_init()` for the initialization of the ADC (Analog to Digital Converter) and the ADC GPIO pin. - The `temperature_get_data()` for computing the temperature value from the sensor. This function will be called from the *temperature_sensor.c* file. -

lm35.c

+

lm35.c

``` #include #include @@ -74,7 +74,7 @@ To generate a layout of the Object’s implementation, we need a few functions t The most important function is responsible for getting the temperature value from the sensor. For this, we create `temperature_sensor_get_value()` function where we call the `temperature_get_data()` function (this function was created in lm35.c file). -

temperature_sensor.c

+

temperature_sensor.c

``` static int temperature_sensor_get_value(anjay_iid_t iid, void *_ctx, double *value) { @@ -90,7 +90,7 @@ In the `temperature_sensor_install()` function, we describe the initialization o Let’s look at the `temperature_sensor_install()` function implementation: -

temperature_sensor.c

+

temperature_sensor.c

``` void temperature_sensor_install(anjay_t *anjay) { if (lm35_init()) { @@ -179,7 +179,7 @@ This function can be divided into a three sections: Let's add the functions `temperature_sensor_update()`, and `temperature_sensor_release()`. To update the Instance we can use [`anjay_ipso_basic_sensor_update`](https://docs.avsystem.com/hubfs/Anjay_Docs/api/api_generated/function_ipso__objects_8h_1adb1d4d64c728ad7e77f35c8c28eb74bf.html#exhale-function-ipso-objects-8h-1adb1d4d64c728ad7e77f35c8c28eb74bf). -

temperature_sensor.c

+

temperature_sensor.c

``` void temperature_sensor_update(anjay_t *anjay) { anjay_ipso_basic_sensor_update(anjay, 3303, 0); @@ -191,7 +191,7 @@ void temperature_sensor_release(void) { ``` Add on top the necessary paths to the libraries used in the *temperature_sensor.c* and defined constant. In file you should include: -

temperature_sensor.c

+

temperature_sensor.c

``` #include #include @@ -212,7 +212,7 @@ Add on top the necessary paths to the libraries used in the *temperature_sensor. ## Register the Object in Anjay The last things to do is creating the header files (*temperature_sensor.h* and *lm35.h*) for the implemented Object, registering the temperature sensor in Anjay by updating the main.c file, and updating CMakeLists.txt file. -

temperature_sensor.h

+

temperature_sensor.h

``` #pragma once @@ -223,7 +223,7 @@ void temperature_sensor_update(anjay_t *anjay); void temperature_sensor_release(void); ``` -

lm35.h

+

lm35.h

``` #pragma once @@ -237,7 +237,7 @@ int lm35_init(void); int temperature_get_data(double *sensor_data); ``` -

main.c

+

main.c

``` void temperature_sensor_update_task(__unused void *params) { const TickType_t delay = 2000 / portTICK_PERIOD_MS; @@ -280,7 +280,7 @@ void anjay_task(__unused void *params) { Add on top the necessary paths to the libraries used in the main.c file you should include: -

main.c

+

main.c

``` #include "temperature_sensor.h" @@ -302,7 +302,7 @@ static StackType_t temp_update_stack[TEMP_UPDATE_TASK_SIZE]; static StaticTask_t temp_update_task_buffer; ``` -

CMakeLists.txt

+

CMakeLists.txt

``` cmake_minimum_required(VERSION 3.13) @@ -337,7 +337,7 @@ pico_add_extra_outputs(temperature_object_lm35) ``` At the end of the file add the mention about subdirectory to the general CMakeLists.txt. -

Anjay-pico-client/CMakeLists.txt

+

Anjay-pico-client/CMakeLists.txt

``` add_subdirectory(temperature_object_lm35) ``` diff --git a/docs/academy/exercise4a.md b/docs/academy/exercise4a.md index 235c37cfb..104fbdba6 100644 --- a/docs/academy/exercise4a.md +++ b/docs/academy/exercise4a.md @@ -39,7 +39,7 @@ Find in the **Operations** column three different icons representing three diffe ## Read Operation The Server can perform a LwM2M Read operation on a Resource, Object Instance or a whole Object. To do this, click the circular icon in the **Operations** column (or use the 3 vertical dots menu in case of Objects and Object Instances). -![Read](images/read_resource.gif "Read"){:style="float: left;margin-right: 817px;margin-top: 17px;margin-bottom: 17px;"} +![Read](images/read_resource.gif "Read"){: .content-image-float .content-image-float--narrow .content-image-float--spaced} You can see that each time you perform a Read Operation on a specific Resource, its value is updated because the Client has been instructed to send the newest value to the server. @@ -52,7 +52,7 @@ The Server can set observations on a Resource, Object Instance or a whole Object ![Observe Operation](images/module4_Observation.png) To set an observation on an Object or Object Instance, click on the 3 vertical dots menu and select **Set observation**. -![Set observation on object](images/module4_observation_object_CLICK.png "Set observation on object"){:style="float: left;margin-right: 817px;margin-top: 17px;margin-bottom: 17px;"} +![Set observation on object](images/module4_observation_object_CLICK.png "Set observation on object"){: .content-image-float .content-image-float--narrow .content-image-float--spaced} You can see that after each time interval which you set in the observation menu, the value is changed as a result of the Client sending an update. diff --git a/docs/academy/exercise4b.md b/docs/academy/exercise4b.md index 8bb23abc7..ca4eb8bc6 100644 --- a/docs/academy/exercise4b.md +++ b/docs/academy/exercise4b.md @@ -17,7 +17,7 @@ Let’s start by going to the **Anjay-pico-client/temperature_object_lm35** dire ## Temperature_sensor files Let’s start with the *temperature_sensor.c* file where we define the Temperature Object’s Resources and add two functions: `send_finished_handler()` and `temperature_object_lm35_send()`. Let’s start by defining all available Resources in *temperature_sensor.c*. -

temperature_sensor.c

+

temperature_sensor.c

``` #include "lm35.h" #include "temperature_sensor.h" @@ -75,7 +75,7 @@ Let’s start with the *temperature_sensor.c* file where we define the Temperatu Next, at the end of the *temperature_sensor.c* file, add a handler which is called automatically each time a Send operation finishes, to send logs to the serial communication program about the operation result. -

temperature_sensor.c

+

temperature_sensor.c

``` static void send_finished_handler(anjay_t *anjay, anjay_ssid_t ssid, @@ -97,7 +97,7 @@ static void send_finished_handler(anjay_t *anjay, It’s time to create a function with the Send Operation itself. Data messages are created using `anjay_send_batch_builder` which builds the payload to be sent to the LwM2M Server. The payload can consist of multiple values from different resources. Calling the `temperature_object_lm35_send()` function does not send a batch immediately, but schedules a task to be run on the next iteration of the Anjay’s event loop. -

temperature_sensor.c

+

temperature_sensor.c

``` void temperature_object_lm35_send(anjay_t *anjay) { if (!anjay) { @@ -156,7 +156,7 @@ void temperature_object_lm35_send(anjay_t *anjay) { ``` Add on top the necessary paths to the libraries used in the *temperature_sensor.c* and defined constant. -

temperature_sensor.c

+

temperature_sensor.c

``` #include #include @@ -178,7 +178,7 @@ Add on top the necessary paths to the libraries used in the *temperature_sensor. Declare the function in the *temperature_sensor.h* file. -

temperature_sensor.h

+

temperature_sensor.h

``` #pragma once @@ -196,7 +196,7 @@ Next up is updating the *main.c* file. We need to create a `temperature_object s !!! Note Optionally update the time interval from 10 seconds to any interval you prefer. -

main.c

+

main.c

``` #define ANJAY_TASK_SIZE (4000U) #define TEMP_UPDATE_TASK_SIZE (1000U) @@ -226,7 +226,7 @@ static void send_job(avs_sched_t *sched, const void *args_ptr) { Now let’s call the `send_job()` function in `anjay_task()`. -

main.c

+

main.c

``` void anjay_task(__unused void *params) { init_wifi(); diff --git a/docs/academy/exercise5.md b/docs/academy/exercise5.md index c0e368806..81c49315a 100644 --- a/docs/academy/exercise5.md +++ b/docs/academy/exercise5.md @@ -23,7 +23,7 @@ Anjay comes with a built-in Firmware Update module, which simplifies FOTA implem In our code, firmware update module installation will be taken by the function declared in **firmware_update.h**: -

firmware_update.h

+

firmware_update.h

``` c #pragma once @@ -34,7 +34,7 @@ int fw_update_install(anjay_t *anjay); In the main.c file the installation of the Firmware Update module takes place in the *anjay_task()* funktion: -

main.c

+

main.c

``` c void anjay_task(__unused void *params) { init_wifi(); @@ -73,7 +73,7 @@ The Firmware Update module consists of user-implemented callbacks of various sor - `stream_open` is called whenever a new firmware download is started by the server. Its main responsibility is to prepare client for receiving firmware chunks - e.g. by opening a file or getting flash storage ready, etc. -

firmware_update.c

+

firmware_update.c

``` c static int fw_stream_open(void *user_ptr, const char *package_uri, @@ -97,7 +97,7 @@ The Firmware Update module consists of user-implemented callbacks of various sor - `stream_write` is called whenever there is a next firmware chunk received, ready to be stored. Its responsibility is to append the chunk to the storage. -

firmware_update.c

+

firmware_update.c

``` c static int fw_stream_write(void *user_ptr, const void *data, size_t length) { (void) user_ptr; @@ -119,7 +119,7 @@ The Firmware Update module consists of user-implemented callbacks of various sor - `stream_finish` is called whenever the writing process is finished and the stored data can now be thought of as a complete firmware image. It may be a good moment here to verify if the entire firmware image is valid. -

firmware_update.c

+

firmware_update.c

``` c static int fw_stream_finish(void *user_ptr) { (void) user_ptr; @@ -148,7 +148,7 @@ The Firmware Update module consists of user-implemented callbacks of various sor - `reset` is called whenever there is an error during firmware download, or if the Server decides to not pursue firmware update with downloaded firmware (e.g. because it was notified that firmware verification failed). -

firmware_update.c

+

firmware_update.c

``` c static void fw_reset(void *user_ptr) { (void) user_ptr; @@ -168,7 +168,7 @@ The Firmware Update module consists of user-implemented callbacks of various sor - `perform_upgrade` is called whenever the download is finished, the firmware is successfully verified on the Client and the Server decides to upgrade the device. -

firmware_update.c

+

firmware_update.c

``` c static int fw_perform_upgrade(void *anjay) { pfb_mark_download_slot_as_valid(); @@ -183,7 +183,7 @@ The Firmware Update module consists of user-implemented callbacks of various sor To install the module, we are going to use the *fw_update_install()* function which is called in the main.c file: -

firmware_update.c

+

firmware_update.c

``` c static const anjay_fw_update_handlers_t handlers = { .stream_open = fw_stream_open, @@ -214,7 +214,7 @@ Flash APIs require that the length of data to write will be a multiple of 256 by - flash_aligned_writer.c -

flash_aligned_writer.c

+

flash_aligned_writer.c

``` c #include #include @@ -286,7 +286,7 @@ Flash APIs require that the length of data to write will be a multiple of 256 by - flash_aligned_writer.h -

flash_aligned_writer.h

+

flash_aligned_writer.h

``` c #pragma once diff --git a/docs/academy/index.md b/docs/academy/index.md index b832b6f36..43be8088c 100644 --- a/docs/academy/index.md +++ b/docs/academy/index.md @@ -47,7 +47,7 @@ We're constantly working on improving the LwM2M Academy. Please share with us yo ## Intro to the hardware used in this course Throughout this course, we will be using the [Raspberry Pi Pico W](https://www.raspberrypi.com/products/raspberry-pi-pico/), Raspberry Pi's first wireless microcontroller board. It has been designed as a tiny and low-cost yet flexible development platform for the RP2040 MCU. -![Raspberry Pi Pico](images/module1_RPI Pico.png){: style="width:300px"} +![Raspberry Pi Pico](images/module1_RPI Pico.png){: .academy-hardware-image} The 21 mm × 51 mm board comes with a 2.4GHz wireless LAN interface (802.11n). It provides 26 GPIO pins, three of which can function as analog inputs. Four RP2040 I/O pins are used for internal functions: driving an LED, on-board switch mode power supply power control, and sensing the system voltages. @@ -60,7 +60,7 @@ In this course, we will be using the **LM35** analog temperature sensor. **Purchase the sensor** via [Kiwi electronics](https://www.kiwi-electronics.com/en/lm35dz-analog-temperature-sensor-10530) (EU), [Amazon](https://www.amazon.com/Bridgold-Analogue-Precision-Centigrade-Temperature/dp/B07Y7FCZYB) (US) or [Mouser](https://www.mouser.com/ProductDetail/Texas-Instruments/LM35DZ-LFT4?qs=QbsRYf82W3FEZkSvxC%252BtOg%3D%3D) (EU/US) -![module1_lm35](images/module1_lm35.jpeg){: style="width:300px"} +![module1_lm35](images/module1_lm35.jpeg){: .academy-hardware-image} ## Intro to Anjay LwM2M Client diff --git a/docs/academy/module2.md b/docs/academy/module2.md index 6176824b7..66ccde77f 100644 --- a/docs/academy/module2.md +++ b/docs/academy/module2.md @@ -15,7 +15,7 @@ Welcome to the second module of the LwM2M Academy. In the previous module, we in ![Smart objects](images/module2_smart-objects.png) -*

Mandatory Objects are: Security `/0`, Server Object `/1` & Device `/3`

* +*

Mandatory Objects are: Security `/0`, Server Object `/1` & Device `/3`

* ## Mandatory Objects @@ -55,7 +55,7 @@ Two layers of security are implemented when using LwM2M. The transport layer is DTLS and OSCORE can work together to provide end-to-end security. DTLS/TLS is used to establish a secure channel between the client and server, and OSCORE is used to encrypt and protect messages exchanged within that channel. This approach provides multiple layers of security, ensuring that the communication channel and the data being exchanged within that channel are both protected against unauthorized access and tampering. ![Security](images/module2_security.png) -*

The transport layer is secured using DTLS or TLS. The application layer is protected using OSCORE.

* +*

The transport layer is secured using DTLS or TLS. The application layer is protected using OSCORE.

* ## Security modes diff --git a/docs/academy/module4.md b/docs/academy/module4.md index 7b0b2a048..eb860f71f 100644 --- a/docs/academy/module4.md +++ b/docs/academy/module4.md @@ -50,7 +50,7 @@ In this interface, the Server holds the ability to define the behavior of the de * **OBSERVE**: When the Observe operation is invoked, the Client starts sending NOTIFY messages to the Server about its data or state at configurable intervals. The OBSERVE operation is canceled when sending **CANCEL OBSERVE**. ![Set Observations](images/module4_Observation.png) -*

Set Observation in {{ coiote_long_name }}

* +*

Set Observation in {{ coiote_long_name }}

* **Client Operations** diff --git a/docs/academy/module5.md b/docs/academy/module5.md index 85cf1d5ad..3c0ac04d0 100644 --- a/docs/academy/module5.md +++ b/docs/academy/module5.md @@ -23,7 +23,7 @@ The LwM2M firmware update process consists of four steps: This procedure is defined in detail in the LwM2M specifications (see [LwM2M specifications](https://www.openmobilealliance.org/release/LightweightM2M/V1_1_1-20190617-A/HTML-Version/OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A.html#13-6-1-0-E61-Firmware-Update-State-Machine)). To add firmware update capabilities to a device, the [Firmware Update Object /5](http://devtoolkit.openmobilealliance.org/OEditor/LWMOView?url=https%3A%2F%2Fraw.githubusercontent.com%2FOpenMobileAlliance%2Flwm2m-registry%2Fprod%2F5.xml) needs to be implemented containing all essential functionalities for conducting the update and reporting the status. Several LwM2M Clients natively support this Firmware Update Object, including [AVSystem’s Anjay LwM2M Client](https://www.avsystem.com/products/anjay/) and [Zephyr’s LwM2M Client](https://docs.zephyrproject.org/latest/samples/net/lwm2m_client/README.html). ![FOTA in progress](images/module5_in-progress-basic.png) -*

Updating a device’s firmware using {{ coiote_long_name }}

* +*

Updating a device’s firmware using {{ coiote_long_name }}

* ## Download a new firmware The LwM2M standard defines two methods to perform a firmware update, allowing either the Client or the Server to decide on the best moment to start the download of the new firmware. diff --git a/docs/index.md b/docs/index.md index 4f4ce9a60..60a4c0f33 100644 --- a/docs/index.md +++ b/docs/index.md @@ -45,17 +45,17 @@ With the {{ coiote_long_name }}, you can easily integrate your LwM2M data with p The guides will take you on a step-by-step journey to seamlessly activate the integrations. -[Webhooks](Coiote_IoT_DM/API_documentation/Guides/Send_data_outside_application.md){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} -[Kafka](Coiote_IoT_DM/API_documentation/Guides/Send_data_outside_application.md){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} -[Azure IoT](Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} -[AWS](Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} -[nRF Cloud](Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} +[Webhooks](Coiote_IoT_DM/API_documentation/Guides/Send_data_outside_application.md){: .md-button .md-button--big .button-row-item} +[Kafka](Coiote_IoT_DM/API_documentation/Guides/Send_data_outside_application.md){: .md-button .md-button--big .button-row-item} +[Azure IoT](Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md){: .md-button .md-button--big .button-row-item} +[AWS](Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md){: .md-button .md-button--big .button-row-item} +[nRF Cloud](Coiote_IoT_DM/Cloud_integrations/cloud-integrations.md){: .md-button .md-button--big .button-row-item} ## LwM2M Academy **Take a deep-dive into the LwM2M standard by following the LwM2M Academy**. A comprehensive online course designed to provide you with both the theoretical understanding and hands-on skills necessary to utilize the powerful LwM2M standard. -[Join course](academy/index.md){: .md-button .md-button--big :style="float: left;margin-right: 30px;"} +[Join course](academy/index.md){: .md-button .md-button--big .button-row-item} ## Join our community on Discord diff --git a/docs/javascripts/analytics-init.js b/docs/javascripts/analytics-init.js new file mode 100644 index 000000000..07c168681 --- /dev/null +++ b/docs/javascripts/analytics-init.js @@ -0,0 +1,33 @@ +(function () { + var config = JSON.parse(document.getElementById("__analytics_config").textContent); + + window.dataLayer = window.dataLayer || []; + window.gtag = window.gtag || function () { + window.dataLayer.push(arguments); + }; + window.gtag("js", new Date()); + window.gtag("config", config.googleTag); + + if (config.googleAnalytics.length) { + window.ga = window.ga || function () { + (window.ga.q = window.ga.q || []).push(arguments); + }; + window.ga.l = +new Date(); + window.ga("create", config.googleAnalytics[0], config.googleAnalytics[1]); + window.ga("set", "anonymizeIp", true); + window.ga("send", "pageview"); + + document.addEventListener("DOMContentLoaded", function () { + if (document.forms.search) { + document.forms.search.query.addEventListener("blur", function () { + if (this.value) { + window.ga("send", "pageview", document.location.pathname + "?q=" + this.value); + } + }); + } + }); + document.addEventListener("DOMContentSwitch", function () { + window.ga("send", "pageview", document.location.pathname); + }); + } +})(); diff --git a/docs/javascripts/material-init.js b/docs/javascripts/material-init.js new file mode 100644 index 000000000..0e709165f --- /dev/null +++ b/docs/javascripts/material-init.js @@ -0,0 +1,11 @@ +(function () { + var config = JSON.parse(document.getElementById("__material_config").textContent); + + window.app = initialize({ + base: config.base, + features: config.features, + search: Object.assign({ + worker: config.searchWorker + }, typeof search !== "undefined" && search) + }); +})(); diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 37e45ff6e..2ce722514 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -1,3 +1,53 @@ +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap'); + +body, +input { + font-family: "Roboto", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif; +} + +code, +kbd, +pre { + font-family: "Roboto Mono", SFMono-Regular, Consolas, Menlo, monospace; +} + +.text-center { + text-align: center; +} + +.button-row-item { + float: left; + margin-right: 30px; +} + +.academy-hardware-image { + width: 300px; +} + +.content-image-float { + float: left; + margin-top: 17px; +} + +.content-image-float--narrow { + margin-right: 817px; +} + +.content-image-float--release-note { + margin-right: 1077px; +} + +.content-image-float--wide { + margin-right: 1177px; +} + +.content-image-float--compact { + margin-top: 7px; +} + +.content-image-float--spaced { + margin-bottom: 17px; +} .topLinePageInfo { @@ -10,7 +60,7 @@ .topLinePageInfo__text { color: #000; font-size: 16px; - font-family: Roboto, sans-serif; + font-family: Roboto; font-style: normal; line-height: 32px; letter-spacing: 0.15px; @@ -62,7 +112,7 @@ transition: .2s; text-decoration: none; cursor: pointer; - font-family: Roboto, sans-serif; + font-family: Roboto; background-color: #ffd100; border: 2px solid #ffd100; color: #000; diff --git a/mkdocs.yml b/mkdocs.yml index baf339df2..abd3199b3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,6 @@ site_name: IoT Developer Zone theme: name: material custom_dir: overrides - font: false logo: assets/images/logo.svg favicon: assets/favicon/favicon-32x32.png features: @@ -47,6 +46,9 @@ plugins: hooks: - main.py +google_analytics: + - UA-25246208-6 + - auto nav: - 'Getting Started': diff --git a/overrides/assets/images/logo.svg b/overrides/assets/images/logo.svg index 66ec4991a..33f3db4e3 100644 --- a/overrides/assets/images/logo.svg +++ b/overrides/assets/images/logo.svg @@ -1,14 +1,14 @@

{{ page.title | d(config.site_name, true)}}

{% block site_meta %} - + {{ super() }} {% endblock %} - - +{% block scripts %} + + + {%- set translations = {} -%} + {%- for key in [ + "clipboard.copy", + "clipboard.copied", + "search.config.lang", + "search.config.pipeline", + "search.config.separator", + "search.placeholder", + "search.result.placeholder", + "search.result.none", + "search.result.one", + "search.result.other", + "search.result.more.one", + "search.result.more.other", + "search.result.term.missing" + ] -%} + {%- set _ = translations.update({ key: lang.t(key) }) -%} + {%- endfor -%} + + + + {{ self.config() }} + + + + {% if config.google_analytics %} + + {% endif %} + {% for path in config["extra_javascript"] %} + + {% endfor %} +{% endblock %} diff --git a/overrides/partials/footer.html b/overrides/partials/footer.html index 62bcbce25..51786347a 100644 --- a/overrides/partials/footer.html +++ b/overrides/partials/footer.html @@ -63,3 +63,7 @@ + + + + diff --git a/overrides/partials/header.html b/overrides/partials/header.html index cf0407e39..5d53772c5 100644 --- a/overrides/partials/header.html +++ b/overrides/partials/header.html @@ -50,7 +50,7 @@
-