Code: Select all
./supla-mqtt-client -config /home/pi/supla-core/supla-mqtt-Client/config/config_template.yaml
Code: Select all
./supla-mqtt-client -config /home/pi/supla-core/supla-mqtt-Client/config/config_template.yaml
Code: Select all
root@raspberrypi:/home/pi/supla-core/supla-mqtt-client/Release# ./supla-mqtt-cli
INFO[1573944035.241457] initializing main loop
INFO[1573944035.243251] Client GUID: 79DFA0C5DF1E529A8C63F9104FBF4B89
INFO[1573944035.253642] SSL version: OpenSSL 1.1.1d 10 Sep 2019
INFO[1573944035.274753] Connecting...
mqtt client error MQTT_ERROR_SEND_BUFFER_IS_FULL
Podłączyłem się i niby działa. Edytuję plik /opt/smashing/dashboards/default.erb i jak dla temperatury jest ok to dla włączników nie. Wpisuję np. ID światła 1172Beku wrote: Sun Nov 17, 2019 5:45 am A w MQTT coś się pojawiło?
Podlącz się MQTT Explorerem żeby sprawdzić.
Code: Select all
<li data-row="2" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="1172" data-view="Ohswitch" data-title="Kuchnia"></div>
</li>
W katalogu Debug mam tylko:Beku wrote: Sun Nov 17, 2019 4:46 pm Zrób git pull na źródłach supla-mqtt-Client.
Skompiluj wersję Debug - powinno się udać (zamiast katalogu Release - Debug) i uruchom tą skompilowaną wersję. Powinno pojawić się na RPi więcej informacji w logu. Prześlij mi to co tam się pojawia.
Co do logiki ... to nie do tego służy. Logika może być obsłużona przez skrypty @fracz i przez sceny (ale te chyba jeszcze są w testach)
Jak zmieniasz stan przełączników w aplikacji supla w telefonie to zmienia się stan w Dashboard ?
Code: Select all
root@raspberrypi:/home/pi/supla-core/supla-mqtt-client/Debug# sudo make all
Building file: ../src/yaml/yaml.cpp
Invoking: Cross G++ Compiler
g++ -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/yaml/yaml.d" -MT"src/yaml/yaml.o" -o "src/yaml/yaml.o" "../src/yaml/yaml.cpp"
../src/yaml/yaml.cpp: In member function ‘void Yaml::ParseImp::Parse(Yaml::Node&, std::iostream&)’:
../src/yaml/yaml.cpp:1024:24: warning: catching polymorphic type ‘class Yaml::Exception’ by value [-Wcatch-value=]
} catch (Exception e) {
^
../src/yaml/yaml.cpp: In function ‘void Yaml::Parse(Yaml::Node&, std::iostream& ’:
../src/yaml/yaml.cpp:1763:28: warning: catching polymorphic type ‘const class Yaml::Exception’ by value [-Wcatch-value=]
} catch (const Exception e) {
^
Finished building: ../src/yaml/yaml.cpp
Building file: ../src/supla-client-lib/cfg.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/cfg.d" -MT"src/supla-client-lib/cfg.o" -o "src/supla-client-lib/cfg.o" "../src/supla-client-lib/cfg.c"
Finished building: ../src/supla-client-lib/cfg.c
Building file: ../src/supla-client-lib/devicechannel.cpp
Invoking: Cross G++ Compiler
g++ -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/devicechannel.d" -MT"src/supla-client-lib/devicechannel.o" -o "src/supla-client-lib/devicechannel.o" "../src/supla-client-lib/devicechannel.cpp"
Finished building: ../src/supla-client-lib/devicechannel.cpp
Building file: ../src/supla-client-lib/eh.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/eh.d" -MT"src/supla-client-lib/eh.o" -o "src/supla-client-lib/eh.o" "../src/supla-client-lib/eh.c"
Finished building: ../src/supla-client-lib/eh.c
Building file: ../src/supla-client-lib/ini.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/ini.d" -MT"src/supla-client-lib/ini.o" -o "src/supla-client-lib/ini.o" "../src/supla-client-lib/ini.c"
Finished building: ../src/supla-client-lib/ini.c
Building file: ../src/supla-client-lib/lck.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/lck.d" -MT"src/supla-client-lib/lck.o" -o "src/supla-client-lib/lck.o" "../src/supla-client-lib/lck.c"
Finished building: ../src/supla-client-lib/lck.c
Building file: ../src/supla-client-lib/log.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/log.d" -MT"src/supla-client-lib/log.o" -o "src/supla-client-lib/log.o" "../src/supla-client-lib/log.c"
Finished building: ../src/supla-client-lib/log.c
Building file: ../src/supla-client-lib/proto.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/proto.d" -MT"src/supla-client-lib/proto.o" -o "src/supla-client-lib/proto.o" "../src/supla-client-lib/proto.c"
Finished building: ../src/supla-client-lib/proto.c
Building file: ../src/supla-client-lib/safearray.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/safearray.d" -MT"src/supla-client-lib/safearray.o" -o "src/supla-client-lib/safearray.o" "../src/supla-client-lib/safearray.c"
Finished building: ../src/supla-client-lib/safearray.c
Building file: ../src/supla-client-lib/srpc.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/srpc.d" -MT"src/supla-client-lib/srpc.o" -o "src/supla-client-lib/srpc.o" "../src/supla-client-lib/srpc.c"
Finished building: ../src/supla-client-lib/srpc.c
Building file: ../src/supla-client-lib/sthread.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/sthread.d" -MT"src/supla-client-lib/sthread.o" -o "src/supla-client-lib/sthread.o" "../src/supla-client-lib/sthread.c"
Finished building: ../src/supla-client-lib/sthread.c
Building file: ../src/supla-client-lib/supla-client.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/supla-client.d" -MT"src/supla-client-lib/supla-client.o" -o "src/supla-client-lib/supla-client.o" "../src/supla-client-lib/supla-client.c"
Finished building: ../src/supla-client-lib/supla-client.c
Building file: ../src/supla-client-lib/supla-socket.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/supla-socket.d" -MT"src/supla-client-lib/supla-socket.o" -o "src/supla-client-lib/supla-socket.o" "../src/supla-client-lib/supla-socket.c"
../src/supla-client-lib/supla-socket.c: In function ‘ssocket_client_initctx’:
../src/supla-client-lib/supla-socket.c:209:3: warning: ‘TLSv1_2_client_method’ is deprecated [-Wdeprecated-declarations]
method = (SSL_METHOD *)TLSv1_2_client_method();
^~~~~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from ../src/supla-client-lib/supla-socket.c:42:
/usr/include/openssl/ssl.h:1891:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void))
^~~~~~~~~~~~~~~~~~
../src/supla-client-lib/supla-socket.c: In function ‘ssocket_free’:
../src/supla-client-lib/supla-socket.c:306:5: warning: ‘ERR_remove_thread_state’ is deprecated [-Wdeprecated-declarations]
ERR_remove_thread_state(NULL);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from ../src/supla-client-lib/supla-socket.c:42:
/usr/include/openssl/err.h:260:1: note: declared here
DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))
^~~~~~~~~~~~~~~~~~
../src/supla-client-lib/supla-socket.c: In function ‘ssocket_supla_socket_close’:
../src/supla-client-lib/supla-socket.c:446:5: warning: ‘ERR_remove_thread_state’ is deprecated [-Wdeprecated-declarations]
ERR_remove_thread_state(NULL);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/e_os2.h:13,
from /usr/include/openssl/err.h:13,
from ../src/supla-client-lib/supla-socket.c:42:
/usr/include/openssl/err.h:260:1: note: declared here
DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))
^~~~~~~~~~~~~~~~~~
Finished building: ../src/supla-client-lib/supla-socket.c
Building file: ../src/supla-client-lib/tools.c
Invoking: Cross GCC Compiler
gcc -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/supla-client-lib/tools.d" -MT"src/supla-client-lib/tools.o" -o "src/supla-client-lib/tools.o" "../src/supla-client-lib/tools.c"
Finished building: ../src/supla-client-lib/tools.c
Building file: ../src/mqtt/mqtt.cpp
Invoking: Cross G++ Compiler
g++ -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/mqtt/mqtt.d" -MT"src/mqtt/mqtt.o" -o "src/mqtt/mqtt.o" "../src/mqtt/mqtt.cpp"
Finished building: ../src/mqtt/mqtt.cpp
Building file: ../src/mqtt/mqtt_client.cpp
Invoking: Cross G++ Compiler
g++ -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/mqtt/mqtt_client.d" -MT"src/mqtt/mqtt_client.o" -o "src/mqtt/mqtt_client.o" "../src/mqtt/mqtt_client.cpp"
Finished building: ../src/mqtt/mqtt_client.cpp
Building file: ../src/mqtt/mqtt_pal.c
Invoking: Cross GCC Compiler
gcc -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/mqtt/mqtt_pal.d" -MT"src/mqtt/mqtt_pal.o" -o "src/mqtt/mqtt_pal.o" "../src/mqtt/mqtt_pal.c"
Finished building: ../src/mqtt/mqtt_pal.c
Building file: ../src/client_command.cpp
Invoking: Cross G++ Compiler
g++ -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/client_command.d" -MT"src/client_command.o" -o "src/client_command.o" "../src/client_command.cpp"
Finished building: ../src/client_command.cpp
Building file: ../src/client_config.cpp
Invoking: Cross G++ Compiler
g++ -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/client_config.d" -MT"src/client_config.o" -o "src/client_config.o" "../src/client_config.cpp"
Finished building: ../src/client_config.cpp
Building file: ../src/client_device.cpp
Invoking: Cross G++ Compiler
g++ -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/client_device.d" -MT"src/client_device.o" -o "src/client_device.o" "../src/client_device.cpp"
Finished building: ../src/client_device.cpp
Building file: ../src/client_loop.cpp
Invoking: Cross G++ Compiler
g++ -D__NO_DATABASE -D__NO_USER -D__DEBUG=1 -D__SSOCKET_WRITE_TO_FILE=0 -I/usr/src/openssl/include -O0 -g3 -Wall -fsigned-char -c -fmessage-length=0 -MMD -MP -MF"src/client_loop.d" -MT"src/client_loop.o" -o "src/client_loop.o" "../src/client_loop.cpp"
In file included from ../src/client_subscriber.h:25,
from ../src/client_loop.h:32,
from ../src/client_loop.cpp:19:
../src/json/jsoncons/json.hpp:10:10: fatal error: jsoncons/basic_json.hpp: No such file or directory
#include <jsoncons/basic_json.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [src/subdir.mk:51: src/client_loop.o] Error 1
Mam porobione zmiany w tych plikach
Code: Select all
root@raspberrypi:/home/pi/supla-core# git pull
Updating aa93065..3397d8d
error: Your local changes to the following files would be overwritten by merge:
supla-mqtt-client/config/command.yaml
supla-mqtt-client/config/config_template.yaml
Please commit your changes or stash them before you merge.
Aborting
root@raspberrypi:/home/pi/supla-core#