Talking ImperiHome

I just added another useful tool to the home control arsenal – speech – not on the PC but on my phone. As regular readers know I use ImperiHome a lot – talking directly to Node-Red to control stuff – and that’s fine – it works – it’s not the only package – I also use Blynk. I just found another reason to concentrate on ImperiHome.

Today I discovered what the “API http server” in ImperiHome is for, at least, one use for it. You don’t normally need this with Node-Red as the phone talks to the Node-Red http link and that’s all that is needed. However I was aware that there was a TTS Engine available in ImperiHome but had never taken the time to find out what it could do.

Now I know. You can fire text at the API from Node-Red and it will speak the text, even when the phone is sitting idle and it sounds ok!!

So the first thing you need to know - in SETTINGS, GENERAL PREFERENCES in ImperiHome, tick the API server.

You need to know the IP address of your phone - so that kills using this outside of the house or office unless someone can think of a wheeze. You should ideally do an IP-MAC binding on your router to ensure the phone always get the same internal address when on the WIFI.

And with that done, you’re almost up and running. In Node-Red you need this simple SUBFLOW – create a new sub-flow, call it “My phone” for want of a better name and create this.

The HTTP request is empty – the work is done in the orange function – put this in the function…

That’s it – you’re done. Whatever you send in the payload to that sub-flow will speak on the phone. Couldn’t be easier. Oh, that IP address – that needs to be the IP address of your phone.

June 2, 2016: I have found a slight bug. So you can let the phone go idle and run other tasks – the speech continues to work – but if you go out of signal area, perhaps onto a mobile network then come back in – noting that the mobile signal is now off and you are on the same IP address, no speech. Bring the app to the foreground – the speech comes back. I reported it and for once got quite a quick response – they think it might be Google power management shutting the API down – so looks like some re-writing may be in order.. will have to wait and see but at least they’re aware of it.

Post navigation

6 thoughts on “Talking ImperiHome”

Pete, You tweaked my interest, so I went off and downloaded ImperiHome onto my tablet, but it turns out that this is one option that is only available with the "Pro" version. Not a complaint (my initial impression is that it looks well worth the fairly paltry purchase price, especially with your series of articles to help get everything set up), but just to let people know.
-John-

Oh yes it's not the free version - I would never expect this much functionality in something totally free - but as you say the price is paltry - and unlike BLYNK there are no extra costs later on.... mind you - they also don't respond to any of my emails 🙂 but it DOES work.

even easier: put this in a function node connected the http get for Imperihome - it will return the IP address of the device talking to Imperihome. (Thanks Nick O'Leary!).
Good for internal use and external (direct or proxy)

Two issues with that one Tony - thanks for that info - I'm learning by the second - but it returns the external, not the internal address (just tried with my data off and wifi on - on the phone) - not sure how much use that is as you'd presumably need port redirects wherever you were... and it doesnt' return anything until Imperihome presses a button... imagine the phone turned off - then move - then on - no sign of the change of address... hmmm.

1) I tried it connected by wifi and got the internal ip. I tried with a web browser (didnt try Imperihome but should be the same) to the node red flow outside (using LTE) and got the external IP. Are you linking it to the Systems/Devices/Rooms GET for Imperihome?
2) On mine, with the Imperihome dashboard running, it is doing the 5 sec refresh which triggers the GET and therefore I can see the IP (and populate a list of devices maybe?).

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Select an image for your comment (GIF, PNG, JPG, JPEG):

Welcome

Hi - I'm Pete and this is my technology blog. It is BIG. Use the search box below or check out the archives and other links below - be sure to SHARE what you like using the social media buttons.

Please register or log in - the top menu changes a lot when you are part of the party... and once in, don't forget to tick the box so you will get email follow-ups to comments.

I am tied to no organisation - I do this for the joy of learning. Maintaining a blog of this size takes a lot of work and I hope you find my contributions useful - if you want to help fund my gadget habit or buy me a coffee - here is a link.

Disclaimer: Because I have no idea of your level of technical skill or the requirements of your country laws in terms of electricity supply etc., I accept no responsibility for any damage caused through following advice in these pages. When dealing with mains voltages you should satisfy yourself that whatever you are doing is safe and if unsure, seek advice from someone who is sure.

Notice: I'm always happy to offer advice on stuff I've written - and indeed take advice. If I can help in any way just let me know but PLEASE don't ask me how to program in C/PASCAL/NODE/etc. There are many resources out there - if you want to program and can't - there's always Google.

Newsletter

The blog will send you occasional emails containing links to recent posts. No ads and your email will not be given to third parties. There's an un-subscribe link on each email. Invalid names will be deleted.

Links

EE Times | Electronic Engineering TimesEE Times connects the global electronics community through news, analysis, education, and peer-to-peer discussion around technology, business, products and design