Skip to content
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

Supported devices #7

Open
matijse opened this issue Dec 31, 2020 · 7 comments
Open

Supported devices #7

matijse opened this issue Dec 31, 2020 · 7 comments

Comments

@matijse
Copy link
Owner

matijse commented Dec 31, 2020

For supported devices, see the readme.

To add new devices, or new message types, make sure the messages are logged when the script is running. (You should receive them on your phone as well).

Provide an export

  1. Export the database: sqlite3 -csv database.sqlite "SELECT * FROM push_payloads" > export.csv
  2. Open in a text editor and remove any personal info (serial number, URL to picture)
  3. Create a new issue with information about your device and this export

DIY

You can also help by submitting a PR with code changes. Some pointers:

  1. Add your device in enums/device_type.js
  2. Add its capabilities in enums/device_type.js

If you need to add a new capability / notificationType:

  1. Create the notificationType in enums/notification_type.js
  2. In mqtt/ha-discovery.js, add it to baseTopicForCapability, payloadForCapability and configurationForCapability
  3. In mqtt/client.js, starting from processPushNotification check if everything is handled correctly

Please also update the readme with the supported device

@matijse matijse pinned this issue Dec 31, 2020
@liquidbear99
Copy link

Where can I find the database file to export?

@m-paulus
Copy link
Contributor

m-paulus commented Jan 1, 2021

wouldn't you also need to add the new device types to ha-discovery.js?

@polleke563
Copy link

polleke563 commented Jan 2, 2021

The T8200 is still not really working for me:

  1. The autodiscovery does not find the entities. A DeviceType.VIDEO_DOORBELL_2K_POWERED is missing in the 2 if statements in ha-discovery.js
  2. The payload is a (JSON) string instead of an object so getting the event type and attributes does not work. It still needs to be parsed. The push message is the following (note the escaped quotes):
    {"pushMessage":{"id":"DC86E09F",[snip], "payload":{"doorbell":"{\"event_type\":3103, [snip]

I changed the code so that it works for me. I will try and make a commit from it. But I only need the doorbell pressed event, and I don't have any other devices, so my code might not work for others.

(edit: the escapes in the quotes were not visible)

@matijse
Copy link
Owner Author

matijse commented Jan 2, 2021

@liquidbear99 It is in the data folder. If you used Docker, it should be where you mapped it. If you started it with npm run start, there should be a subfolder data in the folder where you run npm run start.

@m-paulus That is correct, added it...

@polleke563 Will add 1. Fixing 2 might be harder when I cannot test it... Weird that part of it is a string... Can you share your code?

@polleke563
Copy link

Glad to do so, did a PR, but was already a couple of commits behind.

@JvD12
Copy link

JvD12 commented Jan 2, 2021

Is the Eufy entry/door sensor also supported?

@matijse
Copy link
Owner Author

matijse commented Jan 2, 2021

Not yet. If push messages are received by the app for these sensors, it might be possible to integrate them. If you can provide them, please create a new ticket.

Repository owner locked and limited conversation to collaborators Jan 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants