nick
New Member
Posts: 11
|
Post by nick on Feb 2, 2017 17:13:20 GMT
Hi papa,
I try to load the gateway v 2.4 but give me the following errors :
Arduino:1.6.3 (Windows 8.1), Scheda:"ATmega328 on a breadboard (8 MHz internal clock)"
Opzioni di compilazione cambiate, ricompilo tutto
Uso la libreria RFM69 nella cartella: D:\Program Files (x86)\Arduino\libraries\RFM69 (legacy)
Uso la libreria SPI nella cartella: D:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Uso la libreria Ethernet nella cartella: D:\Program Files (x86)\Arduino\libraries\Ethernet
Uso la libreria PubSubClient nella cartella: D:\Program Files (x86)\Arduino\libraries\pubsubclient
D:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10603 -DARDUINO_AVR_ATMEGA328BB -DARDUINO_ARCH_AVR -ID:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -ID:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -ID:\Program Files (x86)\Arduino\libraries\RFM69 -ID:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -ID:\Program Files (x86)\Arduino\libraries\Ethernet\src -ID:\Program Files (x86)\Arduino\libraries\pubsubclient\src C:\Users\Nicola\AppData\Local\Temp\build4625706481483600481.tmp\RFM_MQTT_GW_24.cpp -o C:\Users\Nicola\AppData\Local\Temp\build4625706481483600481.tmp\RFM_MQTT_GW_24.cpp.o
RFM_MQTT_GW_24.ino:89:1: error: 'define' does not name a type
RFM_MQTT_GW_24.ino:104:3: error: 'Message' does not name a type
RFM_MQTT_GW_24.ino:106:1: error: 'Message' does not name a type
RFM_MQTT_GW_24.ino: In function 'void sendMsg(int)':
RFM_MQTT_GW_24.ino:258:48: error: 'mes' was not declared in this scope
RFM_MQTT_GW_24.ino: In function 'void processPacket()':
RFM_MQTT_GW_24.ino:293:29: error: 'mes' was not declared in this scope
RFM_MQTT_GW_24.ino:300:10: error: 'Message' was not declared in this scope
RFM_MQTT_GW_24.ino:300:18: error: expected primary-expression before ')' token
RFM_MQTT_GW_24.ino:300:19: error: expected ';' before 'radio'
RFM_MQTT_GW_24.ino:313:7: error: 'mes' was not declared in this scope
RFM_MQTT_GW_24.ino: In function 'void mqtt_subs(char*, byte*, unsigned int)':
RFM_MQTT_GW_24.ino:385:2: error: 'mes' was not declared in this scope
Errore durante la compilazione
Can you help me ? Many thanks.
|
|
|
Post by papa on Feb 3, 2017 1:34:59 GMT
Nick, I moved your inquiry from my Success... thread to this new thread. My apologies, I believe most of your trouble uploading was because you downloaded a bad version of the Gateway 2.4 sketch that I posted in the Success... Thread I believe I have since replaced the bad version with a good one that I tested & confirmed that it will compile & upload a working Gateway 2.4 code. RFM_MQTT_GW_24_pub4.ino << Here, too, is what should be a reliable copy to download. You may have caused this compiling error: RFM_MQTT_GW_24.ino:89:1: error: 'define' does not name a type You may have deleted the first character (#) of line 89 so it wrongly read define IS_RFM69HW instead of the correct #define IS_RFM69HW I hope the above gets you on track & again my apology.
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 3, 2017 13:16:30 GMT
I will try it later, many thanks again.
Nick.
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 3, 2017 13:32:32 GMT
Sorry papa, I have another trouble :
Arduino:1.6.3 (Windows 8.1), Scheda:"ATmega328 on a breadboard (8 MHz internal clock)"
Uso la libreria RFM69 nella cartella: D:\Program Files (x86)\Arduino\libraries\RFM69 (legacy)
Uso la libreria SPI nella cartella: D:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Uso la libreria Ethernet nella cartella: D:\Program Files (x86)\Arduino\libraries\Ethernet
Uso la libreria PubSubClient nella cartella: D:\Program Files (x86)\Arduino\libraries\pubsubclient
D:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10603 -DARDUINO_AVR_ATMEGA328BB -DARDUINO_ARCH_AVR -ID:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -ID:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -ID:\Program Files (x86)\Arduino\libraries\RFM69 -ID:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -ID:\Program Files (x86)\Arduino\libraries\Ethernet\src -ID:\Program Files (x86)\Arduino\libraries\pubsubclient\src C:\Users\Nicola\AppData\Local\Temp\build4785393638309308925.tmp\RFM_MQTT_GW_24_pub.cpp -o C:\Users\Nicola\AppData\Local\Temp\build4785393638309308925.tmp\RFM_MQTT_GW_24_pub.cpp.o
RFM_MQTT_GW_24_pub.ino: In function 'void setup()':
RFM_MQTT_GW_24_pub.ino:165:21: error: 'mac' was not declared in this scope
Errore durante la compilazione
How I must change the string ?
Thanks
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 3, 2017 18:47:26 GMT
Hi papa,
Which mac address should I put on this line ? byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xBA, 0xBE }; // Gateway's MAC address for Ethernet
Arduino shield or my computer mac adress ?
====================
Thanks to you I made some progress, now I have both led on... but sometimes serial monitor on second node (with dht11) give me no connection and only when I press reset on my gateway serial monitor give me values... Do you know why ?
|
|
|
Post by papa on Feb 3, 2017 19:12:49 GMT
Nick, byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xBA, 0xBE }; // Assigns Gateway's MAC address for Ethernet ^^You can leave this line as it is within the Gateway 2.4 sketch. This will give the Gateway that MAC address which should show up (sometimes after a delay) in your Ethernet router's DHCP list. ============================ I'm glad my mistakes got out of your way & you are making progress. Regarding your Gateway / End Node connection glitches ... Please provide the location references for the instructions you used to build the second node with dht11. Recheck the sockets where you inserted the 3 DHT wires. You may have missed the library changes (in interrupts) that help the Gateway & End Nodes to stay connected: For the Gateway's programming, did you make the necessary changes in the library files, w5100.h & ethernet.h ( In this post that starts with Downloading, Editing, & Installing Libraries", scroll down to & follow the text after "Yes, replace: [Papa: find these lines in w5100.h]")
|
|
|
Post by papa on Feb 4, 2017 19:11:51 GMT
Just before I posted the RFM_MQTT_GW_24_pub.ino version of the gateway, I successfully customized it, verified it, & uploaded to an Arduino Compatible plus w5100 Ethernet Shield. Nick & all, unfortunately when I uncustomized the Gateway sketch, I made some errors ... You got the error that the mac variable had not been declared because ... under // Ethernet settings, I deleted what should be line 73: byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xBA, 0xBE }; // Assigns Gateway's MAC address for Ethernet router (^^ Have this line 73 as it is within the Gateway 2.4 sketch.)Now on 2/4/17 I need to make another correction: In RFM_MQTT_GW_24_pub2 on line 80 had a wrong NETWORKID of 200. NETWORKID should be 100 as in the end node sketch. RFM_MQTT_GW_24_pub4.ino << Here I'm posting what I HOPE is finally a correct Gateway 2.4 sketch (Note it ends in pub 4.ino) My apologies again. I'm disappointed with my errors & the confusion I may have caused. I'll find & update the locations where bad versions were posted.
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 5, 2017 9:17:01 GMT
|
|
|
Post by papa on Feb 5, 2017 15:44:27 GMT
Nick, have you made the library changes for the Gateway that I wrote about a few posts above: If you have not made those library changes yet, do so & then program the Gateway again with the Gateway... pub4 sketch ======================================================= Nick, you said, "I have followed the instructions on this post homeautomation.proboards.com/post/2067" That post 2067 is Step B) Did you do Step A) & have the bare bones end node working before you moved to Step B)?
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 5, 2017 17:34:51 GMT
Hi papa,
I will try... And yes I have done step A and it worked but I kept that configuration just for a while...
|
|
|
Post by papa on Feb 5, 2017 18:56:24 GMT
OK, nick, good that Step A) was "working" for you, but you also said: "now I have both led on... but sometimes serial monitor on second node (with dht11) give me no connection and only when I press reset on my gateway serial monitor give me values." Again I ask, "Did you made those changes in those libraries used by the Gateway sketch? That has often achieved reliable, ongoing communication between the Gateway & End Nodes." If you have not already ... make the necessary changes in the library files, w5100.h & ethernet.h ( See this thread page, the post that starts with " Downloading, Editing, & Installing Libraries" Scroll down to & follow the text after " Yes, replace: [Papa: find these lines in w5100.h]") ^^ Make those library changes & then reprogram the Gateway, upload the Gateway...pub4 sketch which will now use the edited library files.
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 8, 2017 10:27:56 GMT
Hi papa,
After many other troubles (libraries problem) I finally have the nodes working nice, now the next is openhab configurations ... where I can find them? Thanks
|
|
|
Post by papa on Feb 8, 2017 21:59:05 GMT
Nick, good to hear more progress. Getting the Gateway & End Node built & communicating is among the hardest parts to accomplish for beginners. In this thread, with the Feb 8, 2017 posts, I'm providing OpenHAB configuration instructions.
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 10, 2017 14:57:48 GMT
Hi papa,
Thanks to you now I have two nodes working online, I Was changing some settings in the openhab items and sitemap and after I restart all system the apps on my android and on my ipad didn't work anymore but il I try with my.openhab It work ! Do you know which can be the problem? Thanks.
|
|
|
Post by papa on Feb 10, 2017 16:40:10 GMT
You're welcome. It's good to hear a response back on trying suggestions. That helps keep volunteers like me going. nick: "I try with my.openhab It work !" papa: You must mean it works with myopenhab.org. As in this thread, you must have successfully set up with myopenhab.org/login ( No dot between my & openhab). my.openhab (with the dot) recently stopped. nick: "I Was changing some settings in the openhab items and sitemap and after I restart all system the apps on my android and on my ipad didn't work anymore but il I try with my.openhab It work ! Do you know which can be the problem?" papa: My interpretation of what you wrote: It sounds like like you successfully registered as a new user with the new openhab cloud myopenhab.org (no longer my[dot]openhab.org. On a computer, you SUCCESSFULLY accessed your OpenHAB User Interface via the myopenhab.org cloud. However, the Apple / Android OpenHAB apps did NOT connect to your User Interface via the cloud. If my interpretation is correct, it sounds like you may not have updated the settings in the Apple / Android OpenHAB apps. If so in those settings, change the Remote URL from my.openhab.org to myopenhab.org (delete the first dot). If, to log in to myopenhab.org, you a created new password, a password different from what you used for my.openhab.org, then change the password in the OpenHAB app settings. If I am correctly interpreting & identifying the problem, I may have contributed to it: In this thread, the Feb 8, 2017 post that starts "Launch An OpenHAB User Interface on Your Computer," I had an incorrect link for Linux users to use smart phone apps. Thanks to your prompt for me to investigate, the corrected portion now correctly reads & links: Linux: In this thread, find the Feb 3, 2016 post that starts with "This post was restored here on Feb 8, 2017" but skip to "Using the OpenHAB User Interface on Another Computer..." Follow that section & the next Feb 5, 2016 post. ^^^ Link corrected 2/10/2017
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 14, 2017 12:27:56 GMT
Hi papa,
Thanks for your time, I solve the problem doing nothing so I don't know what caused the problem but now it works. Now I'm try to build the mail node but I think some configuration for openhab wrong... Can you give me some input?
Many thanks!
|
|
|
Post by papa on Feb 14, 2017 14:27:13 GMT
You're welcome. Nick: "I solve the problem doing nothing" Yes, sometimes things seem to click & finally start working. That's why I suggest reboots of different components (router, gateway, node). Which instructions did you use to build & program the mail node? Did you look at my thread on a mail node? If one did not want to build a bare bones Arduino, they might power an Anarduino Miniwireless or a lowpower.com Moteino with battery. In that thread, see the May 25, 2016 post that starts with "Mailbox, etc. Node (Software)" That post gives customizing instructions for an EARLIER version of the Multi-Choice End Node sketch. You can use the current sketch version you have, but go by the mentioned content of the lines instead of the line numbers given. In that thread, see the May 25, 2016 post that starts with "OpenHAB config files needed for the Mailbox, etc. Node:"
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 14, 2017 17:47:22 GMT
Hi papa,
Yes I have used that instructions and I modified the configuration of openhab as you wrote but when I close the reed switch in the openhab tab open in my PC I saw the update of the RSSI and voltage but didn't change the state and the time of recived mail... Can be a problem with rules file of openhab?
|
|
|
Post by papa on Feb 15, 2017 3:23:57 GMT
Nick, first, what version of OpenHAB are you using? Next please notice where I added more posts to that Mail Box End Node thread & referred to earlier posts I tweaked. I really did not change or much, mostly clarified & it still works. (It probably should have worked as it was.) Using the Mail Box End Node thread, please try again using a wall-powered Arduino, the later version sketch & customization, & the slightly updated config files. Leave the node attached to the computer's USB. Open the Arduino IDE's Serial Monitor. Have the reed switch open for a bit. Then close it. Post here the results you get on the Serial Monitor & the User Interface.
|
|
nick
New Member
Posts: 11
|
Post by nick on Feb 15, 2017 10:46:59 GMT
Hi papa,
I have openhab 1.8.x (maybe 3), I have tried one more time and now it works ( on the serial monitor I have the same result as you) but I don't like how it work because I want something like the uber mail node: with email and sound notifications; not only time update. I have tried to adapt those configuration but didn't work. Thanks for your time.
|
|
|
Post by papa on Feb 15, 2017 14:19:41 GMT
You're welcome, nick. I'm glad my mail box node version worked as set up. It should. I had used it with openHAB 1.8.x & used it yesterday with OpenHAB 2. As I said in the mail box node thread, reviewing it currently, I see the programming might be better. I'll have to revisit it sometime. See this thread about email notifications.
|
|