Hi, this seems like just the thing I have been waiting for. So nice that you are doing this and sharing.
I am not the best in coding, but I am very interested in this intergrations. I have the wifi-module (B6R-WWN) and if I can be at any service in testing this. Then I am up for it.
@dkvistgaard@wilfredktlr thank you for the interest. Unfortunately I found some critical bugs that I must sort out first - hopefully ready by the end of Sunday. I will get back to you
No problem. My first idea was to take the code from the Homey implementation and create a Home Assistant integration myself. To accomplish this I did the following to test if sending a raw TCP-packets to WiFi-module works.
Start a packet capture on my firewall (which sits in between my phone and WiFi-module)
Use the Android app from Bellfires on my phone to turn on/off the light of the fireplace
PS. I found this topic some time ago but recently I saw your post about the integration. Do you have a repo you can maybe share with me so I can take a look at your code? I am not a Python but a C# programmer (by occupation). So reading and understanding the code won’t be a problem.
Anyone got the fan speed working with bellfire mertik maxitrol? i already have fireplace on/off, flame higher and lower, light on/off and light higher and lower only missing fan speed. im using broadlink rm4 pro.
: Unfortunately it’s not working for me… gutted. I have a B6R-W2MR-0 but none of the entities are available after configuration and I see a few of these errors, with similar on the other “domains” too.
Logger: homeassistant.components.switch
Source: custom_components/mertik/mertik.py:50
Integration: Switch (documentation, issues)
First occurred: 13:36:54 (2 occurrences)
Last logged: 13:36:54
Error adding entities for domain switch with platform mertik
Error while setting up mertik platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 709, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 804, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 997, in state
if (is_on := self.is_on) is None:
File "/config/custom_components/mertik/switch.py", line 40, in is_on
return bool(self._dataservice.is_on)
File "/config/custom_components/mertik/mertikdatacoordinator.py", line 29, in is_on
self.mertik.is_on or self.mertik.is_igniting
File "/config/custom_components/mertik/mertik.py", line 50, in is_on
return self.on
AttributeError: 'Mertik' object has no attribute 'on'
I’ve been working on my fork of @djerik his code and fixed some stuff (including your error) and added functionality to turn the light on/off (exluding brightness), set the flame height and, turn the aux on/off, set eco and manual mode et cetare. Everything still has some bugs but I’ll try to keep working on it this week and push my changes when they are working well enough.
I had the same problem as @lwsrbrts. My WiFi-module (B6R-W2BE-0) returns a different start of the string (instead of 303030300003) so the method __processStatus() is never executed. After I changed it to my version the error went away. Maybe it has something to do the the model/serial number or it is generated when you register the module. We’ll have to do some more investigation. For now I’ll hard code it and work on creating a working integration.
@djerik how do you want me to push my changes to your repository? Can I just create my commits in my main branch and create a single pull request to merge it into your repository? Let me know your preffered workflow. I’m somewhat new to using Github. At work (I’m a .NET-developer) we use Gitlab and Git Flow to create feature branch for every single issue and then merge those into the different branches used for testing and deployment.