Sian-Lee-SA / Home-Assistant-Switch-Manager

Switch manager is a centralised component to handle button pushes for your wireless switches. This includes anything passed through the event bus. The component relies on switch blueprints which is easily made to allow GUI configuration of your switches and their button pushes. This helps remove clutter from the automations.
Other
239 stars 85 forks source link

Can't discover zigbee2mqtt switch #40

Closed Mr-Groch closed 1 year ago

Mr-Groch commented 1 year ago

Hi, I'm trying to add new switch (based on new blueprint from #39), but auto discovery doesn't work (after I press discovery button only "Press a button on your switch" appears and nothing is happening after I'm pressing any button). Also when I enter mqtt topic manually - buttons on switch picture aren't highlighted when I press buttons on my remote...

In HA logs there are lot of this:

2023-01-03 10:09:20.340 ERROR (MainThread) [frontend.js.latest.202212131] https://hass.groch.cloud/switch_manager_panel.js?0.3.0:15304:6654 Uncaught TypeError: this._subscribed is not a function

Sian-Lee-SA commented 1 year ago

This is a strange new issue that I can't seem to replicate. Can only think of trying to do a hard refresh and clear cache, also try the js version in the repo page and not the released version

Sian-Lee-SA commented 1 year ago

Might also be worth trying a browser known to work like chrome if not using chrome yourself then tell me the browser you're currently using. I'm not sure of the full support of async across browsers

Mr-Groch commented 1 year ago

I'm using Chrome, latest version. I've cleared cache and force reload HA page using dev tools, and it helped! It is working for now, but maybe I will leave this issue open, maybe this issue will come back in some circumstances...

Sian-Lee-SA commented 1 year ago

Home Assistant makes use of heavy caching which can cause problems sometimes but once you have a working refreshed version then generally its fine from then on.

Sian-Lee-SA commented 1 year ago

I will close this issue for now (house keeping) but re-open if it becomes and issue again

Sian-Lee-SA commented 1 year ago

Technically this is not a Switch Manager problem but a browser and Home Assistant issue that I have no control over. Considering the code worked after a clean refresh then the repo's code is working correctly.

I have also took measures to minimise this effect when updating Switch Manager by appending the new version to the js url as to trick the browser into thinking it's a different file. Not much more can be done

genehand commented 8 months ago

Hey I just found this integration and running into something similar. Using zigbee2mqtt, I added a Hue Dimmer and that's working great. I then went to move over some Inovelli VZM31-SN's but they're not coming up in auto-discovery, and also don't work when adding the mqtt topic directly. I can see the events coming through when subscribing to the mqtt topic, and have been using these for a while with regular automations & Node red.

Everything is up to date on HA 2024.1.6, tried multiple browsers and cleared the cache. Let me know what other info would be helpful, happy to help troubleshoot. Thx!

Sian-Lee-SA commented 8 months ago

I can only suggest looking at the blueprint and values that comes through in mqtt and check to see if they're valid. I don't own those devices nor am I the author but finding the issue in this is normally a missmatch in data especially considering a differnt switch is working fine.