HassBridge plugin

Posted on
Sun Apr 05, 2020 11:28 am
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

HassBridge plugin

Howdy all,

I developed this over the past year and wanted to start to make it available. Its started off as a modification of another MQTT plugin but Ive turned it into a lot more. I dont think its ready to be included in the plugin store yet and needs to more work to add in z-wave and clean up the code, but I wanted to start getting user feedback.

Image
HassBridge

This is an plugin for Indigo Domotics to bridge to Home Assistant using its inbuild MQTT discovery and events system.

It provides a bi-directional bridge for the devices directly controlled by Indigo and allows Home Assistant to be able to be able to control and use those devices. It is able to send actions, like button presses, to Home Assistant to be able to be handled as events. It also allows for Indigo Variables to be displayed as Sensors in Home Assistant.

Features
  • Home Assistant Auto Discovery of published Indigo devices
  • Bi Directional control of Indigo connected devices
  • Expose keypad and remote button presses as Home Assistant Events and Device Actions.
  • Expose Indigo Variables as Home Assistant Sensors
  • Allows for customization how Indigo devices are represented in Home Assistant.

Release
The current Beta release is available at: https://github.com/wonderslug/hassbridge/releases
Source: https://github.com/wonderslug/hassbridge
Issues/Bugs: https://github.com/wonderslug/hassbridge/issues

For more info, please see the Readme: https://github.com/wonderslug/hassbridge/blob/master/README.md
Last edited by WonderSlug on Sun May 03, 2020 9:34 pm, edited 1 time in total.

Posted on
Sun Apr 05, 2020 3:57 pm
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

Re: HassBridge plugin Beta

Release 0.2.1 added some very basic Z-Wave support. Should work for simple Switches, Lights, Fans, Sensors. But I can only test with a simple switch module and lamp module.

Posted on
Tue Apr 07, 2020 5:10 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: HassBridge plugin Beta

Great work – thanks for sharing it and be sure and submit it to the Plugin Store once you feel it is ready!

Image

Posted on
Wed Apr 08, 2020 4:13 pm
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

Re: HassBridge plugin Beta

Thanks Matt,

Hopefully some people will find it useful.

Posted on
Wed Apr 08, 2020 4:14 pm
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

Re: HassBridge plugin Beta

Release v0.2.2
- fixed bug for non direct devices registering (battery devices and keypad lights)
- added clean to makefile

Posted on
Thu Apr 09, 2020 1:34 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: HassBridge plugin Beta

This is very interesting. Will it work with dimmer devices?

Håvard

Posted on
Thu Apr 09, 2020 6:38 am
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

Re: HassBridge plugin Beta

haavarda wrote:
This is very interesting. Will it work with dimmer devices?
Yeap. Works fine with both Insteon and Z-wave dimmers.


Sent from my iPhone using Tapatalk

Posted on
Fri Apr 10, 2020 4:28 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: HassBridge plugin Beta

Trying to set this up now. But I am seeing some errors. Is it possible to run without setting up token etc? I am mainly going for the MQTT feature...


Sent from my iPhone using Tapatalk

Håvard

Posted on
Fri Apr 10, 2020 6:39 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: HassBridge plugin Beta

Never mind the previous post. I figured it out.
Very promising plugin. I am really hoping to use this a bridge to get my devices exposed to google assistants around the house.
However I am seeing some issues. Seams as the state is not working. When I turn on a switch, the light will turn on and the UI in hass will indicate on for some seconds, before it returns to off.

Håvard

Posted on
Fri Apr 10, 2020 8:25 am
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

Re: HassBridge plugin Beta

Hey Håvard,

On the state not working, Couple of questions:
- What version of Home Assistant are you on?
- Do you have access to the MQTT data, something like MQTT explorer is very helpful to see whats going on with multiple topics at once.

I would be interested to see what the MQTT topics for the device you are changing the state on is doing. I might try to add some more logging to catch whats going on.

Sometimes Ive seen this in the past and a reload of the plugin helps, not sure if its an MQTT connection issue or just an issue based off of name or ID changes.

About the Access token. its currently used to make HA API calls to send events and sync ids and friendly names back to Indigo. Right now things like remote and keypad button presses get sent to HA as device actions over mqtt and events over the API. Node-Red can only pickup the events and not the device actions right now. So it is possible to make it so it can turn off the API access and not need the access token, but I want to understand peoples use cases before I do that. Are you using node-red or anything else outside of HA core that might need to catch events for remotes or keypads? (and right now its only Insteon remotes and keypads. Dont have any z-wave ones to try)

Thanks

Posted on
Fri Apr 10, 2020 11:08 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: HassBridge plugin Beta

Well I think I use the latest version available.
Have been using this manualy before, but love the idea of auto discover. I only use z-wave since I am in Europe. I have been using MQTT explorer for some time. So I am familiar with that one.. :)

Code: Select all
{
    "json_attributes_topic": "indigo_hass_bridge/switch/light_under_cabinet_kitchen/attributes",
    "qos": 0,
    "name": "Light - Under Cabinet - Kitchen",
    "payload_off": "OFF",
    "payload_on": "ON",
    "payload_not_available": "offline",
    "device": {
        "model": "Relay Switch (FGS211)",
        "identifiers": [
            "82",
            876669673
        ],
        "name": "Light - Under Cabinet - Kitchen",
        "manufacturer": "ZWave via Indigo MQTT Bridge"
    },
    "optimistic": false,
    "state_topic": "indigo_hass_bridge/switch/light_under_cabinet_kitchen/state",
    "command_topic": "indigo_hass_bridge/switch/light_under_cabinet_kitchen/set",
    "availability_topic": "indigo_hass_bridge/switch/light_under_cabinet_kitchen/status",
    "unique_id": "indigo_mqtt_light_under_cabinet_kitchen",
    "payload_available": "online"
}


Code: Select all
Message 43 received on indigo_hass_bridge/switch/light_under_cabinet_kitchen/status at 6:50 PM:
online


Code: Select all
Message 44 received on indigo_hass_bridge/switch/light_under_cabinet_kitchen/state at 6:50 PM:
OFF


Code: Select all
Message 45 received on indigo_hass_bridge/switch/light_under_cabinet_kitchen/attributes at 6:50 PM:
{
    "last_successful_com": "2020-04-10T16:32:47.000000+0000",
    "indigo_id": 876669673,
    "last_changed": "2020-04-10T16:32:47.000000+0000"
}

Håvard

Posted on
Fri Apr 10, 2020 11:21 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: HassBridge plugin Beta

Hmm...
Did some restarts, and played a little back and forth with the plugin, and now it is working... Will experiment a little more, and keep you posted.

Håvard

Posted on
Fri Apr 10, 2020 2:30 pm
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

Re: HassBridge plugin Beta

Cool thanks. Let me know what I can do to help.

If you don't mind can you tell me what z-wave devices you have this working with and any that are not being recognized?

Thanks

Posted on
Tue Apr 14, 2020 1:18 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: HassBridge plugin Beta

I have been playing some more with the plugin. Overall it is working very good. I have experienced a few things.

As far as I can see, battery device creation is not working (z-wave).
I found a asci code error when adding a device with a Scandinavian character.
On my wish list I would put virtual device support. I have some combined devices in Indigo that is represented as a virtual device. It would be very nice to expose those to hass.

Please let me know if and how you would like to have more information / logs etc... :)

Håvard

Posted on
Tue Apr 14, 2020 11:43 am
WonderSlug offline
Posts: 82
Joined: Sep 08, 2017

Re: HassBridge plugin Beta

haavarda wrote:
As far as I can see, battery device creation is not working (z-wave).


Yeah, Battery on ZWAve is not there as I have not had one to work with. I might be able to get a Aeotec Multisensor 6 to play with. So I might be able to add that.

haavarda wrote:
I found a asci code error when adding a device with a Scandinavian character.


Can you tell me where you are seeing this wrong Ascii/Unicode showing up? Is it in the output to HA?

haavarda wrote:
On my wish list I would put virtual device support. I have some combined devices in Indigo that is represented as a virtual device. It would be very nice to expose those to hass.

How do you see this working. Most of the Virtual Devices show up as a RelayDevice inside Indigo. But the question is should it show up as a switch or sensor in HA. Ive have some virtual devices which do stuff. and others that just show an over all state. Do you feel it would be worth it to have it just show up as a switch under HA?

Who is online

Users browsing this forum: No registered users and 1 guest