ztalbot2000 / homebridge-cmd4

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

[Support] state of the accessories won’t save between restart #117

Closed BaRaD5 closed 2 years ago

BaRaD5 commented 2 years ago

Hello! I’m running the plugin on a windows 10 pc and the state of the device will change to “on” after I restart HomeBridge Am I missing a line which will save the state? The log is saying that it cached the state but still won’t stay after restart

thank you

ztalbot2000 commented 2 years ago

Hi,

I need more information like what is in your config.json file.

ttyl, John

On Mon, Nov 8, 2021 at 3:18 AM BaRaD5 @.***> wrote:

Assigned #117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117 to @ztalbot2000 https://github.com/ztalbot2000.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/117#event-5581102691, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5O7LYU2MRA7VTWGFLUK6BXDANCNFSM5HSAVYCQ .

BaRaD5 commented 2 years ago

Hey John! thanks for responding I switched from a Windows machine to a Pi Same thing, State of devices will turn to defult (on)

Hi, I need more information like what is in your config.json file. ttyl, John

{
    "platform": "Cmd4",
    "name": "Cmd4",
    "debug": false,
    "allowTLV8": false,
    "outputConstants": false,
    "accessories": [
        {
            "type": "Television",
            "displayName": "Master Bedroom TV",
            "publishExternally": true,
            "category": "TELEVISION",
            "active": "ACTIVE",
            "activeIdentifier": 1,
            "configuredName": "Master Bedroom TV",
            "sleepDiscoveryMode": "ALWAYS_DISCOVERABLE",
            "linkedTypes": [
                {
                    "type": "InputSource",
                    "displayName": "HOT",
                    "configuredName": "HOT",
                    "currentVisibilityState": "SHOWN",
                    "inputSourceType": "HDMI",
                    "isConfigured": "CONFIGURED",
                    "identifier": 1,
                    "targetVisibilityState": "SHOWN",
                    "name": "HOT",
                    "manufacturer": "HOT",
                    "model": "HOT MAGIC HD",
                    "serialNumber": "00000001"
                }
            ],
            "manufacturer": "NEON",
            "model": "Android TV",
            "serialNumber": "00000001",
            "stateChangeResponseTime": 3
        },
        {
            "type": "Television",
            "displayName": "Living room TV",
            "publishExternally": true,
            "category": "TELEVISION",
            "active": "ACTIVE",
            "activeIdentifier": 1,
            "configuredName": "Living room TV",
            "sleepDiscoveryMode": "ALWAYS_DISCOVERABLE",
            "linkedTypes": [
                {
                    "type": "InputSource",
                    "displayName": "HOT",
                    "configuredName": "HOT",
                    "currentVisibilityState": "SHOWN",
                    "inputSourceType": "HDMI",
                    "isConfigured": "CONFIGURED",
                    "identifier": 1,
                    "targetVisibilityState": "SHOWN",
                    "name": "HOT",
                    "manufacturer": "HOT",
                    "model": "HOT MAGIC HD",
                    "serialNumber": "00000002"
                },
                {
                    "type": "InputSource",
                    "displayName": "Steam Link",
                    "configuredName": "Steam Link",
                    "currentVisibilityState": "SHOWN",
                    "inputSourceType": "APPLICATION",
                    "isConfigured": "CONFIGURED",
                    "identifier": 5,
                    "targetVisibilityState": "SHOWN",
                    "name": "Steam Link",
                    "manufacturer": "VALVE",
                    "model": "1.0",
                    "serialNumber": "00000002"
                }
            ],
            "manufacturer": "Philips",
            "model": "Philips",
            "serialNumber": "00000002",
            "stateChangeResponseTime": 3
        }
    ],
    "_bridge": {
        "username": "0E:73:E2:FF:33:46",
        "port": 30672
    }
}
ztalbot2000 commented 2 years ago

Hi,

Thanks for the quick response. I think you are a little confused about Homebridge and the purpose of the Cmd4 plugin, but that's all good. I'll try to help you as much as I can. Why I may think this is that you filled out the fields in the config.json for your TV, but there is no state_cmd in your config.json. Cmd4 expects you to write your own scripts to control devices that may not be supported by other plugins or in a way to your own satisfaction. Televisions are very complicated accessories. I don't think you want to write your own scripts for one. However, a quick search for Homebridge Neon TV plugin yielded: https://github.com/merdok/homebridge-webos-tv

I think this is more of what you are probably looking for.

I hope this helps and if it does, close the ticket. If your still stuck, just reply to the closed ticket, I'll still respond.

Ttyl, John

On Mon, Nov 8, 2021 at 8:32 AM BaRaD5 @.***> wrote:

Hi, I need more information like what is in your config.json file. ttyl, John … <#m_-3393807741112896838m-3264148231566268169_> On Mon, Nov 8, 2021 at 3:18 AM BaRaD5 @.***> wrote: Assigned #117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117 <#117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117> to @ztalbot2000 https://github.com/ztalbot2000 https://github.com/ztalbot2000. — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub <#117 (comment) https://github.com/ztalbot2000/homebridge-cmd4/issues/117#event-5581102691>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5O7LYU2MRA7VTWGFLUK6BXDANCNFSM5HSAVYCQ .

{ "platform": "Cmd4", "name": "Cmd4", "debug": false, "allowTLV8": false, "outputConstants": false, "accessories": [ { "type": "Television", "displayName": "Master Bedroom TV", "publishExternally": true, "category": "TELEVISION", "active": "ACTIVE", "activeIdentifier": 1, "configuredName": "Master Bedroom TV", "sleepDiscoveryMode": "ALWAYS_DISCOVERABLE", "linkedTypes": [ { "type": "InputSource", "displayName": "HOT", "configuredName": "HOT", "currentVisibilityState": "SHOWN", "inputSourceType": "HDMI", "isConfigured": "CONFIGURED", "identifier": 1, "targetVisibilityState": "SHOWN", "name": "HOT", "manufacturer": "HOT", "model": "HOT MAGIC HD", "serialNumber": "00000001" } ], "manufacturer": "NEON", "model": "Android TV", "serialNumber": "00000001", "stateChangeResponseTime": 3 }, { "type": "Television", "displayName": "Living room TV", "publishExternally": true, "category": "TELEVISION", "active": "ACTIVE", "activeIdentifier": 1, "configuredName": "Living room TV", "sleepDiscoveryMode": "ALWAYS_DISCOVERABLE", "linkedTypes": [ { "type": "InputSource", "displayName": "HOT", "configuredName": "HOT", "currentVisibilityState": "SHOWN", "inputSourceType": "HDMI", "isConfigured": "CONFIGURED", "identifier": 1, "targetVisibilityState": "SHOWN", "name": "HOT", "manufacturer": "HOT", "model": "HOT MAGIC HD", "serialNumber": "00000002" }, { "type": "InputSource", "displayName": "Steam Link", "configuredName": "Steam Link", "currentVisibilityState": "SHOWN", "inputSourceType": "APPLICATION", "isConfigured": "CONFIGURED", "identifier": 5, "targetVisibilityState": "SHOWN", "name": "Steam Link", "manufacturer": "VALVE", "model": "1.0", "serialNumber": "00000002" } ], "manufacturer": "Philips", "model": "Philips", "serialNumber": "00000002", "stateChangeResponseTime": 3 } ], "_bridge": { "username": "0E:73:E2:FF:33:46", "port": 30672 } }

— You are receiving this because you were mentioned.

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

BaRaD5 commented 2 years ago

Hi, Thanks for the quick response. I think you are a little confused about Homebridge and the purpose of the Cmd4 plugin, but that's all good. I'll try to help you as much as I can. Why I may think this is that you filled out the fields in the config.json for your TV, but there is no state_cmd in your config.json. Cmd4 expects you to write your own scripts to control devices that may not be supported by other plugins or in a way to your own satisfaction. Televisions are very complicated accessories. I don't think you want to write your own scripts for one. However, a quick search for Homebridge Neon TV plugin yielded: https://github.com/merdok/homebridge-webos-tv I think this is more of what you are probably looking for. I hope this helps and if it does, close the ticket. If your still stuck, just reply to the closed ticket, I'll still respond. Ttyl, John

Hey! let me explain: I have 2 dumb tv's as you can see by the json, one in the living room and one in the master bedroom I use current sensing smart plugs to tell when one is on nor off, the main goal here for me is to have an aesthetically pleasing Home app, I found that if i automate status checking after the daily HB restart so I can have the accurate status that im after

My bad for miss understanding the purpse of the plugin, great work! thank you john :)

ztalbot2000 commented 2 years ago

Hi,

Smart plugs are pretty easy to create scripts for, if you so wish to do so. Cmd4 has On/Off Switch templates at https://ztalbot2000.github.io/homebridge-cmd4

You still would need the statement to get the On/Off status or Set On/Off commands. I could probably help you out if need be. I'd need to know the models of those smart plugs. There may also be plugins for those smart plugs as well. This is all possible. It is just a matter of how much time you wish to spend on figuring it out.

Ttyl, John

Sent from Zarf’s iPad Air 2

On Nov 8, 2021, at 8:53 AM, BaRaD5 @.***> wrote:



