bombadiltom / homebridge-rademacher-homepilot

MIT License
26 stars 21 forks source link

Support "Dimmaktor" #2

Closed bombadiltom closed 5 years ago

bombadiltom commented 6 years ago

https://service.rademacher.de/hc/de/sections/360000135674-DuoFern-Universaldimmer-9476-1

koljabus commented 6 years ago

Hi Tom, I am using your homebridge-rademacher-homepilot plugin and it works perfectly! But now I installed two Rademacher DuoFern Universaldimmer. The Homepilot 2 itself recognizes the actors, but homekit does not. Here is what HomePilot2‘s deviceajax.do says: (I just xx-ed the serial)

{"did":1010015,"name":"Kolja","description":"Nachttischlampe Schlafz.","initialized":1,"position":0,"productName":"DuoFern Universaldimmer","serial":"4A XX XX","statusesMap":{"Position":0,"Manuellbetrieb":0},"status_changed":1530320469,"deviceGroup":4,"iconSet":{"name":"Glühlampe","description":"Glühbirne Icon-Set","strMin":"An","strMax":"Aus","valMax":100,"valMin":0,"sprite":{ "imageUri" : "images/sets/birne1.png", "numTiles" : 5 },"k":"iconset21"},"iconSetInverted":0,"paired":0,"statusValid":true,"uid":"4AXXXX_1","visible":true,"groups" : [ ] ,"favoredId":-1,"properties":{"rain":3,"smartphone":3,"motion":3,"dusk":3,"smoke":3,"favored":3,"trigger":3,"manual":3,"sun":3,"generic":3,"closingContact":3,"temperature":3,"temperator":3,"warning":3,"dawn":3,"time":3,"dust":3,"wind":3,"states":[{"cfgKey":"setTimeAuto","cfgId":101,"state":1},{"cfgKey":"setAutomationOverall","cfgId":99,"state":0},{"cfgKey":"null","cfgId":0,"state":0},{"cfgKey":"setSunAuto","cfgId":105,"state":1},{"cfgKey":"null","cfgId":0,"state":0},{"cfgKey":"null","cfgId":0,"state":0},{"cfgKey":"null","cfgId":0,"state":0},{"cfgKey":"null","cfgId":0,"state":0},{"cfgKey":"null","cfgId":0,"state":0},{"cfgKey":"setMorningAuto","cfgId":103,"state":1},{"cfgKey":"null","cfgId":0,"state":0},{"cfgKey":"setEveningAuto","cfgId":107,"state":1},{"cfgKey":"null","cfgId":0,"state":0}]},"sortId":0,"sTypes":[],"version":"1.0","sync":-2147483118,"messages":[],"hasErrors":0,"autos":[4,1,2,3,0]}

Can you help me with that?

Thanks in advance, Kolja

bombadiltom commented 6 years ago

What happens, if you add the dimmer as blinds: // blinds if(data.productName.includes("RolloTron") || data.productName.includes("Troll Comfort") || data.productName.includes("Rohrmotor") || data.productName.includes("Connect-Aktor") || data.productName.includes("RolloTube") || data.productName.includes("Universaldimmer")) {

Adding it as lock/switch only supports on and off, blinds support 0 to 100%.

koljabus commented 6 years ago

That‘s a good idea, I will try this. But how do I tell homekit that it‘s a ‚light‘ instead of a ‚blind‘? Cause my favorite siri-commands are ‚hey siri - close all blinds‘ and ‚...lights off‘ :-/ These won‘t work anymore then...

Am 03.07.2018 um 22:40 schrieb Tom Lorenz notifications@github.com:

What happens, if you add the dimmer as blinds: // blinds if(data.productName.includes("RolloTron") || data.productName.includes("Troll Comfort") || data.productName.includes("Rohrmotor") || data.productName.includes("Connect-Aktor") || data.productName.includes("RolloTube") || data.productName.includes("Universaldimmer")) {

Adding it as lock/switch only supports on and off, blinds support 0 to 100%.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

bombadiltom commented 6 years ago

That‘s the next step and a little bit more work, let‘s do fhe first step first ;-)

koljabus commented 6 years ago

Hi Tom, first: THANK YOU! Adding the dimmer as blinds works fine! Now it's even possible to tell siri "xy-device to 20%" and it dimms the light then. The only thing is, it's upside down: homekit shows the device "open" (so the light should be on) when it's actually off. It's the same with the siri commands: my command "xy-device to 20%" dimms the light to 80%, so it's almost 100% on. Telling siri "xy-device to 80%" dimms the light to 20%. So it's almost off. Only 50% works fine (haha - true, but just kidding...) I'm excited to the next steps :) Best Kolja

bombadiltom commented 5 years ago

Todo: Use Service.Lightbulb Example for a dimmer: https://github.com/hackercowboy/homebridge-mqtt-dimmer/blob/master/index.js

koljabus commented 5 years ago

Ah, okay. That looks like a dimming device... Can you give me just a short hint what to change, what to copy and where to paste in ‚your‘ rademacher-homebridge index.js? I don’t really know what to do with this info :-/

bombadiltom commented 5 years ago

Please try commit 9c73db8ac6db90e274ab1a5fd71389b84235e7aa