iOS Toolkit App

Version 2.0 of Mesh Developers Toolkit was released into the App Store tonight, in addition to a few bug fixes this release adds support for the Apple Watch.

This allows you, from an Apple Watch, to:

• List the GoTenna’s you have recent locations for:

IMG_5817

• Get a compass bearing and the distance to a goTenna:

IMG_5818

• Send a pre-defined message to an individual goTenna.

• Send a pre-defined shout to all goTennas.

• Send a find request to all GoTenna’s Mesh Developers Toolkit has positions for.

• Show a GoTenna’s position on the Maps App:

IMG_5819

A new settings tab has been added which allows you to setup the “Direct” one to one message and the “Shout” message.

To get a goTenna appear on the Watch you need to do a find request from Mesh Developers Toolkit - swipe left on an incoming message on the messages tab and select find.

4 Likes

Release 2.1 of Mesh Developers Toolkit went live today in the iTunes App Store, this release adds a new tab, “Twitter Bridge”, and a new JavaScript function:

 tweet(“Message”)

This will allow you to forward a message as a Tweet to your Twitter account.

I would suggest that you limit the devices which can send Tweets, by using the GUID variable passed to the script.

The new Tab “Twitter Bridge” this allows you to setup your API Keys for Twitter and also switch on “Broadcast Tweets”.

“Broadcast Tweets” will automatically forward any tweets from your Twitter account to your goTenna Mesh as a broadcast.

To ensure that you don’t hit any rate limits either within the goTenna or Twitter API’s only Tweets which have been posted in the last two hours will be broadcast and single Tweets are sent every five minutes.

If you have multiple Tweets, they will currently be sent every 5 minutes, although I am looking if I can decrease this time interval.

This conservitive time interval is also to allow you to connect two iOS devices running Mesh Developers Toolkit to the same account - so allowing you to bridge two goTenna Meshes regardless of geographic location.

To enable you to setup the Twitter functionality you need to setup a Twitter App and API keys at:

apps.twitter.com

The Web and Callback URLs can be set to anything (I pass the correct ones in code), although I suggest:

Website:

 https://github.com/pMeshToolkit/quickstart

Callback URL:

 https://meshtoolkit

No Tweets are stored by Mesh Developers Toolkit to comply with Twitter’s guidelines.

Just remember anything you post to Twitter is public…

2 Likes

Hi ae74,
Regarding your question last month, The Twitter functionality in version 2.1 could allow you to bridge across two locations without needing a “point to point” link.

Hope this helps.

Version 2.1.1 has just been released in the iTunes Store.

The only change in this release is an improvement in the performance of the forwarding of Tweets.

Rather than sending a Tweet every five minutes Mesh Developers Toolkit will send out Tweets at a rate of one every 15 seconds.

The interval between checks against the Twitter API has been brought down to 4 minutes.

So the worst case for a Tweet to be broadcast is 4 minutes…

2 Likes

Version 2.2 of Mesh Developers Toolkit has been release in the iTunes App store.

This version adds a new tab “Scan QR Code” (available from the “more” tab), which allows you to convert a QR code to a message, for example the following QR code will send a message as a Shout:

shoutMessage

Scanning the following QR code will create a new goTenna in the “Devices” tab:

location

You can also quickly share your “Mesh Developers Toolkit” contact details by clicking on the “(i)” button on the top right of the “Scan QR Code” tab. This will show a QR Code on screen which can then be scanned by the other IOS device, running Mesh Developers Toolkit.

The QR Codes need to use “Mesh Developers Toolkit” url schema.

Eg: a Shout:

 mtk//shout?message=This%20is%20a%20Shout

Or a message to an individual goTenna:

  mtk://message?guid=GUID&message=MESSAGE

Or a create or update contact:

  mtk://create?guid=GUID&name=NAME&lat=LAT&lng=LNG

If the QR Code does not start with “mtk:” the contents of the QR Code will be sent as Shout (Mesh Developers Toolkit can also scan barcodes but they are simply sent as a shout).

Apart from sharing contacts a few suggestions of how you could use this functionality:

• Have a QR code poster which allows someone to quickly check in - for example for a group of Cub Scouts on an orienteering challenge can report where they are with a single scan which are monitored from a single location.

• If you have shouts turned off you can quickly share your contact details (think volunteers at a sporting event).

Also, if you set the GUID to 0 when using the “mtk://create" call you can create a device entry for a navigation point, so you could have a QR code at a Car park which allows you to quickly get a bearing and distance back to the location.

4 Likes

Version 2.3 of Mesh Developers Toolkit was released on the iTunes App Store today, this version adds some functionality to the “Toolkits” tab:

• The “Map” button on the top right of the “Toolkits” tab’s navigation bar allows you to view all goTennas known by “Mesh Developers Toolkit” on a Google Map, either on the device or on a larger screen:

The map can also be opened in a browser on a tablet, laptop or desktop using the URL “HTTP://iPhone’s IP address:8080/map.html” (this appears on the top of the window if you open it on your iPhone).

Clicking on a Pin will show you the distance and bearing to the goTenna and you can also send a message to the remote goTenna directly from your browser:

50

• Swiping right on a remote Toolkit on the list will open a map displaying all of the goTennas known to the remote Mesh Developers Toolkit on the same Wifi network.

The Map Icon is only enabled when the local web server is running and Mesh Developers Toolkit is connected to a goTenna (this can be enabled from the settings tab).

ps. The locations are test locations…

4 Likes

Version 2.4 of Mesh Developers Toolkit has just been released into the iTunes App Store.

This version adds a Lock Screen Widget which allows you to quickly see if Mesh Developers Toolkit is connected to a goTenna and the Battery percentage of the goTenna.

The Widget also allows you to launch Mesh Developers Toolkit by clicking on the “Connect” button:

IMG_0051

Once you are connected to a goTenna, you can see the battery percentage (which changed colour based on the percentage charge) and any goTenna’s you have a location for (ordered by distance), by clicking on “Show More”:

IMG_0049

Clicking on the “Shout” button displays a second button “Send”:

IMG_0050

Clicking on the “Send” button will then send the predefined “Today” shout message, setup in the settings tab.

The “double” buttons is to try and minimise accidental shouts…

If the Web server is running on Mesh Developers Toolkit the “shout" will be sent without the need to unlock the iPhone or bring the App to the foreground.

f the Web server is not running, the iPhone will need to bring the App which will require you to unlock the device.

The Mesh Developers Toolkit Widget can be added to the Lock screen by swiping right on the Lock screen and clicking on the Edit button.

Also, a new preference, “Request Position”, has been added.

When enabled Mesh Developers Toolkit will request the position of a remote goTenna when an incoming message or shout is received.

The location request will only be made if Mesh Developers Toolkit has not received a location in the last few minutes.

Switching on “Don’t process shouts”, (which stops the JavaScript running against shout messages), will also switch off positions requests for shouts.

1 Like

Version 2.4.1 of Mesh Developers Toolkit was released into the iTunes App Store this afternoon, this fixes a couple of issues.

The encoding of the default message for the “Today Widget” was incorrect - spaces were being removed :confounded:.

The stability of the Bonjour service has been improved and a new function on the “Toolkits” tab to allow you to import goTenna contacts from another Mesh Developers Toolkit running on the same network. This can be accessed by swiping left on the list and selecting “import”.

Note: to use the “Toolkits” please upgrade to 2.4.1 on both devices as I have changed the structure of the Bonjour service name to prevent crashes.

2 Likes

Version 2.5 of Mesh Developers Toolkit was released into the iTunes App Store this morning.

This version improves the stability of the App when connecting to a goTenna and an issue if you scrolled the Messages when the App was trying to connect.

The Messages list has also been reworked to differentiate between incoming and outgoing messages clearer:


The “⇠” icon highlights rows which can be “Swiped left” to show more options:

IMG_0053

1 Like

The Raspberry Pi Lightning Detector, which sends out a goTenna shout when it detects lightning, has slimmed down a bit since my post on the 2nd of March:

The Pi Zero-w connects to the same Wifi Network as the iPhone running the toolkit (which can be a hotspot).

The reason for this is:

The original Raspberry Pi and battery pack has now had a Sim800 board and an Enviro Phat added.

The Sim800 board allows SMS messages to be sent and received from a remote goTenna, without using a third party service or needing internet access (it only requires 2g coverage).

