Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add support for 'undefined' modelID device? #844

Closed
FranciscoTrigo opened this issue Jan 12, 2019 · 11 comments
Closed

How to add support for 'undefined' modelID device? #844

FranciscoTrigo opened this issue Jan 12, 2019 · 11 comments
Labels
stale Stale issues

Comments

@FranciscoTrigo
Copy link

FranciscoTrigo commented Jan 12, 2019

I got some light bulbs from Sylvania (these ones)

I have tried pairing all of the 4 bulbs that I have many times, but I always get a "Device with modelID 'undefined' is not supported" message in the log, I reseted them many times and also put them just besides the raspberry pi.
There are some other Sylvania bulbs that are supported so I guess this must be really similar?

Anyway, looking around the database.db file, I found an entry with an modelID of "A19 W 10 year", so I tried adding support for that, and it didnt work.

Also, an entity with the name of "light.0xf0d1b80000037f32_light" was autodiscovered in HA, but it doesnt do anything. This was before trying to add support using the "A19 W 10 year" modelID

@henriz
Copy link

henriz commented Jan 12, 2019

How did you try to add it?

Most important file here is
node_modules/zigbee-shepherd-converters/devices.js

For instance, I added support for NXP devices by adding:

{
    zigbeeModel: ['ZLL-ExtendedColo'],
    model: 'ZLL-ExtendedColo',
    vendor: 'NXP',
    description: 'NXP extended color light',
    supports: generic.light_onoff_brightness_colortemp_colorxy.supports,
    fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee,
    toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee,
},

I suspect you're using the wrong modelID.

It also might be you have to do some work on HA side. For example, to get the above device in Domoticz, I also had to add it to the zigbee2mqtt-domoticz plugin.

@henriz
Copy link

henriz commented Jan 12, 2019

Addendum:

what might help, I think the logging from zigbee2mqtt when a device is unknown, is incomplete.

To find out WHAT device it was talking about, edit
./lib/extension/deviceReceive.js

find the section where it sais:

 if (!mappedDevice) {
            logger.warn(`Device with modelID '${device.modelId}' is not supported.`);

and add the following line:

logger.warn(Device address '${device.ieeeAddr}');

So that the full code reads:

 if (!mappedDevice) {
            logger.warn(`Device with modelID '${device.modelId}' is not supported.`);
           logger.warn(`device address '${device.ieeeAddr}'`);
            logger.warn(`Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html`);
            return;
        }

Now when you get the 'device not supported' message, it will also tell you the address of the device.

Once you have that, open ./data/database.db, and look for the device address. It might be in there several times.

One of these lines will also contain the modelID you have to use.

Use this to add the device, and then remove all instances of the device with the address from ./data/database.db ./data/configuration.yaml ./data/state.json (if any), and restart.

@ryanbeaton
Copy link

‘undefined’ modelid has been happening to a few devices recently. Probably a bug introduced but I am on an old version for stability so can not investigate. If you search the issues you will find more.

@FranciscoTrigo
Copy link
Author

@henriz that worked! For that one bulb. The other bulbs arent working yet.

{
    zigbeeModel: ['A19 W 10 year'],
    model: 'A19-Dimmable',
    vendor: 'Sylvania',
    description: 'Dimmable bulb,
    supports: generic.light_onoff_brightness_colortemp_colorxy.supports,
    fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee,
    toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee,
}

Its how I added it, I had the modelID right (A19 W 10 year), but it worked after I deleted it from all of the files you mentioned.

@henriz
Copy link

henriz commented Jan 12, 2019

So you have multiple bulbs of this type, and one of them is now working, but the rest aren't?

Are they reset so they are trying to pair? do you see ANY messages about these lights?

The reason why delting worked; your bulb WAS paired, but incorrectly. By removing it from those files, it was unpaired (from zigbee2mqtt standpoint) and re-paired, and since it now knew the modelI, it paired correctly.

@8xiom
Copy link

8xiom commented Jan 12, 2019

‘undefined’ modelid has been happening to a few devices recently. Probably a bug introduced but I am on an old version for stability so can not investigate. If you search the issues you will find more.

In fact that happened to me, too (w/Aqara Cube). It turned out that the reason was an incomplete pairing process. After trying 5-6 times again and again it worked for me, no changes necessary. Of course it‘s worth mentioning that the cube is on the list of supported devices.

@henriz
Copy link

henriz commented Jan 12, 2019

I only got it on devices that were not supported. But from those, on all of them.

@FranciscoTrigo
Copy link
Author

Yes, I have 4 of these bulbs. I have reseted and tried to pair them many times(they blink twice when they enter pairing mode, and blink again once paired). I'm getting the undefined modelID with them too.

@FranciscoTrigo
Copy link
Author

Hello again,
So recently I had to reinstall zigbee2mqtt because it just died for some reason.
Im trying to add support for this lightbulb again, im doing the same as I did last time(and as i was told in here) but it just doesnt seem to work.
It is auto discovered by Hassio, and it is in database.db and configuration.yaml , but when I try to change to change the state it says that that it cant find device. I already tried pairing it again but still get the same problem.

Here is the log: pastebin

Also, for some reason one of my temperature sensors give a weird zigbee message full of nulls (at the bottom of the log).
Both things started at the same time.

@Koenkk
Copy link
Owner

Koenkk commented Jan 27, 2019

@YamiFrankc

  • Can you post your database.db
  • The Xiaomi temperature sensors report these nulls, nothing to worry about, this is normal.

@stale
Copy link

stale bot commented Mar 28, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issues label Mar 28, 2019
@stale stale bot closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues
Projects
None yet
Development

No branches or pull requests

5 participants