Great thanks a lot!
Posts made by cdr
-
Need help with NODEMANAGER_CONDITIONAL_REPORT
Hi all,
Is there anyone that can post an example on how to use the conditional report function in Nodemanager (1.8)?
I want to create a sht21 temperature sensor that reports only when the temperature is changed by 1.5 degrees.
Any help welcome
-
RE: MYSBootloader 1.3.0-beta.3
@tsjoender said in MYSBootloader 1.3.0-beta.3:
@cdr @Henry I ran into the same issue. Turned out to be a syntax issue in the boards.txt file. If you change:
MYSBL.menu.frequency.MYSBL16.f_cpu=16000000L
into
MYSBL.menu.frequency.MYSBL16.build.f_cpu=16000000L
Then it works again. Adding build. needs to be done for the other menu entries as well.
thanks a lot!
-
RE: MYSBootloader 1.3.0-beta.3
Hi,
Anyone seen this error on latest 1.3 release? It seems a define is not done for F_CPU, what am I missing here?
Generating function prototypes... In file included from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/MySensors.h:371:0, from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors\examples\GatewayW5100MQTTClient\GatewayW5100MQTTClient.ino:138: C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/core/MyTransport.cpp:777:42: error: operator '>' has no left operand #if defined(MY_GATEWAY_FEATURE) && (F_CPU>16000000) ^ In file included from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/MySensors.h:396:0, from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors\examples\GatewayW5100MQTTClient\GatewayW5100MQTTClient.ino:138: C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/core/MySensorsCore.cpp:479:11: error: operator '>' has no left operand #if (F_CPU>16000000) ^ exit status 1 Error compiling for board ATmega328 with MYSBootloader 1.3.0.
Regards
-
RE: Merry X-mas and Happy New 2018
Thanks for this cool project, wishing all a good 2018!
-
RE: MYSBootloader 1.3.0-beta.3
Hi Tekka,
Happy 2017! Thanks for the update, can you upload a 8Mhz precompiled bootloader? (and update boards.txt)
I'm curious is there a changelog since last version?
-
Measure a node's NRF signal or distance value
Hi All,
I was wondering if there is an easy way to ask for the distance or signal level of an NRF node.
I know there is I_DEBUG, but it seems rather new and I haven't found any docs on that topic.
Anyone?
Regards,
-
RE: 💬 FOTA (Wireless Programming)
Thanks for the explanation, first try didn't work so I suspected the fuses, but turned out to be a voltage issue.
-
RE: 💬 FOTA (Wireless Programming)
For some reason I can't set the extended fuse to 0x06, it always reverts to 0xFE;
avrdude.exe: verifying ...
avrdude.exe: WARNING: invalid value for unused bits in fuse "efuse", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xfe instead of 0x06 (double check with your datasheet first).
avrdude.exe: 1 bytes of efuse verifiedAnyone knows why?
-
RE: Windows GUI/Controller for MySensors
@MarkV you might want to check your "AppData" folder, I noticed the same behaviour and had to change boards.txt in this location.
C:\Users{{user}}\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10
GL
-
RE: MyController - 0.0.3-Alpha2 pre-release - volunteers required to test
great to hear! Please let me test
-
RE: 2.0 beta, compatible with 1.5?
I'm running beta2 for a month and haven't hit a real show stopper.
The new syntax feels cleaner, I use it with a mqttclientgateway and it never went down since start. I upgraded gateway first and then ported my old 1.5 code to 2.0, OTU pushed via Mysloader 1.3 beta, living on the edge!
Don't know about on-the-wire tho.
-
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
@rollercontainer confirmed working with W5100mqtt here!
-
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
Great work, testing now
-
RE: beta testers required for MyController 0.0.3-alpha1 release
do donators get priority?
-
RE: Ethernet gateway example in DEV branch
I'm testing the DEV branch with MQTT and W5100, I use a shield with an included SD-CARD. I had trouble sending messages using MQTT so I tried to debug using plain Ethernet gateway w5100, the same problem seems to occur.
Everything seems to work normal in debug log, but I noticed that I never get a "gateway ready" command. Please note that radio init is good, and I get an IP adress that is reachable.
I tried to enable SOFTSPI and UDP ethernet, but no dice.
Really looking forward to the new w5100 MQTT client gateway! Any advice appreciated. (trying with a w5100 without SD CARD did not change anything)
-
RE: Windows GUI/Controller for MySensors
Hi @tekka,
Thanks for the reply, I created a "clear eeprom" hex and after uploading it is working as expected, the ID resets.
Using the function in Mycontroller however, does not work. Not sure if this is a bug, or perhaps an error caused by an Arduino clone, but the "reassign ID" function is not working as intended here.
Anyone here that got it working as intended?
-
RE: Windows GUI/Controller for MySensors
I use MYSbootloader, but can neither get "reassign ID", nor "clear eeprom" functions to work.
I guess I could make a cleareeprom hex, but that feels like a workaround.
-
RE: Windows GUI/Controller for MySensors
Can somebody explain to me how the "Reassing ID" function works in MYScontroller? I haven't been able to change a ID remotely.
ID's keep the same after reboots or power cycles, with or without the AutoID option on.
-
RE: Windows GUI/Controller for MySensors
@tekka I feel really, really, REALLY stupid;
I changed the channel in the mysensors config.h to 77, this was the reason no node would ever show up since the default mysbootloader uses the default channel 76.
D'OH
Thanks for your patience and help, everything is working now and I'm really happy!
-
RE: Windows GUI/Controller for MySensors
It is possible to burn the bootloader to an Arduino Uno right? (if not please skip below and I will rtfm some more)
Could anyone please explain me what I am doing wrong here? I use avrdudess (http://blog.zakkemble.co.uk/avrdudess-a-gui-for-avrdude/) to program the bootloader.hex (also tried the supplied method) but no dice;
Writing the bootloader seems to work;
Detected 1e950f = ATmega328P MYSBootloader.hex: 2.002 / 32.768 Bytes (6,11%) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ avrdude.exe: set SCK frequency to 1500000 Hz avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update. avrdude.exe: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude.exe: Device signature = 0x1e950f avrdude.exe: erasing chip avrdude.exe: set SCK frequency to 1500000 Hz avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update. avrdude.exe: reading input file "C:\Users\codar\Desktop\MYSController_0_1_2_280\Bootloader\MYSBootloader.hex" avrdude.exe: input file C:\Users\codar\Desktop\MYSController_0_1_2_280\Bootloader\MYSBootloader.hex auto detected as Intel Hex avrdude.exe: writing flash (32722 bytes): Writing | ################################################## | 100% 0.00s avrdude.exe: 32722 bytes of flash written avrdude.exe: verifying flash memory against C:\Users\codar\Desktop\MYSController_0_1_2_280\Bootloader\MYSBootloader.hex: avrdude.exe: load data flash data from input file C:\Users\codar\Desktop\MYSController_0_1_2_280\Bootloader\MYSBootloader.hex: avrdude.exe: input file C:\Users\codar\Desktop\MYSController_0_1_2_280\Bootloader\MYSBootloader.hex auto detected as Intel Hex avrdude.exe: input file C:\Users\codar\Desktop\MYSController_0_1_2_280\Bootloader\MYSBootloader.hex contains 32722 bytes avrdude.exe: reading on-chip flash data: Reading | ################################################## | 100% 0.00s avrdude.exe: verifying ... avrdude.exe: 32722 bytes of flash verified
However tech life wouldn't be techlife without days of endless debugging
Setting the extended fuse fails verification
avrdude.exe: reading on-chip flash data: Reading | ################################################## | 100% 0.00s avrdude.exe: verifying ... avrdude.exe: 32722 bytes of flash verified avrdude.exe: reading input file "0xF7" avrdude.exe: writing lfuse (1 bytes): Writing | ################################################## | 100% 0.00s avrdude.exe: 1 bytes of lfuse written avrdude.exe: verifying lfuse memory against 0xF7: avrdude.exe: load data lfuse data from input file 0xF7: avrdude.exe: input file 0xF7 contains 1 bytes avrdude.exe: reading on-chip lfuse data: Reading | ################################################## | 100% 0.00s avrdude.exe: verifying ... avrdude.exe: 1 bytes of lfuse verified avrdude.exe: reading input file "0xDA" avrdude.exe: writing hfuse (1 bytes): Writing | ################################################## | 100% 0.00s avrdude.exe: 1 bytes of hfuse written avrdude.exe: verifying hfuse memory against 0xDA: avrdude.exe: load data hfuse data from input file 0xDA: avrdude.exe: input file 0xDA contains 1 bytes avrdude.exe: reading on-chip hfuse data: Reading | ################################################## | 100% 0.00s avrdude.exe: verifying ... avrdude.exe: 1 bytes of hfuse verified avrdude.exe: reading input file "0xFE" avrdude.exe: writing efuse (1 bytes): Writing | ***failed; ################################################## | 100% 0.03s avrdude.exe: 1 bytes of efuse written avrdude.exe: verifying efuse memory against 0xFE: avrdude.exe: load data efuse data from input file 0xFE: avrdude.exe: input file 0xFE contains 1 bytes avrdude.exe: reading on-chip efuse data: Reading | ################################################## | 100% 0.00s avrdude.exe: verifying ... avrdude.exe: verification error, first mismatch at byte 0x0000 0x06 != 0xfe avrdude.exe: verification error; content mismatch avrdude.exe done. Thank you.
This last error is giving me headaches, why the "first mismatch at byte 0x0000 0x06 != 0xfe" error?
Really hope someone can enlighten me...
-
RE: Windows GUI/Controller for MySensors
Hi tekka,
Thanks for the response and clarification. I think I need more knowledge about fuses and bootloaders, it could be that the arduino clones are giving me sh&t.
Looking forward to my success and MYSloader 2.0 ofcourse!
Thanks again for all your work.
-
RE: Windows GUI/Controller for MySensors
Hello,
First of all, thanks Tekka for the great MYScontroller!
I want to get started with the MYSbootloader but I can't get it to work. I've followed each step securely but I never "see" my arduino in MYScontroller after flashing the bootloader. Perhaps I misunderstand the theory behind the bootloader? Maybe the fuses are wrong, I don't know.
Perhaps someone can reply to the following;
- Can I just attach a radio module to an Arduino Nano as instructed on the site, clear the eeprom and then burn the bootloader using usbasp? (as instructed in this thread) Or do I need to upload the gateway sketch before burning the bootloader?
- I have a hard time understanding what the bootloader does, I think it enables low level nrf functionality for OTA and Myscontroller instructions like reboot and clear eeprom etc. But when I upload a sketch does that mean the bootloader inits the nrf first and then the uploaded sketch will just re-init the nrf again?
- Is there a way to debug the bootloader?
Have a good laugh if you will at these noob questions, but any help is appreciated
-
RE: Request for help building a 433Mhz sender node
The simple Chinese ones yes.
I have, it seems to work and the code already contains a nointerrupt/interrupt to avoid echo's.
-
RE: Request for help building a 433Mhz sender node
Thanks for the replies, I got a working sample which can send and receive 433 Mhz signals.
My skills don't include advanced C code, so this is the best I can do It's working for me, so I'll share my work;
#include <SPI.h> #include <MySensor.h> #include <NewRemoteReceiver.h> #include <NewRemoteTransmitter.h> //project #define SN "RF433Tranceiver" #define SV "1.2.2" //children #define CHILD_ID_RF433_RECEIVER 0 #define CHILD_ID_RF433_TRANSMITTER 1 //pins #define RF433_TRANSMITTER_DIGITAL_PIN 8 #define RF433_RECEIVER_DIGITAL_PIN 3 #define INTERRUPT RF433_RECEIVER_DIGITAL_PIN-2 String combined_received_code; String lastcombined_received_code; MySensor gw; MyMessage msgReceive(CHILD_ID_RF433_RECEIVER, V_IR_SEND); MyMessage msgTransmit(CHILD_ID_RF433_TRANSMITTER, V_VAR1); void setup() { gw.begin(incomingMessage, AUTO, true); gw.sendSketchInfo(SN, SV); gw.present(CHILD_ID_RF433_RECEIVER, S_IR); gw.present(CHILD_ID_RF433_TRANSMITTER, S_IR); NewRemoteReceiver::init(INTERRUPT, RF433_RECEIVER_DIGITAL_PIN, showCode); } void loop() { gw.process(); } void incomingMessage(const MyMessage &message) { //char* getString(char *buffer) const; // NewRemoteTransmitter transmitter(231337, TRANSMITTER_PIN, 260, 3); // address: 231337 // unit: 0 // payload: on,off,0-15 // shutter 11854542 unit 0 on, period: 251us if (message.type == V_VAR1 ) { noInterrupts(); unsigned long address = getValue(message.data, '/', 0).toInt(); byte unit = getValue(message.data, '/', 1).toInt(); String payload = getValue(message.data, '/', 2); //Serial.println(address); //Serial.println(unit); //Serial.println(payload); NewRemoteTransmitter transmitter(address, RF433_TRANSMITTER_DIGITAL_PIN, 260, 5); if (payload == "off" || payload == "on" ) { transmitter.sendUnit(unit, (payload == "on" ) ? true : false); } else { transmitter.sendDim(unit, payload.toInt()); } // transmitter.sendGroup(false); interrupts(); } } // Callback function is called only when a valid code is received. void showCode(NewRemoteCode receivedCode) { // Note: interrupts are disabled. You can re-enable them if needed. combined_received_code = ""; combined_received_code += receivedCode.address; combined_received_code += "/"; if (receivedCode.groupBit) { combined_received_code += "group"; } else { combined_received_code += receivedCode.unit; } combined_received_code += "/"; switch (receivedCode.switchType) { case NewRemoteCode::off: combined_received_code += "off"; break; case NewRemoteCode::on: combined_received_code += "on"; break; case NewRemoteCode::dim: combined_received_code += receivedCode.dimLevel; break; case NewRemoteCode::on_with_dim: combined_received_code += receivedCode.dimLevel; break; } // Length (with one extra character for the null terminator) int str_len = combined_received_code.length() + 1; // Prepare the character array (the buffer) char char_array[str_len]; // Copy it over combined_received_code.toCharArray(char_array, str_len); if (combined_received_code != lastcombined_received_code) { gw.send(msgReceive.set(char_array)); lastcombined_received_code = combined_received_code; } } String getValue(String data, char separator, int index) { int found = 0; int strIndex[] = { 0, -1 }; int maxIndex = data.length() - 1; for (int i = 0; i <= maxIndex && found <= index; i++) { if (data.charAt(i) == separator || i == maxIndex) { found++; strIndex[0] = strIndex[1] + 1; strIndex[1] = (i == maxIndex) ? i + 1 : i; } } return found > index ? data.substring(strIndex[0], strIndex[1]) : ""; }
-
RE: Request for help building a 433Mhz sender node
Thanks for the replies, both solutions regarding dim level are nice and at least save me time.
@Sweebee I was thinking to use a VAR1 like "a=12345,u=1,p=0" maybe not the most elegant solution, the fixed string option feels too complex, having to pad leading zero's. But then again a simple "123456,4,0" should work too.
I guess it's not possible to send multi VAR payloads? That would be the most elegant option I guess. Maybe mysensors 2.0?
-
Request for help building a 433Mhz sender node
Hi all,
First of all my compliments for this fantastic framework, I'm new here and I was trying to improve the wheel many times but using "mysensors" feels like the right way to do things (tm).
I like to connect different things to my domotica system, this time I'm trying to create a 433Mhz sender. I know there are some examples but they don't seem to fit my needs.
What I like to do is create a general 433Mhz sender based on the NewRemoteTransmitter library, the parameters to the sendUnit function should come from the controller (mind the 24byte limit, parameters should include: address,unit and payload all encoded in a single VAR1 payload)
I have some questions, perhaps one of you can help me?
- Is VAR1 for the payload a good choice?
- What is the best way to tranport a multi value payload? (address,unit,payload)
- 433Mhz also supports DIM levels, ranged from 0 to 15, is there an easy method to scale this from 0 to 100?
Many questions for a new user I know, hope to see some feedback
current example code
// 433Mhz transmitter for mysensors.org #include <MySensor.h> #include <SPI.h> #include <NewRemoteTransmitter.h> #define SN "RF433Sender" #define SV "1.0.2" #define TRANSMITTER_PIN 8 #define RF433_CHILD_ID 1 MySensor gw; MyMessage msg(RF433_CHILD_ID, V_VAR1); void setup() { // Attach method for incoming messages gw.begin(incomingMessage, AUTO, true); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo(SN, SV); // Register all sensors to gw (they will be created as child devices) gw.present(RF433_CHILD_ID, S_IR); } void loop() { gw.process(); } void incomingMessage(const MyMessage &message) { if (message.type == V_VAR1 ) { unsigned long address = 231337; // TODO hardcoded int unit = 0; // TODO hardcoded bool payload = message.getBool(); /* Serial.println(address); Serial.println(unit); Serial.println(payload); */ NewRemoteTransmitter transmitter(address, TRANSMITTER_PIN, 260, 3); transmitter.sendUnit(unit, payload ? 1 : 0); } }
-
RE: RF 433 MHz sensor to control RF sockets.
"can't find a working instance od Relay.h."
Having the same issue here, perhaps it's for version 1.3 of mysensors?