This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Setup Homey with MQTT for location detection

13468911

Comments

  • Are people here interested in a beta version as soon as i have finished some of the things i am working on? If so then i will also start publishing in the beta channel.
  • @MennoVanGrinsven

    Exactly!

    My phone pops up notifications that it is entering / leaving a geofence. This information does not reach Homey.

    How do I get those transition events to Homey? 

    I have set the radius to 50 and shared it. The geofence is visible on the map.


  • adjuadju Member
    @Eternity

    Don't know if you tried this,  but open the outracks app on your phone, at the map tap your device.  Tap it again on the bottom. Scroll down and look at your identifier. This you must use in honey. First I had a small difference in what I used and that's why it not worked in the first place. 
  • @adju

    Thanks again for trying to help. Really appreciated! 

    This is what it shows 

    Which is what I see in the Homey Owntracks App log, too. I just don't get the in/out geofence updates to Homey. 



  • Eternity said:
    @MennoVanGrinsven

    Exactly!

    My phone pops up notifications that it is entering / leaving a geofence. This information does not reach Homey.

    How do I get those transition events to Homey? 

    I have set the radius to 50 and shared it. The geofence is visible on the map.



    Try owntracks/+/+/event in your trigger card
  • EternityEternity Member
    edited March 2017
    Thanks @MennoVanGrinsven .... sorry for being such a pain in the neck.... : -(

    I have duplicates the Flow with the trigger card 'Geofence binnen gegaan triggerd', made 3 versions that each should sent a Telegram message.
    In the Trigger card I have set:

    1 - owntracks/Ernst/EvdB/event
    2 - owntracks/#/#/
    3 - owntracks/#/#/event

    I will test this by physically moving out of the set region.

    If I press 'test' in the Flow editor, I receive a Telegram message. That is working!

  • @Eternity

    Should be owntracks/+/+/event

  • Thanks @MennoVanGrinsven , I corrected that.

    I walked around. GPS enabled, phone on wifi popping in and out of wifi hotspots and to 4G. The Owntracks App notification shows that I am leaving 'Home" and entering 'Home' again. I am 'connected' according to Owntracks App status.

    However, the geofence exit/enter is not pushed to Homey. I receive no Telegram message. This is (a part of) the log:




  • edited March 2017
    @Eternity
    Check access rights on the MQTT broker? 

    And make a dummy flow with topic 

    owntracks/#


  • adjuadju Member
    edited March 2017
    @Eternity

    Make a flow with "something was said/er werd iets gezegd" put in any word.
    In the And/Dan a card from owntracks with owntracks/+/+
    Push the test button.
    In the owntracks log you should see something like this 

    20170305-13:08:18 send test on topic owntracks/+/+

    As far as I understand, than homey is receiving messages.

    Edit:
    In the and/dan I mean fill in the card with a dummy message and as topic owntrack/+/+
  • EternityEternity Member
    edited March 2017
    It is soooo weird.

    I created a test flow:


    The test message was not received...

    So, I changed the broker setting is the preferences:



    Switching form DNS name (a Synology.me account) to the internal IP adrress.
    Still the test failed.

    I enabled a public broker. The test was received!
    I disabled the public broker....filled in the internal IP again and....The test was received!



    In the phone App I set the radius to ) and back to 50 meters. And get an update in the Homey log:



  • adjuadju Member
    Oke, seems to be working now.
    Only in your testflow instead of Test 1234 etc you should have entered owntracks/+/+


  • @Eternity set the accuracy in the homey app on 50 meters. 
  • EternityEternity Member
    edited March 2017
    @MennoVanGrinsven
    Done !

    The last hurdle was to recreate the flows. Now I am receiving Telegram notifications :-)

    A big thank you - and all others - for all the help and patience !


  • adjuadju Member
    Are people here interested in a beta version as soon as i have finished some of the things i am working on? If so then i will also start publishing in the beta channel.
    I think I would, but it's working perfect now so pse can you tell me first what are the new features.
    For me it was quite a learning process from installing on Syn NAS through making flows so I think you understand that I rather keep it working.
  • edited March 2017
    @adju
    I do not have anything yet, but  as soon as it works for me some speech support (based on an actioncard) and cards without the need for a topic (just user) 
  • adjuadju Member
    @adju
    I do not have anything yet, but  as soon as it works for me some speech support (based on an actioncard) and cards without the need for a topic (just user) 
    Oke,  when you want it to be tested let me know. 
  • chrisboerchrisboer Member
    edited March 2017
    I have a mosquito MQTT Broker running on my QNAP 453 PRO anyone who needs to know how that needs to be done please let me know.


  • chrisboerchrisboer Member
    edited March 2017
    It works
  • chrisboerchrisboer Member
    edited March 2017
    Comment and question deleted
  • adju said:
    @Eternity

    Make a flow with "something was said/er werd iets gezegd" put in any word.
    In the And/Dan a card from owntracks with owntracks/+/+
    Push the test button.
    In the owntracks log you should see something like this 

    20170305-13:08:18 send test on topic owntracks/+/+

    As far as I understand, than homey is receiving messages.

    Edit:
    In the and/dan I mean fill in the card with a dummy message and as topic owntrack/+/+
    Topic with owntrack/+/+ does not work you have to use owntrack/ and nothing more
  • chrisboer said:
    mbalik79 said:

    Now I get this... App on the android phone says connected, but still no report received (i think)

    Download MQTT-SPY then you can see loggings from your devices to "Topic" and "Data" {"batt":88,"lon":3.445464,"acc":65,"p":77.588249206543,"vac":10,"lat":51.56564267,"t":"p","conn":"w","tst":1219019000,"alt":-3,"_type":"location","tid":"CB"}

    @chrisboer
    It's working already..but thanks! 
  • Then I have a question to you @mbalik79 I have everything working only homey does not pick up the events.

    I have exit and enter event triggers as I see them on MQTT-SPY but they does not seem to reach homey, but in homey I can see all testmessages towards MQTT broker so it must be something small
  • mbalik79mbalik79 Member
    edited March 2017
    @chrisboer
    In my case it helped to expand the range to 200m (in the homey app and android app).

    In you're case it is the topic
    owntracks/chris/ChrisBoer/event

    In the geofence you have to point to the "regions" you have in the app.

    I think that if you start playing with the range it would work, that was also in my case. Set it to 0m and after that to 150m. You can see in the MQTT-SPY app that messages are coming in as "event" 
  • I already had this @mbalik79 but there was an issue with the network interface cards on my NAS after a reboot and some tweaking that worked so now homey get's its messages and it works fine ;-)
  • You know what is really cool about this app and service, you don't require any other location service anymore because you can trigger with owntracks if somebody is "aanwezig" or not so you don't need homey to be on the background.

    Now working for 4 people no battery drain and it works 100 % all the time.

    So it does not matter if somebody is still on mobile network or on local home wifi to know it presence.
  • @chrisboer
    Nice to read your positive experience. 
  • chrisboer said:
    You know what is really cool about this app and service, you don't require any other location service anymore because you can trigger with owntracks if somebody is "aanwezig" or not so you don't need homey to be on the background.

    Now working for 4 people no battery drain and it works 100 % all the time.

    So it does not matter if somebody is still on mobile network or on local home wifi to know it presence.

    Eternity said:
    Thanks @MennoVanGrinsven .... sorry for being such a pain in the neck.... : -(

    I have duplicates the Flow with the trigger card 'Geofence binnen gegaan triggerd', made 3 versions that each should sent a Telegram message.
    In the Trigger card I have set:

    1 - owntracks/Ernst/EvdB/event
    2 - owntracks/#/#/
    3 - owntracks/#/#/event

    I will test this by physically moving out of the set region.

    If I press 'test' in the Flow editor, I receive a Telegram message. That is working!

    That's why I wrote this tutorial ;-)

  • And so many more possibilities :) 
Sign In or Register to comment.