AutoRemote Raspberry Pi 3 to Android

Discussion in 'AutoApps' started by MikeW, Feb 7, 2018.

  1. MikeW

    MikeW Member

    Joined:
    Feb 16, 2015
    Messages:
    113
    Likes Received:
    9
    I'm a long-time Tasker user and have most of the AutoApps, but I've recently gotten a Raspberry PI 3 and am looking for some help on a project.
    What I want to do is use Python on the Pi to send commands via Bluetooth to my Android tablet and be able to act on them with Tasker.
    I have my tablet paired with the Pi, but when I try to connect, I get a message about no services being available. (Not surprising.)
    Seems like AutoRemote might be a possibility, but I'm not quite sure what I need to do.
    I figured if there was any place I could get help with this, it would be here.
    Any advice, or pointers to online resources?
    Thanks.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi there. Unfortunately AutoRemote can only receive through bluetooth from another Android device. But you could send through wifi. Did you try that?
     
  3. MikeW

    MikeW Member

    Joined:
    Feb 16, 2015
    Messages:
    113
    Likes Received:
    9
    Thanks for getting back to me.
    No, I hadn't tried wifi; I don't yet know how to access that via Python. In my project, I can't rely on having a wifi network, but as long as it would work peer-to-peer, that would be fine.
    Can you provide any references that would help me get that up and running? Of if not AutoRemote, is there some other way? I just mentioned that because it seemed like a possible candidate.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, in Tasker enable the AutoRemote Wifi service with the AutoRemote Wifi action.
    Then you can send messages to it using the following URL:

    http://PHONE'S_IP:1817/?message=hello

    Hope this helps!
     
  5. MikeW

    MikeW Member

    Joined:
    Feb 16, 2015
    Messages:
    113
    Likes Received:
    9
    Thanks once again. However...in order to have an IP address, wouldn't the device need to be connected to the internet? I need to be able to communicate without any outside networks. Though... I do have a travel router that I could configure as a standalone access point, which should give me a local IP only. I'll have to try that. Thanks.
     
  6. jusplainmike

    jusplainmike New Member

    Joined:
    Feb 13, 2018
    Messages:
    2
    Likes Received:
    0
    I recently created a bridge for mqttwarn to autoremote that you might be interested in. Using the requests library in python it is pretty simple to send autoremote messages. I am in the process of implementing this using POST in my project. Using mqttwarn I am able to direct messages to my android devices simply by publishing the data using MQTT to a topic autoremote/device. The 'sender' field of autoremote has the topic address.

    I tried to link the url to my project file but it is not letting me. Forum thinks I'm a spammer for some reason.
     
  7. MikeW

    MikeW Member

    Joined:
    Feb 16, 2015
    Messages:
    113
    Likes Received:
    9
    I would be very interested in that. Sent you a PM
     
  8. jusplainmike

    jusplainmike New Member

    Joined:
    Feb 13, 2018
    Messages:
    2
    Likes Received:
    0
    How do I fix the issue of not being able to post links? Anytime I try and post a single url to my project it pops up spammer. I understand the need to prevent forum rot but I'm a real person lol.
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Does it work if you post without links, then edit your post with the links? :)
     
  10. MikeW

    MikeW Member

    Joined:
    Feb 16, 2015
    Messages:
    113
    Likes Received:
    9
    To put some closure on this: I got a communications channel working that fits my needs.
    I figured out how to create a Bluetooth port on the pi and the Python code I needed to use it. On the Android side, I used AppInventor to make a simple app that could receive commands via BT and save them to a file. Then I used Tasker's "file modified" event to trigger reading those commands and acting on them.
    Kind of convoluted, but it works for my current project.
     

Share This Page