This tutorial will show you how to send PUSH notifications from your server to Pilot. Before starting, you need the following:
- A working Domoticz server, with access to the internet;
- The app “Pilot: Home Automation Control” has to be installed on your iPhone, and already connected to your Domoticz installation;
- The full version of the app is required to activate push notifications;
Setting up “Pilot: Home Automation Control”
- Launch your “Pilot: Home Automation Control” app;
- Go to “Settings > Notifications”;
- Activate push notifications;
- Let Pilot send you notifications:
- After activating, Pilot will generate a random private key. Keep it aside, you will need it soon.
That is all for the Pilot app. Now it is time to setup your Domoticz server.
Setting up your Domoticz server
- Go to your Domoticz control panel;
- Go to the page “Setup > Settings”;
- Go to the “Notifications section” ;
- Go to the “Custom HTTP/Action:” section;
- Complete as follows :
- Check “Enabled”;
- #FIELD1 field: add the private key generated by Pilot;
- URL/Action : copy/paste this text :
http://api.pilot.patrickferreira.com/#FIELD1/#SUBJECT/#MESSAGE
- Click on “Apply settings” ;
- If everything is correctly setup, you can click on “Test”. This will send a test notification to your iOS device. It should be sent to your device immediatly ;
And there you go! Your Domoticz server and Pilot are now setup for notifications! It is now time to use this in all your Domoticz events.
Using push notifications
It is quite simple to use push notifications in your Domoticz server. All you need to do is add this item to your Domoticz events :
Let’s sum up
In this tutorial, I did the following:
- Activate the notifications in “Pilot: Home Automation Control”;
- Set up the notifications in my Domoticz server;
- Learned how to use these notifications in my Domoticz events.
Got any question? Please leave your comments below!
Hi Patrick, Great functionallity I must say, love it! But I was wondering, is it able to disable the Arriving/Leaving home notifications? Because I’m normaly pretty aware of that so I don’t really care about those notifications…
Yup, it is only a push notification, the geofence will still work even if you disable notifications. 😉
Hi Patrick, Thanks but that’s not what I mean. I do want to enable notifications because I want to use it for certain events in my Domoticz. I just don’t want to be notificated when I arrive and leave home. That is something the app does.
Oh, I see! Then all you have to do is disable notifications in the “location services” screen, and enable it in the “notifications” settings screen.
Does that answer your question?
Ah right! Thanks, I didn’t noticed that option under location services. 🙂
Patrick – nice work – couple of questions/issues.
1) I am running V2.3786 of Domoticz – when setting up I found that I had to specify the URL as http:// not https:// – if I use https then I get an error sending on the “test” action. http works ok.
2) on the app side – I have enabled sounds and badge icons in the notification settings on my phone – but neither seem to work – no sound or badge icon – should these be available?
I think the app is great – and I appreciate your efforts.
Hi Paul,
Thanks for your feedback! Glad you like the app,
1) It’s pretty weird. It worked just fine a few weeks ago with HTTPS. I tried again a few minutes ago and Domoticz is sometimes having a bit of trouble with HTTPS… As you mentionned, HTTP works just fine so I changed the tutorial for the time being. I will contact the Domoticz team, HTTPS is obviously more secure for this kind of stuff.
2) You are right, those are not implemented yet in the app. I will see what I can do.
Please let me know if you have any other issues/suggestions.
P
Thanks for the quick reply.
Yes – would much prefer https to http for the notification – but it’s not super critical for me at the moment.
Biggest thing for me would be sound notification in the app – I am using it to tell me the house alarm has been triggered – so I need to be altered when it occurs.
Icon badges are less important (unless you have a notifications view inside the app where messages are visible)
thanks for your work on this, Domoticz needs this interface
First, Greet app you’ve created. I would like to know if it is possible to add 2 phones to the notification section. Now I have only one phone for the push messages but I would like to add my wife’s phone as well.
When do you think to release the iPad version?
Thanks, glad you like it 🙂
Currently it is only possible to send a notification to one iPhone. You should be able to register 2 phones for notifications in the near future. No release date though.
iPad version has been in the works for quite some time, but I don’t have any release date.
I don’t want it to be a “big iphone” interface.
you can put the same private key in both iphone to work!!!!!!
Yes you can 😉
Hello Patrick,
I really like your app, which I purchased.
One question, I just followed your tutorial and notifications arrive at my iPhone 5.
But the header of the pop-up window reads:
${PRODUCT_NAAM}
This means product_name in Dutch.
Any thoughts? Is it Pilot API related? Or a setting in Domoticz?
Best regards, Bart
Aha, this is only the case when the Pilot app is open. If closed, then a ” normal” notification arrives.
Thanks for the reporting, I’m actually surprised as you’re the first one to report this issue 😛
Will have it fixed in the next release 😉
Cheers!
P
I can confirm this issue happens.
Would you consider replacing the ${PRODUCT_NAAM} with #SUBJECT?
It would be nice to replace ‘Pilot’ with the subject.
If you would change the title to ${PRODUCT_NAAM}: #SUBJECT that would work too!
Merci,
Roel
Yeah, I will try to have it fixed 😉
Hi,
I Just tested the notifications option, but it doesn’t work. Filling in the URL in a browser it shows a “Internal Server Error” error..
Hi, still having issues with sending PUSH notifications?
Is it possible to add more than one private key? to inform multiple users?
This will be available in Pilot 1.8, which should be out in a few weeks.
Cheers,
P
Hello Patrick,
I am on Domoticz version V3.5337 and I noticed that push notifications no longer work.
I noticed that Domoticz now has a POST DATA field, maybe this has something to do with it?
It should now work again. There was an issue server-side.
Cheers,
P
Is it posible to set more sounds??
Hi,
No, not at the moment!
Cheers,
P
Great App,
Wanted to make a choice between Pilot and ImperiHome.
Just removed the full version of ImperiHome from my iPhone. 😉
Changing the API key is a good solution for receiving the push messages on several iPhones.
Hi Leon,
Glad you are enjoying Pilot 🙂
Imperihome is also a very nice app, competition is good, it helps us improve our apps everyday.
Let me know if you have feedback/questions,
P
Hello Patrick,
I activated Push notifications. I enabled all options in Notification center, sounds etc. When the Notification is sent I do not get a sound or info on my locked iPhone. When I touch the power or home button, I do see that the notification has arrived!? What could be the problem?
Thanks,
Arthur
Never mind, it works. Don’t disturb was on because I tested it late in the evening. 😉
Glad you figured it out 🙂
Cheers!
P
Hi Patrick,
My push notification is not working anymore. I’m on version 3.5877 of Domoticz and I notice some extra fields are available in the settings screen like POST data and POST content type. Do these need to be filled?
cheers, Guido
Hi Guido,
Those fields don’t need to be filled.
Can you try using http or https, see if that changes anything?
For best results, I recommend using HTTPS.
Then, be sure that the API key in the Domoticz settings is the same as in Pilot.
Cheers,
P
Hi Patrick,
Can I push a http://“cam_ip”/snap.jpg together with the notification to my iPhone? Now i do it with a email (which I have to separately check for on my phone), but it would be very nice if it was part of the pilot push notification so that I will instantly see who is in front of my front door.
Run Domoticz V3.6616. If I manually enter the URL in the browser it works, with key, subject and message filled, the notification works. If i copy the url from the tutorial i get “Problem Sending Notification”
If i copy the URL I used in the browser,I receive the same error. (tried both http and https)
Hi Marco, can you email me your API key please? 🙂
[email protected]
Same here. Notifications used to work, but not anymore.
My domoticz version is V3.6608 and the key is correctly defined.
Can you email me your API key please? 😉
[email protected]
Hello Patrick,
I juist installed Pilot and configured Domoticz for notifications. I do see that in Domoticz the event look different from your description subsysteem Requirements) and I need to start with a Control block.
Test notification workshop fine.
Radomir
Hello Patrick,
I configured Domoticz (v3.8153) for notifications yesterday and up till the Test it worked fine. Test notification arrived correctly at my iPhone. Configuring the notification for the devices was not succesful. The configuration screen do not match your instruction/screenshot, I need to provide additional information which is not part of your instruction. I assume that in the device notification settings in Domoticz I have to choose HTTP, is this correct?
Hi Patrick,
Got the same problem here that push isn’t working. I already send you an email on 7 september with my API key. Domoticz version is 3.8389.