New integration: Energy monitoring device Circutor Wibeee

Thanks for the update.

I hope you can continue working on the component.

I have left only the host parameter. Now the configurator check reports Valid Configuration! and I don’t get any notification error, but it still doesn’t work for me: it only get the first reading once the server is restarted, but it doesn’t refresh values, it is frozen. There are no errors in the system log.
I know the Wibeee device is is working properly because I can check the power reading through the android app.

I have the same problem.

Thanks for the feedback. As soon as I get some time, I will take a look to this issue.

If someone is interested the oldest Mirubee can also work withi this code after some little changes.
- In the old devices the resource is DEFAULT_RESOURCE = ‘http://{}/gainspan/profile/smartplug’
- the XML field “pm” content can be mapped easily to the new Mirubee fileds handlled on this code.

I don’t have the device yet, but does wibeee actually do device detection? How good is it?

There is no device detection implemented, you need to give explicitly device IP in configuration.yaml.

Also I have been testing a recode using async mechanism and it seems to be working and updating sensor states. Please try modifications and I would appreciate feedback and suggestions.

From previous post I noticed API Path could be a configuration variable in order to have compatibility with mirubee devices. Right?

Something else?

No, i mean , does the Wibeee a device detection on all electronical devcies in your home
so does it recognizes a lamp, a fridge, a pc, washing machine … :slight_smile:

Mine, Wibeee does not have that feature, about mirubee I am not sure. Anyway you should check if that recognizing is done at device level or at cloud server.

What we achieve with this integration is to read energy metrics in real time without any internet server. In other words we can turn off internet of that device and continue using it just with home assistant.

Update and FYI: I have been reading official website and they apply an algorithm to readings (each 1 second). With that they claim to be able to identify patterns for specific appliances. So I understand that algorithm is run at their servers and, I guess, it should be based on neural network algorithms.

Hi,
I tested with new code (sensor.py file), but it still with same issue: it only get the first reading, once the server is restarted, but it doesn’t refresh values.

I am a few days without access to my HA instance but, if possible, please activate debug level for the component and paste here the logs (instructions for activating log level are described in readme.md file of GitHub).

Hi,

Here is my log:

2019-11-08 20:04:49 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for wibeee which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-11-08 20:05:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/wibeee/sensor.py", line 217, in fetching_data
    resp = await websession.get(self.api_url)
  
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/config/custom_components/wibeee/sensor.py", line 217, in fetching_data
    resp = await websession.get(self.api_url)
  File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 45, in __exit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 92, in _do_exit
    raise asyncio.TimeoutError
1 Like

I’m facing the same problems as @Joca, the mirubee, only load the values the first time it boot up. I’m running Home Assistant 0.100.3, I’ll really appreciate to having mirubee working in home assistant like it was in the 0.87 version.

Thanks in advance @juanjoSanz

github code has been updated with some improvements in error handling. I would appreciate your feedback whatever it works or not (in my instance it works)

It works!!! on version 0.100.3. thank you so much for your support. :smiley: :smiley: :smiley:

Hello,
In my case, after rebooting seemed to work fine. But after a few minutes, the values went to zero and the energy meter turned itself off. App Message: “Meter off”.
My log:

2019-11-14 23:08:58 ERROR (MainThread) [custom_components.wibeee.sensor] Retrying in 0 seconds: 
2019-11-14 23:08:59 ERROR (MainThread) [custom_components.wibeee.sensor] Retrying in 0 seconds: None
2019-11-14 23:09:00 ERROR (MainThread) [custom_components.wibeee.sensor] Retrying in 0 seconds: None
2019-11-14 23:09:01 ERROR (MainThread) [custom_components.wibeee.sensor] Retrying in 0 seconds: 
2019-11-14 23:09:02 ERROR (MainThread) [custom_components.wibeee.sensor] Retrying in 0 seconds: 
2019-11-14 23:09:03 ERROR (MainThread) [custom_components.wibeee.sensor] Retrying in 0 seconds: 
2019-11-14 23:09:04 ERROR (MainThread) [custom_components.wibeee.sensor] Retrying in 0 seconds: 

More logs:

Log Details (ERROR)
Thu Nov 14 2019 23:33:13 GMT+0000 (Hora padrĂŁo da Europa Ocidental)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/wibeee/sensor.py", line 225, in fetching_data
    dict_data = xmltodict.parse(xml_data)
  File "/usr/local/lib/python3.7/site-packages/xmltodict.py", line 327, in parse
    parser.Parse(xml_input, True)
xml.parsers.expat.ExpatError: no element found: line 73, column 17

Hi @rossiluis22,

Is your Mirubee working well?

I checked my logs and there is no errors but retries that may be normal when the connectivity is broken or with network performance issues.

I would recommend you to test it again but this time adapt following lines of code:

SCAN_INTERVAL = 1 # seconds
RETRY_INTERVAL = 0.2 # seconds

That define interval between requests and retry interval. I suggest 5 seconds for early tests.

Furthermore I think it does not make many sense to have a retry if a request has not worked, I will try to turn off that in next code revision.

@Joca, Could you test the code with logging level set to debug? With that we may see more information about your errors.

1 Like

Thank you very much @juanjoSanz.
I changed the SCAN_INTERVAL to 5 and RETRY_INTERVAL = 5. Now it seems it’s working without stops.
I activeted the logging level set to debug:

logger:
  default: warn
  logs:
    custom_components.sensor.wibeee: debug

I don’t have debug error at log, but I still have the same error:

2019-11-23 13:23:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/wibeee/sensor.py", line 225, in fetching_data
    dict_data = xmltodict.parse(xml_data)
  File "/usr/local/lib/python3.7/site-packages/xmltodict.py", line 327, in parse
    parser.Parse(xml_input, True)
xml.parsers.expat.ExpatError: mismatched tag: line 72, column 25

If this error doesn’t afect the functionality of system, I can live with it.