-
Notifications
You must be signed in to change notification settings - Fork 36
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
DIM-01 New FW not discovered correctly #215
Comments
Nice catch! You're probably right that hardwareId is not picked up. I haven't looked in detail, but I would guess that the hardwareId is written at least in verbose mode if you change the log level. |
How can I get the logfile offline, where is that file stored in HA install? |
The Developing section has a log fetching part. |
I could catch the whole log now from the container, thanks for pointing in the right direction. Think I need to debug the PlejdApi.js a bit more with additional printouts since the hardwareId is not printed.. more fault searching right :) Do I have to alter the container or the image? (I'm pretty new to container id but I guess its teared up and down once the plugin starts from the supervisor right? So best shot is to alter the image or maybe even better add master into addons folder structure to run a local copy of the add-on. |
I don't know any other way than manually installing master, fiddling with the code and letting it compile on the Home Assistant device. Regarding the actual problem - what happens? The entire addon crashing? It could be handled nicer (let one device init fail and still init the rest), but for now it looks like something like this would be printed and the entire addon reset: |
No no it seem to handle it in the initialization, there is no crash but the device isnt added either - so I stuck with this new device that cant be discovered and thus controlled by HA. If its a reall problem more and more people might get this one problem if it is the new FW. Plejd support said that an Plejd app update will bring possibility to update the FW making potential situation critical I guess :) |
Alright, strange. Shout if you want help debugging or adding debug code, or just post a PR when everything is up and running again! |
Ahh sorry sorry, I can now see that the unit turns up in the mqtt discovery. So the only problem is really the device ID (DIM-01) is not correct. |
I have a set of DIM-01s installed in November 2021, all with firmware v0.0.4. They are discovered and work fine (including dimming) but show up cosmetically as model "-unknown-", as described earlier in this issue. They all have hardwareId=14, so I think PlejdApi.js can confidently be updated to treat hardwareId 14 as DIM-01. Here's an extract from the logs showing discovery for one of the devices when running with log verbosity "silly":
I do wonder why dimming does work, given that in PlejdApi.js, "dimmable: false" is set for hardwareId 14, but I'm obviously not complaining. Is it possible that the "dimmable" property is not properly propagated to HA, at least for lights? (A separate issue, if so) |
Thanks for that @timjackson! Regarding dimming: We actually read the "traits" of each device. Since the device identifies itself as dimmable, we set it as dimmable in the code. The dimmable bool in the hardware id list is just a fallback (old devices didn't do this I think). I'll mark this as resolved, please reopen (or create a new issue) if the new release didn't solve the issue. |
Thanks; can confirm my DIM-01s are now discovered correctly with v0.9.1 |
I just bought a new DIM-01 unit and it has (called Plejd support to confirm this) a new FW version 0.0.4 (the old is 3.1.8). The discovery script does not seem to recognize this unit.
Debug print
2021-09-21 10:38:40 INF [plejd-mqtt] Discovered -unknown- (light) named Belysning Stora Sovrum (35 : E096970F8DF5_0)
it does not get included. Support said that there should be no interface changes with the new FW, but its sure is different.
The problems seem to originate in, master/plejd/PlejdApi.js:
` // eslint-disable-next-line class-methods-use-this
_getDeviceType(plejdDevice) {
// Type name is also sometimes available in device.hardware.name
// (maybe only when GWY-01 is present?)
Havent had time to debug further at this point in time. Will try to pull master to look. I'm currently using Current version: 0.8.0-beta.
Best regards,
/Christer
The text was updated successfully, but these errors were encountered: