Myfox Alarm

@brazil88

Can you have a look to MQTT data, you can use MQTT explorer for exemple. You might have one topic called somfyprotect2mqtt.

Infos:

  • I have push some fix on the dev branch.
  • As you can see in the last version, I display some settings with a switch button. Some of them are working. Some other not. I have test everything but if something does not work tell me.
  • Some settings such as intellitag sensibility is a value between 1-9. I am able to update that, but don’t know how to represent it in MQTT. If you have some ideas.

Teasing:
I’m working on the somfy_api_part and I have found the way to make more things :
Comming Soon :

  • Device Action: This is for exemple to control the camera shutter, the led, reboot, reset and some other things (camera shutter done)
  • Stop the Alarm (done)
  • Trigger the Alarm (with sound or silent) (done, only with sound)
  • Indoor Camera Snapshot !! It works :slight_smile: (done)

Have a nice Update :slight_smile: Hoping release in master during next week. Need some testers :slight_smile:

Once I have done the basics in the API, it will come to SomfyProtect2MQTT

no, there is no topic with somfyprotect2mqtt. Does that mean it’s not connected?

Do you see something in the LOG panel of the Somfy Protect supervisor integration ?
How have you setup the MQTT Integration ?

this is what I see in the log:

Logger: homeassistant.config_entries
Source: components/somfy/init.py:113
First occurred: 22:25:43 (1 occurrences)
Last logged: 22:25:43

Error setting up entry Home Assistant Cloud for somfy
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 248, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/usr/src/homeassistant/homeassistant/components/somfy/init.py”, line 113, in async_setup_entry
if all(not bool(device.states) for device in coordinator.data.values()):
AttributeError: ‘NoneType’ object has no attribute ‘values’

and this:

Logger: homeassistant.components.somfy
Source: helpers/update_coordinator.py:160
Integration: Somfy (documentation, issues)
First occurred: 22:25:43 (1 occurrences)
Last logged: 22:25:43

Error requesting somfy device update data: 400, message=‘Bad Request’, url=URL(‘https://account-link.nabucasa.com/refresh_token/somfy’)

This is the log of the “Somfy Open Api” integration, not the one from @schumijo integration
You might have something here :

@schumijo Do you think you can add a debug: True / False in the add-on configuration, and run with ‘-v’ if it is set to True. Thanks !

this is what i see:

Have You kept the configuration like this :

  topic_prefix: somfyProtect2mqtt
  ha_discover_prefix: homeassistant

Are you using this MQTT add-on broker ?

yes, that’s right, I don’t understand where the mistake can be

what about this in the terminal :

grep -i MQTT config/home-assistant.log

I am not very experienced with TERMINAL, what should I do?thanks for your help

Hi @Minims, I think yes. Will do it in v0.0.4

1 Like

Hello,

this new add-on is really cool. Thank You!!!
I can get now the status of my alarm, my badges and of my intellitags, that’s fantastic! Nevertheless, I can not change the alarm status. When I click on arm_night or amr_away, nothing change. Do you have an idea why?
I use the add-ons somfy mqtt bridge + mosquitto mqtt. I get all the status of all my devices.

Did comment/remove your old configuration for alarm_control_panel?
Once removed it started working without problems for me…

@Minims I see a quite big amount of cpu used by the component, don’t know what could be done to improve this part.

Yes I remove my previous configuration.
The alarm changes of state when I click on the badge or from the somfy app, the HA panel is updating.
But when I click on HA panel, nothing changes.

I agree this add-on is using a lot of CPU ressources, roughly 25% in my case. The CPU temperature has raised of more than 10°C since I use this add-on.

Yes, my fault, I have broke something. It might be OK now. make a git pull or a rebuild.

Thanks

Don’t know for now. Need to investigate.
I think calling the Somfy api everything 10s and publish a lot of message to MQTT does not help to limit CPU usage. If some of you have the knowledge to propose improvement , do not hesitate.

Just copy/paste my command in the HA Terminal :

Capture d’écran 2021-04-04 à 14.03.28

Found !!
The While True loop is taking one core @100% all the time. Adding a sleep 10sec (as I have set the lower delay limit to 10s). And it’s really better ;-).

So Update your Version:

# Manual
git pull
pip3 install -r somfyProtect2Mqtt/requirements.txt  # I have update the Somfy lib yesterday

# HA Intergration  
Rebuild (Docker Image)

Great! it works now!

Wahou!! impressive, I have now almost 0% of CPU usage :smiley:
Thank you for you amazing job!!! :partying_face:

1 Like

I agree, this is an amazing job!! Thank you!!

1 Like