[Beta] MQTT beta 3d (released 5th July)

@autologI I was looking in the next beta3e and I see that $nodes is published when complete homie3 topics are turned off so that might suit you ? I can see it's useful. I don't remember adding that so I would expect it to be published currently but my memory is questionable nowadays

1 Like

@kevin Thanks for the update. Is there an ETA for beta3E? :slightly_smiling_face:

'Soon' :grin:

But had a month or two break and now back looking at it - there's no serious bugs in 3d so 3e is just extra bits and a fix for the rogue child device creation on initial install

1 Like

:partying_face: Beta 3e is about to land hopefully this weekend and so this is the last call for any bugs or feature requests or any patches that you may have that I haven't confirmed as being merged..... All Github reported merges have been done.

If you have a pull request ask for the latest code to merge against.

Beta 3e should be the last beta, assuming no bugs are found, and then it will become the release version.

There will still be some areas like homie discovery that will be expanded over time

1 Like

@woobins @kevin

Just curious if you ever got this sorted out. I'm looking to do something similar. Would like to use the Ecobee state changes (read locally by HA and "pushed" into HE) to trigger HE rules.

I have a new device driver called 'Remote Thermostat' that I think accomplishes this. It has no 'smarts' so is purely a virtual device for a remote MQTT thermostat managed by some other controller/device. That's available now should you want ?

There maybe other such remote devices needed where the virtual driver within HE has some smarts and therefore is in conflict with a remote device. Perhaps window shade is the simplest of such an example with it's timed behaviour.

Hi @kevin,

Further to my post number 333 and your reply, re: pressure.

The App doesn't seem to properly support publishing pressure AFAICS.

I have an Aqara Temperature/Humidity/Pressure device which has events like this:

and this is what is shown in MQTT Explorer:
aqara_mqtt_explorer
Note that no pressure is shown.

Details from the device page, Sates:
aqara_states

and pressure units:
aqara_pressure_units

So I have tinkered with the MQTT App by adding the following code after line 4705:

  else if (xType=='pressure'){
    category='pressure'
            if (!atomicState.suppress){
        mqtt.publishMsg (sTopic+'/'+category+'/$datatype',"integer",1,true,atomicState.suppress)
        mqtt.publishMsg (sTopic+'/'+category+'/$unit','mBar',1,true,atomicState.suppress)
        mqtt.publishMsg (sTopic+'/'+category+'/$format','750:1500',1,true,atomicState.suppress)        
            }
            UOM="mBar"
    HAtype="sensor"
  }

The pressure is now showing:
aqara_mqtt_explorer_including_pressure

However, I don't really know what I am doing with the groovy code but thought I would share. :smiley:

Also when I look at the debug log for the MQTT App, I am seeing these warnings in the log -
For my Aeotec MultiSensor 6:
MQTT: Unknown property value ultravioletIndex
MQTT: Unknown property value tamper
MQTT: Unknown property value powerSource

For my Secure SRT321 Thermostat:
MQTT: Unknown property value checkInterval

Some more detail on the Aeotec MultiSensor 6 in case it is usefull:

app:1322021-01-27 14:10:59.687 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_humidity type: humidity / humidity state: 58 multiple: true
app:1322021-01-27 14:10:59.676 debugMQTT: [s] Unknown Category for type firmware reported by device Study Multi-Sensor
app:1322021-01-27 14:10:59.666 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_firmware type: firmware / firmware state: null multiple: true
app:1322021-01-27 14:10:59.654 debugMQTT: [s] Unknown Category for type ultravioletIndex reported by device Study Multi-Sensor
app:1322021-01-27 14:10:59.645 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_ultravioletIndex type: ultravioletIndex / ultravioletIndex state: null multiple: true
app:1322021-01-27 14:10:59.559 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_illuminance type: illuminance / illuminance state: 0 multiple: true
app:1322021-01-27 14:10:59.507 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_motion type: motion / motion state: inactive multiple: true
app:1322021-01-27 14:10:59.496 debugMQTT: [s] Unknown Category for type tamper reported by device Study Multi-Sensor
app:1322021-01-27 14:10:59.487 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_tamper type: tamper / tamper state: clear multiple: true
app:1322021-01-27 14:10:59.475 debugMQTT: [s] Unknown Category for type powerSource reported by device Study Multi-Sensor
app:1322021-01-27 14:10:59.467 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_powerSource type: powerSource / powerSource state: battery multiple: true
app:1322021-01-27 14:10:59.422 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_battery type: battery / battery state: 100 multiple: true
app:1322021-01-27 14:10:59.376 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_temperature type: temperature / temperature state: 18.1 multiple: true
app:1322021-01-27 14:10:59.294 debugMQTT: sensorDevices (synch) called with name:Study Multi-Sensor xName: Study Multi-Sensor_acceleration type: acceleration / acceleration state: inactive multiple: true

