Skip to content
  • MySensors
  • 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. PiDome
  4. PiDome Domotica/Home Automation

PiDome Domotica/Home Automation

Scheduled Pinned Locked Moved PiDome
controllerserialgatewayraspberrymqttpidome
199 Posts 17 Posters 110.7k Views 5 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.
  • JohnJ Offline
    JohnJ Offline
    John
    Plugin Developer
    wrote on last edited by John
    #87

    Good! Did you do this manual or just stopped, overwritten and restarted the server? The latter would have precedence ;). Updating happens automatically.

    If you did this manual make sure to execute

    PRAGMA user_version=4;
    

    in the SQL editor to make sure the DB is consistent with the configuration file otherwise the server will keep on trying update the database. To check the version you can run "PRAGMA user_version;" without the "=4" to see which version it currently is.

    Report any findings you have so i can make the plugin better!

    My Domotica project: http://www.pidome.org

    1 Reply Last reply
    0
    • tbowmoT Offline
      tbowmoT Offline
      tbowmo
      Admin
      wrote on last edited by
      #88

      I shutdown the server, put the file 4.sql in the Database/private/update directory, also updated mysensors.default.config to reflect latest db version, and then restarted the server.

      In the meantime while trying to add sensors, I have replaced the entire pidome with the latest snapshot build. But it still gives me grey hairs trying to trying to figure out how to add the first temperature sensor node (based on the dalas ds18s20 demo sketch comming with mysensors code). It has two dalas chips, so reporting two temperatures, gw.present(0, S_TEMP); gw.present(1, S_TEMP);

      In PiDome, I have created a custom sensor, with two groups (0 and 1), each having a datafield configured as:
      Control ID: 0
      Control name: Temperature
      Datatype : Float
      Graph : timeseries (average)
      Suffix : C
      Floormap type: Temperature

      After adding the mysensor node, with this custom sensor description, I then go to "Control/Views" and "Devices" clicking on my new sensor, it repports 0C for both sensors, The timestamp is updated to the time that the node last send in it's temperature.

      I can't seem to figure out why it repports 0 as temperature. Looking at the data from the gateway with minicom (while server is shutdown), it does repport correct temperatures for both sensors attached to the remote node.

      Am I doing things wrong here, or have I found a unknown "feature"?

      / Thomas

      1 Reply Last reply
      0
      • JohnJ Offline
        JohnJ Offline
        John
        Plugin Developer
        wrote on last edited by
        #89

        @tbowmo The control id should be the V_VAR naming and the control id you have used as group id.

        More info can be found at: http://pidome.wordpress.com/2014/08/10/added-partly-mysensors-org-wireless-devices-support-api-1-4-beta/

        My Domotica project: http://www.pidome.org

        1 Reply Last reply
        0
        • tbowmoT Offline
          tbowmoT Offline
          tbowmo
          Admin
          wrote on last edited by
          #90

          That did it.. Changed the control id, to V_TEMP on both temperature data fields

          And now I am able to get temperature measurements..
          :)

          JohnJ 1 Reply Last reply
          0
          • JohnJ Offline
            JohnJ Offline
            John
            Plugin Developer
            wrote on last edited by John
            #91

            Good to hear! :+1:

            Uhmm.. read...

            My Domotica project: http://www.pidome.org

            1 Reply Last reply
            0
            • tbowmoT tbowmo

              That did it.. Changed the control id, to V_TEMP on both temperature data fields

              And now I am able to get temperature measurements..
              :)

              JohnJ Offline
              JohnJ Offline
              John
              Plugin Developer
              wrote on last edited by
              #92

              @tbowmo

              Regarding the update method you did

              "I shutdown the server, put the file 4.sql in the Database/private/update directory, also updated mysensors.default.config to reflect latest db version, and then restarted the server."

              Could possibly mess things up.

              This method:
              "I have replaced the entire pidome with the latest snapshot build" can also be "I have overwritten the entire pidome with the latest snapshot build". The last method will auto-update.

              With a database update there also is an high possibility of changes in code. Fortunate DB structure update version 4 only adds data ;)

              My Domotica project: http://www.pidome.org

              1 Reply Last reply
              0
              • tbowmoT Offline
                tbowmoT Offline
                tbowmo
                Admin
                wrote on last edited by
                #93

                @John
                Well i'm still testing things out, so if something goes wrong, I delete everything (including databases), and start all over again.. That was what I meant by "I have replaced the entire pidome with the latest snapshot build" :)

                Still experimenting with adding sensor nodes. Think I have to solder up a couple of extra nodes, just to have something to generate input, and to send some output to (Have the parts ready for 4 more nodes)

                / Thomas

                1 Reply Last reply
                0
                • tbowmoT Offline
                  tbowmoT Offline
                  tbowmo
                  Admin
                  wrote on last edited by
                  #94

                  One thing that is a bit unclear to me..

                  If I have a node with 3 temperature sensors on. They are made with gw.present(0, S_TEMP); gw.present(1,S_TEMP)...

                  This node also functions as a thermostat, using sensor 0, so when temperature is below setpoint make output go high

                  Now in pidome, I have made a sensor node with 3 groups (1 for each S_TEM), each one of them defines one datafield with V_TEMP as ID.

                  I also want to be able to set the target temperature for sensor 0 on the node (that is, the node itself turns on the heater until desired temperature is reached)

                  How should I define this in pidome? Should I make a new group, and attach a slider to that one, in order to set a value in the node? Because I can't see any option to send a datafield value to the node.

                  / Thomas

                  1 Reply Last reply
                  0
                  • JohnJ Offline
                    JohnJ Offline
                    John
                    Plugin Developer
                    wrote on last edited by
                    #95

                    @tbowmo Sorry for the late response, was at a conference yesterday.

                    It depends on how to interpret the value to be send. If you want to let the node control the heater, you should on the node create for example a threshold vairable let's say "int trigger value". If you would create a VAR_1 control which can be a slider in the node 0 group of type int and set a minimal value of 0 and max value of for example 50, you will be able to send a value to the node between 0-50.

                    On the node you should listen for incoming data for sensor 0, with variable VAR_1. and store it in the var on the node.

                    When you change the slider values the value is immediately send.

                    My Domotica project: http://www.pidome.org

                    1 Reply Last reply
                    0
                    • JohnJ Offline
                      JohnJ Offline
                      John
                      Plugin Developer
                      wrote on last edited by
                      #96

                      I know it has should been added earlier, but you can now add battery level to a device added to the server.

                      When you are creating your own device in the visual device editor do the following to show the battery level:

                      • Drag an drop a group to the device declaration field. You can give it any name you want, but the group id must be named "INTERNAL"(capital letters without the " (quotes)).
                      • Drag and drop a data field control to this group. You can give it any name. but the id must be "I_BATTERY_LEVEL" (also without the quotes).
                      • Set the datatype to "FLOAT". All battery levels in the server are handled this way.
                      • If you want, you can select "Battery (0-100%)" as a visual type. This is for future references when the server is able to report low battery levels to users and visualize this in clients.

                      That's it.

                      Cheers,
                      John.

                      P.S. We are on a level where we can start defining an online servers for users to share custom devices. We hope to have this available in a month or 2/3. So if you then create a MySensors node and added a custom device on the server. You can share this custom device setup with others also creating your MySensors node.

                      My Domotica project: http://www.pidome.org

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tortoisedoc
                        wrote on last edited by
                        #97

                        Hey;
                        can someone pinpoint what the "Waiting for gateway" means?

                        Thanks!
                        capture.png

                        1 Reply Last reply
                        0
                        • JohnJ Offline
                          JohnJ Offline
                          John
                          Plugin Developer
                          wrote on last edited by
                          #98

                          Sorry for the late response!

                          The server waits for a message from the gateway which tells the server it is ready to serve data. When you attach the gateway to your pc, and watch it in the terminal, do you see a "Gateway ready" message?

                          John.

                          My Domotica project: http://www.pidome.org

                          T 1 Reply Last reply
                          0
                          • JohnJ John

                            Sorry for the late response!

                            The server waits for a message from the gateway which tells the server it is ready to serve data. When you attach the gateway to your pc, and watch it in the terminal, do you see a "Gateway ready" message?

                            John.

                            T Offline
                            T Offline
                            tortoisedoc
                            wrote on last edited by tortoisedoc
                            #99

                            @John said:

                            Sorry for the late response!

                            No problem :)

                            The server waits for a message from the gateway which tells the server it is ready to serve data. When you attach the gateway to your pc, and watch it in the terminal, do you see a "Gateway ready" message?

                            John.

                            Yes, as a matter of fact i do (via ssh -> miniterm.py on RPi)

                            capture.png

                            EDIT : I Just now realized this is not necessarily the "Gateway ready signal" :dancers:
                            Btw is there support for mysensors from the RPi SIO pins? It would be great to not need to use the FTDI :)

                            1 Reply Last reply
                            0
                            • JohnJ Offline
                              JohnJ Offline
                              John
                              Plugin Developer
                              wrote on last edited by John
                              #100

                              Well, this IS the gateway ready message. It is an internal message the "3". And it is saying "14" which is the ready message (i should have said startup complete). I will take a look into it. Your sure using the same settings as with miniterm?

                              The second remark you gave. I will soon start with the driver which will support mysensors using the rpi pins. Highly possible this will start somewhere next. Already are in contact with an user who also wants to use mysensors this way

                              My Domotica project: http://www.pidome.org

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                tortoisedoc
                                wrote on last edited by tortoisedoc
                                #101

                                About the GW : Yes, same settings than the pidome server (no parity, 1 stop bit, 115200 bauds, 8 data bits); you can see it from the screenshot.

                                About the SPI : Great to hear! I can imagine switching from the USB driver to the SPI's should not be too much of a hassle; I wanted to have a look at the code myself (out of curiousity), but did not get to it yet.
                                One question, I noticed the tty used is exclusively locked by the server once it is started;
                                I believe it would be of great help to be able to access it at the same time as the pidome server, from the shell (say with miniterm.py), for debugging purpouses.

                                JohnJ 1 Reply Last reply
                                0
                                • JohnJ Offline
                                  JohnJ Offline
                                  John
                                  Plugin Developer
                                  wrote on last edited by
                                  #102

                                  Yes, i will also be using mysensors that way, I will then have an USB port free for RFXCom and another one for my IR transceiver (my hub died). When available i will tweet it and put a notification here.

                                  I will take a look into using JSSC_NO_TIOCEXCL when connecting to prevent the exclusive lock.

                                  My Domotica project: http://www.pidome.org

                                  1 Reply Last reply
                                  0
                                  • T tortoisedoc

                                    About the GW : Yes, same settings than the pidome server (no parity, 1 stop bit, 115200 bauds, 8 data bits); you can see it from the screenshot.

                                    About the SPI : Great to hear! I can imagine switching from the USB driver to the SPI's should not be too much of a hassle; I wanted to have a look at the code myself (out of curiousity), but did not get to it yet.
                                    One question, I noticed the tty used is exclusively locked by the server once it is started;
                                    I believe it would be of great help to be able to access it at the same time as the pidome server, from the shell (say with miniterm.py), for debugging purpouses.

                                    JohnJ Offline
                                    JohnJ Offline
                                    John
                                    Plugin Developer
                                    wrote on last edited by John
                                    #103

                                    @tortoisedoc I have updated the serial driver not to do an exclusive lock. It is available on the build server. Currently not tested, i have no (usb) serial devices running earlier then the day after tomorrow. You should be able to debug the channel.

                                    Anyway, data flow should be as following:
                                    <- Wait for the gateway to receive the ready message
                                    -> send out a request for the version
                                    <- receive version
                                    *remove the waiting for gateway message with the gateway version number in the web interface.

                                    My Domotica project: http://www.pidome.org

                                    T 1 Reply Last reply
                                    0
                                    • JohnJ John

                                      @tortoisedoc I have updated the serial driver not to do an exclusive lock. It is available on the build server. Currently not tested, i have no (usb) serial devices running earlier then the day after tomorrow. You should be able to debug the channel.

                                      Anyway, data flow should be as following:
                                      <- Wait for the gateway to receive the ready message
                                      -> send out a request for the version
                                      <- receive version
                                      *remove the waiting for gateway message with the gateway version number in the web interface.

                                      T Offline
                                      T Offline
                                      tortoisedoc
                                      wrote on last edited by tortoisedoc
                                      #104

                                      @John Sorry for the late reply;
                                      I just managed to fry two arduino's today thanks to my stubborness to try to get them powered with a 9V on RAW. So, I am stuck until I can find more arduinos :/
                                      It appears the regulator can only take so much incoming current if the output current is very low (3.3V in my case). Otherwise, it will overheat and bang, that's it.

                                      1 Reply Last reply
                                      0
                                      • JohnJ Offline
                                        JohnJ Offline
                                        John
                                        Plugin Developer
                                        wrote on last edited by John
                                        #105

                                        Well, i was also quite busy today (doing some arduino style "modifications" to a slot car track with my son), so no problem, otherwise i had to excuse ;).

                                        But uhm.. you are quite, how do i call it, enthusiastic.. Take your time, i will ask around regarding the address assignments and gateway ready message. If you find something, just mail to support at the project name with dot org. This is watched more closely then the forum

                                        My Domotica project: http://www.pidome.org

                                        T 1 Reply Last reply
                                        0
                                        • JohnJ John

                                          Well, i was also quite busy today (doing some arduino style "modifications" to a slot car track with my son), so no problem, otherwise i had to excuse ;).

                                          But uhm.. you are quite, how do i call it, enthusiastic.. Take your time, i will ask around regarding the address assignments and gateway ready message. If you find something, just mail to support at the project name with dot org. This is watched more closely then the forum

                                          T Offline
                                          T Offline
                                          tortoisedoc
                                          wrote on last edited by
                                          #106

                                          @John said:

                                          Well, i was also quite busy today (doing some arduino style "modifications" to a slot car track with my son), so no problem, otherwise i had to excuse ;).

                                          But uhm.. you are quite, how do i call it, enthusiastic.. Take your time, i will ask around regarding the address assignments and gateway ready message. If you find something, just mail to support at the project name with dot org. This is watched more closely then the forum

                                          You mean because of the Arduinos or because of fast moving ;)

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


                                          15

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 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
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular