When installing Webmin, I’ve sometimes come across an error installing a dependency package, apt-show-versions: This is caused by the fact that apt-show-versions can’t read compressed index files. Thankfully, the solution is quite simple: First, we need to tell APT not to compress the index. To do this we create an entry in a file called /etc/apt/apt.conf.d/02compress-indexes: If the file is empty (mine was), simply put this line in it: if the file has some text, check if this parameter is in there as “true” and if so change to false. If it’s missing, just add it. Then, we need to delete the existing indexes and… Continue reading →
As I’ve been playing around with Azure Functions I’ve slowly outgrown the web-based editor. It’s not that it’s not useful, it’s just that I miss intellisense (I’ll come back to this in a later post), and I accidentally deployed a change which broke one of my functions. I’d made dozens of tiny changes, but I simply could not figure out which one it was. Not having a version history, I was kinda screwed. I had seen the “Configure Continuous Integration” option before, but never really looked at it. I keep my source code in private GitHub repos, so it was relatively trivial to set… Continue reading →
I accidentally deployed a dodgy bit of code to one of my function apps. Then, even when I tried to revert to a “known good” version of my code via the GUI, it still didn’t work. No matter what I did, I kept getting the dreaded “Compilation Failed” error – but there was no more information. No useful compilation errors… It was so frustrating. Until I worked out that you can actually restart the power app host – just go to the Function App Settings then click “Go To App Service Settings” at the bottom. You’ll see the traditional “full” properties and settings blade, and at the top is… Continue reading →
I’ve been playing around with my Nextion and a Particle Photon for a while. The idea is to pull data from a variety of services and have it available on a display by the front door – things like the weather, the outside temperature (from my Netatmo), and the next 3 trains to Seven Sisters from our station. Living, as we do, at the end of the Enfield Town branch line, it can be a bit hit and miss as to whether or not you make the train, or if it’s even running. Anyway, I got the first part of this working. I regularly… Continue reading →
While trying to install the C# scripting package Microsoft.CodeAnalysis.CSharp.Scripting from nuget, but was getting odd messages about missing dependencies. I spent ages trying to figure it out as all the dependency versions appeared to match (e.g. however, eventually I discovered that you neeed .NET 4.6. Doh! Continue reading →
I started writing EnfieldTownBot using Azure Logic Apps. It’s pretty easy, but i soon hit a challenge – it’s so expensive! My app was pretty simple – a trigger, a “for…each”, a condition and a http callout to my Twitter Poster Function App: So – if there are no delays, that’s (recurrence + httprequest + foreach + 3 x (condition)) = 6 actions. There could be up to 9 if the postToTwitter action also triggers. I want to run this function 2x (once for trains FROM Enfield Town, once for trains TO Enfield Town), so that’s 12-18 actions per request. And I want to run it every… Continue reading →
After my last post, I spent some time looking through this. Eventually, I found a really lightweight class which does what i need. After spending some time adding some error handling to the api.request() method, I then wrapped a webrequest around it and created a function app. You can find it here: https://github.com/mnbf9rca/TwitterFunctionApp the app takes a simple JSON: You can obtain the oAuth token and oAuth secret by following the instructions on the Twitter Developer site. The Function App will return a JSON with the data returned by the Twitter API, or an error. Note that as long as it gets SOME response from… Continue reading →
Earlier this year, we got a new car, a BMW 3 series. It came subscribed to the BMW ConnectedDrive service, and that comes with an iPhone or Android app. So, of course, I immediately set about deconstructing the traffic to figure out what was going on, inspired by the work of Terence Eden. Unfortunately, BMW appears to have implemented certificate pinning in the time since Terrence wrote his paper, so my favourite tool, Charles Proxy, was useless – the BMW app simply dropped the connection. So – I decided to reverse engineer the iphone app itself. I finally managed to get… Continue reading →
I have to say that the twitter API documentation is absolutely abysmal. It’s impossible to navigate – calls make reference to other calls but the major problem is that there are almost no examples – they almost all recommend that you use a library. So how on earth are you supposed to learn how the API works? How do you write a bot which tweets as itself (such as my https://twitter.com/EnfieldTownBot)? anyway – i found a StackExchange article outlining how to use Twitter’s API from Postman – which handles the hashing for you. Once I got a good grip on the API itself… Continue reading →
Since writing this post, Honeywell has sold their products to Resideo, the new URL is: https://tccna.resideo.com/WebApi/Help/ApiIntroduction After my last post, I did some more digging. I found that the API is actually documented at https://tccna.honeywell.com/WebApi/Help/ApiIntroduction you need an APP ID to log in with (or OAuth app ID+secret). Continue reading →
I’m rob. I spend my time exploring the world, playing board games with my family, solving complex technical problems, and learning new things. At work, I lead a team of solution architects designing and building complex realtime trading systems. Sometimes i write about things here, or code them on GitHub. I believe a few things that guide what I do and how I do it: