Windows GUI/Controller for MySensors
-
@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.
-
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.
@gonzalonal
OTA updates for sleeping nodes with MYSBootloader:- add gw.wait(200) after the gw.send() (=node processes incoming messages for 200ms after sending a message)
- In MYSController, right-click on the node, select "Battery-powered / sleeping", then assign FW, confirm to reboot node (reboot request is now queued)
MYSController will now wait until it receives a message from that node, send the reboot command and hence, initiate OTA update.
-
@gonzalonal
OTA updates for sleeping nodes with MYSBootloader:- add gw.wait(200) after the gw.send() (=node processes incoming messages for 200ms after sending a message)
- In MYSController, right-click on the node, select "Battery-powered / sleeping", then assign FW, confirm to reboot node (reboot request is now queued)
MYSController will now wait until it receives a message from that node, send the reboot command and hence, initiate OTA update.
@tekka Great Tekka, thanks again. I will try that.
Regards. -
Hi,
I am trying to debug a mysensors temp. sensor using this tool (it is not detected by Domoticz). I connected the serial gateway to your program and when I turn the temperature sensor, I see that there is traffic back and forth between the gateway and the sensor. But my knowledge stops there.... any pointers? I can upload a screenshot of the log if it helps.
Thanks
Z. -
Hi,
I am trying to debug a mysensors temp. sensor using this tool (it is not detected by Domoticz). I connected the serial gateway to your program and when I turn the temperature sensor, I see that there is traffic back and forth between the gateway and the sensor. But my knowledge stops there.... any pointers? I can upload a screenshot of the log if it helps.
Thanks
Z. -
Hey guys,
maybe anyone can help. I tried to debug my sensors, but didn't got MYSController to talk with my gateway.
I have the NRF24L01+ directly connected to my rPi and can use the Gateway with Pimatic plugin. Then I tried different ways to give MYSController access:- redirecting the serial gateway to tcp port (tried ser2net and socat) to use ethernet option, but didn't got this to work.
- creating a new gateway using a spare nano with NRF24L01+ at my PC. This one worked, but the gateway didn't noticed my nodes. Are they somehow coded to only talk with the gateway they know? I waited serveral minuters (sensors reporting each minute), but didn't got any readings. I assume this programm has an auto update to show now nodes, right?
Hope someone can help, I would realy love the option to debug using my windows PC and in future upload new sketches OTA (with new bootloader).
Regards,
Anduril -
I have followed the procedure listed and that mentioned in post 77. Pro Mini 3.3v 8mhz Arduino.
I keep getting the following message in the debug window every few minutes. Have repeated the process in post 77 several times however get the same results.
[2015-09-01 18:09:17.276 Info] DEBUG Undefined firmware/type for node=2
[2015-09-01 18:09:17.323 Info] INFO BL version=257
[2015-09-01 18:09:17.354 Info] INFO Send FW info to node 2: type=A, version=1, blocks=0x0048, CRC=0xD098
[2015-09-01 18:09:17.386 Info] TX 2;0;4;0;1;0A000100480098D0
[2015-09-01 18:09:17.417 Info] RX 2;255;4;0;0;FFFFFFFFFFFFFFFF0101Any pointers??