Instalacja bramki SUPLA-VIRTUAL-DEVICE z obsługą termometrów LYWSD03MMC

User avatar
klew
Posts: 10396
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

PuteR wrote: Wed Feb 22, 2023 9:39 pm
Robert Błaszczak wrote: Wed Feb 22, 2023 8:27 pm Instalowałeś Supla Virtual Device, czy nowe Supla Device?
Supla Virtual Device. SD też mam na tej samej malinie i z czujnikami działa super, ale potrzebuje SVD do sterowania pilotami RF. Chyba że w SD również da się to ogarnąć??
Jedyne co kojarzę co ma svd a nie ma sd, to wsparcie dla mqtt.

Jak te piloty RF chcesz integrować?
User avatar
PuteR
Posts: 1431
Joined: Wed Dec 06, 2017 10:07 am

Post

klew wrote: Thu Feb 23, 2023 6:33 am
PuteR wrote: Wed Feb 22, 2023 9:39 pm
Robert Błaszczak wrote: Wed Feb 22, 2023 8:27 pm Instalowałeś Supla Virtual Device, czy nowe Supla Device?
Supla Virtual Device. SD też mam na tej samej malinie i z czujnikami działa super, ale potrzebuje SVD do sterowania pilotami RF. Chyba że w SD również da się to ogarnąć??
Jedyne co kojarzę co ma svd a nie ma sd, to wsparcie dla mqtt.

Jak te piloty RF chcesz integrować?
no właśnie i tu jest problem że po mqtt miałem je zintegrowane pry SVD. Generalnie zrobiłem wszystko zgodnie z poradnikiem Roberta https://www.blaszczak.pl/supla-virtual- ... ywsd03mmc/ problem tylko w tym że ten plik uruchamiający się nie pojawił i nie mogę tego odpalić.
User avatar
lesny8
Posts: 2928
Joined: Mon Dec 11, 2017 9:43 pm

Post

Obstawiam, że się z jakiegoś powodu SVD nie kompiluje
SOP 2023 :heavy_check_mark:
SOP 2024 :heavy_check_mark:
Czekam na kolejne Supla Offline Party :upside_down_face:
User avatar
klew
Posts: 10396
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

PuteR wrote: Thu Feb 23, 2023 8:16 pm no właśnie i tu jest problem że po mqtt miałem je zintegrowane pry SVD. Generalnie zrobiłem wszystko zgodnie z poradnikiem Roberta https://www.blaszczak.pl/supla-virtual- ... ywsd03mmc/ problem tylko w tym że ten plik uruchamiający się nie pojawił i nie mogę tego odpalić.
Tam jest błąd w źródłach, które są pobierane z repo https://github.com/lukbek/supla-core.git

Trzeba w pliku ./src/supla-dev/src/pi_2_mmio.h dodać słowo "extern" w tej linijce:

Code: Select all

extern volatile uint32_t* pi_2_mmio_gpio;
Tylko wtedy skrypt instalujacy może nie działać, bo tam jest robiony git pull a będziesz miał lokalne zmiany, więc trzeba dać:

Code: Select all

git add ./src/supla-dev/src/pi_2_mmio.h
git commit -m "add extern to fix compilation"
i wtedy jak dasz ./install.sh to powinno przejść.

Jeśli coś nie będzie działać to edytuj plik install.sh i zmień tą linijkę:

Code: Select all

(cd src/supla-dev/Release && make all >/dev/null 2>&1 && cd ../../..) || exit 1
na:

Code: Select all

(cd src/supla-dev/Release && make all && cd ../../..) || exit 1
Wtedy będzie widać całą kompilację na ekranie. Na końcu powinno być widać błąd - daj go tutaj to pomożemy.
User avatar
PuteR
Posts: 1431
Joined: Wed Dec 06, 2017 10:07 am

Post

Tak to wygląda po wykonaniu kroków które podałeś

Code: Select all

puter@rpi:~/supla-virtual-device $ git add ./src/supla-dev/src/pi_2_mmio.h
The following paths are ignored by one of your .gitignore files:
src
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
puter@rpi:~/supla-virtual-device $ git commit -m "add extern to fix compilation"
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'puter@rpi.(none)')
puter@rpi:~/supla-virtual-device $ ./install.sh
Getting the sources.
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Building. Be patient.
puter@rpi:~/supla-virtual-device $ sudo nano install.sh
puter@rpi:~/supla-virtual-device $ ./install.sh
Getting the sources.
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Building. Be patient.
Building target: supla-virtual-device
Invoking: Cross G++ Linker
g++ -L/usr/src/openssl/lib -pthread -lrt -o "supla-virtual-device" ./src/supla-client-lib/cfg.o ./src/supla-client-lib/devicechannel.o ./src/supla-client-lib/eh.o ./src/supla-client-lib/ini.o ./src/supla-client-lib/ipcsocket.o ./src/supla-client-lib/lck.o ./src/supla-client-lib/log.o ./src/supla-client-lib/proto.o ./src/supla-client-lib/safearray.o ./src/supla-client-lib/srpc.o ./src/supla-client-lib/sthread.o ./src/supla-client-lib/supla-client.o ./src/supla-client-lib/supla-socket.o ./src/supla-client-lib/tools.o  ./src/mqtt/mqtt.o ./src/mqtt/mqtt_client.o ./src/mqtt/mqtt_pal.o  ./src/accept_loop.o ./src/channel-io.o ./src/client_device.o ./src/client_publisher.o ./src/client_subscriber.o ./src/common.o ./src/common_dht_read.o ./src/devcfg.o ./src/devconnection.o ./src/gpio.o ./src/ipcctrl.o ./src/mcp23008.o ./src/pi_2_dht_read.o ./src/pi_2_mmio.o ./src/supla-dev.o ./src/w1.o   -lssl -lcrypto
/usr/bin/ld: ./src/pi_2_mmio.o:(.bss+0x0): multiple definition of `pi_2_mmio_gpio'; ./src/pi_2_dht_read.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:49: supla-virtual-device] Error 1
puter@rpi:~/supla-virtual-device $ 
User avatar
klew
Posts: 10396
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

PuteR wrote: Fri Feb 24, 2023 9:31 am Tak to wygląda po wykonaniu kroków które podałeś
Nadal jest ten błąd kompilacji.

Upewnij się, że dodałeś to "extern", o którym pisałem na początku.
Następnie odpal (jednorazowo):

Code: Select all

git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Ustaw tam swój mail i nazwę użytkownika (dowolne, możesz też bzdury tam wpisać).

Następnie daj:

Code: Select all

git add -f ./src/supla-dev/src/pi_2_mmio.h install.sh
git commit -m "add extern to fix compilation"
i spróbuj jeszcze raz:

Code: Select all

./install.sh
User avatar
PuteR
Posts: 1431
Joined: Wed Dec 06, 2017 10:07 am

Post

Dzięki klew faktycnie nie doczytałem i pominąłem pierwszy krok. Teraz jest OK. Urządzenie SVD pojawiło się cloud. Problem jaki teraz wystąpił to po uruchomieniu wyskakuje error

Code: Select all

mqtt client error MQTT_ERROR_SOCKET_ERROR
mqtt client error MQTT_ERROR_SOCKET_ERROR
mqtt client error MQTT_ERROR_SOCKET_ERROR
i tak cały czas. Dane do logowania mqqtt podałem prawidłowe takie jak są w brokerze

Code: Select all

[MQTT]
host=mqtt9.supla.org
port=8883
username=f649130d71acXXXXXXXXXXXXXXXXXX
password=f=nEvq4uHlyaQXXXXXXXXXXXXXXXXX
client_name=supla-virtual-device
User avatar
klew
Posts: 10396
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

PuteR wrote: Fri Feb 24, 2023 10:04 am Dzięki klew faktycnie nie doczytałem i pominąłem pierwszy krok. Teraz jest OK. Urządzenie SVD pojawiło się cloud. Problem jaki teraz wystąpił to po uruchomieniu wyskakuje error
MQTT w SVD służy do integracji z jakiegoś zewnętrznego MQTT przez SVD do Supli.

Nie wiem jaki jest cel próby łączenia się z MQTT wystawionym przez Suplę. Wszystko co jest w tym Suplowym MQTT dostępne, już jest w Supli, więc wydaje mi się, że umieszczanie tego w SVD nie ma większego sensu.
Juszczaczek1
Posts: 291
Joined: Sun Nov 08, 2020 3:41 pm

Post

kto mi podpowie co musze zrobic
You do not have the required permissions to view the files attached to this post.
User avatar
Robert Błaszczak
Posts: 4456
Joined: Sat Dec 22, 2018 8:55 pm
Location: Zielona Góra

Post

A co to ma wspólnego z Supla Virtual Device / Supla Device?
Pozdrawiam
Robert Błaszczak


Moja prywatna strona: www.blaszczak.pl

Return to “Pomoc”