MQTT Hub/Gateway

@unknown_error Indeed, the device doesn’t have capabilities defined and the MQTT hub can only operate on device capabilities (flowcard triggers & actions are not accessible).

You could try creating a virtual device with capabilities being triggered via flow?

@HarriedeGroot, Yeah, it looks like that’s the only option out of the box. I was curious how people use such devices, because all of them don’t provide any specific capabilities.
I checked the list of all standard capabilities and there’s nothing specific to that except for “button” capability, so now it’s not clear which are expected to be used for generation of “events” from remote dimmers.
All the device drivers are using something like “genOnoff” (“gen” prefix) for flow triggers. Maybe there was something for that in previous versions of Homey API.

PS: see https://github.com/athombv/node-homey-lib/blob/master/assets/capability/capabilities.json

For some reason I get these errors and the hub won’t start up. Everything worked normally for weeks. Can someone help me with this?

@roel_hendr There’s a bug in Homey Core.
As far as I know: Athom (WeeJeWel) already dealt with it and the next Homey release will (probably) contain the fix.

This is all catched by @Jamie (THANKS!) and a temporal solution can be found here:

This worked indeed. Hope the real fix will be available soon. Thx for help!

In latest BETA it is possible to add HA devices to Homey, right?

  1. When will this one be stable?
  2. Can it do the same as this app: https://github.com/rogro82/io.homeassistant?

Wanna know if I should wait until beta is stable or if I should install this app next to the MQTT Hub to be able to build flows in Homey with devices connected directly to HA. Thx!

1 Like

Hi Roel

Re your second question… Is it just a couple of devices you’re wanting to link from HA to Homey and if so are they all switches and lights ? If so I can show you how to do that but it is a manual process for each one.

(HA only implements discovery to get devices into itself, same is true for openHAB)

Or… if it’s many devices and they are more than switches/lights then I would use rogro82’s app.

K

No devices yet. I have a lot of zwave devices on Homey. Thinking about a Zigbee mesh also, but Homey is not that good at it what I understand (correct me if I’m wrong). Wanna use HA as Zigbee controller with all the Zigbee devices I want to add (Aqara, Ikea, etc), but still use Homey to build flows.

When I understand you correctly, I can better use rogro82’s app then.

@roel_hendr

  1. The beta version will become stable if the following issues are addressed:
  • Being able to unsubscribe from topics. Therefore the MQTT Client app2app interface needs to be extended & some sort of ref count needs to implemented at the MQTT Client. For now all topics registered for MQTT Devices or auto discovery will remain subscribed until the client is rebooted.
  • Being able to save MQTT Device settings without the strange timeouts.
  1. Dunno. The MQTT Hub can create devices acting (read/write) on MQTT topics. Additionally it supports auto discovery of devices over MQTT (Homie protocol). Unfortunately auto discovery of HA devices isn’t implemented yet. This e.g. would enable auto discovery of devices available via Zigbee2Mqtt.

AFAIK: The MQTT Devices themselves, once setup, are fully functional.

Hello Harrie,

Thanks for these apps, however I am facing a problem.
I have set up a broker (mosquitto on a raspberry)
I have configured the MQTT Client app v2.2.2
I have the MQTT Hub app v2.1.9
With MQTT explorer I can see the changes of the devices.
In the Hub I receive the message: lampenbank/onoff with value: false
In the MQTT client the log shows: homie/homey/lampenbank/onoff: false

However the status of the device in Homey does not change.

PS: The value in MQTT explores is $settable = true

When you control your light you are setting topic

homie/homey/lampenbank/onoff/set

To true are you , and you see that appear in MQTT Explorer OK ? If using MQTT Explorer to do this use the ‘raw’ option.

Note the /set topic at the end…

K

Hi,

Thanks, this is really a relief.
In explorer I just selected the value I wanted to change without the set added to it.
This makes all the difference. Thank you very much.

Next step is Openhab2.

1 Like

hello all,

I used Mqtt hub for my connection with home assistant.
after a time fighting with the hub and homey all things work,
thanks a lot for this great feature!
this is what I made with home assistant

3 Likes

Very nice!

Can you tell me what hardware/tablet your using? And also which HA addon for your floor plan? How did you create your floor plan images?

Hello @roel_hendr,

