Blog Stats
  • Posts - 198
  • Articles - 0
  • Comments - 36
  • Trackbacks - 0

 

Monday, October 15, 2018

15 seconds of farming


So some great geek stuff with a customer of mine (Family Farms).   We needed to integrate combine-harvester and tipper trucks on our iPad app.  to record weights as combine tips to nearby truck.   This was our saviour a little $50 bluetooth LE dongle.

 

Dongle

 

BLE, allows devices to just find each other (romantic I know). Unlike normal Bluetooth like you use say your handsfree kit; you don’t need to pair a BLE device. You simply say find any devices in range that offer a set of services, i.e. can transfer data. iOS and Android devices have had BLE capability for about 3 years now.

NewImage

So why is all this exciting. This means a harvester can tip their harvest into a tipper truck which is equipped with a weigh cell connected to a dongle like this. As the combine drives by and tips, the iPad app. with the combine driver detects the BLE dongle and reads the tipped weight.

So we were able to prove that this can indeed be done. We have a scale simulator up and running in Harston. As POC addition to the FFG farming app. we can connect over BLE and get a reading from the scale simulator.

The advantage of using BLE is that you just create a temporary network in-field for just a few seconds between combine and tipper truck, you don’t need any other kind of WIFI or cellular network access.

 Picture1

Monday, May 7, 2018

Visual Studio Code - On Mac Talking to SQL Server


So, this has taken a while

Only tonights install of Visual Studio Code update (aka after Build Keynote???)...

 

I can finally run SQL Server queries from Visual Studio Code on my Mac.

 

I followed this guide to install/re-install

 

https://sqldbawithabeard.com/2017/01/05/running-sql-queries-with-visual-studio-code/

 

I then right clicked on my query to select Execute,  the keyboard shortcut didn’t seem to work.

 

Result - some data from SQL server !


Tuesday, May 1, 2018

oData and Big Floats


Today, I made an interesting discovery.

I’m synchronising data to Microsoft NAV, from an iOS app, using oData.

My iOS app,  makes JSON requests to pull/push records in and out of NAV.

Todays discovery was don’t send float numbers in scientific format,  i.e 1e6,   send them as fully expanded numbers,  like 1000000.        Only when numbers get big did I notice this issue. 

Friday, July 7, 2017

Pi Zero W - Streamer - Gains A Lego Case


So I’ve added a Lego Case To My Music Streamer 

 

IMG 0356

 

Its working great.   Our boys can wander in with their tablets/phones and just wirelessly play what they like.    Music should just be like this.   Accessible and easy sounds awesome too.

 

Sum of parts.   Raspberry Pi Zero W - Hifi-Berry DAC Board - Some Lego - Cambridge Audio Amp and Speakers.    + Great Kids.

Monday, May 8, 2017

Raspberry Pi Zero W - Media Streamer


So I’ve been wanting to update my media streamer for a while.

In our kitchen  I have an amp and speakers,  and I have a Raspberry Pi One acting as a media streamer,  primarily for use with Air Play.

IMG 0246

 

It sounds truly amazing.    I did the build for around £30.     

 

Here is my build list -

 

Software - http://Volumio.org

Hardware 

Pi Zero W - Board only

https://shop.pimoroni.com/products/raspberry-pi-zero-w

 

Hammer on - Header Board - this is genius

https://shop.pimoroni.com/products/gpio-hammer-header

 

DAC Board - Gives the Pi Decent Sound capability

https://www.hifiberry.com/shop/boards/hifiberry-dac-zero/

 

Metal stand-offs - These just look nice

https://www.hifiberry.com/shop/accessories/4-standoffs-m2-5x12mm-steel/

 

 

Parts I already had - 

8 Gb Micro SD Card

Power Supply - Used an old phone charger

Micro USB Cable

RCA Cable

Amp + Speakers

 

 

 

Sunday, November 27, 2016

Higlights


This weekend…..

 

I’ve realised the truth that Docker is the future.   Please take a few moments to inhale docker.com

 

I’ve built a MS SQL 2016, in Docker, connected to from another Container running Swift.  

Friday, October 21, 2016

My First Amazon Echo Skill


So excited.   I've done it.   First Amazon Echo Skill, all up and running.   Will report back with full implementation details.   Super easy and really great result.

Wednesday, July 6, 2016

Caller ID on Raspberry Pi


So I have gotten myself another Raspberry Pi 1 Model B. (from eBay with case, power supply and 8GB SD for under £20).

I’ve plugged in an Edmiax WIFI USB Card.   Plus the star purchase a £4 USB Conexant modem.   This  is a good news, as this modem can decode UK caller ID signals.

NewImage

 

 So the goal is to broadcast who’s calling my home phone line and send who’s calling to my desktop Mac and various iOS devices.

The Pi, side of things took the longest.    I decided to use the common established and old (all good things for reliability) NCID package.   Getting this onto the Pi took the longest.

I ended up having to compile the source code, and then struggled to get the thing to start automatically.

In the end this was the best guide I found -

https://github.com/Phiplex/ncidhitta

I used the 1.4 version of NCID.   

Once up and running, I used another terminal window to telnet to my Pi on port 3333 to check that when my home phone rings the Pi was decoding (via NCID) the incoming caller ID information.

 You get something back like the following - 

NewImage

 

 

So good news,  phone rings the telnet window updates, with who’s calling.

 

The next step was to notify all Macs and iOS devices.     I followed the guide here to ‘borrow’ how they collected output from NCID for their own purposes...

https://jimtech.wordpress.com/2012/04/09/getting-ncid-working-on-every-device-possible/

 

My modification was to change the output command to curl a web request adapted to my own web server.

 

As discussed previously I have managed to get Safari and iOS push notifications working, so I utilised that and a database of device tokens and a database of phone numbers to names, to send and Apple Push Notification.

 

Net result,  phone rings.   All my devices go PING  and instantly display who’s calling -

 

NewImage

 

Click the notification and you can see/edit  (in Safari) the name associated to the number and see last calls -

NewImage

In iOS, it works similarly.

 

 

Friday, May 20, 2016

Safari Push Notifications - Working


So its taken me some time, but I finally have managed to enable Safari push notifications on my Bin Collections website. 

Take a look at http://binaryrefinery.com/bincollections

So now if you are a Mac user, using Safari and happen to live in the South Cambridgeshire area I can send you a notification when and which bin to put out.

I implemented the backend in ASP.NET using a handler to receive the messages that Apple pushes out as users sign up or remove themselves from the service.

Gotcha’s along the way.    Apple uses a restful API,  so you must get your handler to listen for all the relevant HTTP Verbs,  GET,POST,DELETE.

Once I got this cracked and assembled a push package things started to work!

 

Another thing to watch out for,  Apple changed the intermediate developer certs.   Make sure you have the latest set on your development machine before you start.  I didn’t, and my keys all didn’t get signed correctly.   Please look at - 

https://developer.apple.com/support/certificates/expiration/

 

 

If you have an error, and Apple sends you a log to your Web-service complaining about a push package.   I’ve found the only way to get things working again is to disable and enable push notification support for your website in Safari for the offending Mac that you tried to push the message too.

As well as sending weekly reminders,  I also send via push if you change any of your alert settings

NewImage

I implemented much of the backend using a database of which certificates and keys to use,  this should make it much easier to use Safari push for other projects and challenges.   This database also logs to a table any logging or errors that Apple reports back.

 

If your thinking about trying this yourself (I’m of course happy to assist).  Please read and re-read the Apple guides.     They do have everything there you should need.   I also have found apple Developer support first rate in guiding me through which now appears like stupid errors. 

https://developer.apple.com/notifications/safari-push-notifications/

Friday, February 12, 2016

CloudKit Server To Server


Now this is quite a big deal for me.

I spend most of my time in the land of enterprise apps (as you know).   Most of the effort it with building the infrastructure to have someones device talk back to one of our servers.    I get wrapped up with issues, about connectivity/amount of bandwidth I’ve got and what happens if someone goes offline.     iCloud has been a walled garden up until this point.   Its great for syncing your photos/documents etc.   but its a closed system for us Enterprise folks.  Now I’ve got the ability to use iCloud to also host my enterprise data.   I can pump data into iCloud;  securely.   iOS takes care of the synchronisation for me.

So use case.   I can take a bunch of data, say a price catalogue and some tables to store quotes.   Pump that over to iCloud.    Then my mobile app.  can just auto-magically just see all that data.    I can quickly just build a UI to take customer orders and let iOS just do its thing to make sure all the data just synchronises.      All I have to worry about is getting the data in and out of the iCloud servers.     This is where the pretty comprehensive and secure (well it looks that way) new API comes in.

So you can do this now,   and thanks to some kind help on the Apple Developer Forums,     + I can do this all from (our own walled garden) from c#.

Announcement here

https://developer.apple.com/news/?id=02042016a

 

Code to follow


 

 

Copyright © Richard Jones