and more detail on the SRT321 in case it is useful:

app:1322021-01-27 14:11:00.442 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.438 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_thermostatOperatingState type: thermostatOperatingState / thermostatOperatingState state: heating multiple: true
app:1322021-01-27 14:11:00.422 infoMQTT: [t] Unknown category for type #switch# reported by device Study Thermostat
app:1322021-01-27 14:11:00.416 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.412 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_switch type: switch / switch state: null multiple: true
app:1322021-01-27 14:11:00.388 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.384 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_coolingSetpoint type: coolingSetpoint / coolingSetpoint state: null multiple: true
app:1322021-01-27 14:11:00.347 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.343 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_supportedThermostatFanModes type: supportedThermostatFanModes / supportedThermostatFanModes state: null multiple: true
app:1322021-01-27 14:11:00.308 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.304 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_heatingSetpoint type: heatingSetpoint / heatingSetpoint state: 20.0 multiple: true
app:1322021-01-27 14:11:00.269 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.265 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_thermostatFanMode type: thermostatFanMode / thermostatFanMode state: null multiple: true
app:1322021-01-27 14:11:00.237 infoMQTT: [t] Unknown category for type #checkInterval# reported by device Study Thermostat
app:1322021-01-27 14:11:00.231 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.228 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_checkInterval type: checkInterval / checkInterval state: 600 multiple: true
app:1322021-01-27 14:11:00.192 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.188 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_thermostatSetpoint type: thermostatSetpoint / thermostatSetpoint state: 20.0 multiple: true
app:1322021-01-27 14:11:00.164 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.160 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_supportedThermostatModes type: supportedThermostatModes / supportedThermostatModes state: null multiple: true
app:1322021-01-27 14:11:00.153 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.148 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_schedule type: schedule / schedule state: null multiple: true
app:1322021-01-27 14:11:00.112 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.108 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_battery type: battery / battery state: 62 multiple: true
app:1322021-01-27 14:11:00.072 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.068 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_temperature type: temperature / temperature state: 18.7 multiple: true
app:1322021-01-27 14:11:00.033 infoMQTT: [t] Unknown category for type #batteryLastReplaced# reported by device Study Thermostat
app:1322021-01-27 14:11:00.025 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:11:00.019 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_batteryLastReplaced type: batteryLastReplaced / batteryLastReplaced state: Tue Jan 05 12:52:03 GMT 2021 multiple: true
app:1322021-01-27 14:10:59.972 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:10:59.969 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_thermostatMode type: thermostatMode / thermostatMode state: heat multiple: true
app:1322021-01-27 14:10:59.932 warnMQTT: NB: Study Thermostat attribute_MAP's not yet supported
app:1322021-01-27 14:10:59.928 debugMQTT: thermostatDevices (synch) called with name:Study Thermostat xName: Study Thermostat_temperature type: temperature / temperature state: 18.7 multiple: true

As always, thanks for your help. :grinning:

A lot of these capabilities are just things that the app doesn't support publishing onto MQTT yet like batteryLastReplaced, lastCheckinEpoch and mappings in some thermostat capabilities. Are you enabling these devices using the 'everything' (every capability) dropdown ?

Pressure however is something that should be supported and I'll add that. I had thought it worked TBH but that's maybe in the next beta. You need a bit more code than the few lines above to handle things like /set for the device and $settable, even though it isn't and you have hard coded the pressure units.

