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
Add support for YoLink -EC devices #84
Comments
This is a strange one....
We are receiving a successful response, but I have never seen one where the But...
whenever there is motion. Are you seeing that whenever you trigger motion? Thanks |
Hi ya Do I have to install something to register as a MQTT client? Update: I’ve installed homebridge-mqtt and Mosquitto broker for macOS and it seems to be running, listening to port: 1883 Log says: [mqtt] connected (url = mqtt://127.0.0.1) But still no updates in the logs when motion is detected. thanks Richard |
You don't need to do anything for MQTT, the plugin registers automatically and that part is working, your log reports...
With that, and your log level, we should see receipt of MQTT messages whenever motion is triggered. But it seems like nothing is being received. I'm still thinking if I should tolerate empty data field on responses to getState. It is very unusual. |
Not sure if this will help, the setup mentioned above is directly with MacOS. I've also created today a version within my UTM app, Linux, Debian within Docker. This is up and working and says: "This plugin threw an error from the characteristic 'Motion Detected': Unhandled error thrown inside read handler for characteristic: Cannot read properties of undefined (reading 'state'). See https://homebridge.io/w/JtMGR for more info."
|
The errors are all related, that no data is coming back from the device is causing the cannot read properties of undefined error. I can suppress that error by checking if the variable is defined first, but that doesn't solve the problem. We need to get to the root cause. The only thing I am noticing as different is that your motion detector is reporting modelName as YS7805-EC. When I look at my own logs, my motion detector is reporting that it is a YS7805-UC. But the only difference is the frequency they operate on (some countries may use different frequencies). I will ask YoLink team on Discord and see if they have any ideas. |
One other thought... What firmware does your motion detector have? Mine is at 050E. If the mobile app states that an update is available you could try updating. |
@dkerr64 Model Name ends with |
Mine says it's the latest Firmware at 50A. Again many thanks for looking into this. |
OK thanks for trying. Richard |
This can be closed now, maybe just a note in the read documents that EC devices are not currently supported by their API. Thanks |
Yes, I have updated the README to note that -EC devices are currently not supported. |
api.yosmart.com for |
@matrixd2 so, if I point my requests at the 2nd URL then -EC devices will work? Which leads to question... would you expect any environment with a mix of -UC and -EC devices (so I would have to handle connections to both at the same time), or could I assume that a user would have all of one or the other (so I only need to connect to the one service, and can configure which at initialization) ? Thanks |
@matrixd2 also, are -EC devices only sold in select regions/countries, like Europe? I'm just trying to think through how to document this in a manner a user would understand. Thanks. |
Yes, different countries/regions have different restrictions on radio communication. |
@r1chards can you please try the URL suggested by @matrixd2. You can do this by updating your config so that....
You can do this in the plugin settings user interface or the config editor... save and then restart the plugin bridge. I tested this myself and get the same symptoms that you see when using the other URL... the data field returns empty. That is because I have -UC devices. So long as a user has all -EC or all -UC devices then the plugin support already exists... but I need to update the instructions in README.md to document the different servers. Thank you. |
Closing as this is believed to be working once user updates the API URL. |
Describe Your Problem:
Hello, I'm trying get the motion sensor working, it shows in Apple Home (HomeKit) app but it's not push any updates when triggered by movement or triggering a light to come via an automation. Homebrige logs highlight "Device offline or other error for Garden Motion Sensor". On the YoLink App the sensor is working correctly and push alerts to my phone.
Can you offer any guidance please
Thank you.
Richard
Logs:
Plugin Config:
Screenshots:
Environment:
The text was updated successfully, but these errors were encountered: