Support threads, fixes, and FAQs.

internal-testing works but not connecting to actual device

Last activity: 12/3/2023, 12:45:52 AMJoin the discussion →
Original post
Running the sample scene from the Unity package, everything works as expected when using the `internal-testing` HyperateID. I get `Connect!` then `Connection open!` debug log messages. Logging the message itself, I get this at regular intervals: `Received message: {"event":"hr_update","payload":{"hr":64},"ref":null,"topic":"hr:internal-testing"}` All good. But when I use the devide ID I see in the phone app, which is in the format `LIVLOV V9-1234567` although I still have `Connect!` then `Connection open!`, I then see the event as `phx_reply` with an empty response. First I see: `Received message: {"event":"phx_reply","payload":{"response":{},"status":"ok"},"ref":0,"topic":"hr:LIVLOV V9-1234567"}` then this is repeated at intervals: `Received message: {"event":"phx_reply","payload":{"response":{},"status":"ok"},"ref":0,"topic":"phoenix"}` No HR data. I've tried changing the HyperateID to LIVLOV-V9-1234567, V9-1234567, 1234567, uppercase, lowercase, nothing works. https://app.hyperate.io/YTP does display the BP measurement so data is getting to the PC. What am I doing wrong? (I've also tried the sample project and no connection there either) There's not a lot of onboard help anywhere that I can find. Are there does beyond the HypeRate DevDocs on github? I'm seeing the 'Required websocket messages' section (https://github.com/HypeRate/DevDocs#required-websocket-messages) but there's no guidance on whether these should be used in Unity. I'm guessing that's already taken care in the code from the package as I can see SendWebSocketMessage() and SendHeartbeat() are taking care of the `phx_join` and `heartbeat` events. So where does `phx_reply` fit in? Seems to imply there's a reply and the response status is "ok" but no data is coming through from the device. Any help would be much appreciated
Community Member12/2/2023, 11:52:05 PM
As far as i know you can not change the HypeRateID to something like "LIVLOV V9-1234567" just use the give ID on your Device which seems to be "YTP".
Community Member12/3/2023, 12:26:15 AM
The device ID in your case is "YTP" - its generated by the HypeRate app and IS NOT the name of the device (because it cant be unique). Imagine a friend of you and you buy the same device - how would the server know to which one the heartbeat relates to, when both share the same ID (the name of the device in your case)? You dont need to implement any of the messages by yourself as you already found out - its handled by the Unity plugin.
Community Member12/3/2023, 12:45:52 AM
Thank you both. Super helpful. Might be worth adding that to the docs page. Had me confused all afternoon 😁
Cookie preferences