ztalbot2000 / homebridge-cmd4

CMD4 Plugin for Homebridge - Supports ~All Accessory Types & now all Characteristics too
Apache License 2.0
147 stars 13 forks source link

Since iOS 14 my television is displayed with house icon instead of TV icon #70

Closed MichlW closed 3 years ago

MichlW commented 3 years ago

Hi John,

I noticed a change since release of iOS 14 makes my Television appear as an house icon in Home App. Before iOS 14 it was a TV Icon.

Other plugins might have a solution to fix that with publishAllTVAsExternalAccessory option, but I do not really know what that means and if you should change some code or if I should do some configuration of my Homebridge.

Do you noticed that change already? Maybe you know what to do.

Thanks in advance.

MichlW commented 3 years ago

Closed due to #66.

Sorry!

MichlW commented 3 years ago

Hey John,

did you notice my comment in https://github.com/ztalbot2000/homebridge-cmd4/issues/66 ?

That is still a problem even in iOS 14.2.

ztalbot2000 commented 3 years ago

Hey Mitch,

What's up.

The stuff in GitHub is later than NPM. I never got around to pushing it out.

TTFN, John

On Wed, Nov 11, 2020 at 5:43 AM MichlW notifications@github.com wrote:

Reopened #70 https://github.com/ztalbot2000/homebridge-cmd4/issues/70.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#event-3983239077, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX2BU5OVADODUORHIELSPJTFTANCNFSM4TBKP7KQ .

ztalbot2000 commented 3 years ago

Hi Mitch,

Sorry, I did not. I only got the reopen message. I'll look now. TTFN, John

On Wed, Nov 11, 2020 at 5:45 AM MichlW notifications@github.com wrote:

Hey John,

did you notice my comment https://github.com/ztalbot2000/homebridge-cmd4/issues/66#issuecomment-718189732 in #66 https://github.com/ztalbot2000/homebridge-cmd4/issues/66 ?

That is still a problem even in iOS 14.2.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-725349936, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXZXUV6AM737YOMHF6LSPJTNBANCNFSM4TBKP7KQ .

ztalbot2000 commented 3 years ago

Okay, I just read it. My unit test script can check for changed options, but there is no way to check for new ones. I'll review them all.

My structure of all the options I believe is better than that of homebridges random defines. It is more inclusive. Though it does take up a small amount of memory, but memory is cheap.

I'll let you know what I find.

TTFN, John

On Wed, Nov 11, 2020 at 5:50 AM John Talbot ztalbot2000@gmail.com wrote:

Hi Mitch,

Sorry, I did not. I only got the reopen message. I'll look now. TTFN, John

On Wed, Nov 11, 2020 at 5:45 AM MichlW notifications@github.com wrote:

Hey John,

did you notice my comment https://github.com/ztalbot2000/homebridge-cmd4/issues/66#issuecomment-718189732 in #66 https://github.com/ztalbot2000/homebridge-cmd4/issues/66 ?

That is still a problem even in iOS 14.2.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-725349936, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXZXUV6AM737YOMHF6LSPJTNBANCNFSM4TBKP7KQ .

MichlW commented 3 years ago

To clarify:

iOS 13.x image

iOS 14.x image

Both are fully functional Television accessories.

ztalbot2000 commented 3 years ago

Interesting. Thx for the pics

On Wed, Nov 11, 2020 at 6:03 AM MichlW notifications@github.com wrote:

To clarify:

iOS 13.x [image: image] https://user-images.githubusercontent.com/49558935/98803655-6443a500-2415-11eb-9b66-092926a6d9c8.png

iOS 14.x [image: image] https://user-images.githubusercontent.com/49558935/98803928-c2708800-2415-11eb-9d75-6fccb954440c.png

Both are fully functional Television accessories.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-725357846, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXZXJXVQRSKONYS7R33SPJVO7ANCNFSM4TBKP7KQ .

ztalbot2000 commented 3 years ago

Hi,

I have not tried to replicate this yes, but I did look through the Hap code for anything resembling publishAllTVAsExternalAccessory Could you please tell me where you saw it as there was nothing I could find.

