NEEOInc / neeo-sdk

NEEO Brain SDK
https://neeoinc.github.io/neeo-sdk/
MIT License
48 stars 17 forks source link

WARNING: no input commands defined! #161

Closed nklerk closed 5 years ago

nklerk commented 5 years ago

I'm working with the #NEXT branch now, as you've said in the just closed "issue" the SDK will warn when no INPUTS are defined.

This is not a big deal but i'm currently working on a HDMI matrix hub IP driver. The driver is a dynamic driver and buttons (especially the input buttons) are assigned dynamically. this means that the initial offered driver state does't have any input's and will return a warning.

WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING: no input commands defined! Your device might not work as desired, check the docs deviceBuilder.ts:192

Is there anyway this check can be done after executing the dynamic driver assignment? that would make more sense i believe.

nklerk commented 5 years ago

P.S. the driver itself is working great, its just cosmetics and probably endusers that will be scared the shit out of them with the many WARNINGS!'s roflol.

pfiaux commented 5 years ago

Interesting, you're right if it's the exported driver stub, not the dynamic discovered ones the validation doesn't really apply.

How do you define the exported driver (the one with enableDynamicDeviceBuilder) do you set the type to HDMISWITCH? If you don't set the type does it still work but without the warning?

nklerk commented 5 years ago

I did set the device type. I’ll test it without and provide it dynamically.

nklerk commented 5 years ago

The warnign is gone now. I've removed the device type from the driver and supplie it during the dynamic part. Thanks for the fast reply.

pfiaux commented 5 years ago

Reopen if you find some other issues related to this.

I'm not sure the icon will be set correctly in the search without a type. If that's the case it might be better to change the SDK to allow the type but not print the warning if enableDynamicDeviceBuilder is true.