anthonywebb / homebridge-cbus

CBus plugin for homebridge
MIT License
35 stars 20 forks source link

Triggers #76

Open RickHOZ opened 6 years ago

RickHOZ commented 6 years ago

Hi All,

Ok, so I am relatively happy with everything and just working through a few issues.

I would firstly like to ask some help on the new Triggers accessory thanks to PhilPearson.

I have however still been able to get it to work but I think that is simply because of a lack of understanding on my part.

{ "type": "trigger", "application": 202, "id": 0, "action": 1, "name": "recall preset 2" }

I believe I understand the "application section, but I am having issues with locating the "id" and the "action" within in C-bus.

I believe I am addressing it correctly but I think I am stuffing up with the setup somehow.

Would appreciate any explanation of the correct procedure to connect and activate the trigger.

My second issue is still with the shutters/Curtains. I have now with PhilPearson assistance got my curtains to open and close however the Home app is still reporting everything inverted. It shows open when closed and visa versa.

Any help with modifying the accessory to suit curtains would be appreciated.

Thank you once again to all involved.

PhilPearson commented 6 years ago

In this image, you can see a Trigger Group in application 202, created with an ID value of 80, and two actions. This would translate to { "type": "trigger", "application": 202, "id": 80, "action": 0, "name": "Lights On" }, { "type": "trigger", "application": 202, "id": 80, "action": 1, "name": "Lights Off" }

image

RickHOZ commented 6 years ago

Hi Phil,

Hmm, Well this time I thought, ok, I will create from new to see if I was doing something wrong.

Please see below:

So In C-Bus Toolkit I created a new trigger:

screen shot 2017-11-12 at 3 41 12 pm

I then went back into PICED and created the Scene.

screen shot 2017-11-12 at 3 49 38 pm

I then see this error in the HomeBridge log:

cbus:client sent command '[106] trigger event //SAMARA/254/202/17 undefined' +2s cbus:client rx response { commandId: 106, code: 405, matched: false, processed: false, type: 'response', raw: '[106] 405 Parameter out of range: //SAMARA/254/202/17 (Bad value for action selector)' } +1ms

PhilPearson commented 6 years ago

check your action is a valid integer { "type": "trigger", "application": 202, "id": 80, "action": 0, "name": "Lights On" }

for some reason yours is showing as undefined '[106] trigger event //SAMARA/254/202/17 undefined'

PhilPearson commented 6 years ago

Oh! my bad. https://github.com/anthonywebb/homebridge-cbus/blob/10a68cf1d3ae6fd48dfeae6abc8d35bd610cbc03/accessories/trigger-accessory.js#L29 this try catch block should not be commented out

RickHOZ commented 6 years ago

Hi Phil, Thanks for that, I will give it a try and see if it solves my problems.

RickHOZ commented 6 years ago

Hi Phil,

Ok, I was only able to spend a little time on this tonight but I still seem to be stuck. I'll get a chance over the weekend to another look.

I know this might be a little rude, but could I get you to cast your eye on another issue I am having.

I am also trying to implement an IR solution into my home automation and I have been working on "homebridge-broadlink-rm-master" but I am having issues adding the platform as it says I have duplicates under the accessories.

Would you be able to have a quick look at some code and how I assembled it? I would really appreciate your time.

Let me know if your ok and I will copy and paste or send it somehow.

Cheers.

PhilPearson commented 6 years ago

sure. best option would probably be to setup a repository on github or use a series of gists.

RickHOZ commented 6 years ago

Hi Phil, Thanks for that.

Here you go. I'm sure you are going to take one look and solve this very quickly. I am sure I am doing something stupid.

https://gist.github.com/RickHOZ/7e3926371575e9eace07c0e4eb289f18

RickHOZ commented 6 years ago

Hi Phil, Managed to work out the issue with the "homebridge-broadlink-rm-master". So I now have everything other than the triggers working and I will be giving that a go today.