kiwi-cam / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
304 stars 95 forks source link

naming a numeral as a button gives an illegal value message #704

Open vmarks opened 5 months ago

vmarks commented 5 months ago

Hi,

in the logs, I see:

[1@@Name] characteristic was supplied illegal value: number instead of string, supplying illegal values will throw errors in the future [02/06/2024, 17:50:22] Initializing platform accessory '2'... [2@@Name] characteristic was supplied illegal value: number instead of string, supplying illegal values will throw errors in the future [02/06/2024, 17:50:22] Initializing platform accessory '3'... [3@@Name] characteristic was supplied illegal value: number instead of string, supplying illegal values will throw errors in the future

I have the numeral buttons named with their numbers. This only started after updating. What should the correct method be for naming a button with a number?

vmarks commented 5 months ago

Additionally, if I put the name: 1, in quotes to make it a string, I get the error:

[03/06/2024, 12:30:00] [BroadlinkRM] [CONFIG ERROR] 1Numeric values should look like this: "name": 1 not this "name": "1"

So which is it - name expects a string instead of a number and will throw errors in the future... or, numeric values should look like numbers, not strings?

kard8 commented 3 months ago

Hi @vmarks please send your current config with all personal data removed.

vmarks commented 3 months ago

the section for this plugin's platform is:

{ "platform": "BroadlinkRM", "name": "BroadlinkRM", "hideWelcomeMessage": true, "hideScanFrequencyButton": true, "hideLearnButton": true, "accessories": [ { "name": "HOT", "type": "switch", "stateless": false, "data": { "on": [ { "data": "2600500000011e8f111312121112121212371037111310131113111310131212123512371113101311131113101313111212121112121212123611371038113512361236113713341200058800011f4811000d05000000000000", "sendcode": 3, "interval": 0.5 } ], "off": [ { "data": "2600500000011e8f111312121112121212371037111310131113111310131212123512371113101311131113101313111212121112121212123611371038113512361236113713341200058800011f4811000d05000000000000", "sendcode": 3, "interval": 0.5 } ] } }, { "name": "N12", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8e131112121212121212351235131112121212121212121310123612351411111212121212113612361113121211121212123512351213131112351136133513351200058800011e4812000bf500011f4712000d050000000000000000000000000000", "pause": 1 }, { "data": "26005c0000011f8f131012121212121212351335121212111212121213111211133612351212111213351212131113341335131013111312111212361235131113101336123513341300058800011f47130004640400078e0001204713000d0500000000000000000000", "pause": 0.5 }, { "data": "2600580000011f8e121212121112131113351236131012121311131013111311143412361112121213111236131111361235131113111411113613101236131013111335123612351300058800011f4812000bf60001204713000d050000000000000000000000000000" } ], "off": "" } }, { "name": "Shopping", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8e131112121212121212351235131112121212121212121310123612351411111212121212113612361113121211121212123512351213131112351136133513351200058800011e4812000bf500011f4712000d050000000000000000000000000000", "pause": 0.5 }, { "data": "2600580000011f8e121212121112131113351236131012121311131013111311143412361112121213111236131111361235131113111411113613101236131013111335123612351300058800011f4812000bf60001204713000d050000000000000000000000000000", "pause": 1 }, { "data": "26005c0000011f8f131012121212121212351335121212111212121213111211133612351212111213351212131113341335131013111312111212361235131113101336123513341300058800011f47130004640400078e0001204713000d0500000000000000000000" } ], "off": "" } }, { "name": "Music", "type": "switch", "stateless": true, "data": { "on": [ { "data": "26005c0000011f8f131012121212121212351335121212111212121213111211133612351212111213351212131113341335131013111312111212361235131113101336123513341300058800011f47130004640400078e0001204713000d0500000000000000000000", "pause": 0.5 }, { "data": "2600500000011e9012121112121212121334133414111311121112121311121212351335121211131112121212121112121214341212121212351334133612351335121113361136120005880001204713000d05000000000000", "pause": 0.5 }, { "data": "2600500000011f8f131112111212121213341335121213111311111213111311123612351212121211361335133513341235131213111310121212121310131112121334133512361200058800011f4812000d05000000000000", "pause": 6 }, { "data": "260050000001218d13111310131113111434133413111311131013111411121113351235131113101411123514341311123514111211121213341212121213341312123513341335130005870001204711000d05000000000000" } ], "off": "" } }, { "name": "Esc", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8e131112121212121212351235131112121212121212121310123612351411111212121212113612361113121211121212123512351213131112351136133513351200058800011e4812000bf500011f4712000d050000000000000000000000000000", "pause": 0.5 } ], "off": "" } }, { "name": "NatGeo", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8e131112121212121212351235131112121212121212121310123612351411111212121212113612361113121211121212123512351213131112351136133513351200058800011e4812000bf500011f4712000d050000000000000000000000000000", "pause": 1 }, { "data": "2600500000011e8f121212111311131112361235121213111211131113121112133512351311131112121311123512351336131012121212123512361212121212121136123513361100058900011e4912000d05000000000000", "pause": 0.5 }, { "data": "2600500000011f8e131113111211131212351236121113111312111212121212133412351311131212351212123513351236131012121212131112361212111212121235123613351300058700011f4812000d05000000000000" } ], "off": "" } }, { "name": "Food", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8e131112121212121212351235131112121212121212121310123612351411111212121212113612361113121211121212123512351213131112351136133513351200058800011e4812000bf500011f4712000d050000000000000000000000000000", "pause": 1 }, { "data": "2600500000011f8e121213111311121212351236121212111311131112121311123512361212131112351236121113361136121212111212121212111336121112121235133513351200058800011f4813000d05000000000000", "pause": 0.5 }, { "data": "2600500000011e9012121112121212121334133414111311121112121311121212351335121211131112121212121112121214341212121212351334133612351335121113361136120005880001204713000d05000000000000" } ], "off": "" } }, { "name": "VOD", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8e131112121212121212351235131112121212121212121310123612351411111212121212113612361113121211121212123512351213131112351136133513351200058800011e4812000bf500011f4712000d050000000000000000000000000000", "pause": 1 }, { "data": "26005c0000011f8f131012121212121212351335121212111212121213111211133612351212111213351212131113341335131013111312111212361235131113101336123513341300058800011f47130004640400078e0001204713000d0500000000000000000000", "pause": 0.5 }, { "data": "2600500000011f8e131113111211131212351236121113111312111212121212133412351311131212351212123513351236131012121212131112361212111212121235123613351300058700011f4812000d05000000000000" } ], "off": "" } }, { "name": 0, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011e8f131112111212131113341336121111131212111212121311123612351311121212111335131013121311123513111212123513121037123513351211133612351200058800011f4813000d05000000000000" } ], "off": "" } }, { "name": 1, "type": "switch", "stateless": true, "data": { "on": [ { "data": "26005c0000011f8f131012121212121212351335121212111212121213111211133612351212111213351212131113341335131013111312111212361235131113101336123513341300058800011f47130004640400078e0001204713000d0500000000000000000000" } ], "off": "" } }, { "name": 2, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8e121212121112131113351236131012121311131013111311143412361112121213111236131111361235131113111411113613101236131013111335123612351300058800011f4812000bf60001204713000d050000000000000000000000000000" } ], "off": "" } }, { "name": 3, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011f8e121213111311121212351236121212111311131112121311123512361212131112351236121113361136121212111212121212111336121112121235133513351200058800011f4813000d05000000000000" } ], "off": "" } }, { "name": 4, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011e8f121212111311131112361235121213111211131113121112133512351311131112121311123512351336131012121212123512361212121212121136123513361100058900011e4912000d05000000000000" } ], "off": "" } }, { "name": 5, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011f8e131113111211131212351236121113111312111212121212133412351311131212351212123513351236131012121212131112361212111212121235123613351300058700011f4812000d05000000000000" } ], "off": "" } }, { "name": 6, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011e90121212111212120e17351235121213111113111213111311123613341311121212111236133512361235131112111311133512121311121112121335123612351200058900011f4813000d05000000000000" } ], "off": "" } }, { "name": 7, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011f8f131112111212121213341335121213111311111213111311123612351212121211361335133513341235131213111310121212121310131112121334133512361200058800011f4812000d05000000000000" } ], "off": "" } }, { "name": 8, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011e9012121112121212121334133414111311121112121311121212351335121211131112121212121112121214341212121212351334133612351335121113361136120005880001204713000d05000000000000" } ], "off": "" } }, { "name": 9, "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011e8f121212111311131112361334121212121310131113121211123612351212131111371311121112121212123513111310131212351236133413361112123612351300058800011e4913000d05000000000000" } ], "off": "" } }, { "name": "Green", "type": "switch", "stateless": true, "data": { "on": [ { "data": "260050000001218d13111310131113111434133413111311131013111411121113351235131113101411123514341311123514111211121213341212121213341312123513341335130005870001204711000d05000000000000" } ], "off": "" } }, { "name": "Red", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011f8f121211121113121213341335121212121212111212121212133413351212121212351212133413121334121212121112121213341312123512121235133512361200058800011f4713000bf600011f4813000d050000000000000000000000000000" } ], "off": "" } }, { "name": "Yellow", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011f8e131113111310121311361236121211121212131112121311123512361310131113351236123513111334141112111212121212111212133512111336123512351300058800011f4813000d05000000000000" } ], "off": "" } }, { "name": "Blue", "type": "switch", "stateless": true, "data": { "on": [ { "data": "260050000001208e131111131211121212351335131112121311121112121311133413351212121212111212121213341336121112121212123513341336111212121235133513351100058a00011e4812000d05000000000000" } ], "off": "" } }, { "name": "Up", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011e8f121212121212111311371235121212121112131111131211123612351212131211361137113612361211131111131113121113111213111310371136123612351200058900011f4712000bf600011f4712000d050000000000000000000000000000" } ], "off": "" } }, { "name": "Down", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011e90111211131212121210371137121111131212121211121212133511371113101311371212111212121235121213111311101313361136113711121137123512361200058800011f4910000d05000000000000" } ], "off": "" } }, { "name": "Left", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600580000011d8f1212131210140f1313361136111312121211121212121113103711371112111410141136121211131136121212121112123612121037123611131137113612361100058900011e4811000bf700011f4910000d050000000000000000000000000000" } ], "off": "" } }, { "name": "Right", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011f8e121212121113101312361235121212121212101411131113113612351212121213341236121111141137101311131212121111131137113611131136123612361100058900011e4812000d05000000000000" } ], "off": "" } }, { "name": "Select", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600500000011f8f111311121212121211361236121111131113121212111212123710371212121112121113123511131235111311131212113711371013123612111236123511381100058800011f4811000d05000000000000" } ], "off": "" } }, { "name": "Ch Up", "type": "switch", "stateless": true, "data": { "on": [ { "data": "260090000001218c13111410131114101334143313111311150e141114101310133513341311141112111311131112351410131013111411133413341335150e1435133414331336130005870001208d141013111211141113341335131013111311140f151013111334133413111311141013111311133414101310150f13111431163512351310133613341335123514000d05000000000000" } ], "off": "" } }, { "name": "Ch Dn", "type": "switch", "stateless": true, "data": { "on": [ { "data": "2600900000011f8f12121211121212121334133512121311121112121212131112361334121212121136131113101435121112121212131111121335123612121235123513361235130005880001208d1311131211121113123513351112121213111311121212121235123612111411113612121212123513111310131212121212103712351311123612361235133413000d05000000000000" } ], "off": "" } } ] },

kard8 commented 3 months ago

Try renaming all the number in the name part of the config within string as this as suggested by the error console.

"name": "1"

Example

{ "name": "1",
 "type": "switch", 
"stateless": true,
 "data":
 { "on": 
[ 
{ "data": "26005c0000011f8f131012121212121212351335121212111212121213111211133612351212111213351212131113341335131013111312111212361235131113101336123513341300058800011f47130004640400078e0001204713000d0500000000000000000000" } 
], 
"off": "" }
 }
vmarks commented 3 months ago

That does not work, I tried.

On Tue, Jul 30, 2024 at 6:06 AM kard8 @.***> wrote:

Try renaming all the number in the name part of the config within string as this as suggested by the error console.

"name": "1"

Example

{ "name": "1", "type": "switch", "stateless": true, "data": { "on": [ { "data": "26005c0000011f8f131012121212121212351335121212111212121213111211133612351212111213351212131113341335131013111312111212361235131113101336123513341300058800011f47130004640400078e0001204713000d0500000000000000000000" } ], "off": "" } }

— Reply to this email directly, view it on GitHub https://github.com/kiwi-cam/homebridge-broadlink-rm/issues/704#issuecomment-2257975886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACSWU4HM5TPWRNFKL7ACTLZO5QSTAVCNFSM6AAAAABIVEDIEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJXHE3TKOBYGY . You are receiving this because you were mentioned.Message ID: @.***>

kard8 commented 3 months ago

Please try renaming them as

"name": "One"

in the config and then renaming in HomeKit as 1

vmarks commented 3 months ago

That would work around the problem, but does not solve the actual problem.

The actual problem is that it objects to the naming as an integer, and doesn’t work with an integer as a string in quotes.

And it wouldn’t stick. In my experience home app renaming reverts to homebridge naming after reboots to homebridge.

On Tue, Jul 30, 2024 at 6:13 AM kard8 @.***> wrote:

Please try renaming them as

"name": "One"

in the config and then renaming in HomeKit as 1

— Reply to this email directly, view it on GitHub https://github.com/kiwi-cam/homebridge-broadlink-rm/issues/704#issuecomment-2257989661, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACSWUYXKIEJJVDETMSJ5DDZO5RNLAVCNFSM6AAAAABIVEDIEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJXHE4DSNRWGE . You are receiving this because you were mentioned.Message ID: @.***>