Support for Velbus Home Automation

I am connecting to a USBIP, so my string is:

“port”: “tls://192.168.0.175:27015”

Here is the full error log (with debug login enabled)

2024-05-18 03:08:22.537 WARNING (MainThread) [velbus-protocol] EOF received from Velbus
2024-05-18 03:08:22.540 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/velbusaio/controller.py", line 150, in connect
    ) = await asyncio.get_event_loop().create_connection(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1120, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1102, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1005, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.0.175', 27015)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/velbusaio/controller.py", line 158, in connect
    raise VelbusConnectionFailed from err
velbusaio.exceptions.VelbusConnectionFailed: 'Connection setup failed'```

It now occurs really often, every horizontal set of values is when a EOF happens, and I have to manually restart HA…

@Cereal2nd do you have an idea for my EOF issue, and a possible fix?
Maybe removing/adding the Velbus integration again? (but then I’d need to rename everything again… gonna take ages)

for now I just run an automation that runs the “reload config entry” service for Velbus when an outdoor temp sensor value does not change for 30 minutes…
thanks !

from the log above this is clearly a network or a signum problem.

The tcp connection towards the signum gets interrupted and the create_connection thats started afterwards is also failing.
So not sure i can do something about this.

Ok, thanks for your help !

@Cereal2nd ; I just updated to the latest HA version; and now all entities are unavailable.

I’ve checked the logs, and I’m getting the following error a lot:
Restarting Velbus writer due to AttributeError(“‘NoneType’ object has no attribute ‘is_closing’”)

Never seen that one before.

My diagnostics are the following:
My Velbus set-up hasn’t changed, just updated to latest DietPi version (9.5.1) and latest HA (2024.7.1)

 scan 117
2024-07-07 21:01:25.813 INFO (MainThread) [velbus-handler] Starting handling scan 118
2024-07-07 21:01:25.813 INFO (MainThread) [velbus-handler] Starting handling scan 119
2024-07-07 21:01:25.813 INFO (MainThread) [velbus-handler] Starting handling scan 120
2024-07-07 21:01:25.814 INFO (MainThread) [velbus-handler] Starting handling scan 121
2024-07-07 21:01:25.814 INFO (MainThread) [velbus-handler] Starting handling scan 122
2024-07-07 21:01:25.814 INFO (MainThread) [velbus-handler] Starting handling scan 123
2024-07-07 21:01:25.814 INFO (MainThread) [velbus-handler] Starting handling scan 124
2024-07-07 21:01:25.814 INFO (MainThread) [velbus-handler] Starting handling scan 125
2024-07-07 21:01:25.815 INFO (MainThread) [velbus-handler] Starting handling scan 126
2024-07-07 21:01:25.815 INFO (MainThread) [velbus-handler] Starting handling scan 127
2024-07-07 21:01:25.815 INFO (MainThread) [velbus-handler] Starting handling scan 128
2024-07-07 21:01:25.815 INFO (MainThread) [velbus-handler] Starting handling scan 129
2024-07-07 21:01:25.815 INFO (MainThread) [velbus-handler] Starting handling scan 130
2024-07-07 21:01:25.816 INFO (MainThread) [velbus-handler] Starting handling scan 131
2024-07-07 21:01:25.816 INFO (MainThread) [velbus-handler] Starting handling scan 132
2024-07-07 21:01:25.816 INFO (MainThread) [velbus-handler] Starting handling scan 133
2024-07-07 21:01:25.816 INFO (MainThread) [velbus-handler] Starting handling scan 134
2024-07-07 21:01:25.816 INFO (MainThread) [velbus-handler] Starting handling scan 135
2024-07-07 21:01:25.816 INFO (MainThread) [velbus-handler] Starting handling scan 136
2024-07-07 21:01:25.816 INFO (MainThread) [velbus-handler] Starting handling scan 137
2024-07-07 21:01:25.817 INFO (MainThread) [velbus-handler] Starting handling scan 138
2024-07-07 21:01:25.817 INFO (MainThread) [velbus-handler] Starting handling scan 139
2024-07-07 21:01:25.817 INFO (MainThread) [velbus-handler] Starting handling scan 140
2024-07-07 21:01:25.817 INFO (MainThread) [velbus-handler] Starting handling scan 141
2024-07-07 21:01:25.817 INFO (MainThread) [velbus-handler] Starting handling scan 142
2024-07-07 21:01:25.817 INFO (MainThread) [velbus-handler] Starting handling scan 143
2024-07-07 21:01:25.817 INFO (MainThread) [velbus-handler] Starting handling scan 144
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 145
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 146
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 147
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 148
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 149
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 150
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 151
2024-07-07 21:01:25.818 INFO (MainThread) [velbus-handler] Starting handling scan 152
2024-07-07 21:01:25.819 INFO (MainThread) [velbus-handler] Starting handling scan 153
2024-07-07 21:01:25.819 INFO (MainThread) [velbus-handler] Starting handling scan 154
2024-07-07 21:01:25.819 INFO (MainThread) [velbus-handler] Starting handling scan 155
2024-07-07 21:01:25.819 INFO (MainThread) [velbus-handler] Starting handling scan 156
2024-07-07 21:01:25.819 INFO (MainThread) [velbus-handler] Starting handling scan 157
2024-07-07 21:01:25.819 INFO (MainThread) [velbus-handler] Starting handling scan 158
2024-07-07 21:01:25.819 INFO (MainThread) [velbus-handler] Starting handling scan 159
2024-07-07 21:01:25.820 INFO (MainThread) [velbus-handler] Starting handling scan 160
2024-07-07 21:01:25.820 INFO (MainThread) [velbus-handler] Starting handling scan 161
2024-07-07 21:01:25.820 INFO (MainThread) [velbus-handler] Starting handling scan 162
2024-07-07 21:01:25.820 INFO (MainThread) [velbus-handler] Starting handling scan 163
2024-07-07 21:01:25.820 INFO (MainThread) [velbus-handler] Starting handling scan 164
2024-07-07 21:01:25.820 INFO (MainThread) [velbus-handler] Starting handling scan 165
2024-07-07 21:01:25.820 INFO (MainThread) [velbus-handler] Starting handling scan 166
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 167
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 168
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 169
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 170
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 171
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 172
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 173
2024-07-07 21:01:25.821 INFO (MainThread) [velbus-handler] Starting handling scan 174
2024-07-07 21:01:25.822 INFO (MainThread) [velbus-handler] Starting handling scan 175
2024-07-07 21:01:25.822 INFO (MainThread) [velbus-handler] Starting handling scan 176
2024-07-07 21:01:25.822 INFO (MainThread) [velbus-handler] Starting handling scan 177
2024-07-07 21:01:25.822 INFO (MainThread) [velbus-handler] Starting handling scan 178
2024-07-07 21:01:25.822 INFO (MainThread) [velbus-handler] Starting handling scan 179
2024-07-07 21:01:25.822 INFO (MainThread) [velbus-handler] Starting handling scan 180
2024-07-07 21:01:25.822 INFO (MainThread) [velbus-handler] Starting handling scan 181
2024-07-07 21:01:25.823 INFO (MainThread) [velbus-handler] Starting handling scan 182
2024-07-07 21:01:25.823 INFO (MainThread) [velbus-handler] Starting handling scan 183
2024-07-07 21:01:25.823 INFO (MainThread) [velbus-handler] Starting handling scan 184
2024-07-07 21:01:25.823 INFO (MainThread) [velbus-handler] Starting handling scan 185
2024-07-07 21:01:25.823 INFO (MainThread) [velbus-handler] Starting handling scan 186
2024-07-07 21:01:25.823 INFO (MainThread) [velbus-handler] Starting handling scan 187
2024-07-07 21:01:25.823 INFO (MainThread) [velbus-handler] Starting handling scan 188
2024-07-07 21:01:25.824 INFO (MainThread) [velbus-handler] Starting handling scan 189
2024-07-07 21:01:25.824 INFO (MainThread) [velbus-handler] Starting handling scan 190
2024-07-07 21:01:25.824 INFO (MainThread) [velbus-handler] Starting handling scan 191
2024-07-07 21:01:25.824 INFO (MainThread) [velbus-handler] Starting handling scan 192
2024-07-07 21:01:25.824 INFO (MainThread) [velbus-handler] Starting handling scan 193
2024-07-07 21:01:25.824 INFO (MainThread) [velbus-handler] Starting handling scan 194
2024-07-07 21:01:25.824 INFO (MainThread) [velbus-handler] Starting handling scan 195
2024-07-07 21:01:25.825 INFO (MainThread) [velbus-handler] Starting handling scan 196
2024-07-07 21:01:25.825 INFO (MainThread) [velbus-handler] Starting handling scan 197
2024-07-07 21:01:25.825 INFO (MainThread) [velbus-handler] Starting handling scan 198
2024-07-07 21:01:25.825 INFO (MainThread) [velbus-handler] Starting handling scan 199
2024-07-07 21:01:25.826 INFO (MainThread) [velbus-handler] Starting handling scan 200
2024-07-07 21:01:25.826 INFO (MainThread) [velbus-handler] Starting handling scan 201
2024-07-07 21:01:25.826 INFO (MainThread) [velbus-handler] Starting handling scan 202
2024-07-07 21:01:25.826 INFO (MainThread) [velbus-handler] Starting handling scan 203
2024-07-07 21:01:25.826 INFO (MainThread) [velbus-handler] Starting handling scan 204
2024-07-07 21:01:25.826 INFO (MainThread) [velbus-handler] Starting handling scan 205
2024-07-07 21:01:25.826 INFO (MainThread) [velbus-handler] Starting handling scan 206
2024-07-07 21:01:25.827 INFO (MainThread) [velbus-handler] Starting handling scan 207
2024-07-07 21:01:25.827 INFO (MainThread) [velbus-handler] Starting handling scan 208
2024-07-07 21:01:25.827 INFO (MainThread) [velbus-handler] Starting handling scan 209
2024-07-07 21:01:25.827 INFO (MainThread) [velbus-handler] Starting handling scan 210
2024-07-07 21:01:25.827 INFO (MainThread) [velbus-handler] Starting handling scan 211
2024-07-07 21:01:25.827 INFO (MainThread) [velbus-handler] Starting handling scan 212
2024-07-07 21:01:25.828 INFO (MainThread) [velbus-handler] Starting handling scan 213
2024-07-07 21:01:25.828 INFO (MainThread) [velbus-handler] Starting handling scan 214
2024-07-07 21:01:25.828 INFO (MainThread) [velbus-handler] Starting handling scan 215
2024-07-07 21:01:25.828 INFO (MainThread) [velbus-handler] Starting handling scan 216
2024-07-07 21:01:25.828 INFO (MainThread) [velbus-handler] Starting handling scan 217
2024-07-07 21:01:25.828 INFO (MainThread) [velbus-handler] Starting handling scan 218
2024-07-07 21:01:25.829 INFO (MainThread) [velbus-handler] Starting handling scan 219
2024-07-07 21:01:25.829 INFO (MainThread) [velbus-handler] Starting handling scan 220
2024-07-07 21:01:25.829 INFO (MainThread) [velbus-handler] Starting handling scan 221
2024-07-07 21:01:25.829 INFO (MainThread) [velbus-handler] Starting handling scan 222
2024-07-07 21:01:25.829 INFO (MainThread) [velbus-handler] Starting handling scan 223
2024-07-07 21:01:25.829 INFO (MainThread) [velbus-handler] Starting handling scan 224
2024-07-07 21:01:25.829 INFO (MainThread) [velbus-handler] Starting handling scan 225
2024-07-07 21:01:25.830 INFO (MainThread) [velbus-handler] Starting handling scan 226
2024-07-07 21:01:25.830 INFO (MainThread) [velbus-handler] Starting handling scan 227
2024-07-07 21:01:25.830 INFO (MainThread) [velbus-handler] Starting handling scan 228
2024-07-07 21:01:25.830 INFO (MainThread) [velbus-handler] Starting handling scan 229
2024-07-07 21:01:25.830 INFO (MainThread) [velbus-handler] Starting handling scan 230
2024-07-07 21:01:25.830 INFO (MainThread) [velbus-handler] Starting handling scan 231
2024-07-07 21:01:25.831 INFO (MainThread) [velbus-handler] Starting handling scan 232
2024-07-07 21:01:25.831 INFO (MainThread) [velbus-handler] Starting handling scan 233
2024-07-07 21:01:25.831 INFO (MainThread) [velbus-handler] Starting handling scan 234
2024-07-07 21:01:25.831 INFO (MainThread) [velbus-handler] Starting handling scan 235
2024-07-07 21:01:25.831 INFO (MainThread) [velbus-handler] Starting handling scan 236
2024-07-07 21:01:25.831 INFO (MainThread) [velbus-handler] Starting handling scan 237
2024-07-07 21:01:25.832 INFO (MainThread) [velbus-handler] Starting handling scan 238
2024-07-07 21:01:25.832 INFO (MainThread) [velbus-handler] Starting handling scan 239
2024-07-07 21:01:25.832 INFO (MainThread) [velbus-handler] Starting handling scan 240
2024-07-07 21:01:25.832 INFO (MainThread) [velbus-handler] Starting handling scan 241
2024-07-07 21:01:25.832 INFO (MainThread) [velbus-handler] Starting handling scan 242
2024-07-07 21:01:25.832 INFO (MainThread) [velbus-handler] Starting handling scan 243
2024-07-07 21:01:25.833 INFO (MainThread) [velbus-handler] Starting handling scan 244
2024-07-07 21:01:25.833 INFO (MainThread) [velbus-handler] Starting handling scan 245
2024-07-07 21:01:25.833 INFO (MainThread) [velbus-handler] Starting handling scan 246
2024-07-07 21:01:25.833 INFO (MainThread) [velbus-handler] Starting handling scan 247
2024-07-07 21:01:25.833 INFO (MainThread) [velbus-handler] Starting handling scan 248
2024-07-07 21:01:25.833 INFO (MainThread) [velbus-handler] Starting handling scan 249
2024-07-07 21:01:25.833 INFO (MainThread) [velbus-handler] Starting handling scan 250
2024-07-07 21:01:25.834 INFO (MainThread) [velbus-handler] Starting handling scan 251
2024-07-07 21:01:25.834 INFO (MainThread) [velbus-handler] Starting handling scan 252
2024-07-07 21:01:25.834 INFO (MainThread) [velbus-handler] Starting handling scan 253
2024-07-07 21:01:25.834 INFO (MainThread) [velbus-handler] Starting handling scan 254
2024-07-07 21:01:25.834 INFO (MainThread) [velbus-handler] Module scan completed
2024-07-07 21:01:26.473 INFO (MainThread) [velbus-handler] Scan module 219 failed: not present or unavailable
2024-07-07 21:01:26.473 INFO (MainThread) [velbus-handler] Starting handling scan 220
2024-07-07 21:01:26.473 INFO (MainThread) [velbus-handler] Starting scan 220
2024-07-07 21:01:26.474 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:28.474 INFO (MainThread) [velbus-handler] Scan module 220 failed: not present or unavailable
2024-07-07 21:01:28.475 INFO (MainThread) [velbus-handler] Starting handling scan 221
2024-07-07 21:01:28.496 INFO (MainThread) [velbus-handler] Starting scan 221
2024-07-07 21:01:28.496 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:30.497 INFO (MainThread) [velbus-handler] Scan module 221 failed: not present or unavailable
2024-07-07 21:01:30.497 INFO (MainThread) [velbus-handler] Starting handling scan 222
2024-07-07 21:01:30.516 INFO (MainThread) [velbus-handler] Starting scan 222
2024-07-07 21:01:30.537 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:32.518 INFO (MainThread) [velbus-handler] Scan module 222 failed: not present or unavailable
2024-07-07 21:01:32.518 INFO (MainThread) [velbus-handler] Starting handling scan 223
2024-07-07 21:01:32.522 INFO (MainThread) [velbus-handler] Starting scan 223
2024-07-07 21:01:32.523 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:34.524 INFO (MainThread) [velbus-handler] Scan module 223 failed: not present or unavailable
2024-07-07 21:01:34.525 INFO (MainThread) [velbus-handler] Starting handling scan 224
2024-07-07 21:01:34.530 INFO (MainThread) [velbus-handler] Starting scan 224
2024-07-07 21:01:34.533 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:36.546 INFO (MainThread) [velbus-handler] Scan module 224 failed: not present or unavailable
2024-07-07 21:01:36.547 INFO (MainThread) [velbus-handler] Starting handling scan 225
2024-07-07 21:01:36.560 INFO (MainThread) [velbus-handler] Starting scan 225
2024-07-07 21:01:36.561 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:38.561 INFO (MainThread) [velbus-handler] Scan module 225 failed: not present or unavailable
2024-07-07 21:01:38.561 INFO (MainThread) [velbus-handler] Starting handling scan 226
2024-07-07 21:01:38.561 INFO (MainThread) [velbus-handler] Starting scan 226
2024-07-07 21:01:38.562 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:40.633 INFO (MainThread) [velbus-handler] Scan module 226 failed: not present or unavailable
2024-07-07 21:01:40.634 INFO (MainThread) [velbus-handler] Starting handling scan 227
2024-07-07 21:01:40.654 INFO (MainThread) [velbus-handler] Starting scan 227
2024-07-07 21:01:40.656 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:42.655 INFO (MainThread) [velbus-handler] Scan module 227 failed: not present or unavailable
2024-07-07 21:01:42.655 INFO (MainThread) [velbus-handler] Starting handling scan 228
2024-07-07 21:01:42.655 INFO (MainThread) [velbus-handler] Starting scan 228
2024-07-07 21:01:42.656 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:44.656 INFO (MainThread) [velbus-handler] Scan module 228 failed: not present or unavailable
2024-07-07 21:01:44.656 INFO (MainThread) [velbus-handler] Starting handling scan 229
2024-07-07 21:01:44.657 INFO (MainThread) [velbus-handler] Starting scan 229
2024-07-07 21:01:44.657 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:46.658 INFO (MainThread) [velbus-handler] Scan module 229 failed: not present or unavailable
2024-07-07 21:01:46.658 INFO (MainThread) [velbus-handler] Starting handling scan 230
2024-07-07 21:01:46.658 INFO (MainThread) [velbus-handler] Starting scan 230
2024-07-07 21:01:46.659 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:48.659 INFO (MainThread) [velbus-handler] Scan module 230 failed: not present or unavailable
2024-07-07 21:01:48.659 INFO (MainThread) [velbus-handler] Starting handling scan 231
2024-07-07 21:01:48.660 INFO (MainThread) [velbus-handler] Starting scan 231
2024-07-07 21:01:48.660 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")
2024-07-07 21:01:50.661 INFO (MainThread) [velbus-handler] Scan module 231 failed: not present or unavailable
2024-07-07 21:01:50.661 INFO (MainThread) [velbus-handler] Starting handling scan 232
2024-07-07 21:01:50.661 INFO (MainThread) [velbus-handler] Starting scan 232
2024-07-07 21:01:50.662 ERROR (MainThread) [velbus-protocol] Restarting Velbus writer due to AttributeError("'NoneType' object has no attribute 'is_closing'")

can you make a bug report?
Ca you also enable the debug logging and get me this, then it should be easy to solve

1 Like

@Cereal2nd , thanks for the reply!

I let it sit for the day (because I was at work); was now looking at it , and I thought to get some more logging by reloading the velbus integration… Now I do get a successful sync with a lot of devices and it seems to be working again (I didn’t reboot or restart HA or anything, just let it sit for the day)…

Not sure why; can’t explain it.

I do notice though that not everything is loading, I have a few devices where all entities are unavailable (mostly VMB4RYNO, VMBEL1, VMBEL2, VMBEL4 and VMBELO)

I’ve created a bug report and added a ZIP file of my logging file:

Hi, I just installed Home Assistant (without signum as it is unavailable).
The entities loaded correctly and now I want to distribute them by area.
I’ve issues with the relays as they have multiple channels going to different area’s (e.g. one going to the kitchen and another one to the living) and I can only attribute one area per relay (excepted for the VMBDMI who can be splitted by channel. It is not the case for instance for a VMB4DC).

Am I doing something wrong? What is the workaround? Best practice?

Thx.

This is something thats indeed a problem.

Hass only assigns a device to an area, but a velbus device can have entities in multiple areas.
So at this moment its not possible …

OK, thanks. For the record, I found a workaround. I use entities cards and it’s doing the job (for now…)

Another question:
how do you program long press on velbus push-buttons? I’m testing via automation right now but I guess the question is generic.

I just use a state trigger for the button entity, and just add “for: 1 second”.
be careful though as a longpress will first trigger a shortpress…