matijse / eufy-ha-mqtt-bridge

Receive Eufy alerts and thumbnails in Home Assistant via MQTT
124 stars 25 forks source link

Support for T8124 - Solo CAM S40 #96

Closed MechEng70 closed 3 years ago

MechEng70 commented 3 years ago

T8124 is the Solo CAM S40 with solar and battery. It also has voice communication. What can I do to help implement?

info: Found device: Driveway (T8124XXXXXXXXXX - type: T8124) {"timestamp":"2021-09-15T01:40:47.005Z"}
warn: DEVICE Driveway NOT SUPPORTED! See: https://github.com/matijse/eufy-ha-mqtt-bridge/issues/7 {"timestamp":"2021-09-15T01:40:47.007Z"}

Following the pinned #7; I can't find the database to export the information. Here are 2 of 3 locations that the docker container is pointing too:

~/docker/hassio/addons/data/f1c878cb_eufy-ha-mqtt-bridge$ ls -al
total 2892
drwxr-xr-x  2 root root    4096 Sep 14 18:40 .
drwxr-xr-x 14 root root    4096 Sep  5 22:31 ..
-rw-r--r--  1 root root 2065721 Sep 15 10:00 combined.log
-rw-r--r--  1 root root     362 Sep 14 18:40 config.yml
-rw-r--r--  1 root root    1357 Sep  5 22:32 credentials.json
-rw-r--r--  1 root root       0 Sep  5 21:37 error.log
-rw-r--r--  1 root root    1023 Sep  5 21:37 exceptions.log
-rw-------  1 root root     305 Sep 14 18:40 options.json
-rw-r--r--  1 root root  859746 Sep 15 10:00 push.log
~/docker/hassio/share/eufy-ha-mqtt-bridge/data$ ls -al
total 220
drwxr-xr-x 2 root root   4096 Sep 14 15:37 .
drwxr-xr-x 3 root root   4096 Sep 14 15:37 ..
-rw-r--r-- 1 root root 136234 Sep 14 18:39 combined.log
-rw-r--r-- 1 root root    512 Sep 14 18:38 config.yml
-rw-r--r-- 1 root root   1356 Sep 14 15:37 credentials.json
-rw-r--r-- 1 root root      0 Sep 14 15:37 error.log
-rw-r--r-- 1 root root      0 Sep 14 15:37 exceptions.log
-rw-r--r-- 1 root root  57462 Sep 14 18:39 push.log
MaxWinterstein commented 3 years ago

The export function mentioned in #7 got dismantled with 0.2.21.

Seems like @matijse and I need to update their documentation 😉

So, sleepy as I am, I would guess

https://github.com/matijse/eufy-ha-mqtt-bridge/blob/5dfe316e034a8c0300831b9de2d7740438f36608/eufy/push.js#L55

there should be some information available in the log files.

As I can't check currently, can you simply grep for Received push message in combined.log?

Just some blind guess until @matijse has some time :)

MechEng70 commented 3 years ago
{"pushMessage":{"id":"E8129260","from":"348804314802","to":"duI-hAj_ZZd4YB-GLTsNLK","category":"com.oceanwing.battery.cam","persistentId":"0:1631667640828644%0d2a775cf9fd7ecd","ttl":3600,"sent":"1631667640795","payload":{"device_sn":"","payload":{"msg_type":18,"event_type":3102,"device_sn":"T8124PXXXXXXXXXX","name":"Driveway","channel":0,"cipher":18,"session_id":"20210914_180039","pic_url":"","create_time":1631667636480,"trigger_time":1631667636480,"file_path":"/media/mmcblk0p1/Camera00/20210914180039.h264","push_count":1,"notification_style":1,"storage_type":1,"unique_id":"9a66829505f05eaa7b4bc496cc216d8b"},"station_sn":"T8124PXXXXXXXXXX","google.c.sender.id":"348804314802","title":"eufyCam Solo","type":"62","push_time":"1631667640778","event_time":"1631667639622","content":"Someone has been spotted"}},"level":"debug","message":"Received push message","timestamp":"2021-09-15T01:00:40.898Z"}