Thanks,

John

On Wed, Nov 11, 2020 at 7:46 AM John Talbot ztalbot2000@gmail.com wrote:

Interesting. Thx for the pics

On Wed, Nov 11, 2020 at 6:03 AM MichlW notifications@github.com wrote:

To clarify:

iOS 13.x [image: image] https://user-images.githubusercontent.com/49558935/98803655-6443a500-2415-11eb-9b66-092926a6d9c8.png

iOS 14.x [image: image] https://user-images.githubusercontent.com/49558935/98803928-c2708800-2415-11eb-9d75-6fccb954440c.png

Both are fully functional Television accessories.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-725357846, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXZXJXVQRSKONYS7R33SPJVO7ANCNFSM4TBKP7KQ .

MichlW commented 3 years ago

Hey John,

I don't know whether there is such a function with exactly this name. It should be more of an indication of the direction in which to look.

In the web you can find a lot of developers and users who recognized this icon change when iOS 14 was introduced and had to adapt their plugins.

Reddit 1 Reddit 2 Reddit 3

Github 1 Github 2 Github 3 ...and more

Many of them gets already fixed...

I'm so sorry, but I am not familiar with developing HomeKit plugins... So i can only assist you in testing.

Kind regards Michael

ztalbot2000 commented 3 years ago

Hi,

I had an hour or so and gave this a shot. Homebridge was running on my new Big Sur upgrade. HomeKit did not connect to it at all. I'll have to try again later. This is just to let you know I have not forgotten about this ticket.

ttfn, John

On Thu, Nov 12, 2020 at 1:41 AM MichlW notifications@github.com wrote:

Hey John,

I don't know whether there is such a function with exactly this name. It should be more of an indication of the direction in which to look.

In the web you could find a lot of developers and users who recognized this icon change when iOS 14 was introduced and had to adapt their plugins.

Reddit 1 https://www.reddit.com/r/HomeKit/comments/iu1e3m/homebridge_tv_icons_turned_into_a_house_with_ios/ Reddit 2 https://www.reddit.com/r/homebridge/comments/jfhpux/tv_icon_doesnt_appear_in_homekit_ios_14/ Reddit 3 https://www.reddit.com/r/HOOBS/comments/iuhnnc/ios_14_problem_with_hoobs_and_homekit_tv_icon/

Github 1 https://github.com/normen/homebridge-bravia/issues/129 Github 2 https://github.com/nicoduj/homebridge-harmony/issues/282 Guthub 3 https://github.com/homebridge/homebridge/issues/2683 ...and more https://www.google.com/search?ei=ANmsX-CqDo3XkwWtyIWwCA&q=ios+14+television+external+accessory+site%3Agithub.com&oq=ios+14+television+external+accessory+site%3Agithub.com&gs_lcp=CgZwc3ktYWIQA1ClCljMDmDCD2gAcAB4AIABUYgBlgKSAQE1mAEAoAEBqgEHZ3dzLXdpesABAQ&sclient=psy-ab&ved=0ahUKEwjgqq-Rs_zsAhWN66QKHS1kAYYQ4dUDCA0&uact=5

Many of them gets already fixed...

I'm so sorry, but I am not familiar with developing HomeKit plugins... So i can only assist you in testing.

Kind regards Michael

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-725873972, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX62KYI3LIU2Z3N4M7DSPN7TJANCNFSM4TBKP7KQ .

ztalbot2000 commented 3 years ago

I'm trying this on my pi and see what you see. Did you send me your Television.sh script? Just wondering.

Thanks, John

On Tue, Nov 17, 2020 at 12:57 PM John Talbot ztalbot2000@gmail.com wrote:

Hi,

I had an hour or so and gave this a shot. Homebridge was running on my new Big Sur upgrade. HomeKit did not connect to it at all. I'll have to try again later. This is just to let you know I have not forgotten about this ticket.

ttfn, John

On Thu, Nov 12, 2020 at 1:41 AM MichlW notifications@github.com wrote:

Hey John,

