Pushover (and IFTTT)
Pages: 1 2
Dave Higton (1515) 3526 posts |
I’ve just been playing sending messages to Pushover directly from RISC OS. It’s actually easier than I thought it might be. All it requires is a bit of JSON containing three items: your app key, your user key, and the message. Send them to Pushover with an appropriate HTTP POST header, and, if you’ve got it all right, the message appears pretty swiftly as a notification on your registered devices. I need to tidy it up, but if anyone’s interested in using it, I’d be happy to release something as an app. I have been using a notification app to send stuff to an IFTTT applet, which then sends it on to Pushover, but I’ve had some awful delays (on Monday, I got a notification that the doorbell had been rung – 90 minutes after the event!) which mean it can’t be relied on for real time notifications. It will be a while before I know if taking IFTTT out of the loop solves or ameliorates the problem. Pushover state that HTTPS is mandatory, but my experiments show that they still support HTTP on port 80. (How long for is another matter.) Now we have the AcornSSL module, HTTPS should work, although it takes a little while to make the SSL connection, so the response is probably going to be noticeably slower. I feel some more experiments coming on… |
Andrew Rawnsley (492) 1445 posts |
Whilst I’m not familiar with pushover, so don’t know how many sites/services it integrates with, it sounds like it’ll deliver notifications about useful (and not so useful!) stuff to RISC OS, which would be a cool addition :) Nice work Dave! We need more apps like this, unlocking sites/services for RISC OS :) |
Gavin Smith (1413) 95 posts |
Hi Dave, just to say that I’d be interested to see this. I’ve done some stuff like this on other platforms and would like to see it on RISC OS. |
Steve Pampling (1551) 8170 posts |
Indeed, there’s a lot to look at: Pushover-Powered Applications & Plugins |
Dave Higton (1515) 3526 posts |
For those who are interested, a little explanation. IFTTT (IF This, Then That) provides a kit of lots of little bits of code that can accept input from things (IF This), or can actuate things (Then That), and allows you to link them together to create a useful interface between systems that couldn’t otherwise communicate. One of the most interesting ones to me is input from Google Assistant, so that I can get voice input. Then I can use that to send an HTML request to my central heating system – so I have voice control of heating and hot water, wherever I am. There are also lots of applets available off the shelf, as it were. Registration and use of IFTTT is free. It’s an absolutely tremendous resource. A few of the things it uses aren’t free, e.g. there isn’t a way to send SMS without some payment, other than a free trial period. (I think it’s a great pity that my mobile phone service provider doesn’t allow me to send free SMS to myself from e.g. an HTML request, but that’s a different matter.) If you’re a tinkerer, I highly recommend playing with IFTTT. Pushover is just a push notification service. There is an IFTTT integration too. Pushover isn’t free, but at the moment it’s a small one time charge for personal users. You can register an app of your own and use that interface to send you a notification, most usefully to your mobile phone wherever you are on condition that you have data access via either your mobile network or wi-fi. Pushover has a specific purpose, but its idea is to get notifications to you in real time, which can be quite valuable. There are interfaces from many programming languages. I’ve hooked up a second door bell receiver to a BeagleBoard that was otherwise unused, and currently it uses IFTTT to notify me via Pushover. It might sound like overkill to get notification from the door bell, but the bell is absolutely inaudible if we’re in the sun lounge with the doors closed, or in the garden. It was a problem that needed a solution. In a few days I intend to get the BB to talk directly to Pushover. |
nemo (145) 2546 posts |
It is a great pity that the so-called “internet of things” is actually an “internet of other people’s incompatible services glued together via massive apps and servers in other countries”. I can press a button on my phone and switch on the light next to me thanks to a ‘smart’ socket… but only if a server in China is working. |
Steve Pampling (1551) 8170 posts |
Possibly (one of) the only country that gives less of a f*** about GDPR than the USA. It’s OK it’s all secure. :) |
Rick Murray (539) 13840 posts |
And people wonder why I’m not interested in Internet of For a lot of this stuff, there is no technical reason whatsoever why processing has to be offloaded to a server on the other side of the planet. Devices could talk amongst themselves, or you could buy/build a simple controller based around an ESP32 sort of thing. It also means that you’re at the mercy of the company, and for how long they plan on keeping that particular cloud service running. Count me out. |
Rick Murray (539) 13840 posts |
|
Tony Noble (1579) 62 posts |
No reason at all – cars do it with CANBus. Admittedly, why there needs to be a serial protocol between the window switch on the door and the electric motor 5cm away from it is an entirely separate argument, but nevertheless, you have a whole bunch of hetergeneous device types communicating and configuring themselves via a simple two-wire messaging system. |
Rick Murray (539) 13840 posts |
Because a serial protocol is a definitive thing that can relay data that can be interpreted, and can either be accepted or rejected as appropriate. 5cm of wire for a switch might not sound like much, but you’ll perhaps find the driver has a switch to control the passenger window. Now it’s 2-3 metres of wire. That’s when a specific protocol becomes useful. You want the window to open because you pressed a button, not because you’re driving in a thunderstorm and the motor is receiving spikes that it thinks are button presses… |
Grahame Parish (436) 481 posts |
In my car there is the capability of opening/closing all the windows from the key fob, like when it’s really hot I click to unlock then click and hold to open all the windows before attempting to get inside. Useful when locking the car and ‘someone’ has left the passenger window open after we’re all out. |
Tony Noble (1579) 62 posts |
Aaaaahh-hahahaha. There speaks a man who’s never fallen foul of CANBus. Yes. You do. And most of the time, that’s exactly what you get. And then something gets itself in a twist (sunspot, electrical surge, random quantum entanglement), the window button will still do ‘down’ for the driver window, but ‘up’ now makes the passenger side windows go ‘down’. And the passengar window control does nothing at all and now you have a car with two open windows and a security system going mental because the car isn’t properly closed up. When it works, it saves you a few kilos of copper wire. When it doesn’t, you’ll find yourself wishing they’d just put more cables in. I used ride an old East German motorbike with an unsupressed ignition system (so basically generating 10kv electrical sparks anywhere up to 6000 times a minute). It could disrupt car radios at a reasonable distance – I’ve since replaced the ignition system, but it’d be fun to see what that could do to a modern car… |
Rick Murray (539) 13840 posts |
No, my cars have never been that advanced. My soon-to-be car has absolutely nothing digital in it at all.
Sounds like a poorly thought out implementation. There ought to be a message and some sort of checksum or whatever. It isn’t as if a car is a clean environment with no chance of signal corruption…
That was illegal. Because it wasn’t just car radios you were messing up. It would have been spewing rubbish all over the radio spectrum. Thus making you an unlicensed transmitter, it falls under the Wireless Telegraphy Act. |
Steffen Huber (91) 1953 posts |
No ABS, ESP and Airbags? Sounds suboptimal. |
Tony Noble (1579) 62 posts |
It was built in East Germany in the 1970s – I don’t think they cared about that kind of thing. And I’ve got older British bikes with magneto ignition and similar lack of spark suppression, all perfectly legal because there’s no MOT testing for them anymore and even when there was, they didn’t check for that kind of thing.
Points ignition too. That’ll be fun. Can’t say I miss the days of scrabbling around under the bonnet with thin slips of carborundum paper trying to clean up fursty contacts when the damn thing wasn’t playing nice… |
Rick Murray (539) 13840 posts |
Yeah, they’re not counted as “real” cars, so the legislation is more or less what you’d expect for quad bikes. They don’t need (bi-)yearly checks either (like the MOT).
Not testing for something does not make it legal. You’re not falling under the rules of the road by spewing RF emissions, you’re falling under the Wireless Telegraphy Act.
Uh…? It’s a diesel. Gotta be, making that racket. ;-) I’m not at all familiar with diesel engines, but I pretty much assumed they didn’t work with sparks. |
Tony Noble (1579) 62 posts |
From my reading of the documents ( http://www.legislation.gov.uk/uksi/1973/1217/made ) – the use of ignition suppressors in motor vehicles applies to anything manufactured after 1973 and doesn’t appear to require retro-fitting to older vehicles (not that it’d be possible in some cases). Early 70s, 60s adn 50s (which mine are) and vintage/veteran don’t appear to be covered.
Good point, well-made. Though pure-mechanical diesels are environmentally horrible polluting things as a rule. A suitably ancient charging system too, I take it? |
Rick Murray (539) 13840 posts |
Probably. Still waiting on a reply from the bank. Pop over to my blog, there are some videos (from YouTube) of it and the car in action. Yeah, it looks completely entirely non-digital. |
Clive Semmens (2335) 3276 posts |
However wonderfully digitally managed a modern diesel might be, it still doesn’t use spark ignition. And the pollution from diesels versus from petrol vehicles is an interesting issue. For oxides of nitrogen diesels before they had catalytic converters were markedly worse than petrol; for particulates before they had DPFs (Diesel Particulate Filters) diesels were markedly worse. But for carbon dioxide, diesels are and have always been markedly better. Choose your concerns: particulates and nitrogen oxides are short-term, local problems; carbon dioxide is a long-term, global problem. On the open road, diesel is environmentally substantially better.* And then there’s particulate matter from tyres, which is much the same from either (and for that matter from electric cars) and, in quantity, between an old design of diesel (in good condition) and a modern diesel – but in quality somewhat nastier (all kinds of crap in tyres…) Not to mention fine particles of platinum/rhodium/irridium from catalytic converters – see http://clive.semmens.org.uk/Opinion/CatalyticConverters.html * I just drove our 2002 petrol car 1,500 miles (Berlin and back, almost all on the open road) burning £230 worth of petrol, instead of our otherwise very similar diesel car, which would have burned about £150 worth of ciesel and produced about 35% less carbon dioxide – because the 14 miles I wanted to drive in Berlin, and 6 miles staying in Duisburg on the way, were in “ultra low emission zones” and the 2004 diesel wouldn’t pass the requirements. Hey ho. |
Tony Noble (1579) 62 posts |
Hence the ‘good point, well made’ comment :) Having looked at Rik’s blog, the diesel engine in this instance a a 400cc twin cylinder kubota industrial engine, producing a whopping 5bhp and side-stepping almost every road law imaginable (including the requirement for a driving license) due to its size and format. I’m willing to wager that DPFs, catalytic convertors and ad-blue are not something you’ll find mentioned anywhere in the spec sheet. Modern diesels are a world away from what they used to be (whether or not they’re better than petrol is, as you said, debatable – you pick your poison), but this ain’t one of them (not that there’s anything wrong with “simple and easily fixed with a hammer”). The repair manual makes interesting reading though – given that there seems to be a separate reverse gear setup, I’m surprised there isn’t a healthy market of people swapping these things out and installing bike engines… http://at.aixam-mega-sav.com/Data/Gamme/doc/MANUEL_DE_REPARATION_S8rev2_UK.pdf |
Clive Semmens (2335) 3276 posts |
Damn right! Indeed, I’m well aware that this isn’t a modern diesel. Mine’s a bit more up-to-date – decent engine management and catalytic converter but no DPF. But as regards pollution, small size and low power makes up quite a lot for sophistication. Pretty certainly doesn’t make up for it entirely, but helps a lot. On the other hand, the variomatic belt drive is rather wasteful – I’ve had a couple of Volvos that had that system, and they were rather thirsty for their size and performance. |
Rick Murray (539) 13840 posts |
I didn’t have time to say earlier… I would imagine that many of us of a certain age will have memories of a long extension flex, a hairdryer, a distributor cap and associated bits dismantled, and plenty of obscenities because every man knows that car problems resolve themselves more rapidly when you swear at it.
Not really. Politicians are simple minded creatures. They see a big cloud of black belch out of the back of a diesel vehicle, but not out of a petrol one.
Yeah. I had this arguement with mom. Our 3 cylinder C1 is efficient and low emission, but it did not qualify as a level 1 car due to its age.
The joy of a country with a rubbish public transport system outside of the big towns. ;-) That said, the lack of requirement to actually know how to drive is the primary reason I’m getting one.
Look at how BIG the boot is! Look at the awesome (optional) touch screen multimedia system.
? Cars do need to go backwards once in a while…
Why bother? Take out the limiting screw and you can clobber the engine and get the car up to about 80kph . . . though doing 85 in a thing that’s basically an aluminium frame covered in plastic is crazy. https://www.youtube.com/watch?v=U8VEEmmYQj4 I’d already found the repair manual. Interesting reading. |
Steve Pampling (1551) 8170 posts |
I have vivid (painful) memories of fiddling with the distributor cap and then the caps on the individual plugs of a friends’ car. I offered to assist in his future development by inserting one of the plug leads in his nether and testing. My language was somewhat more colourful than the version I’ve just given you lot. Anyway I grabbed the key stuck it in MY pocket and finished the cleanup.
It goes a long way to explain the driving standard in Paris :) |
Tony Noble (1579) 62 posts |
I’m not talking about Politicians – I’m talking about people taking a proper scientific look at it and comparing an immediate toxin versus a long-term greenhouse gas. Saying one is better than the other is like saying that cyanide is better than mercury.
Yep, but my point was that the reverse gear setup is separate from the rest of the engine, unlike a standard setup. That makes a bike-engined conversion (which has no reverse gear built in) so much easier
You’re asking a question like that on a site like this…? I think the standard answer here is “because you can” :) If you go on youtube, you’ll find people who’ve converted old minis to take two linked bike engines (combined 300bhp). Is there a sensible reason to do it? No, but that’s not the point. Also, it’s not necessarily about top speed, but acceleration…
My Grandfather’s way of dealing with nosey fiddling grandkids was to let them pick up the freshly reconditioned magneto he had lying on a shelf and play with it. One inadvertent turn of the drive wheel and the grandkid in question suddenly became a lot less nosey (except me. I did it twice. And the continued looking to try and work out exactly what it was that had given me two 5000-volt shocks…) |
Pages: 1 2