We can assign a dashboard to multiple customers, including the Public customer.
We can assign a device to multiple customers, including the Public customer.
TB lets us assign a Dashboard to multiple customers (new in 1.4!!)
However, we can't assign a device to multiple customers. This is required to get the dashboards assigned to multiple customers working, ie showing data!
TB lets us declare a Dashboard as public.
But we can't display data from private devices (assigned to specific customer). We have to make all the devices public for this to function properly.
Just like dashboards, devices can be assigned to multiple customers, including Public.
Assign device D1 to Public customer
Assign a dashboard to the customer A
Not able to assign a device to multiple customers, including Public makes the whole multiple customers per dashboard assignment useless...
Example:
Getting weather data or other data in, and assign this to multiple customer dashboards. This simply doesn't work right now, as the public device data is not shown on the customer dashboards.
ThingsBoard 1.4 (e.g. CE 1.4 or PE 1.4):
Database used Postgres (e.g. HSQLDB, Cassandra, Postgres):
Docker version 17.12 (e.g. Docker 17.12 ):
Are you using Docker Swarm or Kubernetes?
Docker Swarm
Link to your project or a code example to reproduce issue:
N/A
Not able to assign a device to multiple customers, including Public makes the whole multiple customers per dashboard assignment useless
I disagree. I use one shared dashboard for all customers. Customers can see their own devices in the dashboard, which is what I expect. Showing other customers' devices would be a serious leakage of information.
With that said, the suggestion above is still an interesting new feature.
I disagree. I use one shared dashboard for all customers. Customers can see their own devices in the dashboard, which is what I expect. Showing other customers' devices would be a serious leakage of information.
Could you elaborate on that? As I don't understand your configuration, or are all the devices also public?
We have shared devices (some are virtual devices) between customers. Customers (tenants) also can make their own dashboards, so I have to be able to assign these shared devices between a series of customers. I simply can't make those devices public, so need the multiple assignment.
And some customers want to make their private dashboard, public. But that doesn't work, because I get "not authorized" errors, as the devices are still assigned to that customer and won't work on public dashboards!
No devices are public in my setup.
Dashboard X is shared by all customers.
Device A, B and C are assigned to customer 1. Device D and E are assigned to customer 2.
When the tenant user views Dashboard X, all devices are visible.
When customer 1 views Dashboard X, devices A, B and C are visible.
When customer 2 views Dashboard X, devices D and E are visible.
When I update the layout or add a new widget to Dashboard X, I can do that in one place and it will affect all customers.
Nice setup :+1:
Unfortunately we want it the other way around: multiple dashboards sharing a single device that is either a public device or a device assigned to these customers.
Hi,
Are there any updates for this issue? I am experiencing the same problem with my use case.
I achieved this by creating a new rule chain which duplicates data to another device called the same name. I added a relation between the two devices and assigned the first device to customer A and the second device to customer B. The rule chain is attached (remove the txt from the end).
Hi, I have the same need.
I tried the pgirgis2sg solution bat I was allowed to build up manually by tenant a new device with the same name of first one: it says error there is another device with the same name.
Then I tried to upload the duplicate rule chain but the platform seems not recognize the
"type": "org.thingsboard.rule.engine.transform.TbDuplicateMsgToRelatedNode",
I cannot find the task types in the availbale ones (Filter, Enrichment, Transform etc)
There is any update about this issue?
The scenario is like this. Within a single customer, there are two different user groups, lets say from different departments or geographical location. Within a customer, few devices are assigned to one user group and second to other user group. But, there are users within customer, lets say, management admin who should have access to all devices. How this can be accomplished? One way is to create different customer groups - customer-geo1, customer-geo2, and customer-all-geo. But, this is not possible at present because device can not be assigned to multiple customers or same user can not be added to multiple customers. Any plans to support this usecase? Its a valid realistic usecase.
There is a new feature that will be released in the Thingsboard 2.3 - Role-Based Access Control. You can implement the requested case (assign multiple devices to multiple customers with different permission levels)
https://thingsboard.io/docs/user-guide/rbac/
I had a look at vparomskiy's link above, but it does not show how to assign a device to more than one customer. Is there another description of how to achieve this.
I seems that one should use a Device Group, and assign a device to that. Then add the Device Group as a source in dashboards etc. but there is a problem with the scope of the groups, as they do not appear to be visible/accessible by different customers...
Hi @pgirgis2sg you mentioned in your comment below that you duplicate data to a device of the same name. I am unable to create a device with the same name, I get an error telling me a device with that name already exists. How do you create two devices with the same name?
My use case is having two customers who can each create their own devices and they may try to create an asset or device with a name that has already been used by the other customer.
Thanks
Chris
I achieved this by creating a new rule chain which duplicates data to another device called the same name. I added a relation between the two devices and assigned the first device to customer A and the second device to customer B. The rule chain is attached (remove the txt from the end).
Hi Chris
Apologies for the delay in responding. As I recall we used an asset with the same name as the device and duplicated data to it. It is a challenge if you have device names being the same. We have many thousands of devices under different customers. We use a unique identifier for each device name such as the imei or internal identifier and always associate the device with an asset and duplicate the data to the asset so the client views the asset not the device.
We apply rule chains to achieve this automatically and have dashboards where the client can edit the name and other attributes.
An alternative method we have done in the past is keep the devices with a unique internal identifier and then expose a server attribute with something like userName where the user can assign a name of their choosing to the device and then that attribute is used in all our dashboards for displaY TO THE USER.
Hope that helps.
regards
Peter
On 15 Jan 2020, at 5:51 am, Chris Moorhouse notifications@github.com wrote:
Hi @pgirgis2sg https://github.com/pgirgis2sg you mentioned in you comment below that you duplicate data to a device of the same name. I am unable to create a device with the same name, I get an error telling me a device with that name already exists. How do you create two devices with the same name?
My use case is having two customers who can each create their own devices and they may try to create an asset or device with a name that has already been used by the other customer.
Thanks
Chris
I achieved this by creating a new rule chain which duplicates data to another device called the same name. I added a relation between the two devices and assigned the first device to customer A and the second device to customer B. The rule chain is attached (remove the txt from the end).
duplicate_to_related_entity.json.txt https://github.com/thingsboard/thingsboard/files/2316517/duplicate_to_related_entity.json.txt
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/thingsboard/thingsboard/issues/669?email_source=notifications&email_token=AG5PIBQQQX7IO5OMUQCBTE3Q5YCUFA5CNFSM4EWNISLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI5WRXA#issuecomment-574318812, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5PIBSOREM5W4QJ6F3WUMDQ5YCUFANCNFSM4EWNISLA.
--
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. If you are not the intended recipient
you are notified that disclosing, copying, distributing or taking any
action in reliance on the contents of this information is strictly
prohibited.
Hi Peter
Thank you very much for the detailed response. I like the idea of using an asset to map to a device. Our IoT gateways all generate unique IDs for sensors so we can use this to create devices in ThingsBoard.
I will look into it this week.
Regards
Chris
Hi Chris Apologies for the delay in responding. As I recall we used an asset with the same name as the device and duplicated data to it. It is a challenge if you have device names being the same. We have many thousands of devices under different customers. We use a unique identifier for each device name such as the imei or internal identifier and always associate the device with an asset and duplicate the data to the asset so the client views the asset not the device. We apply rule chains to achieve this automatically and have dashboards where the client can edit the name and other attributes. An alternative method we have done in the past is keep the devices with a unique internal identifier and then expose a server attribute with something like userName where the user can assign a name of their choosing to the device and then that attribute is used in all our dashboards for displaY TO THE USER. Hope that helps. regards Peter
…
On 15 Jan 2020, at 5:51 am, Chris Moorhouse @.*> wrote: Hi @pgirgis2sg https://github.com/pgirgis2sg you mentioned in you comment below that you duplicate data to a device of the same name. I am unable to create a device with the same name, I get an error telling me a device with that name already exists. How do you create two devices with the same name? My use case is having two customers who can each create their own devices and they may try to create an asset or device with a name that has already been used by the other customer. Thanks Chris I achieved this by creating a new rule chain which duplicates data to another device called the same name. I added a relation between the two devices and assigned the first device to customer A and the second device to customer B. The rule chain is attached (remove the txt from the end). duplicate_to_related_entity.json.txt https://github.com/thingsboard/thingsboard/files/2316517/duplicate_to_related_entity.json.txt — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#669?email_source=notifications&email_token=AG5PIBQQQX7IO5OMUQCBTE3Q5YCUFA5CNFSM4EWNISLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI5WRXA#issuecomment-574318812>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5PIBSOREM5W4QJ6F3WUMDQ5YCUFANCNFSM4EWNISLA.
-- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
Most helpful comment
There is a new feature that will be released in the Thingsboard 2.3 - Role-Based Access Control. You can implement the requested case (assign multiple devices to multiple customers with different permission levels)
https://thingsboard.io/docs/user-guide/rbac/