{"pushMessage":{"id":"E813A783","from":"348804314802","to":"duI-hAj_ZZd4YB-GLTsNLK","category":"com.oceanwing.battery.cam","persistentId":"0:1631667665819724%0d2a775cf9fd7ecd","ttl":3600,"sent":"1631667665796","payload":{"device_sn":"","payload":{"msg_type":18,"event_type":3102,"device_sn":"T8124PXXXXXXXXXX","name":"Driveway","channel":0,"cipher":18,"session_id":"20210914_180104","pic_url":"","create_time":1631667661986,"trigger_time":1631667661986,"file_path":"/media/mmcblk0p1/Camera00/20210914180104.h264","push_count":1,"notification_style":1,"storage_type":1,"unique_id":"144351cd66b2a7da7485f917eb578e94"},"station_sn":"T8124PXXXXXXXXXX","google.c.sender.id":"348804314802","type":"62","title":"eufyCam Solo","push_time":"1631667665781","content":"Someone has been spotted","event_time":"1631667664591"}},"level":"debug","message":"Received push message","timestamp":"2021-09-15T01:01:05.927Z"}

{"pushMessage":{"id":"E8284A27","from":"348804314802","to":"duI-hAj_ZZd4YB-GLTsNLK","category":"com.oceanwing.battery.cam","persistentId":"0:1631668172592700%0d2a775cf9fd7ecd","ttl":3600,"sent":"1631668172584","payload":{"device_sn":"","payload":{"msg_type":18,"event_type":3102,"device_sn":"T8124PXXXXXXXXXX","name":"Driveway","channel":0,"cipher":18,"session_id":"20210914_180932","pic_url":"","create_time":1631668169200,"trigger_time":1631668169200,"file_path":"/media/mmcblk0p1/Camera00/20210914180931.h264","push_count":1,"notification_style":1,"storage_type":1,"unique_id":"629f3dd1122883efef018f85869dad3f"},"station_sn":"T8124PXXXXXXXXXX","google.c.sender.id":"348804314802","type":"62","title":"eufyCam Solo","push_time":"1631668172565","event_time":"1631668172041","content":"Someone has been spotted"}},"level":"debug","message":"Received push message","timestamp":"2021-09-15T01:09:32.673Z"}

{"pushMessage":{"id":"E820DFAD","from":"348804314802","to":"duI-hAj_ZZd4YB-GLTsNLK","category":"com.oceanwing.battery.cam","persistentId":"0:1631667640828644%0d2a775cf9fd7ecd","ttl":3600,"sent":"1631667640795","payload":{"device_sn":"","payload":{"msg_type":18,"event_type":3102,"device_sn":"T8124PXXXXXXXXXX","name":"Driveway","channel":0,"cipher":18,"session_id":"20210914_180039","pic_url":"","create_time":1631667636480,"trigger_time":1631667636480,"file_path":"/media/mmcblk0p1/Camera00/20210914180039.h264","push_count":1,"notification_style":1,"storage_type":1,"unique_id":"9a66829505f05eaa7b4bc496cc216d8b"},"station_sn":"T8124PXXXXXXXXXX","google.c.sender.id":"348804314802","title":"eufyCam Solo","type":"62","push_time":"1631667640778","event_time":"1631667639622","content":"Someone has been spotted"}},"level":"debug","message":"Received push message","timestamp":"2021-09-15T01:39:01.598Z"}

{"pushMessage":{"id":"E820DFAE","from":"348804314802","to":"duI-hAj_ZZd4YB-GLTsNLK","category":"com.oceanwing.battery.cam","persistentId":"0:1631667665819724%0d2a775cf9fd7ecd","ttl":3600,"sent":"1631667665796","payload":{"device_sn":"","payload":{"msg_type":18,"event_type":3102,"device_sn":"T8124PXXXXXXXXXX","name":"Driveway","channel":0,"cipher":18,"session_id":"20210914_180104","pic_url":"","create_time":1631667661986,"trigger_time":1631667661986,"file_path":"/media/mmcblk0p1/Camera00/20210914180104.h264","push_count":1,"notification_style":1,"storage_type":1,"unique_id":"144351cd66b2a7da7485f917eb578e94"},"station_sn":"T8124PXXXXXXXXXX","google.c.sender.id":"348804314802","type":"62","title":"eufyCam Solo","push_time":"1631667665781","content":"Someone has been spotted","event_time":"1631667664591"}},"level":"debug","message":"Received push message","timestamp":"2021-09-15T01:39:01.600Z"}

{"pushMessage":{"id":"E820DFB1","from":"348804314802","to":"duI-hAj_ZZd4YB-GLTsNLK","category":"com.oceanwing.battery.cam","persistentId":"0:1631668172592700%0d2a775cf9fd7ecd","ttl":3600,"sent":"1631668172584","payload":{"device_sn":"","payload":{"msg_type":18,"event_type":3102,"device_sn":"T8124PXXXXXXXXXX","name":"Driveway","channel":0,"cipher":18,"session_id":"20210914_180932","pic_url":"","create_time":1631668169200,"trigger_time":1631668169200,"file_path":"/media/mmcblk0p1/Camera00/20210914180931.h264","push_count":1,"notification_style":1,"storage_type":1,"unique_id":"629f3dd1122883efef018f85869dad3f"},"station_sn":"T8124PXXXXXXXXXX","google.c.sender.id":"348804314802","type":"62","title":"eufyCam Solo","push_time":"1631668172565","event_time":"1631668172041","content":"Someone has been spotted"}},"level":"debug","message":"Received push message","timestamp":"2021-09-15T01:39:01.604Z"}
MechEng70 commented 3 years ago

In the app, it does have a solar and battery indicator.

MechEng70 commented 3 years ago

Is that what needs to be added to the device_type.js

  EUFYCAM_SOLO_S40: 'T8124',

  [deviceType.EUFYCAM_SOLO_S40]: [                  
    NotificationType.EVENT_MOTION_DETECTED,  
    NotificationType.EVENT_PERSON_DETECTED,
    NotificationType.THUMBNAIL,              
    SensorType.BATTERY_PERCENTAGE,          
  ], 
matijse commented 3 years ago

I think so, I will add it in a moment so you can test it... Will update the documentation later...

MechEng70 commented 3 years ago

thank you! I attempted to added it to the fork that already existed. I think I was done correctly.

MechEng70 commented 3 years ago

Integration works. Image doesn't update, but that is not related to this.

MaxWinterstein commented 3 years ago

Integration works. Image doesn't update, but that is not related to this.

Which one?

MechEng70 commented 3 years ago

The last update camera image for both the cam solo and wires doorbell.

MechEng70 commented 3 years ago
debug: Got notification - Device: T8124PXXXXXXXXXX, Type: 3102 {"timestamp":"2021-09-20T21:46:59.993Z"}
debug: Received push message {"pushMessage":{"id":"32D1D345","from":"348804314802","to":"eiBvb7KQnlbfLXY4uBLI9U","category":"com.oceanwing.battery.cam","persistentId":"0:1632174483617404%0d2a775cf9fd7ecd","ttl":3600,"sent":"1632174483608","payload":{"device_sn":"","payload":{"msg_type":18,"event_type":3102,"device_sn":"T8124P202131078E","name":"North - Carlson","channel":0,"cipher":28,"session_id":"20210920_144803","pic_url":"","create_time":1632174481212,"trigger_time":1632174481212,"file_path":"/media/mmcblk0p1/Camera00/20210920144803.h264","push_count":1,"notification_style":1,"storage_type":1,"unique_id":"40e751722c606c24bc09b726b9d3d8aa"},"station_sn":"T8124P202131078E","google.c.sender.id":"348804314802","type":"62","title":"eufyCam Solo","push_time":"1632174483585","content":"Someone has been spotted","event_time":"1632174483968"}},"timestamp":"2021-09-20T21:48:03.689Z"}
debug: Got notification - Device: T8124P202131078E, Type: 3102 {"timestamp":"2021-09-20T21:48:03.689Z"}

The image has not been updated since the last reboot of HA.

spencerbutler commented 3 years ago

I just got a new SoloCam S40 (T8124). I updated my eufy-ha-mqtt-bridge docker image and can confirm the device is listed in device_type.js. MQTT discovery is enabled. I am NOT seeing the new S40 in the logs. I have a T8210 that has been working great for some time. Is there some special trick to get eufy-bridge to recognize more than one camera?

/app # grep -r T8124 .
./enums/device_type.js:  EUFYCAM_SOLO_S40: 'T8124',
HA version: core-2021.9.7
eclipse-mosquitto: 2.0.12
MechEng70 commented 3 years ago

When you restart the eufy bridge, do you see and info In there?

spencerbutler commented 3 years ago

When you restart the eufy bridge, do you see and info In there?

Negative, that was the first thing I tried.

MechEng70 commented 3 years ago

Have you shared the device with they account that HA is using? You have to share each new device.

In the mobile app, click the three bars, select Family & guests, then manage devices.

spencerbutler commented 3 years ago

Have you shared the device with they account that HA is using? You have to share each new device.

In the mobile app, click the three bars, select Family & guests, then manage devices.

That was it, thank you!

With all the hooha trying to get an account registered with eufy, I forgot I was using different account to troubleshoot. The account I setup the device with, was/is different from the one eufy-bridge uses. As soon as I shared the device and accepted it -- I can now see the device in the logs.

For the record, I did have to restart the eufy-bridge before HA/MQTT found the device.