A different DSC binding - using MQTT and ESP8266

(Rokk Zoltan) #1


Just a short question, would it be a big work for someone to rewrite (rework) the code, to work directly with OpenHAB?
Or if I buy the components, make the small PCB and connect it to my OpenHAB through MQTT it will work?

What I like in this is that you can communicate with your DSC alarm using components which cost 10 times less then the, lets say… official ones.


(Vincent Regaud) #2

Yes it should

(Rokk Zoltan) #3

I’ve managed to upload HomeAssistant-MQTT on my ESP8266. It is connected to MQTT of Openhab (and also to my DSC alarm), but I don’t think the syntax I’m trying to use works…

Any ideas how to move on, how can I check this zone state?

Switch	DSC_Zone3	"Zone 3 status"   		 {mqtt="<[broker:dsc/Get/Zone3:command:ON:0],<[broker:dsc/Get/Zone3:command:OFF:1]"}

(Angelos) #4

where (in which topic) does the ESP code publish Zone states?

You are currently using an inbound definition in your MQTT bound item that processes commands.
If you want status updates, identify the proper topic(s) and use one :state:default (instead of :command:ON:0)

Ref: https://www.openhab.org/addons/bindings/mqtt1/#item-configuration-for-inbound-messages

Switch	DSC_Zone3	"Zone 3 status"   	 {mqtt="<[broker:dsc/Get/Zone3:state:default]"}

(Vincent Regaud) #5

I was going to ask the same questions as @Dim

What topics does the ESP publishes on?
And what are the values published?

Then we can configure the binding with a transformation if necessary

(Angelos) #6

it seems that the payload is 1 for ON and the topic is dsc/Get/Zone3
so the example above (with state:default) should work (I think that he won’t need a MAP xform)

Ref: https://github.com/taligentx/dscKeybusInterface/blob/master/examples/esp8266/HomeAssistant-MQTT/HomeAssistant-MQTT.ino#L96

(Vincent Regaud) #7

Now that new to me! 1 and ON are the same for a Switch item?

(Angelos) #8

I think!? that a Switch Item can process both 1 & ON incoming states to ON status (no need to transform 1 to ON using MAP)
I am not 100% sure :stuck_out_tongue:

I will check this on my test system