icanos / hassio-plejd

Hass.io add-on for Plejd home automation devices
Apache License 2.0
126 stars 37 forks source link

Error trying to create input device: Error: Unknown device type with hardware id 70. --- PLEASE POST THIS AND THE NEXT LOG ROWS #300

Open anordnes opened 6 months ago

anordnes commented 6 months ago

trying to use the motion sensor Plejd WMS-01. does not show up. Is this possible to use?

anordnes commented 6 months ago

Is the device showed as entiy in entities dashboard/ in the mqtt devices?

SweVictor commented 6 months ago

So - as the error says, the hardware Id (and by that also the hardware type itself is unknown).

Please turn on vebose/debug logging and post the relevant logs to get it supported.

That said - this is a new "type" of device (motion sensor). What would you expect it to do?

In general, feel free to create a PR with a suggested functionality. I don't myself have this device.

anordnes commented 6 months ago

I have turned on verbose in the Plejd addon. Not at home now, so no moment. Will update later. The only thing i need from the sensor is Occupancy: true/false. Nice to have: Sensitivity setting. its 4 or 5 settings i belive. If possible Link quality

anordnes commented 6 months ago

verbose plejd.txt Added verbose logg

Also added Debug logg debug plejd.txt

Both of this are without any movement. If need i can upload new file with sensor movement active/occupied true

SweVictor commented 6 months ago

@anordnes: Thanks!

The verbose log looks fairly complete with regards to the startup, the debug log does not contain much.

From the logs it should be possible to add rudimentary support for the device (as in at least adding it but without functionality).

To start thinking about functionality we will need to understand what kind off messages are sent. Once supported it looks like this (verbose), but even now you should be able to see the incoming raw BLE commands which are the ones we process.

2024-02-19 11:58:39 VRB [plejd-ble] Raw event received: 4d0110009801000000
2024-02-19 11:58:39 VRB [plejd-ble] Decoded: Device D9C6168C2163_0 (BLE address 77), cmd 98, state 1, dim 0
2024-02-19 11:58:39 DBG [plejd-ble] Golvspotlights vardagsrum (D9C6168C2163_0) got state+dim update. S: 1, D: 0
2024-02-19 11:58:39 VRB [plejd-mqtt] Updating state for Golvspotlights vardagsrum: true
2024-02-19 11:58:39 VRB [plejd-mqtt] Received mqtt message on homeassistant/light/plejd/D9C6168C2163_0/state
2024-02-19 11:58:39 VRB [plejd-mqtt] Getting device D9C6168C2163_0 from registry
2024-02-19 11:58:39 VRB [plejd-mqtt] Sent mqtt state command for light, Golvspotlights vardagsrum (D9C6168C2163_0). 

The two first rows are the important ones for now. I'm guessing the device sends "occupancy true/false" in some way, potentially also other info. You could also look at other Plejd projects to see if any of those have already figured out the API and how to parse incoming messages.

anordnes commented 6 months ago

Yes. im home now and when i walked pass the sensor i get som new data

verbose occupied true.txt

EDIT: Dont know if it needed but here is the debug file

debug occupied true.txt

Silly file if needed silly plejd.txt

anordnes commented 6 months ago

@SweVictor Is this something that you have the time to get a look at? :)

SweVictor commented 6 months ago

Well. Not very soon unfortunately. PRs are welcome though so feel free to have a look yourself