Custom Component: Maxsmart (Revogi)

improvements
1-Names in the cloud are not automatically imported into home assistant .
2-The master ie total wattage is no longer displayed.

  1. I will not implement cloud name polling. This is way more complex, and most of all, we don’t know how long will cloud be alive. These products are EOL since years now. However, I plan to work on port and device name customization
  2. I will add master wattage ASAP. Right now, there is no sensor implemented for master.
1 Like

New release published:

1 Like

Hi superkikim,

Thanks already for your work on this integration, it’s great.

On the other hand, I’m having a problem adding my power strips. On one of the regovi models, I can’t connect directly (SOW019), so I have to go through the web to retrieve the data. this isn’t a problem, but your application seems to script when it can’t add a referenced socket, it gets an error and doesn’t try to register another socket. Would it be possible to set a number of tries, and if that doesn’t work, move on to another one, or output a message saying that the outlet can’t be reached? Because then I get a 500 and the import stops.

Hi superkikim,

I find in other forum a solution in python for use a udp connection.
But in your code, i don’t fint the part where you use the tcp connection?

Can contact us to talk about it?

Hi @haazeel an you tell me what release you have installed and what you obtain ? What is the FW version of your devices (and what device is it ? Power strip ? Smart plug ?)

If fw version is not 1.30, it should show fields where you can put port names manually. Please give me more details (logs, error ? anything)

I use UDP for discovery. Details cannot be retrieved for FW >1.30 given the details are stored in the cloud and I won’t bother developing for that. However, it retrieves IP through UDP, and then it should show the form to add names.

TCP is only use to operate the devices (on/off/state/values)

Hi all, I did created an issue on github, but askin here as well.

I am using latest HAOS and not able to add Integration after installing those 4 files into filesystem:

Config flow could not be loaded: {“message”:“Invalid handler specified”}

Logger: homeassistant.config_entries
Source: config_entries.py:864
First occurred: 9:21:09 PM (1 occurrences)
Last logged: 9:21:09 PM
Error occurred loading flow for integration maxsmart: No module named 'custom_components.maxsmart.const'

I did tried to upload a file const.py as well. It did started to look promissing showin
Please wait, starting configuration wizard for Max Hauri Maxsmart

but ended up Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

This error originated from a custom integration.

Logger: aiohttp.server
Source: custom_components/maxsmart/config_flow.py:14
Integration: Max Hauri Maxsmart (documentation, issues)
First occurred: 9:30:31 PM (1 occurrences)
Last logged: 9:30:31 PM

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 147, in post
return await super().post(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post
result = await self._flow_mgr.async_init(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 846, in async_init
flow, result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 874, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 394, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/maxsmart/config_flow.py", line 45, in async_step_user
await self.hass.config_entries.flow.async_init(
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 846, in async_init
flow, result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 874, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 394, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/maxsmart/config_flow.py", line 64, in async_step_import
num_of_ports = await async_get_number_of_ports(self.hass, ip_address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/maxsmart/config_flow.py", line 14, in async_get_number_of_ports
state = await hass.async_add_executor_job(device.check_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/maxsmart/maxsmart.py", line 128, in check_state
response = self._send_command(511)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/maxsmart/maxsmart.py", line 86, in _send_command
raise Exception("Failed to send command to power strip after multiple retries")
Exception: Failed to send command to power strip after multiple retries

Maybe if anyone could show me their maxsmart folder view?

Thanks for help.

Hi,

How did you install the integration ?

I replied to you on Github.

Seems you used an old guide. Please point me to it so I can change it if I made it.

Your best bet to install the integration nowadays is to use HACS.

In HACS, on top right, click on Integrations, and on the top right, click the three dots menu button and select “Custom repositories”. Add this repository, and then enable “Show beta versions”.

Latest beta release is 2023.8.0-beta3

Hello! First of all, thank you for your contribution! I would like to know if it is compatible with smart sense devices. Since I have also been researching for years how to take control of these devices for when the revigi website stops working.

Devise smart-sense-starter-kit
Home Assistant

Hey.

No. I don’t have smartsense devices, so I didn’t work on that.