New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tv remote control does not skip repeated values #200
Comments
See related issue #129 - especially this comment Have you ever had this working? Another thing to try would be upgrade to version 1.0.0-dev.5 - there have been a few updates to hap-nodejs since dev.2. |
PS: I'll put together a quick test of this today and see if I can get something started for the wiki page. |
And what about allow message pass through option? |
Please share your flow (code). |
@Shaquu it looks like something broke - I just tried it and got the same behavior as @daddvok is seeing. Important part of the flow:
And a screenshot of the output, showing all keys working but no repeats even though I tried repeats: |
|
never worked, but just now got around to write about the problem. |
Just want to be clear, this is a one-time issue when you update. After updating you'll need to reconfigure once then things will stay the same (hopefully through many subsequent updates). It's likely that the fix for your issue will be dev.6 - do you run on a raspberry pi? I suggest running tests on a development system (extra pi, separate docker container, separate VM, etc) so you don't break your main system... Don't tell anyone but my main use of this plugin still runs the very old 0.6.2 version! I play with and test new features on a separate raspberry pi. |
Yes, RPi 3b. I don’t have another raspberry, but I’m too lazy to run in containers) |
Maybe you can complement the wiki about TV? How to create a remote and volume buttons, because now you can achieve this only by trying everything in sequence |
It's funny that it used to be an issue before :)
Originally posted by @cacherocks in #84 (comment) Anyway. Calling @gotofoo because he is an author of last significant change in our code (except hap-nodejs dependency update). I will look at it when I am back home. |
I see a problem. I have an idea what we should do but again have no idea if we will break something or not. ServiceUtils: here and here change from characteristic.updateValue to characteristic.setValue ServiceUtils: here add node.send(msg) - problem is that we have different context and we don't have old value. Latest discussion on hap-nodejs setValue vs updateValue: KhaosT/HAP-NodeJS#629 |
I did a change I proposed before but didn't pushed to dev yet. So first time when we click key 5 we receive key 5 twice in node-red (posted by onSet and onUpdate). If we click key 5 and then key 6 then we receive 4 messages, two for each key (if not repeated). Another thing is that message posted by onSet will not contain oldValue (it will be undefined). PS. 1.0.0-dev.6 pushed contains latest hap-nodejs 0.5.6 but there are no breaking changes I think. |
This wouldn't work unless there can be a check for remote items something like Then we could easily make a flow that only passes "onUpdate" messages and ignores "onSet", leaving us one message per button click. Think of the case someone is trying to navigate a menu. They want to go to item 1 to 3 so they click down twice - it would send the message 3 times and end up at item 4. Then they click "up" - end up at item 2. Item 3 would seem impossible to get to unless you can filter out the extra presses. |
Well, so solution to pass onUpdate/onSet in msg.hap is fine except we would force people to make another guards in scripts. |
What about an output for onSet and an output for onUpdate? Can this be added for certain services only? I think Television and TelevisionSpeaker are the only ones I know of that need repeated messages. |
Well good idea to use outputs. |
Function nodes, switch nodes, etc are built in and change number of outputs based on the function or switch. Perhaps there is a check box to enable/disable both camera snapshot and onUpdate outputs? I’m not sure it’s possible but it could be a cool solution. Otherwise my vote goes for an additional output that outputs updates only to go along with the current outputting set (changes?) only. |
A quick read of blocky readme seems like that node can add/remove outputs as it wants. |
Okay, I will try to make it vary.
But for which services should we have second output and why only for them?
Maybe all services should have 2 and camera should have 3?
…On 23 Jan 2020, 00:06 +0100, crxporter ***@***.***>, wrote:
A quick read of blocky readme seems like that node can add/remove outputs as it wants.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This is probably good until we come up with reasons to change it. I believe most services send “onUpdate” Or similar whenever the Home app is opened, could be useful for some? |
So I will try to to make it like: Output 1 is onUpdate since right now it is default source. |
Oh I had it confused I thought set was the one-time message. Sounds great to me, good luck!! |
Now first output is for onChange, second for onSet and third for camera snapshot #200
All right. #202 added new output to node. @crxporter @daddvok please test on dev About update/set, previously we used characteristic.updateValue which fired onChange if value changed. Now we use characteristic.setValue and it fires onSet and onChange if value changed. |
I’ll be testing first thing tomorrow morning. Sounds pretty awesome, thanks! |
updated, tested - it works fine, thanks to everyone! |
If anyone have a time and would like to help.
|
After update I created 3 new bridges - fine, camera is working too (tested on codec h264_omx, but i don't know what about sound in camera, it should work?), hap.context is used in few cases, works fine. |
Would do this but I would need some guidance how to build (or get) the NPM installable package from the dev branch to deploy this on my DEV env based on RPi 3B+ |
@djiwondee - I just updated on my dev pi 4 running raspbian. Install should be the same. 1- install node-red
3- restart node-red using your favorite method I tried without the My comments: I'll be going through more testing today and next week as I have time. Thanks for the quick turnaround as always, @Shaquu ! |
@djiwondee sure!
So it will be |
@Shaquu good morning/evening! I prefer the -g tag for global install, then I don't have to remember where things are installed! |
@crxporter its 2:30pm, so I guess good afternoon to me and good morning to you! Global is not always good if you need specific package to be used in different versions. Without global you could test different versions on one device but I agree it’s easier :) I would be very grateful if you all try to test it as much as possible. When I publish new version as official release and there is a bug then people will strike our Issues section 🗡 |
Let's move the 1.0.0 discussion to #163 so it's all together? That being said, I'll keep this discussion here since it's directly related to TV item. I just tested a TelevisionSpeaker item and I'm actually getting volume output from the control center remote! It seems like I've tried this before but with little/no success. Configuration: Parent node is {
"VolumeControlType":1,
"VolumeSelector":true
} With this, I get messages (repeated from the 2nd output) of Debug shows the following message when injecting
Anyway this seems like progress! I have tried (unsuccessfully) a few times to get volume control to do anything. @Shaquu - can you point me to any documentation on how to use this feature? It's not in the Spec R13... |
Update - found the documentation. Starting around line 412. If anyone's interested we can start building out some functional volume controls! |
First thing. R13 might be older then R2. This you found on hap-nodejs is generated by contributors and should comply to R2 I guess. |
The HAP spec documents don't ever include the television or television service... I think guess-and-check is going to be the only option for this one. |
@Shaquu @crxporter I don't know whether it makes sense to open a new issue fo my specific testings related to above would make sense here? However, first of all I spend some time to test After that I tried to wrap up the work on Support for service type Speaker
The control showing 'Television' seems to be like a slide, because you can swipe with that, but I just get one input source. I also have a remote on my iPhone: But there is now output while tapping on that. Maybe because I haven't set any characteristic properties for remote keys. For verification of services and characteristics, once again I was dealing with the recent Apple HomeKit Simulator My Fazit: What ever for HAP-node has implemented here, I come to the point where I don't believe in a successful setup of these services with NRCHKB. |
@djiwondee you need to use the service |
@crxporter are you really getting volume value or just 0/1? |
I’m getting the 1/0 from the volume buttons on the phone. I haven’t investigated more than that to try to get a slider type or relay an actual volume number (0-100 is the available range). Some more fiddling is needed to get the config just right. A good option may be to look at homebridge setups to see what they’ve figured out? That helped with cameras, could help figure out config on mimicking the full tv setup. |
I got the same 0/1 only. From my research I think there is no option for exact volume value. We can only receive 0/1 which is increment or decrement and is send on button release I guess. Of course we can always use it to populate volume by for example 5 on every push.
…On 25 Jan 2020, 23:59 +0100, crxporter ***@***.***>, wrote:
I’m getting the 1/0 from the volume buttons on the phone. I haven’t investigated more than that to try to get a slider type or relay an actual volume number (0-100 is the available range). Some more fiddling is needed to get the config just right.
A good option may be to look at homebridge setups to see what they’ve figured out? That helped with cameras, could help figure out config on mimicking the full tv setup.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Line 446 here looks like setup for volume control. Line 120 here is another example. Interesting thing here might be setting I’m at home today and just on my phone so I haven’t read through the whole code or tried things. I also looked over onkyo, Denon, Marantz, etc but it seems homebridge development stopped once manufacturers started integrating with homekit. @Shaquu you might be able to make more of it than me... |
I've been thinking and configuring this a bit more and I've realized - the controls we have access to with this plugin don't ever display a slider, do they? In my native devices I can only get a slider type control for airplay devices, it doesn't ever show in the Home app or in the Control Center remote. So while Right? |
@crxporter well I don't know yet :) Update. I couldn't make it to control volume from Control Center remote for TV + TV Speaker.
|
Indeed. We cannot add AirPlay support for our HomeKit NRCHKB TV. About Lightbulb as Linked Service. Adding more (Hue, Colour) characteristics to Lightbulb caused slider to move down and appear in separate section under Lightbulb displayName but still grouped under TV accessory in Home.app. See here |
Agreed. Let’s leave this thread open for a few more days please, if anyone is still trying to get this set up on dev branch, please speak up! |
## [1.0.0] - 2020.02.23 Lost backward compatibility. In order to make it work read this [notice](#163 (comment)). ### Fixed - Node id macify algorithm changed [#170](#170) - Corrections regarding issue [#12](#12) so that changes can be deployed without restarting node-red - Automatically creating a new service and replacing the old one if the service type changed - Automatically replacing an accessory with a new one if the accessory information changes (e.g. Name, Manufacturer, ...) - Video Filter value in Camera Control is now optional [#194](#194) (can be empty, before it was generated if was empty) - Removed updateReachability as it is deprecated (and doesn't make a difference) ### Added - After Service selection in node configuration Category will be automatically set to default for Service - Interface Name for Camera Service configuration - Support for new TV Remote services - Now first output is for onChange, second for onSet and third for camera snapshot. [#200](#200) - Sponsor Button on repository page ### Changed - Accessory Category in node configuration moved under Service selection - Clarify NO_RESPONSE in README - Update node-red version in dependencies - Camera Service source code to match newest improvements in homebridge-camera-ffmpeg - Update to latest HAP-NodeJS - Removed unnecessary accessory category from service node - Removed fields Manufacturer, Serial Number and Model from linked service nodes - Moved eslint and prettier configuration to package.json - Added automatic linting on pre-commit Thanks to all contributors! @radokristof @NorthernMan54 @gotofoo And thanks to those who also helped in testing! @crxporter @sjorge
@Shaquu, should be ready to close. All- please open a new issue for version 1.0.0 or higher if you have more related issues |
please correct the bug with skipping repeated values.
if i press the same key two or more times value of msg.payload.RemoteKey does not come more than once.
node-red-contrib-homekit-bridged@1.0.0-dev.2
The text was updated successfully, but these errors were encountered: