NimmLor / esp8266-fastled-iot-webserver

A universal software for all my LED projects, with many awesome features
https://www.thingiverse.com/surrbradl08/designs
GNU General Public License v3.0
366 stars 94 forks source link

Home assistant mqtt light not discovery but mqtt explore show message #214

Closed 1975felix closed 2 years ago

1975felix commented 2 years ago

In mqtt explore i see the massage but in home assistant get this error:

Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'name': 'Hexaleafs', 'device': {'identifiers': 'Hexaleaf_lamp', 'manufacturer': 'WD DIY', 'model': '0.1', 'name': 'DIY Nanoleafs'}, 'state_topic': 'homeassistant/light/hexaleaf', 'command_topic': 'homeassistant/light/hexaleaf/set', 'brightness': True, 'rgb': True, 'effect': True, 'unique_id': 'hexaleaf_lamp', 'schema': 'json', 'effect_list': ['Pride', 'Color Waves', 'Horizontal Rainbow', 'Solid Rainbow', 'Confetti', 'Sinelon', 'Beat', 'Juggle', 'Fire', 'Water', 'Strobe', 'Rainbow Strobe', 'Smooth Rainbow Strobe', 'Rainbow Twinkles', 'Snow Twinkles', 'Cloud Twinkles', 'Incandescent Twinkles', 'Retro C9 Twinkles', 'Red & White Twinkles', 'Blue & White Twinkles', 'Red, Green & White Twinkles', 'Fairy Light Twinkles', 'Snow 2 Twinkles', 'Holly Twinkles', 'Ice Twinkles', None], 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 198, in async_discover config = schema(discovery_payload) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 218, in call return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 337, in _exec v = func(v) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) File "/usr/src/homeassistant/homeassistant/components/mqtt/light/init.py", line 38, in validate_mqtt_light_discovery return schemasvalue[CONF_SCHEMA] File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 218, in call return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 337, in _exec v = func(v) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: string value is None @ data['effect_list'][25]

bb-Ricardo commented 2 years ago

Hi, it seems like the last element in the effect list is None.

Can you compile the code with DEBUG set to 1 and poat the serial output here? That would help a lot.

Thank you.

1975felix commented 2 years ago

Thant for answare, i'm look for led Debug set but no line in sketch, becouse i have a old version. Now i update to new one enable led debug but now wemos reboot continuously after few second...

WarDrake commented 2 years ago

Old versions of the script would not allow a full MQTT configuration message to be generated while visualizations were enabled. this is solved in newer versions, if you wish to continue using the old one, disable audio visualizations.

xbavnu commented 2 years ago

Old versions of the script would not allow a full MQTT configuration message to be generated while visualizations were enabled. this is solved in newer versions, if you wish to continue using the old one, disable audio visualizations.

I just recently upgraded to the most recent version (Version 4.5, Version Date "2020-02-14") and am in the process of setting up home assistant. But I am not able to "discover" the Nanoleafs. In the MQTT log I can see, that the nanoleafs are connecting to the Mosquitto Broker:

1645042607: New client connected from 192.168.178.25 as Nanoleaf (p2, c1, k10, u'mqtt-user'). 1645042607: Socket error on client Nanoleaf, disconnecting. (according to my research the socket error seems to be normal?)

But I can not find any new devices or entities for the Nanoleafs in home assistant. What am I doing wrong? Do I still need to make some changes when I want to use both MQTT and have audio visualizations enabled? Or do I have to somehow manually add the nanoleafs to HA?

WarDrake commented 2 years ago

That error is not normal, get a log of the nanoleafs side as they connect and post that, create a new issue for it too please.