Closed nava0928 closed 3 years ago
@nava0928
Can u post your config pls
{ "bridge": { "name": "Homebridge", "username": "0E:C8:7B:76:2A:67", "port": 51826, "pin": "772-57-168" }, "description": "This is an example configuration file. You can use this as a template for creating your own configuration file containing devices you actually own.", "accessories": [ { "accessory": "XiaoMiPowerStrip", "name": "主卧排插", "address": "192.168.1.120", "token": "464254b7dba3c86cb6b3a87bf65a64ba", "model": "zimi.powerstrip.v2" }, { "accessory": "XiaoMiPowerStrip", "name": "餐厅排插", "address": "192.168.1.121", "token": "4bae0e5b996a3ebefdafd3f752084254", "model": "zimi.powerstrip.v2" }, { "name": "扫地机器人", "ip": "192.168.1.100", "token": "577a44685952584d4c545a7a304e5364", "pause": true, "dock": true, "accessory": "XiaomiRoborockVacuum" } ], "platforms": [ { "platform": "MiAirPurifierPlatform", "deviceCfgs": [ { "type": "MiAirPurifierPro", "ip": "192.168.1.101", "token": "5c52a245596140e7488379abd4331b8c", "airPurifierDisable": false, "airPurifierName": "空气净化器Pro", "silentModeSwitchDisable": false, "silentModeSwitchName": "MiAirPurifierPro Silent Mode Switch", "temperatureDisable": false, "temperatureName": "MiAirPurifierPro Temperature", "humidityDisable": false, "humidityName": "MiAirPurifierPro Humidity", "buzzerSwitchDisable": true, "buzzerSwitchName": "MiAirPurifierPro Buzzer Switch", "ledBulbDisable": true, "ledBulbName": "MiAirPurifierPro LED Switch", "airQualityDisable": false, "airQualityName": "MiAirPurifierPro AirQuality" }, { "type": "MiAirPurifier2", "ip": "192.168.1.102", "token": "054580126abc7906aee6c1c413d7af80", "airPurifierDisable": false, "airPurifierName": "空气净化器", "silentModeSwitchDisable": false, "silentModeSwitchName": "MiAirPurifier2 Silent Mode Switch", "temperatureDisable": false, "temperatureName": "MiAirPurifier2 Temperature", "humidityDisable": false, "humidityName": "MiAirPurifier2 Humidity", "buzzerSwitchDisable": true, "buzzerSwitchName": "MiAirPurifier2 Buzzer Switch", "ledBulbDisable": true, "ledBulbName": "MiAirPurifier2 LED Switch", "airQualityDisable": false, "airQualityName": "MiAirPurifier2 AirQuality" } ] }, { "platform": "BraviaOSPlatform", "tvs": [ { "name": "客厅电视", "ip": "192.168.1.75", "mac": "FC:01:7C:24:A5:87", "port": 80, "psk": "326277", "extraInputs": false, "cecInputs": true, "wol": false, "customSpeaker": true, "speakerType": "speaker" } ] } ] }
and now
[5/3/2019, 6:08:37 PM] [BraviaOSPlatform] [ERROR] 客厅电视: An error occured while handling accessories! [5/3/2019, 6:08:37 PM] [BraviaOSPlatform] [ERROR] { "status": 500, "message": "Internal Server Error", "config": { "transformRequest": {}, "transformResponse": {}, "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "headers": { "Accept": "application/json, text/plain, /", "Content-Type": "application/json", "X-Auth-PSK": "326277", "User-Agent": "axios/0.18.0", "Content-Length": 78 }, "method": "post", "url": "http://192.168.1.75:80/sony/avContent", "data": "{\"id\":1,\"method\":\"getCurrentExternalInputsStatus\",\"version\":\"1.0\",\"params\":[]}" }, "data": { "error": [ 500, "Internal Server Error" ], "id": 1 } }
@nava0928
Can u try without psk pls, just remove PSK from config and try again
When PSK is cancelled, the TV will prompt for pin, but there is no pin option in your configuration instructions.
@nava0928
In your homebridge folder will be generated a file, there you need to give the pin
After typing pin, it looks as if the connection is successful. But I couldn't find the TV icon on the homekit.
[5/3/2019, 6:47:51 PM] [BraviaOSPlatform] [INFO] 客厅电视: Please enter the four-digit PIN in 客厅电视.json! Located at /homebridge [5/3/2019, 6:47:51 PM] [BraviaOSPlatform] [INFO] 客厅电视: Trying again in 30 seconds... [5/3/2019, 6:48:21 PM] [BraviaOSPlatform] [INFO] 客厅电视: 客厅电视.json refreshed with new cookie! [5/3/2019, 6:48:25 PM] [BraviaOSPlatform] [INFO] 客厅电视: Authenticated! [5/3/2019, 6:48:25 PM] [BraviaOSPlatform] [INFO] 客厅电视: CEC detected, checking TV state before fetching inputs...
After this appears in the log, there is no other information about the TV.
@nava0928
Set wol to true and try again pls
and……
[5/3/2019, 7:08:09 PM] [BraviaOSPlatform] [INFO] 客厅电视: 客厅电视.json refreshed with new cookie! [5/3/2019, 7:08:14 PM] [BraviaOSPlatform] [INFO] 客厅电视: Authenticated! [5/3/2019, 7:08:14 PM] [BraviaOSPlatform] [INFO] 客厅电视: CEC detected, checking TV state before fetching inputs... [5/3/2019, 7:08:14 PM] [BraviaOSPlatform] [WARN] 客厅电视: Can not check TV state, because WOL is on! [5/3/2019, 7:08:14 PM] [BraviaOSPlatform] [INFO] 客厅电视: Turning on TV (WOL) [5/3/2019, 7:08:14 PM] [BraviaOSPlatform] [INFO] 客厅电视: TV switched ON! [5/3/2019, 7:08:14 PM] [BraviaOSPlatform] [INFO] 客厅电视: Wait 7s before fetching inputs..
@nava0928
Does the tv turns on?
Can u start homebridge in debug mode pls?
homebridge -D
or with systemd
DEBUG=BraviaPlatform,BraviaPlatformApi
[5/3/2019, 7:17:30 PM] Plugin /homebridge/node_modules/homebridge-bravia-tvos requires Node version of ^8.9.1 which does not satisfy the current Node version of v10.15.3. You may need to upgrade your installation of Node.
Maybe I should wait a while to test, I see your answer in other questions that if you connect TV frequently, there may be 500 errors. Because I also had 500 errors when I was testing yesterday, I connected to it today when I retested. Today, I adjusted the configuration file again, there was no connection later.
I will test the situation tomorrow, I will report it to you again. Thank you for developing this plugin!
hi,It seems that my idea is correct. today I restored the configuration with psk yesterday, and then turned on the TV, and the connection was successful once! But then, because of the lack of information about a device in the input signal, I restarted the homebridge and then a 500 error occurred.
I was seeing this same error: (node:2722) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON at JSON.stringify () at TelevisionAccessory.handleAccessory (/homebridge/node_modules/homebridge-bravia- tvos/src/accessory.js:127:30) at process._tickCallback (internal/process/next_tick.js:68:7) (node:2722) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
I also noticed that my wifi was losing it's connection every 5 minutes or so. When that happens, your plugin loses its connection to the TV and tries to reconnect. Every so often during one of these cycles your plugin throws this error. What I discovered was that IPV6 routing was disabled in my router (Netgear Orbi) and syslog showed that wlan0 was losing carrier when an IPV6 router could not be found. Once I enabled IPV6 in the router (and gave the TV a static IP address - not sure if this matters but it makes managing config.json easier), the errors stopped. Hope this helps.....
One more thing: It turns out that the wifi on the Raspberry Pi 3B+ has a power saving feature that is turned on by default. With this on, the wifi connection drops after a period of inactivity. The power saving feature can be disabled via "iwconfig wlan0 power off"
hi,It seems that my idea is correct. today I restored the configuration with psk yesterday, and then turned on the TV, and the connection was successful once! But then, because of the lack of information about a device in the input signal, I restarted the homebridge and then a 500 error occurred.
My router is UBNT ER-X and uses OPENWRT firmware. By default, IPV6 is always turned on. The smart devices in the home use static IP.
Also give the author a question. According to the query, I found that the Sony 75Z9F is the version of Android 8.0.
@SeydX I seem to have missed a message. My PS4, and shield TV are connected to Samsung's audio system, and then the HDMI out of the audio system is connected to the TV's HDMI3 (EARC). I found that sometimes the signal can search for the input of the PS4, but I have never searched for the shield TV. I don't know if this input method has caused some impact?
Any progress regarding this error? I can easily reproduce this problem by simply turning off the wifi while homebridge (and your plugin) are running.
[2019-5-16 14:25:51] [BraviaOSPlatform] [ERROR] Sony TV: An error occured while handling accessories!
(node:15673) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
at JSON.stringify (
Im working on this
same 500 error here, sony a8f.
This error is the worst. You can’t uninstall this plugin without redoing your entire homekit setup. It crashes everything
Could this error occur if there is something else on the network controlling the tv too?
Example, I noticed my z9d was throwing errors and I have it also connected to my control4 smart home. That driver uses IP control, MAC address, Web API and WoL.
My other tv isn’t connected to control4 and this error never comes up.
Maybe the issue is the interval? Control4 interval is 30. Maybe it should match.
As a note - the other homekit driver by arnif works fine in my setup and doesn’t throw errors. It just takes a few try’s to turn a tv off.
Changed my control4 to use UUID instead of IP. Idk if that matters.
Updated my config and reinstalled this driver. Got it working for now using MAC address. Tried wol and it didn’t work. Removed it and it worked.
Haven’t dared try cecinputs again - that’s always been how it fails and either crashes completely making me have to wipe my entire homebridge or makes all hdmi seperate tiles
500 error is when you do a call at sony/avContent with method getCurrentExternalInputsStatus. If there is input coming in through HDMI (at least on port 1 which I have tested), then it will generate a 500 error.
Currently working on v4 and there will be some major changes, should fix this problem
Sorting out the issues. This issue is fixed in v4 (coming soon)
[BraviaOSPlatform] [ERROR] 客厅电视: An error occured while handling accessories! (node:2722) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON at JSON.stringify ()
at TelevisionAccessory.handleAccessory (/homebridge/node_modules/homebridge-bravia-tvos/src/accessory.js:127:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:2722) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2722) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
How can I deal with this problem? thanks
Today, after my first successful configuration, I plan to add an input port. As a result, I started reporting errors, whether I reverted to the previous configuration or made the same mistake.