Comments (23)
I turned up debugging this morning and I think I found this.
My OpenHab item:
Dimmer Kitchen_Island_Light_Level
My Homebridge accessory:
{
"name": "Island",
"type": "light",
"item": "Kitchen_Island_Light_Level"
}
I say "Hey Siri, turn on the Island LIghts".
What happens: The light level is set to 0.
Here are the logs:
[7/14/2019, 10:49:07 AM] [openHAB2-Complete] Change binary target state of Island to true
[7/14/2019, 10:49:07 AM] [openHAB2-Complete] Preparing commit
[7/14/2019, 10:49:07 AM] [openHAB2-Complete] Received commit with object {"binary":true}
[7/14/2019, 10:49:07 AM] [openHAB2-Complete] Commiting light state with vectors (B,H,S,B): true,undefined,undefined,0
Here's the code from SetAndCommitLight.js
this._log.debug(`Commiting light state with vectors (B,H,S,B): ${binary},${hue},${saturation},${brightness}`);
if(binary === undefined && hue === undefined && saturation === undefined && brightness === undefined) {
command = new Error("Unable to commit state, since necessary information are missing");
} else if (hue === undefined && saturation === undefined && brightness === undefined) {
command = binary ? "ON" : "OFF";
} else if (hue === undefined && saturation === undefined) {
command = binary ? `${brightness}` : "OFF";
} else {
command = binary ? `${hue},${saturation},${brightness}` : "OFF";
}
Basically, homekit is setting binary as true, but brightness as 0. Which executes:
command = binary ? `${brightness}` : "OFF";
setting the light to 0, instead of turning the light ON
I ran a few more tests, it looks like when I say "turn the island light on" and "turn the island light off" the value in brightness is the current brightness setting, not the target. Only binary matters.
I don't have a Color device to test hue, saturation, brightness with.
But it seems like at least for a dimmer that when it receives a binary true it should send an ON, not set the light level to the brightness setting received.
Thanks,
Doug
from homebridge-openhab2-complete.
Merged PR that should fix the problem.
from homebridge-openhab2-complete.
Seems to be related to #12
from homebridge-openhab2-complete.
Could you please manually install the latest commit on the master branch and check if this fixes your issue?
from homebridge-openhab2-complete.
Happy to do so but not sure how exactly. I tried to google and came up with
npm install --save
https://github.com/steilerDev/homebridge-openhab2-complete/tarball/master
Would that be correct? Just want to be sure i am acrually testing a new version
from homebridge-openhab2-complete.
Since you are also running homebridge inside the docker container, do the following:
-
Remove the current installation
This depends on how you added the plugin in the first place. If you installed it viadocker exec <container name or id> npm install homebridge-openhab2-complete
you need todocker exec <container name or id> npm remove homebridge-openhab2-complete
or just remove the docker container (docker stop <container name or id> && docker rm <container name or id>
). Otherwise remove the relevant line fromstartup.sh
, in order to be sure, remove the container anyway. -
Download the latest version:
Navigate to your homebridge volume, create a folder (I am usingcustom_node_modules
). Then download the repository:
git clone https://github.com/steilerDev/homebridge-openhab2-complete.git
- Install the downloaded version:
Add the following line to yourstartup.sh
npm install -g /homebridge/custom_node_modules/homebridge-openhab2-complete/
Let me know if you run into any issues.
from homebridge-openhab2-complete.
I think I need to resolve a permission issue for the download directory as it complains about missing write access
/homebridge # npm install -g dowload/homebridge-openhab2-complete/
npm WARN checkPermissions Missing write access to /homebridge/dowload/homebridge-openhab2-
complete/node_modules/@types/node
from homebridge-openhab2-complete.
The easiest way would be sudo chmod -R ugo+rwx <your folder>
:P
from homebridge-openhab2-complete.
Did you have the time to test this? The other issue was reported to be fixed, I'm curious if this is also the case for you.
from homebridge-openhab2-complete.
I tried earlier this week but was unable to get it installed. Was abroad until today so i will try to test over the weekend.
from homebridge-openhab2-complete.
Unfortunately I broke the current master branch, if you want to test it anyway you should go to the 4687d56 commit.
from homebridge-openhab2-complete.
Didn’t manage over the weekend as we are renovating the downstairs and back abroad this week so i will try asap when i return
from homebridge-openhab2-complete.
No worries :)
from homebridge-openhab2-complete.
I did some tests today. While I had to use your current 0.10.0 release because I didn't know how to use the master I "manually" changed SetAndCommitLight.js and alternated between "0" and "OFF". Unfortunately the dimmer is switched to "0%" either way.
This is what I'm getting with "0" in the code:
"Hey Siri, Licht im Wohnzimmer auf 25%"
[3/31/2019, 1:43:24 PM] [openHAB2-Complete] Updating state of Licht im Wohnzimmer with item DimmerLivingRoom to 25
[3/31/2019, 1:43:24 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
[3/31/2019, 1:43:24 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
[3/31/2019, 1:43:24 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 1
[3/31/2019, 1:43:24 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 1
[3/31/2019, 1:43:27 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
[3/31/2019, 1:43:27 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
"Hey Siri, Licht im Wohnzimmer ausschalten."
[3/31/2019, 1:43:43 PM] [openHAB2-Complete] Updating state of Licht im Wohnzimmer with item DimmerLivingRoom to OFF
[3/31/2019, 1:43:43 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:43:43 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:43:43 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 24
[3/31/2019, 1:43:43 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 24
[3/31/2019, 1:43:45 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:43:45 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
"Hey Siri, Licht im Wohnzimmer einschalten."
[3/31/2019, 1:45:29 PM] [openHAB2-Complete] Updating state of Licht im Wohnzimmer with item DimmerLivingRoom to 0
Here's the same with "OFF" in the code:
"Hey Siri, Licht im Wohnzimmer auf 25%"
[3/31/2019, 1:59:05 PM] [openHAB2-Complete] Updating state of Licht im Wohnzimmer with item DimmerLivingRoom to 25
[3/31/2019, 1:59:05 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
[3/31/2019, 1:59:05 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
[3/31/2019, 1:59:05 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:59:05 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:59:07 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
[3/31/2019, 1:59:07 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 25
"Hey Siri, Licht im Wohnzimmer ausschalten."
[3/31/2019, 1:59:14 PM] [openHAB2-Complete] Updating state of Licht im Wohnzimmer with item DimmerLivingRoom to OFF
[3/31/2019, 1:59:14 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:59:14 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:59:14 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 24
[3/31/2019, 1:59:14 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 24
[3/31/2019, 1:59:17 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
[3/31/2019, 1:59:17 PM] [openHAB2-Complete] Received push with new state for item DimmerLivingRoom: 0
"Hey Siri, Licht im Wohnzimmer einschalten."
[3/31/2019, 1:59:21 PM] [openHAB2-Complete] Updating state of Licht im Wohnzimmer with item DimmerLivingRoom to 0
What's really weird is that the brightness level is changing a couple of times after each command (except the final "switch on" command). This is only visible on the console. The "real" light is not showing those inbetween brightness states.
Hope that helps! Will do further experiments, if you want.
Cheers,
Jens
from homebridge-openhab2-complete.
I just released V0.10.1, could you please check if the issue still exists? @jewesta @extric99
from homebridge-openhab2-complete.
I tested 0.10.1 and I'm very sorry to report that the issue still exists. Unfortunately I also noticed that if I use a slider in Apple's Home app to adjust a dimmer, then the dimmer changes rapidly between various brightness settings. It looks like an endless loop at first but after a couple of seconds the constant changing stops at a certain (seemingly random) level. Not sure if this behavior is new.
from homebridge-openhab2-complete.
I noticed this behavior as well (with the random reduction if set through the slider and below 50%). I actually don't have a clue what is causing this.
But the original issue (using Siri to set a specific value) still does not work?
from homebridge-openhab2-complete.
I finally figured out how to update :-(
Just tested with 0.10.1 and it still has the issue unfortunately. When you ask Siri to turn something on that is a dimmer the value is set to 0%
from homebridge-openhab2-complete.
For what it's worth, I can confirm this behavior in the current version.
I installed fresh using docker, then added "npm install homebridge-openhab2-complete" to startup.sh. Then added a couple of my dimmers.
Let me know if there is anything I can do to help test/debug.
Doug
from homebridge-openhab2-complete.
Is there anything I can do to assist in terms of the slider / value changing back and forth issue? Unfortunately this issue is beginning to significantly lower the homekit acceptance factor in my house. ;-) I am also observing it with roller shutters where it is a real pain in the butt. The shutters can sometimes start moving up and down for minutes if I am making the mistake of using a homekit slider. Because of this I have stopped using sliders in homekit altogether.
Would it help to peek into the code of homekit-openhab2 where the sliders do not show this strange behavior? Sorry, just grasping for straws here. I know you have probably done this already.
from homebridge-openhab2-complete.
I just stopped using the slider or just adjust and immediately quit the view.
I tried to hunt down the problem and I Wasn't able to track it down. Feel free to look at the logs and everything I am happy about every hint. The problem is that it seems that homekit actually sends the request for the new values. The one thing I can image is a rounding error. Maybe I'll get around to look at this again.
from homebridge-openhab2-complete.
Based on @grzegorz914 pull request (thank you very much for that one!) I added some adjustments. Please test my latest commit and let me know if this fixes the issue: fc33b50
from homebridge-openhab2-complete.
Hi,
after some test not fixed #43, fixed only #13.
With Your code send value 100 or 0/OFF, with my code send ON/100 and 0/OFF always.
If U look on my rule in #43 state ON enabled light and set to the latest state of brightness(value 100 is ignored), with Your code the light is enabled with 100% of brightness.
from homebridge-openhab2-complete.
Related Issues (20)
- Homebridge crash with ReferenceError: url is not defined HOT 1
- Thermostat errors - when trying to allow Heating (on Off and Auto) HOT 3
- README Install command small fixes HOT 1
- Documentation for irrigation items is wrong HOT 2
- 'Current Heater-Cooler State' didn't respond at all HOT 8
- Heater/Cooler Swing not working HOT 5
- After update to iOS 15 asking for current room temperature fails and only replies with "Heating is off" HOT 3
- item not deleted after label is changed - creating duplicate HOT 1
- Add Multiplier Option to Humidity Values
- Heater/Cooler Accessory with sepparate min-max temp for thresholds HOT 5
- Connection with OpenHabian3 HOT 6
- Switch from OpenHAB is not synced to Homebridge HOT 1
- AssertionError [ERR_ASSERTION]: Services must be created with a valid UUID.
- Color of Lamp is recognized as Brightness HOT 1
- when new accessories added old ones that were on the dashboard dissappear HOT 3
- OH3 Support? HOT 1
- Temperature sensor no response HOT 1
- Speaker Object doesn't show volume controls HOT 5
- Invalid JSON in an platform Oliver HOT 2
- request still used in OpenHab.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-openhab2-complete.