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

Reversing the protocol to get state #4

Closed
jjensn opened this issue Feb 1, 2018 · 14 comments
Closed

Reversing the protocol to get state #4

jjensn opened this issue Feb 1, 2018 · 14 comments

Comments

@jjensn
Copy link

jjensn commented Feb 1, 2018

Hi,

As promised, here is what I have so far. I will update it as I make progress. Hopefully someone can collaborate with me as there are a lot of information in the status payload.

To get status:
Send FC 05 FF 30 01 0a 2a to the broadcast address (for me its 10.0.1.255). Note that it is missing the checksum field that the PDF outlines for commands, so be sure not to include it.

The device will send back a status payload directly to the sender IP address (your machine) to port 8888 (UDP).

Example status payload:

0000   a4 d1 8c dc 82 b6 5c cf 7f 67 ef 7e 08 00 45 00  ......\..g.~..E.
0010   00 af 02 e1 00 00 80 11 21 42 0a 00 01 0a 0a 00  ........!B......
0020   01 12 22 b8 22 b8 00 9b 93 6a fc 91 ff 60 01 0a  .."."....j...`..
0030   44 72 65 61 6d 53 63 72 65 65 6e 20 48 44 00 00  DreamScreen HD..
0040   75 6e 61 73 73 69 67 6e 65 64 00 00 00 00 00 00  unassigned......
0050   00 01 64 0f ff ff ff ff RR GG BB bc c2 ab 0c 18  ..d.......;.....
0060   48 48 07 07 00 00 02 01 32 32 32 00 00 00 07 08  HH......222.....
0070   00 07 10 00 00 00 01 00 01 00 00 48 44 4d 49 20  ...........HDMI 
0080   31 20 20 20 20 20 20 20 20 20 20 48 44 4d 49 20  1          HDMI 
0090   32 20 20 20 20 20 20 20 20 20 20 48 44 4d 49 20  2          HDMI 
00a0   33 20 20 20 20 20 20 20 20 20 20 01 01 00 14 00  3          .....
00b0   00 03 01 02 01 07 02 00 01 01 00 01 ee           .............

BITS of importance
1: "FC" packet, row 0020: indicates start of all packets per the protocol
2: "01" packet, row 0050, indicates Mode ID (see PDF for details)
3: "64" packet, row 0050, indicates overall brightness
4. I've replaced the bits in row 5 that correspond to the ambient color as RR GG BB

There is one rather large detail that i overlooked now that I've gotten the data I was after: they don't expose the average color between all the LEDs, which means I won't be able to turn my living room lights the same color as the TV backlight (which was the whole point of my efforts).

@jjensn jjensn changed the title RE protocol to get state Reversing the protocol to get state Feb 1, 2018
@DreamScreen
Copy link

See Rev 2
http://dreamscreen.boards.net/thread/293/dreamscreen-wifi-udp-protocol

@GregoryDosh
Copy link
Contributor

Awesome thanks, I'll take a gander and make some changes/updates this weekend hopefully

@GregoryDosh
Copy link
Contributor

I'm working on moving the logic of the DreamScreen out of the Home Assistant service so that it can be used independently. Additionally I'm looking to revamp this so that it's more than just a service. Looking to add entity & state so you can see the status of DreamScreens on the network as well as issue commands through a service. At some point I also want to have a custom frontend widget for them too. To start though here is the PyPi location of the PyDreamScreen service I created.

https://pypi.python.org/pypi/PyDreamScreen/

I only have 1 DreamScreen and it's only an HD model so I can't vouch for group behavior or sidekick working properly but AFAIK it should be fine.

@DreamScreen
Copy link

Looking good, its been linked to on the forum.

@GregoryDosh
Copy link
Contributor

@jjensn
I know it doesn't fit your exact use case, but I have updated the component so it will pull in device state now. It's my first experimentation with it so it might change/evolve but it is there for playing around now.

@ToracX
Copy link

ToracX commented Jan 31, 2021

Hey,

Any progress on this? :)

@J3n50m4t
Copy link
Owner

What do you mean? Everything is documented as far as we know. Pydreamscreen supports most features.

@ToracX
Copy link

ToracX commented Jan 31, 2021

I know but I am making a project myself, end game I want to make a node JS homebridge plugin.
Does anyone have acces to all de PDF files dream screen gave? Since I cannot acces the forums. My account stays pending acceptance by staff.

@J3n50m4t
Copy link
Owner

J3n50m4t commented Jan 31, 2021

@ToracX contact me via Mail or somewhere, where I can Send you the pdf. I will Not Upload it here, due to eventually copyright issues

-- mobile keyboard are horrible..

@ToracX
Copy link

ToracX commented Jan 31, 2021

@ToracX contact ne via Mail per somewhere, where I can Send you the pdf. I will Not Upload it here, due to eventually copyright issues

Fair enough, will do.
Do you have a clue to send the packet and retrieve data? Im using packet finder.

@ToracX
Copy link

ToracX commented Feb 1, 2021

I have no clue how to find youre email but feel free to email it to me; jyp.schuthof3@gmail.com.

@J3n50m4t
Copy link
Owner

J3n50m4t commented Feb 1, 2021

in the git log for example. Send mail with all versions from the forums.

@ToracX
Copy link

ToracX commented Apr 18, 2021

Could you maybe make an example python script?
Its currently very hard to use this script in any project.

The only things im getting when running the script is,
<function get_devices at 0x03A8BE88>
<function get_states at 0x03A8BED0>

@J3n50m4t
Copy link
Owner

Not sure which script you mean.
The communication is done by this project. The repo here is only Home Assistant
Also everything we know is done over there. Maybe you searched the wrong repo. Also the api docs should help. https://github.com/J3n50m4t/pydreamscreen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants