Zuntara / Arduino.AdagioPro

Adagio Pro Pool light library for arduino
MIT License
0 stars 0 forks source link

HomeAssistant #2

Open holzwurm83 opened 3 months ago

holzwurm83 commented 3 months ago

Hi

Can you help me to integrate it to home assistant?

THX

Waldemar

Zuntara commented 1 month ago

And how would you like to integrate it ? I have home assistent here on a raspi somewhere ...

I think the questions would be:

Cheers

holzwurm83 commented 1 month ago

Hi

I think the best way is a connection bei RS485. I bought this modul https://www.amazon.de/dp/B0CPHX4764?ref=ppx_yo2ov_dt_b_fed_asin_title

I have done a small base with a few function, but it is only very easy.

`light:

shell_command: g_pool_light_on: "echo -n 'PL1' | nc 192.168.1.32 8899" g_pool_light_off: "echo -n 'PL0' | nc 192.168.1.32 8899" g_pool_light_next_program: "echo -n 'PsU' | nc 192.168.1.32 8899" g_pool_light_vorheriges_program: "echo -n 'PsD' | nc 192.168.1.32 8899" g_pool_light_weis1: "echo -n 'PW1' | nc 192.168.1.32 8899" g_pool_light_weis2: "echo -n 'PW2' | nc 192.168.1.32 8899" g_pool_light_weis3: "echo -n 'PW3' | nc 192.168.1.32 8899" g_pool_light_sync: "echo -n 'PsS' | nc 192.168.1.32 8899" g_pool_light_level: "/bin/bash /config/send_rgb_command.sh 'PD{{ '%03d' | format((100 / 255 * states('input_number.helfer_poolbeleuchtung_bright') | float) | int) }}'" g_pool_light_rgb: "/bin/bash /config/send_rgb_command.sh 'PC{{ '%03d' | format(states('input_number.poolbeleuchtung_r_input') | int(0)) }}{{ '%03d' | format(states('input_number.poolbeleuchtung_g_input') | int(0)) }}{{ '%03d' | format(states('input_number.poolbeleuchtung_b_input') | int(0)) }}'"`

I have the problem to sync the light and I can't integrate the programs by "effect" I used https://www.home-assistant.io/integrations/light.template/

Maybe there are a better way?

Zuntara commented 1 month ago

For syncronizing I found that you need to send multiple commands:

PRM0  (relay off)
PRM1 (relay on)
PL1 (lights on)
PsS (syncronize)

If you can try that? Then normally the lights should come alive ...