Skip to content

Commit

Permalink
Merge pull request #830 from tubleronchik/master
Browse files Browse the repository at this point in the history
upd sub-activate article with new videos
  • Loading branch information
Vourhey authored May 16, 2024
2 parents fcf7030 + d47f460 commit 49c56f9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 38 deletions.
8 changes: 4 additions & 4 deletions data/sidebar_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
link: /docs/hass-init
- title_en: Zigbee2MQTT Adapter
link: /docs/zigbee-to-mqtt-image
- title_en: Buying a Subscription
- title_en: Subscription Activate
link: /docs/sub-activate
topic: Pre-installed Image For Raspberry Pi
- title_en: Robonomics Integration Setup
Expand All @@ -22,7 +22,7 @@
link: /docs/global-administration
- title_en: Upgrade Home Assistant OS
items:
- title_en: Buying a Subscription
- title_en: Subscription Activate
link: /docs/sub-activate
topic: Upgrade Home Assistant OS
- title_en: Robonomics Installation
Expand All @@ -35,7 +35,7 @@
link: /docs/global-administration
- title_en: Upgrade Home Assistant Docker for Unix-like OS
items:
- title_en: Buying a Subscription
- title_en: Subscription Activate
link: /docs/sub-activate
topic: Upgrade Home Assistant Docker for Unix-like OS
- title_en: Robonomics Installation
Expand All @@ -49,7 +49,7 @@
link: /docs/global-administration
- title_en: Upgrade Home Assistant Core
items:
- title_en: Buying a Subscription
- title_en: Subscription Activate
link: /docs/sub-activate
topic: Upgrade Home Assistant Core
- title_en: Robonomics Installation
Expand Down
64 changes: 30 additions & 34 deletions docs/sub-activate.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,89 +8,85 @@ tools:
https://github.com/airalab/dapp.robonomics.network
---

In this article you will create Robonomics parachain accounts and buy IoT subscription.
In this article, you will create Robonomics parachain accounts and buy an IoT subscription.

<robo-wiki-picture src="home-assistant/sub_activate.png" />


To control Home Assistant with Robonomics, you need 2 accounts on the Robonomics parachain. For one of the accounts (`sub_owner`), you will buy a Robonomics subscription. Second account (`sub_controller`) will control all Home Assistant processes (such as telemetry) and will give access to other users. These accounts will provide security for your Home Assistant.
To control Home Assistant with Robonomics, you need 2 accounts on the Robonomics parachain. For one of the accounts (`owner`), you will buy a Robonomics subscription. The second account (`controller`) will control all Home Assistant processes (such as telemetry) and will give access to other users. These accounts will provide security for your Home Assistant.

<robo-wiki-note type="warning" title="WARNING">

Both accounts must be created with **ed25519** encryption. Because of this, you need to create an account using the Polkadot-JS UI and select the required encryption.
Both accounts must be created with **ed25519** encryption. Therefore, you need to create an account using the Polkadot-JS UI and select the required encryption.

This feature is disabled by default on the Polkadot-JS UI. To enable it, navigate to `Settings` -> `General` -> `account options` and select `Allow local in-browser account storage` in the drop-down menu `in-browser account creation`.
This feature is disabled by default in the Polkadot-JS UI. To enable it, navigate to `Settings` -> `General` -> `account options` and select `Allow local in-browser account storage` in the drop-down menu under `in-browser account creation`.

</robo-wiki-note>

## Create Owner and Controller Accounts

<robo-wiki-video autoplay loop controls :videos="[{src: 'https://crustipfs.art/ipfs/QmQiJYPYajUJXENX2PzSJMSKGSshyWyPNqugSYxP5eCNvm', type:'mp4'}]" />
<robo-wiki-video autoplay loop controls :videos="[{src: 'https://ipfs.living/ipfs/QmajeEV4adqR2DCaBJPZhH6NR74eHaRmvCcbeQtnLm7Kcc', type:'mp4'}]" />

