derkalle4 / python3-idotmatrix-client

reverse engineered python3 client to control all your 16x16 or 32x32 pixel displays (experimental)
GNU General Public License v3.0
199 stars 40 forks source link

Home Assistant Temporary Workaround #30

Open Supreme500 opened 8 months ago

Supreme500 commented 8 months ago

Hi!

I wanted to first start off by thanking you for starting this project. I have gotten Home Assistant to successfully send commands to the Pixel Screen (I have a 32X32). I use a HACS repo called SSHCommand which can be found here AlexxIT/SSHCommand

Using that allows you to perform automations by calling a Service and selecting SSHCommand to send the commands to the remote Linux client (in my case OrangePI).

If you need more info please do not hesitate to contact me. Would be nice to have my Linux client always connected so that when an automation gets triggered we don't see the Bluetooth connection logo every time on the Pixel Display. Also, as a quick side note, not all GIFs seem to work with the commands --set-gif and --process-gif. I have tried many GIFs of different resolutions and file sizes. If I upload the same GIF using their phone APP it works. Seems like some incompatibility or the unit is picky with what GIFs are sent using your library.

Thanks

tigers75 commented 8 months ago

Could you care to elaborate more? If I understand this correctly you have a separate Raspberry with this repo installed and use the SSHCommand to send commands to it? How do you send the gifs? Are they stored on the HA machine or on the remote Raspberry? Do you think it could work with a BT proxy with ESP32 installed, sending data directly from the HA machine?

Supreme500 commented 8 months ago

Could you care to elaborate more? If I understand this correctly you have a separate Raspberry with this repo installed and use the SSHCommand to send commands to it? How do you send the gifs? Are they stored on the HA machine or on the remote Raspberry?

Do you think it could work with a BT proxy with ESP32 installed, sending data directly from the HA machine?

Correct I have a seperate linux device (OrangePi) that has all the GIFs and images stored onto it. SSHCommand allows me to send Linux commands to the OrangePi (or any Linux device), which is where I send the GIF command that was developped from this project. As per ESP32, I am not sure as I do not have a testbed for that.

Thanks

derkalle4 commented 8 months ago

Hi @Supreme500,

many thanks for your interest in my project! If you are familiar with Python you can simply use my library instead of this client to directly utilize this in a small homeassistant script. A homeassistent integration is planned but unfortunately I haven't got time to implement it properly: https://github.com/derkalle4/python3-idotmatrix-library/

Edit #1: the library stays connected until closed (or the python program stops) and also should reconnect automatically whenever the connection is lost. Therefore keeping a simple python program running 24/7 with a simple homeassistant API interface would work ;)

Kind Regards, Kalle

Supreme500 commented 8 months ago

Hi @Supreme500,

many thanks for your interest in my project! If you are familiar with Python you can simply use my library instead of this client to directly utilize this in a small homeassistant script. A homeassistent integration is planned but unfortunately I haven't got time to implement it properly: https://github.com/derkalle4/python3-idotmatrix-library/

Edit #1:

the library stays connected until closed (or the python program stops) and also should reconnect automatically whenever the connection is lost. Therefore keeping a simple python program running 24/7 with a simple homeassistant API interface would work ;)

Kind Regards,

Kalle

Thank you for the reply I will look into this!

aptonline commented 7 months ago

This is great, I came here looking for an API and Home Assistant integration and found this post. @Supreme500 have you managed to get the library working with HA directly. Happy to help support/test any work on this.

Supreme500 commented 7 months ago

This is great, I came here looking for an API and Home Assistant integration and found this post. @Supreme500 have you managed to get the library working with HA directly. Happy to help support/test any work on this.

Hi! I have not looked into this yet as I have been very busy lately. Let me know if you get it working by chance. Thanks

Dokport commented 3 months ago

Thanks for suggesting this, I have it up and running on a Pi Zero W, and it works. How fast response are you getting? I'm seeing almost 9 seconds for a simple turn off screen command, but I suspect its partly due to the slow processing of the Pi Zero? I tried to install the library directly in Home Assistant using AppDaemon Add-on, but I didn't manage to get it running, and ChatGPT started running in circles on me

derkalle4 commented 3 months ago

@Dokport the library itself is not ready for Homeassistant use yet. For your 9 seconds delay: on a raspberry pi 4 I do not experience any further delay other than the initiation of the bluetooth connection. So maybe that does take some time on the raspberry pi zero.