• Categories
  • Recent
  • Tags
  • Popular
  • Register
  • Login
  • Categories
  • Recent
  • Tags
  • Popular
  • Register
  • Login

OTA firmware update with external MQTT broker

Scheduled Pinned Locked Moved General Discussion
46 Posts 6 Posters 31.6k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    yd @jkandasa
    last edited by 9 Nov 2016, 12:13

    @jkandasa Is there any easy update Snapshot version. Just overwrite all files?

    J 1 Reply Last reply 9 Nov 2016, 14:16 Reply Quote 0
    • J Offline
      jkandasa @yd
      last edited by 9 Nov 2016, 14:16

      @yd SNAPSHOT build is available here with upgrade instruction.

      1 Reply Last reply Reply Quote 0
      • I Offline
        imedia
        last edited by 9 Nov 2016, 15:55

        @jkandasa ,

        I loaded your latest snapshot, I am not getting the following error, OTA firmware update no longer seems to work either.

        ERROR [Thread-5] [org.mycontroller.standalone.message.MessageMonitorThread:123] Throws exception while processing!, [RawMessage(gatewayId=1, data=1;255;4;0;2;010001007E04, subData=null, isTxMessage=false, networkType=MY_SENSORS, timestamp=1478706446658)]
        java.lang.IndexOutOfBoundsException: Index: 18400, Size: 1024
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.mycontroller.standalone.message.McMessageEngine.procressFirmwareRequestMySensors(McMessageEngine.java:552)
        at org.mycontroller.standalone.message.McMessageEngine.streamSubMessageTypeSelector(McMessageEngine.java:489)
        at org.mycontroller.standalone.message.McMessageEngine.execute(McMessageEngine.java:136)
        at org.mycontroller.standalone.message.McMessageEngine.run(McMessageEngine.java:1148)
        at org.mycontroller.standalone.message.McMessageUtils.sendToMcMessageEngine(McMessageUtils.java:616)
        at org.mycontroller.standalone.provider.mysensors.MySensorsProviderBridge.executeRawMessage(MySensorsProviderBridge.java:58)
        at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:562)
        at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:112)
        at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:191)
        at java.lang.Thread.run(Thread.java:745)
        2016-11-09 10:47:30,960 ERROR [Thread-5] [org.mycontroller.standalone.message.MessageMonitorThread:123] Throws exception while processing!, [RawMessage(gatewayId=1, data=1;255;4;0;2;010001007E04, subData=null, isTxMessage=false, networkType=MY_SENSORS, timestamp=1478706450936)]
        java.lang.IndexOutOfBoundsException: Index: 18400, Size: 1024
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.mycontroller.standalone.message.McMessageEngine.procressFirmwareRequestMySensors(McMessageEngine.java:552)
        at org.mycontroller.standalone.message.McMessageEngine.streamSubMessageTypeSelector(McMessageEngine.java:489)
        at org.mycontroller.standalone.message.McMessageEngine.execute(McMessageEngine.java:136)
        at org.mycontroller.standalone.message.McMessageEngine.run(McMessageEngine.java:1148)
        at org.mycontroller.standalone.message.McMessageUtils.sendToMcMessageEngine(McMessageUtils.java:616)
        at org.mycontroller.standalone.provider.mysensors.MySensorsProviderBridge.executeRawMessage(MySensorsProviderBridge.java:58)
        at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:562)
        at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:112)
        at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:191)
        at java.lang.Thread.run(Thread.java:745)

        J 2 Replies Last reply 9 Nov 2016, 16:12 Reply Quote 0
        • J Offline
          jkandasa @imedia
          last edited by 9 Nov 2016, 16:12

          @imedia Thanks to report this. Let me have a look.

          1 Reply Last reply Reply Quote 0
          • J Offline
            jkandasa @imedia
            last edited by 9 Nov 2016, 16:20

            @imedia I do not see error on my side, Could please post screenshot of firmware page, As shown here,

            0_1478708296561_upload-d89ddd46-20f6-4f9b-b6f2-6da4f1389a51

            1 Reply Last reply Reply Quote 0
            • I Offline
              imedia
              last edited by 9 Nov 2016, 16:49

              0_1478710137914_upload-a47deee1-deee-4f89-9c8c-f66c6425ae29

              Not sure what is up, I rebooted flashed the bootloader again on the node and deleted re-added the node and now it works. Also not getting the error either.

              1 Reply Last reply Reply Quote 0
              • I Offline
                imedia
                last edited by 9 Nov 2016, 17:56

                I've been testing more... It seems that in order for the new firmware to be loaded to the node and then show as running in MyController the node needs a hard reset (pull power and restore). Issuing reboots from the controller does not seem to work.

                I've yet to figure out what combination of things is actually triggering the update though. I just keep trying different things and eventually it works. But consistently the new firmware version will not be shown in MyController until a hard reset on the node is completed.

                I'm using 5v 16Mhz Pro Mini.

                I've also noticed that once the firmware version has been put on a node I can't re-send the same version, I need to increment the versions everywhere. Is this correct or should I be able to re-flash with the same firmware version by issuing the command?

                J 1 Reply Last reply 10 Nov 2016, 00:21 Reply Quote 0
                • J Offline
                  jkandasa @imedia
                  last edited by 10 Nov 2016, 00:21

                  @imedia said:

                  Issuing reboots from the controller does not seem to work.

                  I do not know what causes this issue for you. Hence I could not reproduce this issue locally in my environment. I am using pro mini 5 volt cloned version and MySensors version 2.0.1-beta

                  I've also noticed that once the firmware version has been put on a node I can't re-send the same version, I need to increment the versions everywhere. Is this correct or should I be able to re-flash with the same firmware version by issuing the command?

                  Yes, this is known limitation on MySensors. To avoid firmware update on every reboot. If you have any changes on your firmware, your CRC will be changed. Then node will consider it a new firmware. Node will check three things type, version and CRC, if either once is changed node assumes that there is anew firmware available for me and run firmware update.

                  Y 2 Replies Last reply 10 Nov 2016, 04:17 Reply Quote 0
                  • Y Offline
                    yd @jkandasa
                    last edited by 10 Nov 2016, 04:17

                    @jkandasa Hi jkandasa,
                    I did upgrade with SNAPSHOT version from google drive.
                    Seems it works fine but I'm unable to select firmware from node. There are many firmware in utilities.
                    Do you know this issue?
                    Thank you in advance.

                    1 Reply Last reply Reply Quote 0
                    • Y Offline
                      yd @jkandasa
                      last edited by 10 Nov 2016, 04:24

                      @jkandasa Oh, it works now. I have to restart after restore from backup.
                      After restart server then I'm able to see all firmware^^ however I can't see smart sleep option on firefox.
                      I can see it on chrome.

                      J 1 Reply Last reply 10 Nov 2016, 04:52 Reply Quote 0
                      • J Offline
                        jkandasa @yd
                        last edited by 10 Nov 2016, 04:52

                        @yd Thanks to report this. Could you please remove your browser cache on firefox. It could be a firefox browser caching issue.

                        Please report SmartSleep support status with MyController. I didn't test this feature as I do not have any SmartSellp node.

                        Thank you!

                        Y 1 Reply Last reply 10 Nov 2016, 07:23 Reply Quote 0
                        • Y Offline
                          yd @jkandasa
                          last edited by 10 Nov 2016, 07:23

                          @jkandasa You are right. It's working now after clear cache. There is no plan to firmware upgrade at this moment. I will let you know when I do test this function.

                          1 Reply Last reply Reply Quote 1
                          • Y Offline
                            yd
                            last edited by 10 Nov 2016, 11:02

                            I can confirm smartsleep works fine with mysensors 2.0.0 (battery powered arduino pro mini 3.3V )
                            Thank you for your support! This is awesome controller!

                            1 Reply Last reply Reply Quote 1
                            • D Offline
                              Doug @jkandasa
                              last edited by 16 Nov 2016, 20:21

                              @jkandasa

                              Hi SmartSleep is now working for me thank you this is great I haven't yet tested all the commands but have noticed you are forced to enter a sensor ID as well as the node id on internal commands such as reboot and present when the sensor id is not relevant.

                              I have also noticed that the name field doesn't seem to get updated when a presentation request is made after first registration. This may be intentional though as people may wish to display a different name to that presented. May be worth having a name field and a known as field just a thought.

                              I'm attempting to get OTA updates working using dualoptiboot. I have it operating using MYScontroller so know the nodes are accepting the firmware ok. In your post you mention for dualoptiboot you need to click Update firmware. Any help on where I may find this in the UI would be appresiated.

                              On a testing front I have noticed a few small niggles one of those being the filter and sort options at the top of each page don't seem to persist past page refreshes.

                              Hope this is helpful

                              J 1 Reply Last reply 17 Nov 2016, 01:38 Reply Quote 0
                              • J Offline
                                jkandasa @Doug
                                last edited by 17 Nov 2016, 01:38

                                @Doug

                                I haven't yet tested all the commands but have noticed you are forced to enter a sensor ID as well as the node id on internal commands such as reboot and present when the sensor id is not relevant.

                                I hope you passing commands via Send Raw message page. Which is not require. Suppose if you want to reboot smartsleep node. Just select that node on Resources >> Nodes >> your node on actions click on Reboot. This command will be send to SmartSleep node when it talks to MyController.

                                I have also noticed that the name field doesn't seem to get updated when a presentation request is made after first registration. This may be intentional though as people may wish to display a different name to that presented. May be worth having a name field and a known as field just a thought.

                                Yes, this is addresses on this requirement. However if your node sends some name will be overridden. It will not change only when node sends NULL or "" no values.

                                I'm attempting to get OTA updates working using dualoptiboot. I have it operating using MYScontroller so know the nodes are accepting the firmware ok. In your post you mention for dualoptiboot you need to click Update firmware. Any help on where I may find this in the UI would be appresiated.

                                I believe it should be on user manual. And here is the steps.

                                • Update your firmware under Utilities >> Firmwares
                                • Edit your node and select your uploaded firmware for a node [Resources >> Nodes >> select a node and on actions Edit] finally save the configuration.
                                  *MyController ready to send your firmware to your node. Select your node under Resources >> Nodes >> your node and on actions select Upload firmeware

                                On a testing front I have noticed a few small niggles one of those being the filter and sort options at the top of each page don't seem to persist past page refreshes.

                                Yes, This is known limitation. If possible I will address this. Kindly create a ticket on github project page

                                Hope I have addressed your queries.

                                M 1 Reply Last reply 4 Jan 2019, 11:04 Reply Quote 0
                                • M Offline
                                  Marcel @jkandasa
                                  last edited by 4 Jan 2019, 11:04

                                  I am very new to this. Sorry for stupid questions.

                                  @jkandasa I have still issues with OTA. It is uploading spontaneously to a wrong node? Anyone here has maybe a bootfile for 8MHZ node which should work correctly? (Also serial works?) and is there a clear description of how it should work. I have added the firmware but if I select the node and upload firmware I cannot select the firmware version only with the edit mode.

                                  Thanks for any help.

                                  skywatchS jkandasaJ 2 Replies Last reply 6 Jan 2019, 09:12 Reply Quote 0
                                  • skywatchS Offline
                                    skywatch @Marcel
                                    last edited by 6 Jan 2019, 09:12

                                    @Marcel said in OTA firmware update with external MQTT broker:

                                    I am very new to this. Sorry for stupid questions.

                                    The only stupid questions are the ones you don't ask!

                                    We are all on a learning curve here and it takes time. Stick with it!

                                    OTA I have not tried yet, but will in the coming months as I have outdoor nodes that would benefit from this. So if you get it going, please tell us how! 😉

                                    M 1 Reply Last reply 12 Jan 2019, 08:49 Reply Quote 1
                                    • jkandasaJ Offline
                                      jkandasa @Marcel
                                      last edited by 7 Jan 2019, 06:05

                                      @Marcel Can you post some of the screenshots? I will help us to understand easily.

                                      M 1 Reply Last reply 12 Jan 2019, 08:46 Reply Quote 0
                                      • M Offline
                                        Marcel @jkandasa
                                        last edited by 12 Jan 2019, 08:46

                                        @jkandasa

                                        I am trying to understand the logic of the program. But what I expect is the following:

                                        2019-01-12 09_31_00-MyController.org - The Open Source Controller.png

                                        When I press the upload firmware I see a list where I can choose the firmware from and upload it. But that seems not the case after trail and error. So let me explain what I think it works.

                                        When I have a new node, this will publish an auto node ID. Then I cannot upload new firmware because if I do this the default firmware will be loaded ? I am not sure if that is even possible with manually assigned numberings of nodes.
                                        So the next step is that I press edit on the new node and assign the firmware to it (that I added to utilities\firmware tab) and save this and the press the above button upload firmware? This seems to work but I am not sure if this is the correct process as I find this not very logical.

                                        When I would like to update a node, I add the software again to the utilities\firmware tab, edit the specific node and assign this new software and do the upload firmware again? Correct?

                                        The part where it did goes wrong is that I put the default switch on for firmware as I saw errors in the logging about this. Then this will upload software (which is already on another node) to the new node and you get duplicated node numbers.

                                        So preferable, I would like to see. Add also the possibility that you have a split menu. Upload Assigned/default firmware or upload firmware where you get a popup and select the one you would like to upload to your node.

                                        Secondly, I had a problem with my boot software. The first time it advertises itself and after the upload of the new firmware, I could never upload new firmware again. I have downloaded the MySensors Bootloader and recompiled it for my hardware (slim node atMega328p 8MHz) and this bootloader seems to work okay 🙂

                                        jkandasaJ 1 Reply Last reply 15 Jan 2019, 03:34 Reply Quote 0
                                        • M Offline
                                          Marcel @skywatch
                                          last edited by 12 Jan 2019, 08:49

                                          @skywatch
                                          Thanks 🙂

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          1

                                          Online

                                          587

                                          Users

                                          529

                                          Topics

                                          3.4k

                                          Posts
                                          Copyright © 2015-2025 MyController.org | Contributors | Localization