Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Mozilla WebThings Gateway
  4. MySensor Controller Config - Imperial (false) setting
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

MySensor Controller Config - Imperial (false) setting

Scheduled Pinned Locked Moved Mozilla WebThings Gateway
18 Posts 3 Posters 1.1k Views 2 Watching
  • 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.
  • R Offline
    R Offline
    rmalbers
    wrote on last edited by
    #1

    Ok, this driving me nuts: I can't find any doc that shows how to change the default ControllerConfig from Metric (true) to Imperial (false). I'm seeing some years old stuff where there was a setting in an include file but that's not there anymore. How to I set/change the controller config to false in the mysensors gateway so when my sensor code does a getControllerConfig call it returns a 'false'?

    mfalkviddM 1 Reply Last reply
    0
    • R rmalbers

      Ok, this driving me nuts: I can't find any doc that shows how to change the default ControllerConfig from Metric (true) to Imperial (false). I'm seeing some years old stuff where there was a setting in an include file but that's not there anymore. How to I set/change the controller config to false in the mysensors gateway so when my sensor code does a getControllerConfig call it returns a 'false'?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @rmalbers which controller are you using?

      The gateway will return whatever setting your controller is using.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rmalbers
        wrote on last edited by
        #3

        Ok, for sensor value display I am using Mozilla WebThings gateway connected to a MySensors 8266 wifi/NRF24 gateway receiving data from MySensors temp/hum sensors.

        mfalkviddM 1 Reply Last reply
        0
        • R rmalbers

          Ok, for sensor value display I am using Mozilla WebThings gateway connected to a MySensors 8266 wifi/NRF24 gateway receiving data from MySensors temp/hum sensors.

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by mfalkvidd
          #4

          Thanks for explaining

          So Mozilla WebThings is your controller. Its MySensors support is very new (it exists thanks to @Sathishkumar-Thangavel and @alowhum )

          I have no experience with this controller, but hopefully someone else has. I moved the thread to the Mozilla WebThings category where it might get noticed by the right people.

          R 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            Thanks for explaining

            So Mozilla WebThings is your controller. Its MySensors support is very new (it exists thanks to @Sathishkumar-Thangavel and @alowhum )

            I have no experience with this controller, but hopefully someone else has. I moved the thread to the Mozilla WebThings category where it might get noticed by the right people.

            R Offline
            R Offline
            rmalbers
            wrote on last edited by
            #5

            @mfalkvidd Thank you, I was unsure where to post the question and as you can tell, unsure what code was responsible for the C or F setting.

            1 Reply Last reply
            1
            • alowhumA Offline
              alowhumA Offline
              alowhum
              Plugin Developer
              wrote on last edited by alowhum
              #6

              @rmalbers This isn't implemented in the Mozilla Gateway yet. Until it is, the MySensors add-on can't send the proper response (it's probably always saying metric now?), since there is no data to work from.

              I could, for the time being, perhaps implement a setting in the add-on settings instead. I'll have a look.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rmalbers
                wrote on last edited by
                #7

                Ya, I think I saw the message with the 'M' at the end in the log file. You know, I was kind of wondering about a setting like that, that would be really slick. One thing that is odd, I have the 'Weather' addon installed using 'Dark Sky' as the weather source and on that 'thing', it shows Temp in degrees 'F' and is shows up as a 'temperature sensor' when I go into 'Edit' for that 'thing' so there must be some kind of support for 'F' for a Temp sensor WebThings somewhere.

                1 Reply Last reply
                0
                • alowhumA Offline
                  alowhumA Offline
                  alowhum
                  Plugin Developer
                  wrote on last edited by
                  #8

                  I've created the setting. It should be in the next version. First I'll do a few tests.

                  For now, I've made it so that if you set it to Imperial, temperature sensors will show the data as being in Fahrenheit.

                  Once the WebThings Gateway has that preference available (perhaps it already has, although I didn't see anything in the code), I will link it to that. I don't think I've seen a 'metric or imperial' setting in the UX though.

                  R 1 Reply Last reply
                  0
                  • alowhumA alowhum

                    I've created the setting. It should be in the next version. First I'll do a few tests.

                    For now, I've made it so that if you set it to Imperial, temperature sensors will show the data as being in Fahrenheit.

                    Once the WebThings Gateway has that preference available (perhaps it already has, although I didn't see anything in the code), I will link it to that. I don't think I've seen a 'metric or imperial' setting in the UX though.

                    R Offline
                    R Offline
                    rmalbers
                    wrote on last edited by rmalbers
                    #9

                    @alowhum Wow great, thanks for getting that in there, that should help other users out also as they fire this code up. So many of the mysensors examples use that config setting that I'm sure others would request that addition to the the addon.

                    R 1 Reply Last reply
                    0
                    • R rmalbers

                      @alowhum Wow great, thanks for getting that in there, that should help other users out also as they fire this code up. So many of the mysensors examples use that config setting that I'm sure others would request that addition to the the addon.

                      R Offline
                      R Offline
                      rmalbers
                      wrote on last edited by
                      #10

                      FYI: I just looked and the 'Weather' addon does have a setting for F or C in the addon config, so that makes more since now.

                      1 Reply Last reply
                      0
                      • alowhumA Offline
                        alowhumA Offline
                        alowhum
                        Plugin Developer
                        wrote on last edited by
                        #11

                        @rmalbers Ah, thanks. Then it makes sense to add it to this add-on too.

                        R 1 Reply Last reply
                        0
                        • alowhumA alowhum

                          @rmalbers Ah, thanks. Then it makes sense to add it to this add-on too.

                          R Offline
                          R Offline
                          rmalbers
                          wrote on last edited by rmalbers
                          #12

                          @alowhum You know, I sort of misspoke, just to be more accurate: it's (the setting is) actually imperial or metric, I guess it's really more than just C and F, I simplified (and I shouldn't have). This is how it's stated on the addon: "Units to use, i.e. imperial for ˚F, metric for ˚C"

                          1 Reply Last reply
                          0
                          • alowhumA Offline
                            alowhumA Offline
                            alowhum
                            Plugin Developer
                            wrote on last edited by
                            #13

                            It works. The new version is getting closer to release.

                            R 1 Reply Last reply
                            1
                            • alowhumA alowhum

                              It works. The new version is getting closer to release.

                              R Offline
                              R Offline
                              rmalbers
                              wrote on last edited by
                              #14

                              @alowhum Great thanks!

                              R 1 Reply Last reply
                              0
                              • R rmalbers

                                @alowhum Great thanks!

                                R Offline
                                R Offline
                                rmalbers
                                wrote on last edited by
                                #15

                                I didn't know for sure which thread to put this update under but I'll put it here: I updated to the new add-on version. I rebooted everything and I can confirm this the 'imperial' setting is working with my sensors. I had one sensor that has the code in it to check that setting and before I was getting the reading in C and the C label. Now with that sensor I am getting a F reading and a F label. GREAT! I did have to reboot a couple of things more than once! At this point I'm wondering that the boot order should be. Also I'm thinking that I need to unplug everything in the chain and plug things back in the right order, like Mozzilla gatewat first, then the MySensors gateway, the plug the MySensor sensors back in to get it all to work right. Anyway, this is really looking good!

                                1 Reply Last reply
                                1
                                • alowhumA Offline
                                  alowhumA Offline
                                  alowhum
                                  Plugin Developer
                                  wrote on last edited by
                                  #16

                                  Glad to hear it :-)

                                  it shouldn't matter much, but in theory the order is:

                                  • plug in serial MySensors Gateway
                                  • reboot Mozilla Gateway
                                  • reboot your nodes
                                  1 Reply Last reply
                                  0
                                  • R Offline
                                    R Offline
                                    rmalbers
                                    wrote on last edited by
                                    #17

                                    Looks like I got the V0.9 Mozilla Gateway update last night, everything seems to be working fine. I now have a decimal digit on my temp readings that was not there prior to the upgrade. (73.4 F now, 73 F previous version)

                                    alowhumA 1 Reply Last reply
                                    2
                                    • R rmalbers

                                      Looks like I got the V0.9 Mozilla Gateway update last night, everything seems to be working fine. I now have a decimal digit on my temp readings that was not there prior to the upgrade. (73.4 F now, 73 F previous version)

                                      alowhumA Offline
                                      alowhumA Offline
                                      alowhum
                                      Plugin Developer
                                      wrote on last edited by
                                      #18

                                      @rmalbers Thanks for reporting!

                                      1 Reply Last reply
                                      1
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      16

                                      Online

                                      11.7k

                                      Users

                                      11.2k

                                      Topics

                                      113.0k

                                      Posts


                                      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • OpenHardware.io
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular