HealsCodes / node-red-contrib-homegear-mqtt

Interact with Homegear connected devices via mqtt
MIT License
8 stars 3 forks source link

Output does not work for me / input does #12

Open sbolten opened 7 years ago

sbolten commented 7 years ago

Hi, I have successfully configured the node to send messages to a DIM1_TPBU_FM Homematic dimmer. Can switch it on and off or change the level.

NodeRed --> Homegear --> Dimmer (ok)

Using the output node it looks like it is configured correctly but I do not receive any event from the dimmer.

Dimmer --> Homegear --> NodeRed (nok)

This is the json. Very simple. Just the output and debug. Nothing shown in debug.

[{"id":"3ac68ce3.34dfb4","type":"tab","label":"Network"},{"id":"ba2d95e7.d810c8","type":"debug","z":"3ac68ce3.34dfb4","name":"","active":false,"console":"false","complete":"true","x":602,"y":167,"wires":[]},{"id":"5e0741c8.66c7d","type":"homegear-mqtt in","z":"3ac68ce3.34dfb4","broker":"54b28f83.4ddef","homegearId":"1234-5678-9abc","peerId":"1","deviceType":"22:0","publishUpdates":true,"publishComplete":true,"name":"Bathroom","genName":"","x":270,"y":122,"wires":[["ba2d95e7.d810c8"]]},{"id":"54b28f83.4ddef","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

I have no idea how to approach the problem. Would really much appreciate any kind of help. Maybe it is just some small configuration change somewhere since it is working one way but not the other.

Best regards,

Stephan

Aietes commented 7 years ago

I think what you are seeing corresponds to issue #8. Sending commands works, but rreceiving events does not, as the library subscribes to the wrong topic. I created a pull request for the issue, it's bascally fixing one line in the code. Please see #9.

HealsCodes commented 7 years ago

@sbolten I Kerr3d the mentioned PR, could you try installing the current master and see if it solves your problem?

sbolten commented 7 years ago

@Shirk I have installed the current master (?) yesterday (clean install - I am btw not the github expert) - installed it via node-red gui. Looking at the code of homegear-mqtt.js it was updated 4 month ago.

Result: nothing changed. Inbound is not working.

Tried to change the following line in homegear-mqtt.js

this.eventTopic = 'homegear/' + this.homegearId + '/event/' + this.peerId + '/#'; to this.eventTopic = 'homegear/' + this.homegearId + '/json/' + this.peerId + '/#';

Still not working. What am I doing wrong?