Myfox Alarm

Version v0.0.3 is available

Indentation error solved

Thanks you @Minims for this API !

1 Like

Yes of Course. I will have a look to you intégration. Thanks for working on this too :slight_smile:

For my personal use, I have created a new owner user on the alarm dedicated to HomeAssistant. I think it a good idea.

I think we can test the MQTT gateway in the next days. if you have any bug or strange behavior, tell me, or make an issue on GitHub. If all is OK, I release it on master as version 0.1.0. I think it will be better for @schumijo to follow son release on master for this integration.

I’ve it working on my Home Assistant too, thanks also to @schumijo addon.
I successfully created a mqtt sensor that is reading somfy status… :tada::tada:
As soon as I can I will try to get it work as alarm_control_panel

Thanks for the great help!

It seems the alarm status is not updated when armed.
need to dig a bit :

2021-04-02 00:03:22 WARNING (MainThread) [homeassistant.components.mqtt.alarm_control_panel] Received unexpected payload: {"security_level": "partial"}

I think that alarm_control_panel in Home Assistant has following status available: armed_custom_bypass/armed_home/armed_away/armed_night/disarmed/triggered

Can be found here: https://www.home-assistant.io/integrations/manual#armed_custom_bypassarmed_homearmed_awayarmed_nightdisarmedtriggered
Could be the root cause?

It seems you are right, but I was expecting it will work with :

        "payload_arm_away": "armed",
        "payload_arm_night": "partial",
        "payload_disarm": "disarmed",

According to documentation, it seems this only work with set and not get.

Thx, fixing in progress. :slight_smile:
Does anyone has already trigger the alarm to know the reported status by the API ? I can’t make it for the moment.

Night mode is reported as “partial”.
I don’t remember the value for armed mode.

dev branch updated :

[SomfyProtect2MQTT] Fix GET Alarm Status
[SomfyProtect2MQTT] Fix console logging
[SomfyProtect2MQTT] Retain MQTT message on HA Discovery

Excellent job ! Will do some tests during the weekend.

For the people who use my addon, just start a rebuild.

I rebuilt and set as alarm_control_panel.
Disarm and armed_away are working fine, armed_night it’s working by the service.
So on integration side I guess this is great!!
But I’ve a problem, opening the site entity alarm_control_panel I have only armed_home and armed_away as a button, I was used to use armed_home as a synonymous of armed_night but with this new configuration it’s not more a synonymous.
But this is a missing feature of HA I guess.
How do you usually switch to the night mode?

One little thing to add, I set the configuration like that:
delay_site: ‘10’
delay_device: ‘60’
But I always see my site status updating every 6p seconds.

By the way, Thank you for this new great integration!

EDIT: Found out that using the official alarm card you can choose available states :tada:

1 Like

I get this error from the mqtt log:

1617393714: New client connected from 172.30.32.1 as somfy-protect (p2, c1, k60, u’mqtt_user’).
1617393878: Saving in-memory database to /data/mosquitto.db.
1617394221: Client 1HlOA15fkYu0KjJdyGUEjT has exceeded timeout, disconnecting.
1617394243: New connection from 172.30.32.1 on port 1883.
[22:10:44] INFO: [INFO] found homeassistant on local database
1617394244: New client connected from 172.30.32.1 as 0wAdX5CU8dvBPnUFUxMd56 (p2, c1, k60, u’homeassistant’).
1617394616: Socket error on client somfy-protect, disconnecting.
1617394625: New connection from 172.30.32.1 on port 1883.
[22:17:06] INFO: [INFO] found mqtt_user on local database
1617394626: New client connected from 172.30.32.1 as somfy-protect (p2, c1, k60, u’mqtt_user’).
1617394802: Socket error on client 0wAdX5CU8dvBPnUFUxMd56, disconnecting.
1617394824: New connection from 172.30.32.1 on port 1883.
[22:20:25] INFO: [INFO] found homeassistant on local database
1617394825: New client connected from 172.30.32.1 as 6E75jWukVBl7rJUgzJSOeN (p2, c1, k60, u’homeassistant’).

6 times per second or every 6 seconds ?

@brazil88 You can try changing MQTT client from “Somfy-protect” to “Somfy-protect-2” to se if it helps

I have also make an other update, you might be able to update all device settings that are ON/OFF except for camera for now.

Sorry for the typo… I see sites update once every 60 seconds. As showed by the log:

2021-04-02 23:24:11,218 [INFO] Update Sites Status
2021-04-02 23:24:11,789 [INFO] Update Devices Status
2021-04-02 23:25:12,001 [INFO] Update Sites Status
2021-04-02 23:25:12,665 [INFO] Update Devices Status
2021-04-02 23:26:12,970 [INFO] Update Sites Status

@teo.cannata Fixed, I have hardcoded a limit at 10s minimum too. Don’t really know what Somfy can handle as it simulate the app.

Does anyone know where to get the source of that : https://market.jeedom.com/index.php?v=d&p=market_display&id=4081

It’s now updating every 10s, perfect!! Thanks!

Now it looks connected:

1617401193: New connection from 172.30.32.1 on port 1883.
1617401193: New client connected from 172.30.32.1 as somfy-protect-2 (p2, c1, k60, u’mqtt_user’).

but I don’t see the panel entity.

I noticed that the log viewer is returning this error to me:

2021-04-03 08:31:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2752257568] Received invalid command: camera_thumbnail