I don't know whether there is such a function with exactly this name. It should be more of an indication of the direction in which to look.

In the web you could find a lot of developers and users who recognized this icon change when iOS 14 was introduced and had to adapt their plugins.

Reddit 1 https://www.reddit.com/r/HomeKit/comments/iu1e3m/homebridge_tv_icons_turned_into_a_house_with_ios/ Reddit 2 https://www.reddit.com/r/homebridge/comments/jfhpux/tv_icon_doesnt_appear_in_homekit_ios_14/ Reddit 3 https://www.reddit.com/r/HOOBS/comments/iuhnnc/ios_14_problem_with_hoobs_and_homekit_tv_icon/

Github 1 https://github.com/normen/homebridge-bravia/issues/129 Github 2 https://github.com/nicoduj/homebridge-harmony/issues/282 Guthub 3 https://github.com/homebridge/homebridge/issues/2683 ...and more https://www.google.com/search?ei=ANmsX-CqDo3XkwWtyIWwCA&q=ios+14+television+external+accessory+site%3Agithub.com&oq=ios+14+television+external+accessory+site%3Agithub.com&gs_lcp=CgZwc3ktYWIQA1ClCljMDmDCD2gAcAB4AIABUYgBlgKSAQE1mAEAoAEBqgEHZ3dzLXdpesABAQ&sclient=psy-ab&ved=0ahUKEwjgqq-Rs_zsAhWN66QKHS1kAYYQ4dUDCA0&uact=5

Many of them gets already fixed...

I'm so sorry, but I am not familiar with developing HomeKit plugins... So i can only assist you in testing.

Kind regards Michael

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-725873972, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX62KYI3LIU2Z3N4M7DSPN7TJANCNFSM4TBKP7KQ .

MichlW commented 3 years ago

Hey John,

thanks vor investigating this.

Here is my script, but I think that has nothing to do with functional layer of my Television.sh content:

#!/bin/sh

TELEVISION_IP=172.16.2.30
MEDIAPI_IP=172.16.2.31

TRANSITION_TO_STANDBY="/dev/shm/Television.TransitionToStandby"
TRANSITION_TO_ON="/dev/shm/Television.TransitionToOn"

if [ "$1" = "Get" ]; then
        case $3 in
                "Active")
                        ping -c 2 -W 1 -w 2 $TELEVISION_IP > /dev/null 2>&1
                        if [ $? -eq 0 ]; then
                                if [ -f $TRANSITION_TO_STANDBY ]; then
                                        echo 0
                                else
                                        if [ -f $TRANSITION_TO_ON ]; then rm -f $TRANSITION_TO_ON; fi
                                        echo 1
                                fi
                        else
                                if [ -f $TRANSITION_TO_ON ]; then
                                        echo 1
                                else
                                        if [ -f $TRANSITION_TO_STANDBY ]; then rm -f $TRANSITION_TO_STANDBY; fi
                                        echo 0
                                fi
                        fi
                ;;
                "ActiveIdentifier")
                        echo 1234
                ;;
        esac
        exit 0
fi

if [ "$1" = "Set" ]; then
        case $3 in
                "Active")
                if [ "$4" = "1" ]; then
                        if [ ! -f $TRANSITION_TO_STANDBY ]; then
                                curl -s --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.json-cec","params":{"command":"activate"}},"id":0}' http://$MEDIAPI_IP:8080/jsonrpc
                                touch $TRANSITION_TO_ON
                        fi
                else
                        if [ ! -f $TRANSITION_TO_ON ]; then
                                for i in 1 2 3; do
                                        curl -s --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.json-cec","params":{"command":"standby"}},"id":0}' http://$MEDIAPI_IP:8080/jsonrpc
                                        if [ $i -lt 3 ]; then sleep 0.2; fi
                                done
                                touch $TRANSITION_TO_STANDBY
                        fi
                fi
                ;;
        esac
        exit 0
fi

exit 66

The script uses HDMI CEC from a connected Raspberry Pi with installed Kodi (LibreELEC) to power on and off the Television. MEDIAPI_IP is the Raspberry Pi. TELEVISION_IP is the TV itself.

