tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
309 stars 53 forks source link

[Feature] Automatic reconnect to router not working #217

Closed vulnersCom closed 2 years ago

vulnersCom commented 2 years ago

Hi mate! There are two point I've suggest as a feature. First one is kind obvious and maybe(?) my system just working wrong. Hass is missing routerboard after reboot. And to get back system I need to reboot Home Assistant. Maybe it's possible to add auto-reconnection feature?

Second one is about functionality. There is LtAP version of RouterBoard with integrated GPS module. Here is API samples: https://wiki.mikrotik.com/wiki/Manual:GPS-tracking It's will be very cool to track the position of the vehicle and write log of it in Hass.

tomaae commented 2 years ago

reconnect is there from the start. I will have a look if it got broken.

Do you mean this? #196

vulnersCom commented 2 years ago

Yep! Oh, completely missed that it's already done. But I can't see this entities in my integration.

tomaae commented 2 years ago

It will be available in next release soon along with quite few new features.

reconnect is not yet fixed, so let's not close this yet ;)

vulnersCom commented 2 years ago

Regarding GPS i think also we may use device_tracker and link it to the initial router device. For now to get object on the map I use:

- id: Bavaria GPS Tracker
  alias: Bavaria GPS Tracker
  description: ''
  trigger:
  - platform: state
    entity_id: sensor.bavaria_36_longitude
  condition: []
  action:
  - service: device_tracker.see
    data_template:
      mac: "DC:2C:6E:60:BC:C2"
      dev_id: "2f2ac6b3f60ea25e13aefbe7d358d047"
      host_name: bavaria
      location_name: Rocky Raccoon
      gps:
        - "{{ states('sensor.bavaria_36_latitude')|float }}"
        - "{{ states('sensor.bavaria_36_longitude')|float }}"
      gps_accuracy: 10
      battery: "{{ states('sensor.bavaria_36_voltage')|float }}"
  mode: single
tomaae commented 2 years ago

Problem with that is, that I dont own gps I could connect to a mikrotik and this is HA implementation I have no experience with. Doing something like this blindly is not really viable.