sam43434 / remootio

remootio
18 stars 29 forks source link

remootio - usage also without sensor needed #9

Open camelcamro opened 1 year ago

camelcamro commented 1 year ago

Hello, i already had with other platforms that topic, that a usage of remootio is for much much more as only for usage with a sensor. so, i see no reason to block that users, which are not using a sensor ? eg: feeding automation, i have other sensors and which are not used at all, as only used for automatical raining system or fill up the water tanks, etc ....

pls make it possible to use also without sensor, then it will simply do a "toggle" - nothing else. i have many other cases on which i do not have a close or a open state.

eg: the "automatical horese feeding", is only toggling a feed wheel - and 1 toggle is 1 portion.

finally, a remootio will not only used to close or open a gate !! many other things not having that stage or where there is a CLOSE AND OPEN !! and is nothing to do with security as I'M the user which needs to know, what I'M doing.

thx i guess it should be relativ easy but not that good developer.

camelcamro commented 1 year ago

here the link, mayybe you can see how he handled to be using as "relay" that is how I'M using it as well ... https://github.com/ronniepettersson/homebridge-remootio/issues/13

camelcamro commented 1 year ago

`2023-02-16 19:08:00.855 ERROR (MainThread) [custom_components.remootio.config_flow.aioremootio.remootioclient] Failed to initialize this client. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aioremootio/remootioclient.py", line 318, in initialize await self.lifecycle.wait_for(lambda: self.connected) File "/usr/local/lib/python3.10/asyncio/locks.py", line 296, in wait_for await self.wait() File "/usr/local/lib/python3.10/asyncio/locks.py", line 269, in wait await fut asyncio.exceptions.CancelledError 2023-02-16 19:08:00.858 ERROR (MainThread) [custom_components.remootio.config_flow] Unexpected exception/error Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aioremootio/remootioclient.py", line 318, in initialize await self.lifecycle.wait_for(lambda: self.connected) File "/usr/local/lib/python3.10/asyncio/locks.py", line 296, in wait_for await self.wait() File "/usr/local/lib/python3.10/asyncio/locks.py", line 269, in wait await fut asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/remootio/config_flow.py", line 117, in async_step_user validation_result = await validate_input(self.hass, user_input) File "/config/custom_components/remootio/config_flow.py", line 86, in validate_input device_serial_number: str = await get_serial_number( File "/config/custom_components/remootio/utils.py", line 59, in get_serial_number async with RemootioClient( File "/usr/local/lib/python3.10/site-packages/aioremootio/remootioclient.py", line 296, in aenter await self.initialize() File "/usr/local/lib/python3.10/site-packages/aioremootio/remootioclient.py", line 332, in initialize raise RemootioClientError(self, "Failed to initialize this client.") from ex aioremootio.errors.RemootioClientError: Failed to initialize this client. Host [192.168.1.240] SerialNumber [N/A] ApiVersion [N/A] State [State.UNKNOWN] 2023-02-16 19:08:04.879 DEBUG (MainThread) [custom_components.sonoff.core.ewelink.local] 10011156e9 => Local4 | {'cmd': 'info'} <= info: 200 `

camelcamro commented 1 year ago

FYI: i had the same problem before ... that as the API can only be accessed once at same time, that i was blocked as also used by Homebridge, as it is the only 1 way to use the remootio for home assistant and also support: "no sensor needed" + relay 1 or relay 2 to be used. .... but the error above are still happening, as no sensor installed and not possible to be used in my cases