Greetings

ztalbot2000 commented 3 years ago

I tried this other plug-in: https://github.com/SeydX/homebridge-bravia-tvos It came up as a switch. Justly so as it registers as one. Still digging. John

ztalbot2000 commented 3 years ago

I just tried https://github.com/normen/homebridge-bravia It comes up as a house also. No ideas yet.

ztalbot2000 commented 3 years ago

I found a good reason here. I'm on the hunt .... https://github.com/kiwi-cam/homebridge-broadlink-rm/issues/57#issuecomment-694058114

ztalbot2000 commented 3 years ago

Hi Mich,

I agree it has nothing to do with the problem we are seeing. I'm just covering all bases. I think I know what's up, working on it as well as many new characteristics and devices.

Tttfn, John

On Tue, Nov 17, 2020 at 3:57 PM MichlW notifications@github.com wrote:

Hey John,

thanks vor investigating this.

Here is my script, but I think that has nothing to do with functional layer of my Television.sh content:

!/bin/sh

TELEVISION_IP=172.16.2.30 MEDIAPI_IP=172.16.2.31

TRANSITION_TO_STANDBY="/dev/shm/Television.TransitionToStandby" TRANSITION_TO_ON="/dev/shm/Television.TransitionToOn"

if [ "$1" = "Get" ]; then case $3 in "Active") ping -c 2 -W 1 -w 2 $TELEVISION_IP > /dev/null 2>&1 if [ $? -eq 0 ]; then if [ -f $TRANSITION_TO_STANDBY ]; then echo 0 else if [ -f $TRANSITION_TO_ON ]; then rm -f $TRANSITION_TO_ON; fi echo 1 fi else if [ -f $TRANSITION_TO_ON ]; then echo 1 else if [ -f $TRANSITION_TO_STANDBY ]; then rm -f $TRANSITION_TO_STANDBY; fi echo 0 fi fi ;; "ActiveIdentifier") echo 1234 ;; esac exit 0 fi

if [ "$1" = "Set" ]; then case $3 in "Active") if [ "$4" = "1" ]; then if [ ! -f $TRANSITION_TO_STANDBY ]; then curl -s --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.json-cec","params":{"command":"activate"}},"id":0}' http://$MEDIAPI_IP:8080/jsonrpc touch $TRANSITION_TO_ON fi else if [ ! -f $TRANSITION_TO_ON ]; then for i in 1 2 3; do curl -s --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.json-cec","params":{"command":"standby"}},"id":0}' http://$MEDIAPI_IP:8080/jsonrpc if [ $i -lt 3 ]; then sleep 0.2; fi done touch $TRANSITION_TO_STANDBY fi fi ;; esac exit 0 fi

exit 66

The script uses HDMI CEC from a connected Raspberry Pi with installed Kodi (LibreELEC) to power on and off the Television. MEDIAPI_IP is the Raspberry Pi. TELEVISION_IP is the TV itself.

Greetings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-729209248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX6RPKOYKEY3XRLJXFTSQLPTNANCNFSM4TBKP7KQ .

ztalbot2000 commented 3 years ago

Hey Mitch,

I spent 3 hours trying to get a TV icon, with no luck. I'm going to have to go back to basics with a test plugin as Homebridge suggests. Stay tuned ...

TTFN, John

On Thu, Nov 19, 2020 at 2:58 PM John Talbot ztalbot2000@gmail.com wrote:

Hi Mich,

I agree it has nothing to do with the problem we are seeing. I'm just covering all bases. I think I know what's up, working on it as well as many new characteristics and devices.

Tttfn, John

On Tue, Nov 17, 2020 at 3:57 PM MichlW notifications@github.com wrote:

Hey John,

thanks vor investigating this.

Here is my script, but I think that has nothing to do with functional layer of my Television.sh content:

!/bin/sh

TELEVISION_IP=172.16.2.30 MEDIAPI_IP=172.16.2.31

TRANSITION_TO_STANDBY="/dev/shm/Television.TransitionToStandby" TRANSITION_TO_ON="/dev/shm/Television.TransitionToOn"

