Skip to content

feature: verify device mapping using manufacturer query api#1543

Merged
beesaferoot merged 5 commits into
mainfrom
feat/device-info-verification
Jul 9, 2026
Merged

feature: verify device mapping using manufacturer query api#1543
beesaferoot merged 5 commits into
mainfrom
feat/device-info-verification

Conversation

@beesaferoot

Copy link
Copy Markdown
Contributor

IManufacturerDeviceInfo interface is added to compose a Manufacturer class with device info retrieval logic

Brief summary of the change made

Are there any other side effects of this change that we should be aware of?

Describe how you tested your changes?

Pull Request checklist

Please confirm you have completed any of the necessary steps below.

  • Meaningful Pull Request title and description
  • Changes tested as described above
  • Added appropriate documentation for the change.
  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

@dmohns

dmohns commented Jul 2, 2026

Copy link
Copy Markdown
Member

I'm not sure I like the UX here (or, I don't understand fully understand the use case). Right now, we are simply adding a button. It's not really clear to me, under which circumstances a user would ever click that.

What I can imagine is we are looking for some way to confirm we can actually control a given device from MPM. But if this is the case I would consider a different approach:

  • On the device model we could add two fields liked mapped_with_manufacturer_api (or similar) and last_checked. - We could then nicely add these information to a Device Detail overview. Also, Device Overview and search filter + export
  • When new devices are added, we immediately run the check.
  • On Device Details view, the button you added would run the check as above.

In terms of API design another questions... We have a couple of feature requests regarding ad-hoc device management, for example

I imagine there will be some overlap with the work you are doing here. Have you considered if there will be some synergy between the two works streams?

@beesaferoot
beesaferoot requested a review from dmohns July 2, 2026 09:26
@beesaferoot

Copy link
Copy Markdown
Contributor Author

I'm not sure I like the UX here (or, I don't understand fully understand the use case). Right now, we are simply adding a button. It's not really clear to me, under which circumstances a user would ever click that.

What I can imagine is we are looking for some way to confirm we can actually control a given device from MPM. But if this is the case I would consider a different approach:

  • On the device model we could add two fields liked mapped_with_manufacturer_api (or similar) and last_checked. - We could then nicely add these information to a Device Detail overview. Also, Device Overview and search filter + export
  • When new devices are added, we immediately run the check.
  • On Device Details view, the button you added would run the check as above.

In terms of API design another questions... We have a couple of feature requests regarding ad-hoc device management, for example

I imagine there will be some overlap with the work you are doing here. Have you considered if there will be some synergy between the two works streams?

You make good points; I will be looking further into it with your feedbacks. Thanks

@beesaferoot
beesaferoot force-pushed the feat/device-info-verification branch 2 times, most recently from 6ed1bbc to a3bc83c Compare July 7, 2026 15:52
@beesaferoot
beesaferoot force-pushed the feat/device-info-verification branch from e8eb7c4 to 02b3dc6 Compare July 9, 2026 08:22

@dmohns dmohns left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look very good 👍 Only slight concern I have is about naming

  • There is some in consistency, sometime you are referring to it as ManufacturerMapping sometimes as DeviceMapping. Could we decide on on terminology and stick with it?
  • I personally find the word "mapping" not specific enough, it's more of an implementation detail than descriptive (i.e. some manufacturer say a device is mapped to an API key but other manufacturer might totally avoid this naming). I'm not really sure what would be better 🫣 Sometime along the lines of device management? Or Remote device management? Any ideas?

@beesaferoot

Copy link
Copy Markdown
Contributor Author

This look very good 👍 Only slight concern I have is about naming

  • There is some in consistency, sometime you are referring to it as ManufacturerMapping sometimes as DeviceMapping. Could we decide on on terminology and stick with it?
  • I personally find the word "mapping" not specific enough, it's more of an implementation detail than descriptive (i.e. some manufacturer say a device is mapped to an API key but other manufacturer might totally avoid this naming). I'm not really sure what would be better 🫣 Sometime along the lines of device management? Or Remote device management? Any ideas?

Device mapping here only represents the verification on the manufacturer level. Device Management was the intended name for the abstraction that includes work from #490, #743 but left it at mapping on this PR.

I could make it uniform by using "Device management" for the section header already.

@dmohns

dmohns commented Jul 9, 2026

Copy link
Copy Markdown
Member

Device mapping here only represents the verification on the manufacturer level. Device Management was the intended name for the abstraction that includes work from #490, #743 but left it at mapping on this PR.

I could make it uniform by using "Device management" for the section header already.

Yeah, I understand what you mean with "Device Management" and it makes sense. This can be expanded later.

My point is, what we are currently calling "mapping" is really checking if we have permissions to call the management API (or remote management permission). Mapping generally refers to combine or link to entities, which doesn't make sense from our point of view (It does make sense from the manufacturer point of view, they are mapping an API key to a device, which gives it permissions).

But maybe I'm being way too nit-picky here 🫣

@beesaferoot

beesaferoot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Device mapping here only represents the verification on the manufacturer level. Device Management was the intended name for the abstraction that includes work from #490, #743 but left it at mapping on this PR.
I could make it uniform by using "Device management" for the section header already.

Yeah, I understand what you mean with "Device Management" and it makes sense. This can be expanded later.

My point is, what we are currently calling "mapping" is really checking if we have permissions to call the management API (or remote management permission). Mapping generally refers to combine or link to entities, which doesn't make sense from our point of view (It does make sense from the manufacturer point of view, they are mapping an API key to a device, which gives it permissions).

But maybe I'm being way too nit-picky here 🫣

For me Mapping here simply implies that the device unit exists on the Manufacturer platform which then allows for operations on that unit i.e unlocking, credit unit, device control etc.

It doesn't care about the means that we verify this on the manufacturer side. If the unit gets removed on the Manufacturer side, then we can correctly flag this as such using the button.

We can go with this for now and refactor to a better name if a better suggestion surfaces.

@beesaferoot
beesaferoot merged commit b912d30 into main Jul 9, 2026
17 checks passed
@beesaferoot
beesaferoot deleted the feat/device-info-verification branch July 9, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants