MadPatrick / somfy

Tahoma/Conexoon plugin for IO blinds, this plugin require internet connexion and a Somfy account
GNU General Public License v3.0
14 stars 3 forks source link

Connections/commands limits ? #9

Closed ab10002 closed 1 year ago

JanJaapKo commented 1 year ago

Hi @ab10002 ,

This is too little to work with, please describe what it is that you want to have changes or is not working as expected.

ab10002 commented 1 year ago

I'v 11 shutters. Sending one cmd to all shutters caused a error "too many connections" Sending 11 cmd's with a delay, there's no error.

I thinks the limit is somewhere to 5? Op 23-7-2022 14:23:27, Jan-Jaap Kostelijk @.> schreef: Hi @ab10002 [https://github.com/ab10002] , This is too little to work with, please describe what it is that you want to have changes or is not working as expected. — Reply to this email directly, view it on GitHub [https://github.com/MadPatrick/somfy/issues/9#issuecomment-1193117046], or unsubscribe [https://github.com/notifications/unsubscribe-auth/ATHORRGP7AB6ZP6PCHK63YDVVPP35ANCNFSM54N4SLLA]. You are receiving this because you were mentioned.Message ID: @.> [36355ce6-c166-4bd0-a1bb-5d046d2e6cf1]

MadPatrick commented 1 year ago

How do you send the command for all your shutters ?

I've made a group with 11 Screens and this is working fine

ab10002 commented 1 year ago

With a lua script, like commandArray[4]={[rl02]='Off'} And that 11 times..

Before i'd 7 shutter and never issues

MadPatrick commented 1 year ago

Ok. I've made a group in Domoticz and send the command in Dzvents to switch On of Off the Group

local Screens       = dz.groups(Screens)
Screens.switchOn()
ab10002 commented 1 year ago

Ok, but it's not so easy to change. I've a complex script with a lot of parameters..

MadPatrick commented 1 year ago

Understandable. I'm not familair with Lua and using DZventz. This is very easy to learn and has some powerfull functions.

I'm using this option for delayed opening

Erker3.switchOn()
Erker4.switchOn().afterSec(0.5)
Erker5.switchOn().afterSec(1)`

If you need help with your script maybe i can help

ab10002 commented 1 year ago

Is it possible to play with timeout's somewhere?

MadPatrick commented 1 year ago

I believe so. I'm not an expert in Dzvents but checkout the Wiki, There is something written about timeouts

https://www.domoticz.com/wiki/DzVents:_next_generation_Lua_scripting#Using_dzVents_with_Domoticz

ab10002 commented 1 year ago

I meant in plugin.py

JanJaapKo commented 1 year ago

Hey,

The problem is most likely that all the commands are fired individually from Domoticz to the plugin, so the plugin cannot really group them (I'm also not sure if 11 commands could be sent at once to the Somfy API). Also, putting a 'sleep' in the plugin after a command is not desirable as this will block reception of next commands (they will be missed). So I'm afraid this needs to be handled in you script.

There is a timeout parameter on the web request. This just specifies how long the plugin waits for a response from the Somfy API before going into error, so it is not going to help here.