If you like me dont want to have your Home-Assistant exposed outside your network and still want to use your fingbox for presence detection.
Then there is another way to “pull” your status and not use the IFTTT sollution.
Use the same settings to setup ‘alert me when state changes’ as described here
Then use the imap component in HA to “pull” the state.
To keep my inbox clean i have setup a separate mailbox for my fingbox ([email protected])
I store the state in mqtt to make it persistent.
I find this way to use fingbox for presence a bit faster then the IFTTT way.
Hopefully Fingbox will get a native API soon that will work with HA for a super fast detection.
############################################################################
## IMAP - Fing
############################################################################
## Customizations
############################################################################
homeassistant:
customize:
sensor.fing_state:
hidden: true
sensor.fing_matte:
entity_picture: /local/fing.png
############################################################################
## Sensor
############################################################################
sensor:
#---------------------------------------------------------------------------
- platform: imap_email_content
name: Fing State
server: imap.gmail.com
port: 993
username: !secret imap_email_content_username
password: !secret imap_email_content_password
senders:
- [email protected]
value_template: subject
############################################################################
## Automations
############################################################################
automation:
- alias: 'Matte fing DOWN'
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.fing_state
condition:
condition: and
conditions:
- condition: template
value_template: "{{ states.sensor.fing_state.attributes.subject == 'A device went DOWN: Mattes Mobil @ McFrojd' }}"
action:
- service: mqtt.publish
data:
topic: 'fing/matte'
payload_template: 'Away'
retain: True
#---------------------------------------------------------------------------
- alias: 'Matte fing UP'
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.fing_state
condition:
condition: or
conditions:
- condition: template
value_template: "{{ states.sensor.fing_state.attributes.subject == 'A device went UP: Mattes Mobil @ McFrojd' }}"
- condition: template
value_template: "{{ states.sensor.fing_state.attributes.subject == 'A device is IN RANGE: Mattes Mobil @ McFrojd' }}"
action:
- service: mqtt.publish
data:
topic: 'fing/matte'
payload_template: 'Home'
retain: True