NMA exceeded the maximum number of API calls per hour allowed

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
HenFre
Posts: 22
Joined: Thursday 12 May 2016 15:48
Target OS: Raspberry Pi
Domoticz version: 3.8771
Location: Sweden
Contact:

NMA exceeded the maximum number of API calls per hour allowed

Post by HenFre » Thursday 28 December 2017 20:13

Version : 3.8771
Platform : Raspberry Pi3 / Debian

Without sending a single message Domoticz reports that "Your IP exceeded the maximum number of API calls per hour allowed" ant that is 800.
When there is something to send it will be sent!

I don't understand this. It seem like this syntax count upp even if it isn't true and not sent:
2017-12-28  NMA.JPG
2017-12-28 NMA.JPG (211.53 KiB) Viewed 1982 times

This is the error messages in the log:
2017-12-28 17:44:27.590 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2017-12-28 17:44:27.590 Error: Notification sent (nma) => Failed
2017-12-28 17:44:28.829 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2017-12-28 17:44:28.829 Error: Notification sent (nma) => Failed
Domoticz on Raspberry PI 3 since 2016.

User avatar
dk78
Posts: 34
Joined: Monday 07 March 2016 16:50
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Veldhoven
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by dk78 » Sunday 31 December 2017 17:44

I have also issues with NMA with Domoticz version 3.8796. Same error.

User avatar
Denny64
Posts: 48
Joined: Friday 03 February 2017 12:34
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Italy
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by Denny64 » Sunday 31 December 2017 20:15

Up to a month ago NMA was perfect, then started to give me the error of exceeding limit.

Nothing has changed in Domoticz (update) and Python script aren't used to send NMA notification. Only swich tab and events notification.

Domoticz 3.5877 on RPi3.

Now i'm testing Pushover and it works very well.

zicht
Posts: 219
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 3.8xxx
Location: NL
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by zicht » Monday 01 January 2018 13:06

Hi

I see the same errors.
Discovered by accident that when i do a manual http get with a different application name (see api) the message is delivered while domoticz stil returns err 402

Version: 3.8796
Build Hash: 2d99bbbc
Compile Date: 2017-12-24 07:06:53
dzVents Version: 2.3.0
Platform win10
Rpi & Win x64. Using : cam's,Nest,RFXCom,Kaku,LaCrosse,RFY,IsAlive,Dummy,Wether Underground, standard Lua, Curl on windows,Domoticz Android App & Tasker,

"The only source of knowledge is experience (A.Einstein)"

HenFre
Posts: 22
Joined: Thursday 12 May 2016 15:48
Target OS: Raspberry Pi
Domoticz version: 3.8771
Location: Sweden
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by HenFre » Saturday 13 January 2018 2:13

Now I have found out what creates the problem. It is not LUA and it is not dzVents.

When I replace this:
2018-01-13 NMA 1.JPG
2018-01-13 NMA 1.JPG (151.49 KiB) Viewed 1822 times

with this:
2018-01-13 NMA 2.JPG
2018-01-13 NMA 2.JPG (64.03 KiB) Viewed 1822 times
The problem disappears.
Domoticz on Raspberry PI 3 since 2016.

zicht
Posts: 219
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 3.8xxx
Location: NL
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by zicht » Saturday 13 January 2018 10:20

HenFre wrote:
Saturday 13 January 2018 2:13
Now I have found out what creates the problem. It is not LUA and it is not dzVents.
The problem disappears.
Well i only use Lua, (no notification are set at all on switches or sensors) :

Code: Select all

				commandArray[#commandArray + 1] = {['SendNotification'] = notific }
Still have the problem.
If i use the NMA site to send a notification (premium unlimted account !) i have no problems at all
When i look a the api and construct an URL request with another APP name than domoticz it works fine.
When i do the same with APP name domoticz sometimes it works, sometimes i get the code for exceed max number notifications.
Maybe something has changed on the backend of NMA ?

QUite anoying.
So i am working in spare time to transfer NMA messages to LUA with curl to get some reliability again.

something like this works in plain lue (=not dzevents)

Code: Select all

		local Link = "https://www.notifymyandroid.com/publicapi/notify?apikey="
		local apikey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
		local Application="MySmartHome"  --header
		local Event=Subject
		local Description=notific
		local Priority="0"
		local url=Link..apikey.."&application="..Application.."&event="..Event.."&description="..Description.."&priority="..Priority
	    	local feedback=assert(io.popen('start /b /realtime curl.exe "'..url..'" &'))
No errors whatsoever till now. It is not the best way to do, but as a quick&dirty solution fine for me.
Rpi & Win x64. Using : cam's,Nest,RFXCom,Kaku,LaCrosse,RFY,IsAlive,Dummy,Wether Underground, standard Lua, Curl on windows,Domoticz Android App & Tasker,

"The only source of knowledge is experience (A.Einstein)"

micha_pr
Posts: 414
Joined: Friday 24 October 2014 12:26
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Germany, Berlin
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by micha_pr » Saturday 13 January 2018 21:34

I had same errors with free account since December about.
Additional there was no way to pay for a premium account - so I have tested Pushover - without any problems.
So I have purchased the unlimited version for small money...

Additional - for a free solution I can suggest "Telegram" - this is working very nice.
Michael Pruefer
----------------------------
http://www.zwave-review.com (German only)
http://www.SmartHome.Work (German only)

User avatar
Denny64
Posts: 48
Joined: Friday 03 February 2017 12:34
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Italy
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by Denny64 » Sunday 14 January 2018 17:28

Due to the NMA problem, i also decided to move to Pushover and for now it works wery well.

I also tested Telegram and it is perfect, but i failed to use different sounds for different priority level.

Has anyone succeeded?

dobber
Posts: 40
Joined: Saturday 07 May 2016 1:43
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Sweden
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by dobber » Wednesday 24 January 2018 20:01

I'm also experiencing this issue. No vpn involved and I also have the premium account on nma. Works well when sending from other applications. Version 3.8834 of Domoticz.
2018-01-24 18:51:32.682 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-24 18:51:32.682 Error: Notification sent (nma) => Failed

HenFre
Posts: 22
Joined: Thursday 12 May 2016 15:48
Target OS: Raspberry Pi
Domoticz version: 3.8771
Location: Sweden
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by HenFre » Tuesday 30 January 2018 19:35

After upgradeing to Domoticz ver. 3.8872 I have got the same problems with push notes over dzVents. I don't know if it is the upgrade or coincidence.

Now I have tested to send 106 pushnotes via NMA, during 15 minutes, alternating between dzVents and devices in the API.
65 was sent.
41 ended up in errors. All with this messages:
2018-01-30 17:20:51.488 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:21:10.549 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:22:00.383 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:22:29.743 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:22:38.247 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:22:51.329 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:22:58.248 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:23:19.785 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:23:33.738 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:23:37.321 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:24:33.051 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:25:03.968 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:25:31.247 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:25:46.453 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:25:52.406 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:26:13.783 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:26:21.012 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:27:17.611 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:27:30.745 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:27:35.033 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:27:44.173 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:28:08.523 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:28:22.445 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:28:40.100 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:28:49.445 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:28:53.644 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:29:14.570 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:29:52.507 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:30:18.203 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:30:31.744 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:30:41.497 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:30:49.502 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:31:13.066 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:31:26.534 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:31:33.350 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:31:36.146 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:31:48.677 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:31:54.644 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:31:59.939 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:32:02.856 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
2018-01-30 17:32:08.847 Error: NMA: Your IP exceeded the maximum number of API calls per hour allowed.
Domoticz on Raspberry PI 3 since 2016.

marigo
Posts: 36
Joined: Sunday 31 May 2015 11:04
Target OS: Raspberry Pi
Domoticz version: V4.9700
Location: The Netherlands, Veenendaal
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by marigo » Wednesday 31 January 2018 20:27

I have this problem too with build Version: 3.8745
Compile Date: 2017-11-24 09:04:50

When logging in into NMA and send a message from there everything works. When doing it from domoticz it fails.
I have regenerated a new API key and the problem was solved. I can send multiple times a test message. no more "exceed" messages in de the log.

civi
Posts: 4
Joined: Friday 21 October 2016 12:14
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Madrid, Spain
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by civi » Thursday 01 February 2018 21:59

I have read all your posts, and following, I'm going to explain my investigations:
From my point of view, the problem is due to NMA servers/API.

I'm using for months the 3.8153 Domoticz version in a RPi 2, so I can't find any reason related to Domoticz software.
My problems started during past December, same than some of you, as far as I remember.
I'm using my API key in another python program, running a different RPi than domoticz, and I have the same problems there.
I have tried to change the API key but nothing has changed in none of my systems. They have been failing after this.
I have tried the HTTP notifications in Domoticz, writing the API address plus the parameters, but NMA fails randomly.

If I try to send a test notification from the browser, writting the complete address, it randomly fails (or it randomly success). Repeating this test keeps failing some tries, but success others, and curiosly, the correct ones, are correctly decrementing the hourly counter returned by NMA.
I have repeat the browser test in my mobile phone, using the mobile data network, not the wifi, with similar results than from my home ISP. With the last test, I have discarded the possibility of any CG-NAT, proxy or whatever causing NMA servers receiving my requests from the same IP than others. I even have tried this test from my work computer, with the same results.

Any of you can make the same tests from a browser or 'curl' using your API key in the following request:
https://www.notifymyandroid.com/publica ... XXXXXXXXXX
This returns an XML string (easy to read)

My solution after these tests has been to create a bash script which sends the notification and evaluates the response from NMA server. If not success, the script retries sending the notification again. This is done up to 8 retries (or more if the notification is the highest priority)

The script is then used from my lua scripts or by the HTTP notifications (you can use http:// or script://). By the way, I think there is a bug in the 'script://' implementation, which is not using the PRIORITY parameter passed. I'll report this later.

This way, I have solved the problem and NMA notifications are working in both my systems (Domoticz and a python application in another Rpi)

HenFre
Posts: 22
Joined: Thursday 12 May 2016 15:48
Target OS: Raspberry Pi
Domoticz version: 3.8771
Location: Sweden
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by HenFre » Friday 02 February 2018 0:21

Thank's for all good advices.

Right now it works after that I have regenerated the API-key but it is maybe a coincidence.

Extension:
No, it don't work. Only for a short amount of time.
Domoticz on Raspberry PI 3 since 2016.

MaartenJB
Posts: 7
Joined: Wednesday 27 July 2016 18:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by MaartenJB » Saturday 17 February 2018 15:59

Hi, I've got the same problem, but I think I know what the problem is. I think domoticz is using an old link to nma.

This link will give you an error regularly: https://www.notifymyandroid.com/publicapi/verify?apikey=YOUR-API-KEY

Code: Select all

<nma><error code="402" resettimer="14">Your IP exceeded the maximum number of API calls per hour allowed.</error></nma>

This one works all the time: https://notifymyandroid.appspot.com/publicapi/verify?apikey=YOUR-API-KEY

Code: Select all

<nma><success code="200" remaining="972" resettimer="36"/></nma>
I dont know where this link is specified.

Best regards,

Maarten

zicht
Posts: 219
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 3.8xxx
Location: NL
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by zicht » Saturday 17 February 2018 22:10

MaartenJB wrote:
Saturday 17 February 2018 15:59
Hi, I've got the same problem, but I think I know what the problem is. I think domoticz is using an old link to nma.

This link will give you an error regularly: https://www.notifymyandroid.com/publicapi/verify?apikey=YOUR-API-KEY

Code: Select all

<nma><error code="402" resettimer="14">Your IP exceeded the maximum number of API calls per hour allowed.</error></nma>

This one works all the time: https://notifymyandroid.appspot.com/publicapi/verify?apikey=YOUR-API-KEY

Code: Select all

<nma><success code="200" remaining="972" resettimer="36"/></nma>
I dont know where this link is specified.

Best regards,

Maarten
Confirmed , see the same with my lua curl workaround, when using the same link problem solved, when using old link it returns with a short amount of time. I think also this is the cause (THANKS FOR THE TIP) Mine is working again after updating the link :)
Rpi & Win x64. Using : cam's,Nest,RFXCom,Kaku,LaCrosse,RFY,IsAlive,Dummy,Wether Underground, standard Lua, Curl on windows,Domoticz Android App & Tasker,

"The only source of knowledge is experience (A.Einstein)"

MaartenJB
Posts: 7
Joined: Wednesday 27 July 2016 18:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by MaartenJB » Sunday 18 February 2018 9:54

I think the link is hard coded in the domoticz binary.

Micha123
Posts: 25
Joined: Monday 28 August 2017 16:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by Micha123 » Thursday 08 March 2018 11:54

i have changed it in the source in the NotificationNma.ccp file
//send message to NMA
bool bRet;
std::stringstream sPostData;
std::string sResult;
sPostData << "apikey=" << _apikey << "&application=Domoticz&priority=" << Priority << "&event=" << Subject;
sPostData << "&description=" << Text;
std::vector<std::string> ExtraHeaders;
bRet = HTTPClient::POST("https://notifymyandroid.appspot.com/pub ... rs,sResult);
bool bSuccess = (sResult.find("success code=\"200\"") != std::string::npos);
if (!bSuccess)
_log.Log(LOG_ERROR, "NMA: %s", sResult.c_str());
return (bRet && bSuccess);



and then comiled it for the RPi 2/3

now NMA is realy nice working.


here is the compiled domoticz file

http://ul.to/tbffi6od

backup your

/home/pi/domoticz/domoticz

file

then copy the new one there,

ssh to the pi and type

chmod 755 /home/pi/domoticz/domoticz

and restart your domoticz or the raspberrypi

jvandenbroek
Posts: 177
Joined: Wednesday 12 March 2014 17:37
Target OS: Raspberry Pi
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by jvandenbroek » Thursday 08 March 2018 15:46

I'd like to fix it in source, but according to https://www.notifymyandroid.com/api.jsp the old URL is valid? Does someone has a source which states otherwise? (where did you get that appspot.com URL from?)

MaartenJB
Posts: 7
Joined: Wednesday 27 July 2016 18:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by MaartenJB » Thursday 08 March 2018 19:13

jvandenbroek wrote:
Thursday 08 March 2018 15:46
I'd like to fix it in source, but according to https://www.notifymyandroid.com/api.jsp the old URL is valid? Does someone has a source which states otherwise? (where did you get that appspot.com URL from?)
Hi, well this is how i figured it out. I went to the www.notifymyandroid.com website and got redirected to notifymyandroid.appspot.com. So I thought they had moved their servers to google, (appspot is google cloud) and made a redirect function to the new location that just does not work that good. Then I replaced the domain name to try to work around the redirect, and that worked without any problems.

If you go to www.notifymyandroid.com right now, there is no redirect any more. I dont know if NMA knows about these problems, maybe the better approach is to inform them about it so they can fix it.

MaartenJB
Posts: 7
Joined: Wednesday 27 July 2016 18:18
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: NMA exceeded the maximum number of API calls per hour allowed

Post by MaartenJB » Thursday 08 March 2018 19:23

I've send them an email, I don't know how willing they are to fix it, because I think there is not a lot of development going on at nma anymore. When you click on "login" on their website, you still go to the appspot.com url.

Post Reply

Who is online

Users browsing this forum: mcwieger and 6 guests