Windows GUI/Controller for MySensors
-
@tekka, I've being playing with MYSController and MYSBootloader over last days, I'm totally amazed by them ;-) Thank you so much for developing such nice tool!
If you allow me, I have only one ask for the santa-claus list: Perhaps it is possible for MYSBootloader capture serial output from a node, allowing OTA Serial monitor via MYSController? I know you guys are doing a miracle within 2KB, but who knows...
Again, thanks a lot!
-
@cdr said:
@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!
:+1:@tekka is there a way to change the default channel in MYSbootloader ?
-
What ware the designed values for "type" in the fimware_config.csv?
Can I use this variable for my sensor IDs? -
This sounds like a great app! What is the current status? I clicked on the link in the OP expecting it would connect with GitHub (where there might be a ReadMe.txt which tells what the current status is), but instad of that it just downloaded the app right then and there! There are now 197 posts on this thread, which is a bit many to sort through to find the status....
Move it to Github?
-
@tekka, I've being playing with MYSController and MYSBootloader over last days, I'm totally amazed by them ;-) Thank you so much for developing such nice tool!
If you allow me, I have only one ask for the santa-claus list: Perhaps it is possible for MYSBootloader capture serial output from a node, allowing OTA Serial monitor via MYSController? I know you guys are doing a miracle within 2KB, but who knows...
Again, thanks a lot!
@rvendrame said:
@tekka, I've being playing with MYSController and MYSBootloader over last days, I'm totally amazed by them ;-) Thank you so much for developing such nice tool!
If you allow me, I have only one ask for the santa-claus list: Perhaps it is possible for MYSBootloader capture serial output from a node, allowing OTA Serial monitor via MYSController? I know you guys are doing a miracle within 2KB, but who knows...
Again, thanks a lot!
Thanks, I'm glad you like the tools. :)
Unfortunately your suggestion is not possible: bootloader and sketch run sequentially, not in parallel, and thus, cannot communicate with each other. -
This sounds like a great app! What is the current status? I clicked on the link in the OP expecting it would connect with GitHub (where there might be a ReadMe.txt which tells what the current status is), but instad of that it just downloaded the app right then and there! There are now 197 posts on this thread, which is a bit many to sort through to find the status....
Move it to Github?
@NeverDie said:
This sounds like a great app! What is the current status? I clicked on the link in the OP expecting it would connect with GitHub (where there might be a ReadMe.txt which tells what the current status is), but instad of that it just downloaded the app right then and there! There are 197 posts on this thread, which is a bit many to sort through to find the status....
Move it to Github?
The first post is updated once a new version is released :)
-
@NeverDie said:
This sounds like a great app! What is the current status? I clicked on the link in the OP expecting it would connect with GitHub (where there might be a ReadMe.txt which tells what the current status is), but instad of that it just downloaded the app right then and there! There are 197 posts on this thread, which is a bit many to sort through to find the status....
Move it to Github?
The first post is updated once a new version is released :)
@tekka said:
@NeverDie said:
This sounds like a great app! What is the current status? I clicked on the link in the OP expecting it would connect with GitHub (where there might be a ReadMe.txt which tells what the current status is), but instad of that it just downloaded the app right then and there! There are 197 posts on this thread, which is a bit many to sort through to find the status....
Move it to Github?
The first post is updated once a new version is released :)
So then, as far as status goes, based on the version number, I guess it's still an unstable alpha release? Am I reading between the lines correctly?
I did download it, and I can see that the files are from 7/25/2015, but there's no readme or other indication as to its status.
I imagine others probably have the same question....
-
@tekka said:
@NeverDie said:
This sounds like a great app! What is the current status? I clicked on the link in the OP expecting it would connect with GitHub (where there might be a ReadMe.txt which tells what the current status is), but instad of that it just downloaded the app right then and there! There are 197 posts on this thread, which is a bit many to sort through to find the status....
Move it to Github?
The first post is updated once a new version is released :)
So then, as far as status goes, based on the version number, I guess it's still an unstable alpha release? Am I reading between the lines correctly?
I did download it, and I can see that the files are from 7/25/2015, but there's no readme or other indication as to its status.
I imagine others probably have the same question....
-
@tekka said:
Unfortunately your suggestion is not possible: bootloader and sketch run sequentially, not in parallel, and thus, cannot communicate with each other.
Maybe by re-implementing serial.print methods, in order to first checking which FW is installed, and if MYSBootloader, re-direct the output to a internal radio message? Just brainstorming....
-
-
Du you all connect the controller direct to the gateway?
I have a serial gateway which is connected directly to a raspberry running domoticz. I can rum ser2net and then connect the MYSController via ethernet. While ser2net is running, domoticz does not get any data from the gateway.
Has anyone found a solution to use both, MYSController and a controller software (e.g. domoticz) in parallel?
-
-
@tekka said:
Unfortunately your suggestion is not possible: bootloader and sketch run sequentially, not in parallel, and thus, cannot communicate with each other.
Maybe by re-implementing serial.print methods, in order to first checking which FW is installed, and if MYSBootloader, re-direct the output to a internal radio message? Just brainstorming....
@rvendrame said:
@tekka said:
Unfortunately your suggestion is not possible: bootloader and sketch run sequentially, not in parallel, and thus, cannot communicate with each other.
Maybe by re-implementing serial.print methods, in order to first checking which FW is installed, and if MYSBootloader, re-direct the output to a internal radio message? Just brainstorming....
I like the idea, but again, the bootloader cannot handle that.
However, we may think about implementing an OTA serial monitor in the library, let's say re-routing the serial output and transmit it via a dedicated debug sensor instance back to the GW...@hek, what do you think about that? -
Hi Tekka.
Great software, thanks for sharing.I 've being doing some tests and found a problem that seems to be related to my own sketches.
When I upload through OTA the TimeReporter sketch, it uploads fine, and I am able to change the firmware afterward for another one.
But when I upload my own sketch, It uploads fine, and works fine, but it stops to answer MYScontroller commands, such as reboot or assing firmware. So I am stuck with that sketch in that node. To flash another sketch in that node, I have to reflash MYSBootloader again via usbASP and later on, upload the desire sketch wit MYSController.Am I skiping something in my code that allows MYSBootloader to respond to MYSController commands?
Could you please upload the TimeReporter.ino sketch as example of a working sketch with MYSController/MYSBootloader?Thanks, regards!
Gonzalo
-
Hi Tekka.
Great software, thanks for sharing.I 've being doing some tests and found a problem that seems to be related to my own sketches.
When I upload through OTA the TimeReporter sketch, it uploads fine, and I am able to change the firmware afterward for another one.
But when I upload my own sketch, It uploads fine, and works fine, but it stops to answer MYScontroller commands, such as reboot or assing firmware. So I am stuck with that sketch in that node. To flash another sketch in that node, I have to reflash MYSBootloader again via usbASP and later on, upload the desire sketch wit MYSController.Am I skiping something in my code that allows MYSBootloader to respond to MYSController commands?
Could you please upload the TimeReporter.ino sketch as example of a working sketch with MYSController/MYSBootloader?Thanks, regards!
Gonzalo
@gonzalonal said:
Hi Tekka.
Great software, thanks for sharing.I 've being doing some tests and found a problem that seems to be related to my own sketches.
When I upload through OTA the TimeReporter sketch, it uploads fine, and I am able to change the firmware afterward for another one.
But when I upload my own sketch, It uploads fine, and works fine, but it stops to answer MYScontroller commands, such as reboot or assing firmware. So I am stuck with that sketch in that node. To flash another sketch in that node, I have to reflash MYSBootloader again via usbASP and later on, upload the desire sketch wit MYSController.Am I skiping something in my code that allows MYSBootloader to respond to MYSController commands?
Could you please upload the TimeReporter.ino sketch as example of a working sketch with MYSController/MYSBootloader?Thanks, regards!
Gonzalo
There is nothing special about the sketch, except of calling gw.process() as often as possible. If you have delay() call gw.wait() instead.
For the sake of completeness, here you go:
#include <SPI.h> #include <MySensor.h> #include <Time.h> #include <avr\wdt.h> #define NODE_ID AUTO #define CHILD_ID_GENERAL 0 #define CHILD_ID_POWER 1 #define CHILD_ID_TEMPERATURE 2 #define SketchName "TimeReporter" #define SketchVersion "20150826" #define UPDATE_TIME 100000L #define REPORT_TIME 5000L MySensor gw; boolean timeReceived = false; unsigned long ms_now; unsigned long lastUpdate=0, lastRequest=0; MyMessage msgGeneral(CHILD_ID_GENERAL, V_VAR1); MyMessage msgPower(CHILD_ID_POWER, V_VOLTAGE); MyMessage msgTemperature(CHILD_ID_TEMPERATURE, V_TEMP); void setup() { // watchdog 8s wdt_enable(WDTO_8S); // repeater mode on gw.begin(NULL,NODE_ID,true); // Send sketch version and information gw.sendSketchInfo(SketchName, SketchVersion); // Register sensors to gateway gw.present(CHILD_ID_GENERAL, S_ARDUINO_NODE,"Main node"); gw.present(CHILD_ID_POWER, S_POWER,"ADC power",true); gw.present(CHILD_ID_TEMPERATURE, S_TEMP,"Chip temp"); // request time gw.requestTime(receiveTime); } // time callback void receiveTime(unsigned long time) { // Ok, set incoming time setTime(time); timeReceived = true; } long readMUX(uint8_t aControl) { long result; ADMUX = aControl; delay(20); // Wait for Vref to settle ADCSRA |= _BV(ADSC); // Convert while (bit_is_set(ADCSRA,ADSC)); result = ADCL; result |= ADCH<<8; return result; } long readVcc() { // Read 1.1V reference against AVcc return 1126400L / readMUX(_BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1)); } float readTemp() { // Read 1.1V reference against MUX3 return (readMUX(_BV(REFS1) | _BV(REFS0) | _BV(MUX3)) - 125) * 0.1075; } void loop() { // watchdog reset wdt_reset(); // process incoming messages and repeater function gw.process(); // get millis since start ms_now = millis(); // time update needed? if (timeReceived && ms_now-lastRequest > UPDATE_TIME) { // Request time from controller. gw.requestTime(receiveTime); lastRequest = ms_now; } // report time if (timeReceived && ms_now-lastUpdate > REPORT_TIME) { gw.send(msgGeneral.set(ms_now)); char Output[10]; String OutStr = String(hour()) + ":" + String(minute()) + ":" + String(second()); OutStr.toCharArray(Output,10); gw.send(msgGeneral.set(Output)); gw.send(msgTemperature.set(readTemp(),1)); gw.send(msgPower.set(readVcc()),true); lastUpdate = ms_now; } } -
Thanks Tekka for replying.
Just another silly question.
How should I compile my sketch to later be uploaded into a MYSBootloader Arduino Nano?
Should I compile for "Arduino Nano" or for "ATMega328 16Mhz MYSBootloader"?Thanks, regards.
Gonzalo
-
Thanks Tekka for replying.
Just another silly question.
How should I compile my sketch to later be uploaded into a MYSBootloader Arduino Nano?
Should I compile for "Arduino Nano" or for "ATMega328 16Mhz MYSBootloader"?Thanks, regards.
Gonzalo
-
Ok, thanks for that.
I finally found my problem.
The Node was sleeping most of the time. In spite of waking up twice per second, it was not enough to enter the uploading mode in the mysbootloader, so the node wasn't answering back to the gateway, nor MYSController.Now I have a questions
How can I OTA update/upload the firmware of a sleeping node? Should the gateway, or a relay node, send the upload message to the sleeping node as soon as it wakes up for transmiting its data?
I guess that in order to do that, the sleeping node should always wait for an aknowledge or some kind of message after waking up. I mean:Sleeping node wakes up
Then, it send its data to controller or to relay node
Afterwards, it wait for the controller to acknoledge the data just send, and to tell him (sleeping node) if there is a firmware upgrade for it.
If there's not, go back to sleep. If there is, go to OTA upgrade routine.Thanks, regards.