witnessmenow / pushsafer-arduino-library

1 stars 1 forks source link

does not send notification #1

Closed robomaniac closed 7 years ago

robomaniac commented 7 years ago

what's up!

This is Jerome from instructables. I tried your latest code that was updated 2 hours ago. I can't get to work. There is 3 things to modify in your code. SSID, password and PushsaferKey.

is that right? It compiles and it tells me it works. I triple check my Pushsaferkey.

..................
WiFi connected
IP address: 192.168.1.149
Connected
Content-Length: 619
--------------------------b8f610217e83e29b
content-disposition: form-data; name="m"

Hello!
--------------------------b8f610217e83e29b
content-disposition: form-data; name="d"

2722
--------------------------b8f610217e83e29b
content-disposition: form-data; name="k"

xxxxx push safer key xxxxx
--------------------------b8f610217e83e29b
content-disposition: form-data; name="s"

8
--------------------------b8f610217e83e29b
content-disposition: form-data; name="v"

1
--------------------------b8f610217e83e29b
content-disposition: form-data; name="i"

1
--------------------------b8f610217e83e29b--

Sent

I think these are both up to date

include

include

witnessmenow commented 7 years ago

Hi Jerome,

Is the device Id right? Kind of suspicious that its the same as mine :)

Under "my devices" on the pushsafer website is where the id is

https://imgur.com/gallery/ao1RD

robomaniac commented 7 years ago

yes it works!

Your the man!!

For your generic example, I would write this:

  struct PushSaferInput input;
  input.message = "Hello!";
  input.sound = "2";
  input.vibration = "3";
  input.icon = "6";
  input.device = "a";     // all device

with "a" for device it send notification to all device. Now you can't make my mistake I just did. It's generic. Plus the sound is sign you got it working :P

Maybe device could be a define #define DEVICE "1927"

Thanks again! I will tell Kevin on his forum that you got a working example.

witnessmenow commented 7 years ago

Awesome!

Didn't realise that about the "a" just changed it there. Thanks

It could be for sure, but I guess its whatever the user wants to do with it. At some stage some string needs to be past into input.device however the user decides :)

Your welcome, feel free to submit PRs or fork this library if there is anything you want to do with it. I can't see myself focusing too much time on it, the Telegram library is probably my main focus and there is a good bit work on it!

If you have any questions on the code let me know.

I made this video a few weeks ago about making HTTPS calls from the esp8266, it might be useful https://youtu.be/hMZdM0Wlt54

Brian