anthonywebb / homebridge-cbus

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

Help with fan speed control #81

Closed andysyiros closed 6 years ago

andysyiros commented 6 years ago

Hello All,

I would like some assistance with setting up the Fan Control relay as an accessory. From Homekit, I can only turn the fan on/off and not adjust the speed.

Is it possible to see an example of the correct config text to enable fan speed control?

Thanks in advance

Andrew

DarylMc commented 6 years ago

@andysyiros Hello Andy I've never used the CBus fan control relay but I have set up the fan accessory for an exhaust fan on a dimmer channel. In Home app I hold the button down and can use the slider to set speed.

In Toolkit the fan control relay allows you to adjust thresholds to get the various speeds so you should be able to use the slider to set your speeds. Siri is pretty smart and I reckon if you say set fan to medium or low she will choose a percentage. Tweak the percentages in Toolkit if its not quite right.

Maybe you could also use scenes in Home app to set the fan to a certain level with a single button.

edit I don't know what levels are loaded into your CBus input units to trigger low and medium speeds but if they are not the same as Siri uses which is 25% for low and 50% for medium your status indication on CBus might not work correctly. I have to install some soon so please let me know how you go.

andysyiros commented 6 years ago

Thanks Daryl,

I will try setting the Fan a dimmer. I did read somewhere that is can also be set a Shutter?

Homekit displays the fan speed percentage. When I double press the wall switch (medium speed), the corresponding value is 67%. I think low speed is 34% but I will have to confirm.

Also, a big thank you for your youtube installation guide. After spending many hours and not succeeding, your guide help with a couple of steps I missed.

I will next try to see if I can get Homekit to display the security panel status. The one good thing about Wiser is the remote arming and disarming of the security panel (great if trades or family need access to the house etc.), however I have unplugged Wiser for the time being until I had things working.

I seem to having some issues reconnecting to Homebridge when I get home from work, but it might be my Pi 3 is in a cupbaord and given the warm weather, probably locking up? I will move it at some point. After a reboot of the Pi and the iOS device it seems to come good, or worst case I have to delete the existing home on IOS and rediscover.

Is there a limit to how many iOS devices can connect to Homebrige? At the moment my iPhone and iPad can connect but my wife’s iPhone can’t. We are all running iOS 11.2.1

Cheers

Andy

DarylMc commented 6 years ago

I think you can leave the fan as a fan. Actually looking at the fan controller default settings I think it will all just work for you. It seems to me the fan control relay responds to CBus levels just like a dimmer. You know you can hold the fan button down to bring up a slider? Add some scenes on the phone if you want some buttons instead. Siri should recognise high medium and low voice commands for the fan.

I haven't had any trouble with heat and the pi but if you are using a full case taking the lid off drops a few degrees.

DarylMc commented 6 years ago

you need to send her share invite from your phone

DarylMc commented 6 years ago

sometimes coming back to wifi i think it is iphone not homebridge have you set up a hub eg ipad? I never have any trouble with the ipad because it never leaves the home network.

andysyiros commented 6 years ago

Well there you go!

I didn’t know that the slider function worked by holding down the button for the fan. Thanks it worked a treat!

Homekit and Siri are clearly smarter than I am. I ask Siri to set fan to low, fan speed is 25% and is low speed. I ask to set fan to medium, fan speed is 50% and is on medium! Thank you so much for your assistance!

With my issue of not being able to connect to the accessories, I thought it was more likely to be a cgate issue as I checked the status of the CNI and it wasn’t connected to the Pi and was ready for connection.

I have not yet set up the iPAD as a Hub as I take it to work most days, but will definitely look into it. When I arrived home tonight, my iPhone connected straight away, so likely to be a network or CNI issue..

Cheers

Andy

DarylMc commented 6 years ago

" the CNI and it wasn’t connected to the Pi and was ready for connection" Not quite sure what you mean. Do you mean the CGate on pi IP address, port 20023 said "201 Service ready: Clipsal C-Gate Version: v2.11.1 (build 3240) #cmd-syntax=1.0" ?

DarylMc commented 6 years ago

One thing which took me a little while to get my head around was once you have CGate running on the pi. Then you don't want to start another CGate console or have CGate service running on the Windows PC. Your project xml now lives on the raspberry pi. It's the one you need to back up. The remote CGate on the pi is the one you need to connect to when making any changes with Toolkit. If you make changes to the xml on the pi it won't be reflected in the project xml on the PC or vice versa.

andysyiros commented 6 years ago

Sorry if I was unclear. When I typed in the CNI IP address in a webbrowser, it provides a summary of the CNI and that is where I checkd the Status. My Pi has an IP address of 192.168.1.6 so this is a check to see if the Pi connected to CBus

image

DarylMc commented 6 years ago

I've not used CNI2. So you looked there and it said ready for connection? I've never had a problem with CGate on the pi dropping the connection. You might see why in the CGate logs on the pi. Have you got CGate all set up to start as a service and load project.default and project.start If it does it again might be worth mentioning on CBus forum.

andysyiros commented 6 years ago

Issue was probably network related as it was working fine the other day when I arrived home. I have CGate set up with 20BRIK as the project.default and project.start.

image

I have been turning off the Pi when using toolkit and have been using CGate on my Laptop. I just make sure I follow the below steps: • Close the network on Toolkit • Check CBus status on CNI2 (to make sure there are no connections) • Copy out the XML file to the Pi • Update the Config.json • Delete the persist files • Delete project on Homekit • Reconnect Homekit to homebridge etc This all seems to work so I haven’t changed my process. Now I have a slightly better idea what I am doing, I will try Installing Wiser again and update the IP address in the XML file (from the CNI2 IP address to Wiser IP address) to see if that works.

I Shared the project with my wife and that is working well. Thank you so much for your help!!

Now the only problem is I seem to spend many hours each night playing and breaking things then working out what when wrong etc. LOL

Cheers

DarylMc commented 6 years ago

Do you have Wiser 2? Original Wiser uses the CBus interface for its own communication to CBus and I think you will still need the CNI. Wiser 2 has dual CBus interfaces and I helped set one up for Homebridge CBus with no bad reports so far. I've still never laid eyes on a Wiser.

If you delete the Home on the phone you will have to delete the persist files. I try not to delete the Home on the phone or the persist files if at all possible. Changing the xml or config.json does not require it.

Make an image of the SD when you are happy with it all. That will also save you having to re set up the phone and sharing.

andysyiros commented 6 years ago

I have the original Wiser and its uses CNI2.

Good to know that I don’t need to delete Home or Persist if I update the XML or Config.json.

Future challenge is to connect the CBus in the garage to the network (currently standalone) which will happen in the next year or two.

Off topic, does the CBus plugin support the DALI gateway? I haven’t looked into yet as I am a while off connecting the garage to the house (I have DALI LED panels in the garage)

Cheers

DarylMc commented 6 years ago

I think you will still need a dedicated CBus interface for Homebridge. None of the CBus interfaces can accept more than one connection at a time. Your Wiser will use that interface while it is running. That is why Wiser 2 and the new Wiser Automation controller have two CBus interfaces.

CBus Dali Gateway maps Dali addresses to CBus group addresses. Assuming the Dali fittings are on lighting application 56 just add the Dali fitting CBus group address to Homebridge CBus config file as a dimmer.

andysyiros commented 6 years ago

I have 2 spare CNIs, so might use one dedicated for Homebridge and the other for wiser/toolkit.

Thanks again!