1 Like

Hi Kevin, Yes I selected "every capability". I am not saying I need all those things, I was just drawing it your attention. Yes, I realise my code wasn't enough but lack the groovy skills and HE knowledge to do a proper pull request for you. Thanks for adding in pressure. :grinning:

Hey @kevin ...I told you I'd be looking for your help soon!

I've got my ecobee thermostat and Mosquitto properly set up in Home Assistant and have moved on to getting your Hubitat MQTT App set up properly. I've followed installation steps 1 and 2 from the readme, but step three says:

  1. Configure this device to access your existing MQTT broker using the 'Preferences' section on the next screen in the device driver then click 'Done'. You must enter the IP (or URL) e.g. tcp://192.168.1.78:1883 , username / password are only required if your broker needs them. NB include tcp:// at the start of the entry.

I have two MQTT devices in my device list. One is the virtual device I created as part of step 2, the other is a child device created by the MQTT app. Neither of them has any "preferences" that can be set.

What have I missed?

You’ve fallen foul of outdated instructions. Delete both these MQTT child devices (not the driver code) and reboot the hub. Another child device will be automatically created. Now the broker address (in you case HA’s) can be entered within the MQTT app (MQTT Broker option) use any user/password that works.

image

Deleting the two devices and rebooting worked like a charm. I've now got 8 Home Assistant devices detected in the Hubitat app!

I've got two new problems, though. First, my actual ecobee thermostat is not one of them. I'll set that to the side for later. The second problem is that even the devices that were detected don't show their correct states. Take the Ecobee's remote temperature sensor, for example... no temperature value is available.

Also, now that my problems have progressed into the HA portion of the app, I can move to the dedicated MQTT/statestream thread.

Yes please... what do I need to do?

I'll PM you Dylan as this may require beta3e as the discovery mechanism via homie or HA Statestream in your case has to autocreate the correct device. There's possibly a few other things I need to go through with you personally to get you up and running. Are HA lights etc working OK for you ?

beta3e will be out shortly - just working on the 'everything' capability dropdown as it has become broken in next beta

I have nothing else in HA besides the ecobee and it's remote sensor. None of the states/attributes appear to be updating within HE.

I don't really have anything else to add into HA for testing...

Adding ecoBee to HE is not an option due to ‘local’ requirement? Running HA just for ecoBee is quite a commitment.

ecoBee is currently discovered by HE as a virtual thermostat but no attributes are updated? Could you PM me a screenshot of both the fully expanded MQTT broker topics for the thermostat from HA (climate) and also a full screenshot of the virtual thermostat that was auto created in HE

Sending the PM shortly. Actually, getting HA running was pretty painless using my Raspberry Pi, the hass.io image, and bit of help from the community. I'm planning to use the Ecobee and its sensors as the front-end to my HVAC zoning system. I need Home Assistant's local integration (really just hvac_action feedback) with the Ecobee to make sure the zone dampers are triggered reliably. Sending commands to the Ecobee (using the Universal Ecobee Suite App) for setpoint and schedule changes might still be cloud-based, but that seems to work more quickly. A bit of a cobbled together system, but I would rather do it this way than replace my ecobee.

@kevin Is there a way to force a publishing refresh of all measurements to MQTT?

At the moment it seems that I have to wait for a measurement to change before it gets published. This is fine once the receiving client (in my case Indigo) has received the initial values and then the connection is continuous. However, until the initial values are received then it is out-of-sync. This could also occur if there is a break in communication of some sort e.g. updating the HE Hub software.

That would imply that I am publishing the states non retained to the MQTT broker which is not as intended. Let me check but one way to see this is find a topic on MQTT for one of these that originates from HE and then disconnect MQTT Explorer and connect again immediately. If that topic is still listed with a payload then it is correctly published retained and it a problem with the Indigo end

image

It looks like some are but the measurements aren't e.g. :

The only reason the measurements (humidity / temp / pressure) are there is because I forced an update by breathing on the device. :slight_smile:

I will double-check my Indigo code as well.