Extra info page or wiki.



  • Ok to start this topic with.
    Like a whole lot of others i started using mysensors, and at the moment I'm blown away by the fact how simple and good everything works.
    the tutorials for the basics are great and can be done by anyone who takes the time to read them.
    But... after that there is a great knowledge gap if you want to do some cooler bigger or just different things with mysensors then you have to be an fully capable arduino programmer (in my opinion).
    can we make a extra page to the mysensors page with just basic information and explanation about how everything works wihtin the system?

    for example me, I'm enthusiastic using the sensors but don't have any knowledge in electronics or programming whatsoever.
    I allready managed to get the gaeway going and building a couple of sensors that also works:).
    But now I want to combine some sensors, say a motion sensor and a relay sensor on one nano board, I know it should be possible and (think) know I have to do something with "childs" but what to do with it I can't find.
    Especialy how do I combine the libraries in the sketch, That kind of basic info I can't find anywhere.
    Again I also know that it is a lack in my own programming skills.

    So tell me what you all think about the idea, or just be honest and tell me that I'm a lazy nitwit😃


  • Contest Winner

    I'm currently writing Arduino programming tutorials on my blog (it's in DUtch). But I'm still not sure whether I will post them. As much as I like to help others with learning how to program. I don't think I'd be happy with the questions I might get. My experience is, that the more you learn, the more question you'll get

    But if I decide to post them. I'll leave a link on this forum. The biggest challenge when developing Arduino software, is that you'll also need a basic understanding of analog and digital electronics. I know how to code, but I'm not an expert on the electronics fields.

    What might help is buying the Arduino basic kit. It's explains most of the programming and electronic basics.



  • Dear theo,
    you're blogs in dutch looks quite promising, the way you explain things is nice and understandable for people without any technical background.
    So keep on going doing that and you wil be a helping hand for a lot of people.
    If you are 'scared' to post them, then maybe you should post them somewhere else then your own blog. that way people don't contact you directly 9by mail or through your own website, and other people can clear out questions as well.
    But.. What I can read now (what i found) are still some really basic explanations. what I'm looking for is some extra deeper information.
    as an example,
    The whole mysensors system communicates through mesh technology, so repeating the signal/data to a outposted sensor via the shortest way.
    wich part of the sketch makes that work? is it in the basic mysensor.h script that is akkready included in most sketches or do i have to include another sketch or script to make it work.

    and as in my firts post how do you combine things. what is the node? the wifi transceiver? what is the child a sensor on a board or the board itself etc. etc.

    If you know all that kinds of things you can find the rest on the internet again sketches manuall's etc.
    But for now, as a nono I get stuck because more then just copy pasting things I can't do because of a lack in knowledge, wich I can't find because I don't know where to look.


  • Plugin Developer

    @j-jk

    I think the API is at least part of what you're looking for.

    http://www.mysensors.org/download/sensor_api_15

    Also see the serial API for the message structure.

    http://www.mysensors.org/download/serial_api_15

    You need some basic programming experience to understand it, but it's easier than starting directly with the source code, which is the final place to look, if you really want to know what's going on in the software.

    For other help or ideas, the forum is a great place to learn. For general arduino stuff, I like the adafruit page, lowpowerlabs and you can often find stuff on instructables when you google.



  • Hey martin,
    Thanks for your reply, and i did not found the extra information regarding the API.
    The rest you mention is actually how i do it myself a lot, especially instructables is a place i often look. But you are actucally missing my point a little bit. (maybe its me explaining it wrong. in that case i'm sorry but i'm not an native english speaker)

    The thing is that as like almost every technical forum this one is flooded with so called noob questions. I know even if you documentate everything that you still get these questions. But my point is that a lot of the whole mysensors project is really well and understandble documented wich is a great help when you are a beginning starter. but it leaves you hanging at the point that you want to try things out for yourself, because the way the whole thing actually works is not described in stupid peoples language as the rest is.

    So an option is to start learning arduino, but for me myself it takes to long to really learn and understand it, because there is a lot of difference between letting an led to blink or letting it communicate through wifi.

    So with a little bit more of background explanation I think including me a lot more people can make awesome projects, and share it again.



  • @j-jk I agree. i think we could use a wiki.
    for example. when i first started, all the examples used a pro mini.
    what if i wanted to use an uno, or nano, or some clone, sensebender?
    these all have different hookups. stuff like that would be great for a wiki.
    if you are using an uno, here is how you hook it up
    nano
    nano v2/v3 etc etc.

    things like the sensebender, they list the pinouts, but not for the ISP.
    if you know what you are looking for, you can figure out pin 1, but i had to go and then look online for the pinouts of an ISP header to find a reset pin.
    this could easily be put into a wiki and would be very helpful.

    the 501 motion sensor, i was informed through the forums, i could use an alternative pin for 3v and make it work that way.
    that could go in a wiki.
    how to do OTA
    how to burn a bootloader
    how to transform a nano into a ASP bootloader burner. etc etc
    i'm sure allot of into could be placed in a wiki that would be very helpful to many.

    @hek what do you think?


  • Admin

    @mvader

    Yes, thought about setting up a wiki a few times. I've been on the scout for something that would be possible to integrate with NodeBB (SSO with the current user base) and preferable build on nodejs.


  • Contest Winner

    @j-jk Thanx for your kind words.

    To be honest I don't think you should know that much details, like how the protocols works and how a sensor looks up for the gateway or a repeater node. The good thing about MySensors is that you don't need to know that kind of stuff. MySensors hides it from you and takes care of it. What you need to know is how you declare and setup the gateway in your Sketch. How you present different sensors to the gateway and how you can send and receive values to and from the gateway. Combining different sensors into one sketch is already something, you need to learn some basic software skills for.

    What I'm working on is a basic how-to tutorial for how to combine Sketches. I don't mind sharing them with @Hek 'cause they might be suitable for the mysensors.org website as well. Since my English is good, but not good enough, somebody has to review them.

    I've been a teacher at the Hogeschool of Enschede in the field of software Engineering for over 4 years. I always use the knowledge and educational skills I learned during that period in the tutorials I write. Because I like to educate people.

    The problem with teaching people how to develop software, is that writing good software is actually harder than most people think. Some people can teach themselves how to write software. But for a lot of people looking at examples is not enough. And I'm not trying to discourage anyone, because writing software is also very fun. But when you have to combine software with electronics, it might just be too much at the same time, for people.


  • Admin

    @hek could jingo be a candidate? https://github.com/claudioc/jingo


  • Admin

    @tbowmo said:

    @hek could jingo be a candidate? https://github.com/claudioc/jingo

    Yes, looks like a good candidate (actually glanced at it a while ago 🙂 ).



  • ah nice that there is such great and quick response in this topic.
    I do agree that the whole setup being so easy is a plus and probably the reason for the succes of mysensors.

    I also understand that making software is a lot of work especially if you want a little bit sleek looking gui.
    thats actually not what i would ask for, because like a lot of people on this forum (and others) my opinion is that you also have to do your own research so you can also fix your own problems.

    but if you're not a programmer or skilled in programming, then you at least need guidelines or terms to look for. otherwise you are just reinventing the wheel wich takes a lot of time.

    So thanks for all the help and good work, and i'm curious what you come up with.
    Till then I wait with overflowing the forum with questions😛



  • worst case we could always add a new category to the forum called "wiki" or "how to's" or something like that


  • Contest Winner

    What about starting off with identifying the most common information gaps and create a faq to cover those initially.
    As for general Arduino programming, electronics and such, there are tons of online resources to tap from. I am not sure it is a good idea to go deeper in those areas in a MySensors site context (apart from forum discussion threads) since it would greatly add to the amount of information here and could potentially "bloat" the site(s). But pointers to other sites which goes into more detail could of course he added.
    Adafruit for instance had a lot of articles in interfacing various hw with Arduino. Adding a custom library to use from a sketch which also uses MySensors is no different from a sketch that is "standalone" so the Adafruit examples can be used almost as is.



  • Okay, let me explain which kind of information I mean, because a lot of skilled people understand my kind of question as fix my problem for me.

    The things that i would love to see explained is some discovery style information like in this ship will fit a 1000 truckloads of blahblah. it does not gives you any information about the ship but it does help you understand how big it is if you don't have a clue.

    For example I would not need any explanation how the code is written and how the whole system is communicating through the mesh web, but it would greatly help me figuring out who is talking to who on which point, and maybe which sketch is responsible for it.
    so really plain basic numbnuts information.

    And of course one of the other returning questions is can you combine sketches easily. is it just as simple as adding inclusion of another sketch and pin assigning plus copy pasting the rest in the void loops and void setup, or are there other things to look for as well

    So indeed I'm on your side as well regarding that there is already a lot of arduino courses/information/tutorials/etc on the web so there is no need to explain all that again on this site.
    But for now (and I do understand sketches a little bit when I read them) a whole lot of abracadabra is going on to get everything to work. because it needs more sophisticated scripting then if pin d3 is above 30% switch pin 1 to full (example).



  • Combining sketches is a big one. I am new to electronics and while I have had good success building 1 or 2 sensor nodes with nanos, minis, and unos I have struggled when attempting to create a multi-sensor node with a LCD panel and radio using a mega2560. I am hoping maybe there are some "best practices" to follow and the wiki could document these.

    Ideally I would some programming patterns to follow when writing sketches that make it much easier to combine them. The existing sketches on the MySensors website could be rewritten to follow these patterns.

    For example:
    How to combine sleep/waits is not completely intuitive in all cases. It seems that maybe these calls should be in the main loop and that the main loop then calls each sensor loop. Are sleep and wait completely interchangeable? Why not always use wait then?

    The mysensors library defines the radio pins in the library. That is not very clear and does not match the pattern of all the example build sketches on the site. At first when switching boards I was not sure if the radio needed PWM or not. Changing what pins to use should be an easy thing to do when combining sensors in one sketch so it should be done in a standard way.

    Also for sensors like the DS18B20 that can have many sensors attached to the same pin, determining the child ids to avoid conflicts with other sensors on the same node can be tricky. This also raises issues about assigning IDs or requesting IDs. Most sketches let the gateway assign IDs and I am not sure that is easier for a beginner.

    Also it seems if you have a problem with the radio ("radio init fail") all other serial output seems to stop (that has been my experience). I am going to start taking the approach of adding the radio first, make sure everything is good. Then add 1 sensor , recheck and so on. To do this quickly I want to be able to quickly add/remove sensors from my sketch. I suspect there is a programming pattern that makes this easy.

    My main concern when I started adding multiple sensor types to a single node was conflicts in the imported libraries. I am not confident enough to modify these libraries. Fortunately I have not had any issues, but if people no about conflicts it would be good to document them.

    Lastly, maybe we just need an easy place to share sketches. The forum has a Project section but a Sketches library where people could possibly add feedback would be nice.

    As always my comments are just suggestions for improvement. The mysensors project is fantastic and i appreciate all the great work.



  • Just an example that I am using (I am sure there are better ways):

      void loop()      
    { 
    // Process incoming messages (like config from server)
      gw.process(); 
    
     #ifdef CHILD_HUMIDITY
      loopHumid();
     #endif
    
      #ifdef CHILD_H2O
      loopH2O();
      #endif
      
      #ifdef CHILD_LUX
      loopLux();
      #endif
    
      #ifdef CHILD_RELAY
      loopRelay();
      #endif  
    
      gw.wait(SLEEP_TIME); //sleep a bit
    }
    
    void loopHumid()
    {...


  • Hey guys, I've already had this idea. Then, I've started creating an unoffical documentation page on ReadTheDocs that I hope to fill the lacks on official documentation. So, I am using my point of view and studying the whole library. I hope that helps someone (I am really at the beginning).


Log in to reply
 

Suggested Topics

10
Online

11.4k
Users

11.1k
Topics

112.7k
Posts