if [ "$1" = "Get" ]; then case $3 in "Active") ping -c 2 -W 1 -w 2 $TELEVISION_IP > /dev/null 2>&1 if [ $? -eq 0 ]; then if [ -f $TRANSITION_TO_STANDBY ]; then echo 0 else if [ -f $TRANSITION_TO_ON ]; then rm -f $TRANSITION_TO_ON; fi echo 1 fi else if [ -f $TRANSITION_TO_ON ]; then echo 1 else if [ -f $TRANSITION_TO_STANDBY ]; then rm -f $TRANSITION_TO_STANDBY; fi echo 0 fi fi ;; "ActiveIdentifier") echo 1234 ;; esac exit 0 fi

if [ "$1" = "Set" ]; then case $3 in "Active") if [ "$4" = "1" ]; then if [ ! -f $TRANSITION_TO_STANDBY ]; then curl -s --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.json-cec","params":{"command":"activate"}},"id":0}' http://$MEDIAPI_IP:8080/jsonrpc touch $TRANSITION_TO_ON fi else if [ ! -f $TRANSITION_TO_ON ]; then for i in 1 2 3; do curl -s --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.json-cec","params":{"command":"standby"}},"id":0}' http://$MEDIAPI_IP:8080/jsonrpc if [ $i -lt 3 ]; then sleep 0.2; fi done touch $TRANSITION_TO_STANDBY fi fi ;; esac exit 0 fi

exit 66

The script uses HDMI CEC from a connected Raspberry Pi with installed Kodi (LibreELEC) to power on and off the Television. MEDIAPI_IP is the Raspberry Pi. TELEVISION_IP is the TV itself.

Greetings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-729209248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX6RPKOYKEY3XRLJXFTSQLPTNANCNFSM4TBKP7KQ .

ztalbot2000 commented 3 years ago

This is driving me insane. It actually may be a homebridge issue. It does have to do with "category" as per my previous notes. For whatever reason, homebridge will not see it. I tried homebridge-denon-tv and it too gave me those house. So does homebridge-brava-tv. Least to say, I'm still working on it.

ztalbot2000 commented 3 years ago

I finally got a working answer here: https://developers.homebridge.io/#/service/Television

I will have a solution soon.

ztalbot2000 commented 3 years ago

Fixed in dev branch b_IOS14_dev

This branch contains Cmd4 V3.0. Big changes, though backward compatible. All Accessories are now Platform Accessories and require "category": "TELEVISION" and "publishExternally": true as per Homebridge API documentation.
As for Cmd4, I just put the first pass of new documentation on the branch. It's now sub divided into README. AdvancedTroubleShooting and a Developers Guide. This update requires the new lib and utils on this branch, if you want to try it. I'm working hard on releasing this soon. Lots of other good stuff too.

Sorry for the long delay. It took me awhile to fully understand the implications of the changes to Homebridge. I probably rewrote this four times. This will track the API exactly.

ttfn, John

MichlW commented 3 years ago

I've updated and reconfigured my both Cmd4 devices (Television, DoorLock) to version 3.0.3. Therefore I want to say MANY THANKS to you and for the new version. The TV icon now is shown correctly.

Great work!

Greetings Michael

ztalbot2000 commented 3 years ago

Hi Michael,

Your quite welcome. Sometimes it gives me something to do. I can only spend an hour or so a day on it, but it adds up.

I'm still working on making the caching less painful by not caching Cmd4 directives like polling. I hope to publish 3.0.4 tomorrow.

Thanks again for your help and patience as well.

Time to take meds and go back to bed. Ttyl, John

On Thu, Jan 14, 2021 at 5:57 AM MichlW notifications@github.com wrote:

I've updated and reconfigured my both Cmd4 devices (Television, DoorLock) to version 3.0.3. Therefore I want to say MANY THANKS to you and for the new version. The TV icon now is shown correctly.

Great work!

Greetings Michael

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/70#issuecomment-760121052, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3WWCRSTZ423XJQFWDSZ3EYPANCNFSM4TBKP7KQ .