You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are correct! I recently got a lock myself and i'm not very familiar with it yet.
I added a new command to the the m-api branch, '--door-lock-configuration'. This branch only has support for the devices I own so far...
Sadly I can't add new commands to the master branch due to that the app has changed to a new API
Thank you will try that out. Another question do you know a good way to read events like firealarm and get that info in to home assistant? Is there someway to run this script from home assistant and get info like water leak, fire etc.?
Possibly you could get the information from the event log, but I would not call that a good way, and it is not supported by home-assistant so you would need to use a shell command or similar.
I added a command for setting auto-lock enabled/disabled and event-log to the m-api branch as well.
Possibly you could get the information from the event log, but I would not call that a good way, and it is not supported by home-assistant so you would need to use a shell command or similar.
In my experience a good way to provide Verisure status information of all kind is to run a Python script with the python-verisure module and publish/subscribe to a MQTT broker. This would give you a generic solution that most "modern" sw including HA and Node-RED supports. I do that since years, including support for commands to SmartPlugs, rock solid. Only disadvantage is that we still have to poll for information, the push support used in apps seems to be "hidden away" somehow?
Possibly you could get the information from the event log, but I would not call that a good way, and it is not supported by home-assistant so you would need to use a shell command or similar.
In my experience a good way to provide Verisure status information of all kind is to run a Python script with the python-verisure module and publish/subscribe to a MQTT broker. This would give you a generic solution that most "modern" sw including HA and Node-RED supports. I do that since years, including support for commands to SmartPlugs, rock solid. Only disadvantage is that we still have to poll for information, the push support used in apps seems to be "hidden away" somehow?
This sound like a good solution. Can you explain a bit more in detail how I can achieve that. Share your setup or so? I'm also using node red. I short what I want to accomplish is turn on all lights when fire alarm is triggered. For getting instant alerts when something happens I create automations in verisure to turn on a smartplug, thats connects to a shelly 1. When Home assistant see the sensor on shelly 1 turn on I'm polling verisure for an update. If you this way opens a door it takes 1-2 seconds for HA to get the status.
@persandstrom Would it somehow be possible to get push alerts to this python module?
I can make a write up and provide examples of what I did
I run a python script, Node-RED and Mosquitto MQTT broker, all on a Raspberry Pi. Currently just supporting arm statuses and smart plugs but I see no reason why it cannot be extended if needed
You will have to install some additional stuff
install Mosquitto MQTT broker
install the python-verisure module
modify a file in python-verisure in the section for smart-plugs
create a copy of the script with your login credentials
using PIP to install some additional python libraries needed for the script
test the script via command prompt until it is running as expected
Install Node-RED and import a sample flow that will handle the start, monitoring and restarts if needed of your script
If you feel fully comfortable with all this, it all sounds familiar, I can continue here or we can take it offfline
I do not use HA anymore, I did earlier with some Z-Wave devices but all is now replaced with Node-RED. The script supports MQTT so you should be able to use it along with HA as well
In the attached script you need to add your configuration details:
Your verisure user name and password, your ip to your MQTT broker
username = 'your_username'
password = 'your_password'
locale = 'sv_SE'
mqtt_broker = '127.0.0.1'
The script is checking the armstatus every 3x pollinterval (30 seconds). You can change this with the param
pollinterval = 10
I run the script with python3 like "python3 /home/pi/VerisureSystemInterface.py". You will have to install some python modules using pip3 to make it work. By trying to run it from the command prompt you will find out what modules you are missing, all required are listed in the start of the script:
import time
import verisure
import paho.mqtt.client as mqtt
import os
import subprocess
import signal
from sys import exit
from threading import Thread, Event, Condition
from setproctitle import setproctitle
First step is to make the script running in your system. Next I will explain and show you how to start, control and integrate it with Node-RED
Best regards, Walter
PS change the extension of the attached script from .txt to .py
Activity
persandstrom commentedon May 21, 2022
Hi,
You can see that using the overview command.
jacobhallgren commentedon May 21, 2022
Which field?
The "method" that says auto is just if it was locked by the autolock. Not if autolock is enabled.
persandstrom commentedon May 21, 2022
You are correct! I recently got a lock myself and i'm not very familiar with it yet.
I added a new command to the the m-api branch, '--door-lock-configuration'. This branch only has support for the devices I own so far...
Sadly I can't add new commands to the master branch due to that the app has changed to a new API
jacobhallgren commentedon May 21, 2022
Thank you will try that out. Another question do you know a good way to read events like firealarm and get that info in to home assistant? Is there someway to run this script from home assistant and get info like water leak, fire etc.?
persandstrom commentedon May 21, 2022
Possibly you could get the information from the event log, but I would not call that a good way, and it is not supported by home-assistant so you would need to use a shell command or similar.
I added a command for setting auto-lock enabled/disabled and event-log to the m-api branch as well.
krambriw commentedon May 22, 2022
In my experience a good way to provide Verisure status information of all kind is to run a Python script with the python-verisure module and publish/subscribe to a MQTT broker. This would give you a generic solution that most "modern" sw including HA and Node-RED supports. I do that since years, including support for commands to SmartPlugs, rock solid. Only disadvantage is that we still have to poll for information, the push support used in apps seems to be "hidden away" somehow?
jacobhallgren commentedon May 22, 2022
This sound like a good solution. Can you explain a bit more in detail how I can achieve that. Share your setup or so? I'm also using node red. I short what I want to accomplish is turn on all lights when fire alarm is triggered. For getting instant alerts when something happens I create automations in verisure to turn on a smartplug, thats connects to a shelly 1. When Home assistant see the sensor on shelly 1 turn on I'm polling verisure for an update. If you this way opens a door it takes 1-2 seconds for HA to get the status.
@persandstrom Would it somehow be possible to get push alerts to this python module?
persandstrom commentedon May 22, 2022
@jacobhallgren not at the moment. And I'm not sure how to do it. I'll add an investigation of that to my to-do list.
jacobhallgren commentedon May 22, 2022
@persandstrom Thanks, really appreciate it. Would open up so many possibilities with instant alerts on event.
persandstrom commentedon May 24, 2022
@jacobhallgren I cant find a solution on how to capture push notifications. You could enable email notifications and trigger on those.
jacobhallgren commentedon May 27, 2022
@krambriw Can you share more in detail about your setup?
krambriw commentedon May 28, 2022
I can make a write up and provide examples of what I did
I run a python script, Node-RED and Mosquitto MQTT broker, all on a Raspberry Pi. Currently just supporting arm statuses and smart plugs but I see no reason why it cannot be extended if needed
You will have to install some additional stuff
If you feel fully comfortable with all this, it all sounds familiar, I can continue here or we can take it offfline
jacobhallgren commentedon May 31, 2022
@krambriw Thank you for the details. Yes I feel comfortable with that. Please provide the script details. Do you also use this with Home Assistant?
krambriw commentedon Jun 1, 2022
I do not use HA anymore, I did earlier with some Z-Wave devices but all is now replaced with Node-RED. The script supports MQTT so you should be able to use it along with HA as well
In the attached script you need to add your configuration details:
Your verisure user name and password, your ip to your MQTT broker
username = 'your_username'
password = 'your_password'
locale = 'sv_SE'
mqtt_broker = '127.0.0.1'
The script is checking the armstatus every 3x pollinterval (30 seconds). You can change this with the param
pollinterval = 10
I run the script with python3 like "python3 /home/pi/VerisureSystemInterface.py". You will have to install some python modules using pip3 to make it work. By trying to run it from the command prompt you will find out what modules you are missing, all required are listed in the start of the script:
import time
import verisure
import paho.mqtt.client as mqtt
import os
import subprocess
import signal
from sys import exit
from threading import Thread, Event, Condition
from setproctitle import setproctitle
First step is to make the script running in your system. Next I will explain and show you how to start, control and integrate it with Node-RED
Best regards, Walter
PS change the extension of the attached script from .txt to .py
VerisureSystemInterface.txt