This is achieved using Mesh Developers Toolkit as a gateway, again the iPhone and the Pi has to be on the same Wifi network.

The Envoro board allows a goTenna to request the local air pressure and temperature (the board was originally on the Pi Zero).

The Lightning detector had a few issues when running alongside the GMS board - hence the reason for it slimming down…

2 Likes

I downloaded the toolkit app to try out battery reporting with a stationary relay. The shouting portion works great and responds immediately for both GTM and phone battery. I may finally have a great use of all the old iPhone 4s I have laying around.

I’m having trouble getting it to send the battery back to the originating goTenna. I manually scripted in my GUID, made sure it was correct, but my goTenna doesn’t receive the message. Any tips?

2 Likes

Hi MrTSolar,
Thank you for the feedback.

I do pass a Javascript variable ‘guid’ into the script, which contains the sender guid - have your tried this?

Also I pass the guid around as a string within the code - if it is declared as a number in the Javascript, this might fail when the script calls back to the main code.

If this does not work - if you send a message, or post a reply, with your script I can have a look and see what is failing (once I have charged my old 4s…).

That might be my problem. I tried using targetguid as a variable. I’ll try guid when I get home.

I’m really excited to get this working, as it will be a game changer on checking stationary relays. I’m currently designing an updated version that relies on raw solar power with capacitor storage, details of which I’ll post in another thread once I have more testing done.

2 Likes

Hi MrTSolar,
Sounds interesting in what you are working on - are you planning to be able to charge the phone at the same time?

I have found an issue where the GUID could be truncated when passed from the Javascript to the core application :grimacing:

I have fixed this and put it into the iTunes review process (it will be version 2.5.1).

Yes, enough power for phone and goTenna.

So, the code snips that I’ve tried are:

} else if (message == “Phone batt?”) {
send(guid,iphone_battery());
return ";

} else if (message == “Phone batt?”) {
send(targetguid,iphone_battery());
return ";

} else if (message == “Phone batt?”) {
send(“targetguid”,iphone_battery());
return ";

I’ve also tried my GUID in-place of the variable both with and without quotes. It tries to send to the proper GUID (verified phone number), but fails after the usual 3 transmissions.

Hi MrTSolar,
It does sound like the bug I fixed last night is the cause of your problem, which will be fixed in the next iTunes release.

The code:

} else if (message == “Phone batt?”) {
send(guid,iphone_battery());
return ";

Will then work, although the following code will work in the current release, returning the result to the goTenna which sent the message:

} else if (message == “Phone batt?”) {
return iphone_battery();

If anything is returned by the script it will send it out as a message to the originating goTenna without the need for a separate send command.

Hope this helps.

That still doesn’t seem to work. I’ve tried running the Toolkit app on two devices. It looks like the message sent, but nothing appears on the receiving phone.

I’ll wait for the update to come through.

Hi MrTSolar,
If you could try a couple of things for me and let me know the results:

•Try sending a shout from mesh Toolkit before sending a message to get the battery level.

•Try a simple script (with no other logic):

 return ‘ok’;

Does this respond to a shout?

Thank you.

Shouts work fine. It just has trouble sending back to a single goTenna when I message it directly. I started a 1-1 chat by sending a Shout from Toolkit, then selected the message on my phone and sent a private message.

Sending a shout first, followed by a direct message gives me a shout response immediately, and the direct message gives me delivery confirmation on both ends, but no message actually comes back. The chat window in Toolkit shows the proper message going out. Return ‘ok’ and return iphone_battery() both work on shout.

The interesting thing is, I just paired my goTenna to another iOS device and private messaging worked. My Android device doesn’t receive private messages from Toolkit.

Hi MrTSolar,
Thank you for your great feedback, version 2.5.1 has now been released into the App Store.

It looks to be a specific function to be failing in the code.

I don’t test against Android devices (we are an iOS household), therefore it might take me a few of days to test against one, so if I could ask if your could do a couple more tests using version 2.5.1 and let me know the results:

• “Swipe left” on a incoming message to reveal the “Find” and “Message” options, can you then try:

• Send a find request.

• Send the message “hello” (with no spaces etc.).

Hopefully this will allow me to identify the problem quickly (both of the above functions have different routes through the code).

Thank you in advance.

1 Like