This thread (shortly) will contain a link to the next ''work in progress' beta 3e release of MQTT beta3e which will later become, in another thread, a fully supported beta 4 release which will be the last beta before final release and inclusion in Hubitat Package Manager.
Reserved
Please don't post here unless you are running beta 3e latest release which is currently at version pre 23 and have some feedback which is very welcomed, issues, bugs, features whatever. I can't help here with newbie to MQTT users and issues. To use this release I expect you to be be quite familiar with MQTT.
I do appreciate updated documentation is not yet published for this release.
Hi Kevin,
Thanks for your work on this amazing App and Drivers for Hubitat Elevation. Your work is much appreciated and I will try my best to provide feedback as we move into beta3e.
I have now updated to beta3e App and both drivers. Since I don't use Home Assistant currently, I have obviously not installed automations.yaml.
It took me a little longer to reply (as I mentioned in my previous email that I would report "shortly"), because things got a little more complicated then I expected. So, in order to make sure I did not have lingering data from previous version complicating my understanding, I took the time to perform the following steps:
a) Replaced the raw text for your MQTT App and Drivers;
b) Removed the Child Device;
c) Rebooted my C-7 Hub;
d) Removed the automatically created device your previous version of App/Driver had created from MQTT data I published with the Indigo MQTT Connector Plugin (created by Joe aka FlyingDiver);
e) After the C-7 started, I took the time to re-configure every button of your App to make sure new data was recorded (I basically recreated everything from scratch, making the same choices for each button and sub-button of your App.
f) Verified both the MQTT and the automatically created device HE devices where recreated;
g) Manually recreated corresponding devices in Indigo, by using Jon's (@autolog both here in this forum as well as on Indigo's Forum) Indigo Hubitat Plugin;
h) tried switching on/off switching devices from both Indigo and the HE Dashboard;
i) tried switching on/off/setting brightness level from both Indigo and the HE Dashboard;
My findings are the following:
- It seems the on/off capability became disjointed from HE, as it is not reflected to mosquitto as verified in MQTT Explorer;
- It seems the brightness capability also became disjointed from HE, as it is also not reflected in mosquito as verified in MQTT Explorer;
Therefore, with the new version:
- For native HE devices, I can not change things from Indigo nor from HE and have it reflected in the other platform anymore, something that was working perfectly in the previous beta3d of your App/Driver.
- For native Indigo devices which your App automatically created as virtual devices in HE, I still cannot change things (turn on/off/set brightness level) from HE and have it reflected in Indigo, something that WAS NOT working in the previous version.
- For native Indigo devices which your App automatically created as virtual devices in HE, I cannot change things (turn on/off/set brightness level) from Indigo and have it reflected in HE, something that WAS working before.
So, for me, the new version appear to have made things worse, butI suppose it's probably just a matter of reviewing and correcting the Homie Schema for the Indigo Devices I'm publishing in Mosquitto, so you app can "rejoin" settings appropriately.
I know it must be quite late there, so I will let you rest and will talk to you latter. Please review my Homie schema for topic "macpro" on my previous message on the older thread on this forum, as I believe you may very easily catch what I need to change on my published topics and sub-topics. I'm currently using the simplified Homie schema on your App, but I can switch that to complete schema if you find necessary with no problem, as I can very easily re-enable missing sub-topics on Joe's (FlyingDiver) MQTT plugin In Indigo.
Now, if I were you I would go to bed...
Cesar
@cesarvog let's move this to a chat as it's about Indigo. I have sent you a PM and a fix .. I hope in pre24
Ok, will do.
But, before I do that, for the sake of making sure we are on the same page, and to answer some of your last questions, let's take a step back first, so I can clarify the various components of my intended scenario:
a) YOUR MQTT App/Driver, which is capable of publishing HE device data to an MQTT broker. It does so, by creating a Homie topic, then a hubitatc7 (the name I gave my Hubitat C-7 during it's initial setup) sub-topic, then a sub-topic for each HE device it finds and I choose to publish on your App.
b) Jon's (@autolog) Indigo Hubitat Bridge Plugin, which is capable of subscribing to the afore mentioned topics/sub-topics, then allow's me to create proxy devices in Indigo's device interface, allowing me to set devices states like on/off/brightnessLevel/others, depending on device type. For my two proof of concept devices, I'm currently limited to on/off for one (switch, or outlet) and on/off/brightnessLevel for the other (dimmer, or light).
c) Joe's (@FlyingDiver) MQTT Connector Indigo Plugin, which is capable of publishing topics/sub-topics on an MQTT Broker. I have manually configured it to publish under homie/macpro, where it creates a sub-topic for each device I'm willing to publish using the Homie schema, which took me quite a long time to figure out, by the way... So, back in you MQTT App, I configure the Discovery Into HE > Discovery Protocols > homie button > homie device topic name to "macpro" (without the quotes).
Ok, I'm moving this into the chat now.
So has the link for Beta3e been posted and I missed it? As this thread is about a week old. I'm about to jump into "importing" power consumption data into my HE (that already exists in MQTT topics), and this seems like the best of the 3 MQTT options for my use-case, reading the bottom of the MQTT app beta3d thread.
I'm fine providing beta feedback as a software developer, but as I'm just about to load this, and start with the config around my topics tree (which I control), and parsing the incoming data, as well as doing HE RM rules based on power events. - I'm a tad unclear if I should start with the 3d that's available in GitHub, ask for a private link to the 3e beta, or just wait for the beta 3e link on this thread.
Don't want to rush or push - but would rather start with the proper bits, versus just getting started and having to upgrade in a week.. Perfectly acceptable is beta 3d is the proper place to start, and I should have all the bits I need to start with that.
sounds like a plan.. I'll send it tomorrow - I had a sudden revival in people implementing homie incoming discovery and that revealed a couple of better ways to do things...
K
Hey Kevin,
I have some feedback on the Home Assistant side of things. In the logs there are errors about the MQTT messages received from Hubitat using deprecated options:
ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'name': 'Master Bedroom Fan', 'availability_topic': 'homie/hubapp/$state', 'payload_available': 'ready', 'payload_not_available': 'init', 'unique_id': 'Hubitat-MQTT:_master-bedroom-fan', 'state_topic': 'homie/hubapp/master-bedroom-fan/onoff', 'command_topic': 'homie/hubapp/master-bedroom-fan/onoff/set', 'payload_on': 'true', 'payload_off': 'false', 'value_template': '{{ value }}', 'on_command_type': 'first', 'brightness_state_topic': 'homie/hubapp/master-bedroom-fan/dim', 'brightness_command_topic': 'homie/hubapp/master-bedroom-fan/dim/set', 'brightness_value_template': '{{ value }}', 'brightness_scale': 100, 'device': {'identifiers': 'HE_445', 'name': 'Master Bedroom Fan', 'sw_version': 'pre 21 beta 3e', 'model': 'hubapp', 'manufacturer': 'Hubitat'}, 'platform': 'mqtt'},)
Traceback (most recent call last):
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/helpers/config_validation.py", line 815, in validator
raise vol.Invalid(warning % arguments)
voluptuous.error.Invalid: The 'value_template' option has been removed, please remove it from your configuration
I have a handful of similar errors, I can paste more if that seems helpful.
Thank you.
Which version of 3e is it ? The latest is pre28 but as I posted that just yesterday I suspect it’s pre27. Regardless pre28 has no changes in this area.
Are you using statestream discovery or HA Discovery? I would recommend the latter and the HA MQTT Discovery Stream matching integration as then you don’t need any matching automations loaded in HA. That error message I think points to incoming to HA using HA MQTT Discovery.
I’ll take a look…
It looks like I'm a few behind, I'll update and see if the issue remains. I'm currently on 3e pre21.
I'm using HA Discovery, I don't do any discovery into Hubitat from Home Assistant. So I don't have statestream setup (I thought that was only necessary if I was doing Home Assistant into Hubitat).
Updated to pre28, I see this that seems relevant during startup (after a reboot):
MQTT: Unknown property value supportedFanSpeeds
Strange. It looks like now I no longer have any "light.*" devices in Home Assistant. So any dimmers, or things like colored bulbs don't show up in Home Assistant after updating to pre28.
I'll delete the MQTT Child Device Driver, and the app, and restart HE. Recreate the app, restart HE again, and see if things come back...
I'm still not seeing dimmable light devices. Here's a log snippet from Home Assistant:
2022-03-06 19:20:09 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'name': 'Porch Bulb East', 'availability_topic': 'homie/hubapp/$state', 'payload_available': 'ready', 'payload_not_available': 'init', 'unique_id': 'Hubitat-MQTT:_porch-bulb-east', 'state_topic': 'homie/hubapp/porch-bulb-east/onoff', 'command_topic': 'homie/hubapp/porch-bulb-east/onoff/set', 'payload_on': 'true', 'payload_off': 'false', 'value_template': '{{ value }}', 'on_command_type': 'first', 'brightness_state_topic': 'homie/hubapp/porch-bulb-east/dim', 'brightness_command_topic': 'homie/hubapp/porch-bulb-east/dim/set', 'brightness_value_template': '{{ value }}', 'brightness_scale': 100, 'color_temp_state_topic': 'homie/hubapp/porch-bulb-east/color-temperature/temp', 'color_temp_command_topic': 'homie/hubapp/porch-bulb-east/color-temperature/set', 'color_temp_value_template': '{{ value | round(0) }}', 'hs_state_topic': 'homie/hubapp/porch-bulb-east/color', 'hs_command_topic': 'homie/hubapp/porch-bulb-east/color/set', 'hs_value_template': "{{value.split(',')[0]}},{{value.split(',')[1]}}", 'device': {'identifiers': 'HE_1079', 'name': 'Porch Bulb East', 'sw_version': 'pre i28 beta 3e', 'model': 'hubapp', 'manufacturer': 'Hubitat'}, 'platform': 'mqtt'},)
Traceback (most recent call last):
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/helpers/config_validation.py", line 815, in validator
raise vol.Invalid(warning % arguments)
voluptuous.error.Invalid: The 'value_template' option has been removed, please remove it from your configuration
This is similar, but rather than a color bulb, it's a dimmer switch:
2022-03-06 19:24:43 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'name': 'Kitchen Sink Light', 'availability_topic': 'homie/hubapp/$state', 'payload_available': 'ready', 'payload_not_available': 'init', 'unique_id': 'Hubitat-MQTT:_kitchen-sink-light', 'state_topic': 'homie/hubapp/kitchen-sink-light/onoff', 'command_topic': 'homie/hubapp/kitchen-sink-light/onoff/set', 'payload_on': 'true', 'payload_off': 'false', 'value_template': '{{ value }}', 'on_command_type': 'first', 'brightness_state_topic': 'homie/hubapp/kitchen-sink-light/dim', 'brightness_command_topic': 'homie/hubapp/kitchen-sink-light/dim/set', 'brightness_value_template': '{{ value }}', 'brightness_scale': 100, 'device': {'identifiers': 'HE_427', 'name': 'Kitchen Sink Light', 'sw_version': 'pre i28 beta 3e', 'model': 'hubapp', 'manufacturer': 'Hubitat'}, 'platform': 'mqtt'},)
Traceback (most recent call last):
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/helpers/config_validation.py", line 815, in validator
raise vol.Invalid(warning % arguments)
voluptuous.error.Invalid: The 'value_template' option has been removed, please remove it from your configuration
It's hard catching up from so many versions back but we'll try.
Can you completely delete your homeassistant discovery topic in MQTT (the one HA is importing from for discovery) and then re-run the MQTT app again. This will re-populate it again. Are all your exported devices now showing correctly in that topic ?
Does HA not discover any still ? HA should at least have removed the previous now non functional ones. If there are no devices discovered by HA please double check that they exist now on MQTT and that the HE Home Assistant export topic matches the MQTT Discovery import topic configured in HA and that HA is connected to the broker.
I will look at the issue re value-template - do you have a link to the information in HA documentation re. it's deprecation and what it should now be replaced with ?
You don't have value-template
settings for MQTT devices in your configuration.yaml do you ?
It looks like it has moved from 'will be' deprecated to 'is now' and I assume you are running the current 2022.3.3 version of HA ?
I will give this a try against the current version of HA too, but it will be tomorrow unfortunately
Can we continue this by PM - to avoid boring the HE Community - I'll post back here when resolved
I deleted the entire discovery topic (homeassistant in my case) and re-ran the MQTT app in Hubitat. It did repopulate, when I pulled up Home Assistant, the same devices were there and the same devices (the light.* devices) are still missing. So it seems to be discovering most of my exported devices, but possibly is getting hung up on a particular one and stops populating after that?
I double checked configuration.yaml and don't have any value-template settings for any devices. I checked all of my yaml files and don't have any value-template settings in any yaml file in my Home Assistant configuration directory.
I couldn't find any specific documentation regarding what to use in place of the deprecated option, but I did see some forum posts using state_value_template now. I don't know if that's the new way forward, or if that's specific to certain devices/configurations.
PM sounds good to me! Appreciate the help!
In the notes on Github under Installation Notes, it says "It may seem to hang don't worry." How long should I wait? I am getting this in my logs:
But this progress indicator has been spinning for 10+ minutes and the app is not showing
Just checking that you are using beta 3e which is the pre release version Stephen and the topic of this thread ? The 'it seems to hang - don't worry' is not a known issue with 3e and from your log that looks like 3d