1. Go to [Robonomics Parachain app](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.rpc.robonomics.network%2F#/) on Polkadot / Substrate Portal. **Check the top left corner to ensure that you are connected to Robonomics Parachain.**
1. Go to [Robonomics Parachain app](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.rpc.robonomics.network%2F#/) on the Polkadot / Substrate Portal. **Check the top left corner to ensure that you are connected to Robonomics Parachain.**

2. Go to `Accounts` -> `Accounts` and press `Add account` button. You will see the popup menu with account seed. It has two forms: *Mnemonic* (human-readable) and *Raw* (a sequence of digits and letters).

3. Open `Advanced creation options`, change the crypto type of creating account to `Edwards - ed25519` and press `Next`.
2. Go to `Accounts` -> `Accounts` and press the `Add account` button. You will see the popup menu with account seed. It has two forms: *Mnemonic* (human-readable) and *Raw* (a sequence of digits and letters).

3. Open `Advanced creation options`, change the crypto type of the account being created to `Edwards - ed25519` and press `Next`.

4. Save the mnemonic seed phrase securely and press `Next`.

5. In the next menu, you need to set the account name and password. Give it a name `sub_owner` for convenience. Press `Next`.
5. In the next menu, you need to set the account name and password. For convenience, name it `owner`. Press `Next`.

6. On the last window click `Save` to finish account creation. It will also generate a backup JSON-files that you should safely store. You can later use this file to recover your account if you remember the password.
6. In the final window, click `Save` to complete the account creation. This will also generate a backup JSON-files that you should store safely. You can later use this file to recover your account if you remember the password.

7. Repeat these steps for an account with the name `sub_controller`.
7. Repeat these steps to create an account with the name `controller`.


## Add Accounts to Polkadot.js

For convenience, you should use the [Polkadot.js extension](https://polkadot.js.org/extension/) and add these newly created accounts to it. For an ed25519 account you can do that only with a backup JSON file. You can use the files saved when you created the accounts.
For convenience, you should use the [Polkadot.js extension](https://polkadot.js.org/extension/) and add these newly created accounts to it. For an ed25519 account, you can do that only with a backup JSON file. You can use the files saved when you created the accounts.

You can get these files again by creating a backup file of the account. Press on three dots on your account, choose `Create a backup file for this account` and type in your password.
You can get these files again by creating a backup file of the account. Click on the three dots next to your account, choose `Create a backup file for this account` and type in your password.

<robo-wiki-video autoplay loop controls :videos="[{src: 'https://crustipfs.art/ipfs/QmRd7gztUjWkLF4W2XuJwy5aXBwzNV2aPCU6CQQLvUpSNj', type:'mp4'}]" />
<robo-wiki-video autoplay loop controls :videos="[{src: 'https://ipfs.living/ipfs/Qmc5LcbLSdVCUubLomUUo5Qxrxb2xaixpwUFqnpj2C9iM5', type:'mp4'}]" />

1. Open an extension and press `+` button on the top right, then choose `Restore account from backup JSON file`.
1. Open the extension and press the `+` button in the top right, then choose `Restore account from backup JSON file`.

2. In an opened window upload the JSON file, enter the password and press `Restore`.
2. In the opened window, upload the JSON file, enter the password, and press `Restore`.

3. Make sure the Robonomics network is selected for accounts in the Polkadot.js extension. On on Polkadot / Substrate Portal go to `Setting` -> `Metadata` and click on the `Update metadata` button.
3. Make sure the Robonomics network is selected for accounts in the Polkadot.js extension. On on Polkadot / Substrate Portal go to `Settings` -> `Metadata` and click the `Update metadata` button.

4. Confirm the metadata update in the popup. Now the extension will show the label of the network for which the address is used.
4. Confirm the metadata update in the popup. The extension will now show the label of the network for which the address is used.

<robo-wiki-video autoplay loop controls :videos="[{src: 'https://crustipfs.art/ipfs/QmT5sTNP9t8gpbD4RJJw6ETwG4wiziiChAh2uHHBk9Zsyd', type:'mp4'}]" />
<robo-wiki-video autoplay loop controls :videos="[{src: 'https://ipfs.living/ipfs/QmXVhu17Qkx8VkAAVfm5mUBzSTq1BvaAF7MNdXLgZSvZcR', type:'mp4'}]" />

## Activate Robonomics Subscription

<robo-wiki-note type="okay">

For this step, you must have a sufficient amount of XRT tokens (minimum 2-3 XRTs) in your `sub_owner` account.
For this step, you must have a sufficient amount of XRT tokens (minimum of 2-3 XRT) in your `owner` account.

</robo-wiki-note>

<robo-wiki-video autoplay loop controls :videos="[{src: 'https://crustipfs.art/ipfs/QmXrFCajmJgkRDSbshGD3QehjnoyS6jafEPSjHdYkoBHum', type:'mp4'}]" />
<robo-wiki-video autoplay loop controls :videos="[{src: 'https://ipfs.living/ipfs/QmXA7WgScwjt1re34BMEqX9CUYLrYQKqqvigDNU6TALQah', type:'mp4'}]" />

1. Go to Robonomics dapp to the [subscription page](https://dapp.robonomics.network/#/subscription) and press connect account on the right sidebar.
1. Go to the Robonomics dApp and navigate to the [subscription page](https://robonomics.app/#/rws-buy). Then, click on `Connect Account` on the right sidebar.

2. In the following popup menu connect Polkadot.js extension. You will see your account address with balance.
2. In the following popup menu, connect the Polkadot.js extension. You will see your account address along with its balance.

3. Before purchasing, check that you chose the `sub_owner` account. Press the address profile icon, you should see the `sub_owner` account under the `Check owner account` field.
3. Before purchasing, ensure that you have selected the `owner` account. Click on the address profile icon, and you should see the `owner` account.

4. Finally, press the `SUBMIT` button and enter the password for your account. After that wait until the activation process is completed. You will see the state of your subscription after a while.
4. Finally, click the `BUY SUBSCRIPTION` button and enter the password for your account. Wait until the activation process is completed. You will see the state of your subscription after a while.


## Add Accounts to Subscription

Now you need to add a `sub_controller` account to the **access list**.

<robo-wiki-video autoplay loop controls :videos="[{src: 'https://crustipfs.art/ipfs/QmV1gkwtcXsWv54ov9tuXfcHg7nqs1foM8cRwts4sqnqtX', type:'mp4'}]" />

1. Open extension and click on the icon near the account name. It will copy the account address.
Now, you need to add your `controller` account to the **access list**.

<robo-wiki-video autoplay loop controls :videos="[{src: 'https://ipfs.living/ipfs/QmbjtjYBadWY7bxbnN7UkH8vUyG7dYxDRzMGQiReWgdRiz', type:'mp4'}]" />

2. Paste this address to the `Robonomics parachain address` field in the **Manage access** part. Give it a name and press the `+` button.
1. Open the extension and click on the icon next to the account name. It will copy the account address.

3. Repeat steps 1 and 2 for `sub_owner` account.
2. Paste this address into the `Polkadot address` field in the **USERS IN SUBSCRIPTION** section and click the `+` button.

4. Press `Save`. Enter your `sub_owner` password in the popup window and wait until the activation process is completed.
3. Enter the password for your `owner` account in the popup window, then wait for the activation process to be completed.

0 comments on commit 49c56f9

Please sign in to comment.