i have an iPad Air in the wall, for creating the floorplan I used sweethome 3d, added lights in the floorplan.
in home assistant I used picture elements and the Lovelace in yaml mode.
used the floorplan as picture and have some black overlays made in model in Inkscape then give this an filter for “on” and “off”.
here a little Lovelace.yaml

    cards:
  - type: picture-elements
    image: /local/floorplan.png
    elements:
      - type: image
        tap_action:
         action: toggle
        entity: light.woonkamer
        image: /local/woonkamerov.png
        state_filter:
          "off": opacity(70%)
          "on": opacity(1%)
        style:
          top: 26.6%
          left: 57%
          width: 39%
      - type: image
        tap_action:
          action: toggle
        entity: light.keuken
        image: /local/keukenov.png
        state_filter:
          "off": opacity(70%)
          "on": opacity(1%)
        style:
          top: 59%
          left: 49%
          width: 17.15%
      - type: image
        tap_action:
          action: toggle
        entity: light.bijkeuken
        image: /local/bijkeukenov.png
        state_filter:
          "off": opacity(70%)
          "on": opacity(1%)
        style:
         top: 66.5%
         left: 32%
         width: 17.5%
      - type: image
        tap_action:
          action: toggle
        entity: light.entree
        image: /local/halov.png
        state_filter:
          "off": opacity(70%)
          "on": opacity(1%)
        style:
         top: 56.5%
         left: 65.5%
         width: 17.35%

halov keukenov

1 Like

Hi,

I have a Logic boolean variable in Homey which is true when shower is on and off when shower is off. How can I get this value as a sensor in HA? I already created a virtual device and see it now as a switch in HA, but I don’t want it to switch. Just want to read its value and show it on frontend together with some graphs how long the shower was on

Probably the logic boolean is presenting as being a settable value in Homey - does it show as such in the homie MQTT device tree ? What is its type ?

image

If so the best idea would be to create in your configuration.yaml an input boolean for the shower and map its state topic to the one on MQTT. Remove the other discovered device from your front end display.

Amazing app, the MQTT Hub! Big thumbs up! It works well, except for one issue.

I have three IKEA Trådfree bulbs. The RGB-bulb works perfectly. However, the tunable bulb does not. (I do not have a dimable bulb).
In the developers-pane it says that it has capabilities “onoff, dim, light_temperature”. I can control all three (onoff, dim, color) features via Homey regular interface. But only onoff and dim works via MQTT. Homey or MQTT Hub does not send any color/light_temperature information via MQTT. Whereas the lamp shows up correctly in HA, and HA sends the commands (incl color) via MQTT.

This makes me suspect that this is an issue with the MQTT Hub. Anyone else with same issue? Or am I missing something?

edit: Upload of images did not work

I am not sure that tuneable white bulbs are supported,…

How is the lamp being created in HA ? Is this via auto discovery from MQTT Hub based upon the lamp being a physical Homey discovered device ? You say it shows correctly… does it give a tuneable slider or the colour picker ? If so have a look at the control topic that the HA config is advertising as this is how HA is controlling the light. It must be correct as you say it is working via MQTT from HA.

Yes, the light you show in the screenshot only has a dim and onoff capability. That color topic looks to have been created manually or via an incorrect HA color control attempt and is not $settable or being used by MQTT Hub. There is maybe another topic elsewhere that HA is using via MQTT…(if it’s working)

I see you say HA created that set topic, and that HA control of that light via MQTT works ? Or are you saying tuneable white / colour doesn’t work from HA but onoff and brightness do… which would make more sense ? If so I am surprised HA is getting a colour control topic from MQTT Hub for this bulb… it shouldn’t be sending one.

. I will look at how my tuneable whites are represented via homie MQTT tomorrow and update this post. In HA they have a color temperature slider. It does look like it’s not being handled quite right (or just not supported) currently

That is my guess too. If so, I will just patiently wait :slight_smile: I am trying to rule out that I have done something wrong in the setup.

The lamp is added in Homey as tunable bulb. MQTT Hub then creates it in HA via auto-discovery. It shows the tunable slider in HA.


But the capabilities/properties broadcasted by MQTT Hub as shown in my previous pictures are only onoff and dim.
The lamp can be fully controlled from Homey interface (onoff, dim, colortemp). But MQTT Hub only sends onoff and dim commands. If I adjust the color temperature, nothing is sent to MQTT.
From HA I can control onoff and dim, its sent via MQTT, picked up by MQTT Hub and Homey sets the lamps accordingly.
The problem is that when I adjust the color temperature from HA, HA sends the commands via MQTT, hence creating that topic as shown in my MQTT-Explorer picture. But it is not acted upon by MQTT Hub and Homey is not adjusting the color temperature.

So the strange thing is: MQTT Hub sets up the tunable bulb correctly in HA. But does not react upon the color_temperature adjustment.