Hi, Thanks for the quick response. I think you are a little confused about Homebridge and the purpose of the Cmd4 plugin, but that's all good. I'll try to help you as much as I can. Why I may think this is that you filled out the fields in the config.json for your TV, but there is no statecmd in your config.json. Cmd4 expects you to write your own scripts to control devices that may not be supported by other plugins or in a way to your own satisfaction. Televisions are very complicated accessories. I don't think you want to write your own scripts for one. However, a quick search for Homebridge Neon TV plugin yielded: https://github.com/merdok/homebridge-webos-tv I think this is more of what you are probably looking for. I hope this helps and if it does, close the ticket. If your still stuck, just reply to the closed ticket, I'll still respond. Ttyl, John … <#m-1502797253730987259> On Mon, Nov 8, 2021 at 8:32 AM BaRaD5 @.*> wrote: Hi, I need more information like what is in your config.json file. ttyl, John … <#m-3393807741112896838m-3264148231566268169_> On Mon, Nov 8, 2021 at 3:18 AM BaRaD5 @.*> wrote: Assigned #117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117 <#117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117> <#117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117 <#117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117>> to @ztalbot2000 https://github.com/ztalbot2000 https://github.com/ztalbot2000 https://github.com/ztalbot2000. — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub <#117 https://github.com/ztalbot2000/homebridge-cmd4/issues/117 (comment) <#117 (comment) https://github.com/ztalbot2000/homebridge-cmd4/issues/117#event-5581102691>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5O7LYU2MRA7VTWGFLUK6BXDANCNFSM5HSAVYCQ . { "platform": "Cmd4", "name": "Cmd4", "debug": false, "allowTLV8": false, "outputConstants": false, "accessories": [ { "type": "Television", "displayName": "Master Bedroom TV", "publishExternally": true, "category": "TELEVISION", "active": "ACTIVE", "activeIdentifier": 1, "configuredName": "Master Bedroom TV", "sleepDiscoveryMode": "ALWAYS_DISCOVERABLE", "linkedTypes": [ { "type": "InputSource", "displayName": "HOT", "configuredName": "HOT", "currentVisibilityState": "SHOWN", "inputSourceType": "HDMI", "isConfigured": "CONFIGURED", "identifier": 1, "targetVisibilityState": "SHOWN", "name": "HOT", "manufacturer": "HOT", "model": "HOT MAGIC HD", "serialNumber": "00000001" } ], "manufacturer": "NEON", "model": "Android TV", "serialNumber": "00000001", "stateChangeResponseTime": 3 }, { "type": "Television", "displayName": "Living room TV", "publishExternally": true, "category": "TELEVISION", "active": "ACTIVE", "activeIdentifier": 1, "configuredName": "Living room TV", "sleepDiscoveryMode": "ALWAYS_DISCOVERABLE", "linkedTypes": [ { "type": "InputSource", "displayName": "HOT", "configuredName": "HOT", "currentVisibilityState": "SHOWN", "inputSourceType": "HDMI", "isConfigured": "CONFIGURED", "identifier": 1, "targetVisibilityState": "SHOWN", "name": "HOT", "manufacturer": "HOT", "model": "HOT MAGIC HD", "serialNumber": "00000002" }, { "type": "InputSource", "displayName": "Steam Link", "configuredName": "Steam Link", "currentVisibilityState": "SHOWN", "inputSourceType": "APPLICATION", "isConfigured": "CONFIGURED", "identifier": 5, "targetVisibilityState": "SHOWN", "name": "Steam Link", "manufacturer": "VALVE", "model": "1.0", "serialNumber": "00000002" } ], "manufacturer": "Philips", "model": "Philips", "serialNumber": "00000002", "stateChangeResponseTime": 3 } ], "_bridge": { "username": "0E:73:E2:FF:33:46", "port": 30672 } } — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#117 (comment) https://github.com/ztalbot2000/homebridge-cmd4/issues/117#issuecomment-963154464>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX5HDQRN7DN5BRAMGJ3UK7GQRANCNFSM5HSAVYCQ .

Hey! let me explain: I have 2 dumb tv's as you can see by the json, one in the living room and one in the master bedroom I use current sensing smart plugs to tell when one is on nor off, the main goal here for me is to have an aesthetically pleasing Home app, I found that if i automate status checking after the daily HB restart i can have the accurate status that im after

My bad for miss understanding the purpse of the plugin, great work! thank you john :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/117#issuecomment-963170242, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX35JHVZ7S4VG6QVEO3UK7I5FANCNFSM5HSAVYCQ .

BaRaD5 commented 2 years ago

Hey! Sorry I think you miss understood me now:) I got everything up and running using said smart plugs using Smartthings The said TV’s in CMD4 are purely aesthetics for the tv icon

thank you very much for your good will!