The examples on the website need love


  • Plugin Developer

    I discovered MySensors not too long ago after playing around with Domoticz.

    I wish I could say that working with MySensors has been easy, but I have wasted a lot of time the past few weeks trying to get things to work. This is mostly because some examples on the website are out-of-date or contain errors.

    .

    Trouble with the temperature sensor
    I first tried making the temperature sensor. That turned out to be a hassle: through the comments and a lot of googling I had to figure out that I had to delete and install specific versions of libraries. Afterwards I posted better code for the website, so that others may have an easier time
    I've also made a proposal for a different temperature sensor to be the standard on the website. I think most people who use MySensors for their home would have been way happier with the BME280.

    Trouble with the dust sensor
    Next I tried making the dust sensor. I wasted a sunday trying to get it to work, and then it turned out the webpage linked to two different sensors.. The one I got from Aliexpress needed to have completely different code. So I made that code which I then posted here.
    I've also done a proposal for a whole new dust-sensor, as the Sharp one that is on the website is getting a bit old, and leads to incomparable results because everyone has to add their own fan.

    trouble with other sensors
    A lot of the sensor examples (humidity, distance, gas, etc) still use Sleep in their code. This means they can't be used as repeaters, even though MySensors advertises that any node can be used as a repeater.

    .

    As a total beginner, I decided to try MySensors because the website is so great. It explains things well, looks fun and accessible. "Just put this code on your cheap Arduino, and go", seemed like a powerful idea.
    But on such a beginner-friendly website you expect to find working code. Beginners don't go into the forum. Beginners don't expect the examples code in the library to have newer options (better dust sensors).

    The explanation and code on the website is really important. If that code doesn't work, then it will only lead to disappointment.

    This started out as a response to @mfalkvidd question here, and a mysterious post by @hek about a reply to a message I didn't even send πŸ™‚


  • Hero Member

    Sounds like a succes story. A few remarks...

    • I started in a similar way and soon find out it is and should be a learning experience.

    • plug and play is not very satisfying. A good amount of trial and error is the learning experience. "wasting a sunday on MySensors" is a contradiction in my view.

    • examples are just a good start and function most of the time. The community need to take care of maintaining them. As I read you already did a good job here ☝

    • MySensors is typically a low power sensor thingy. Using sleep() is very useful for most sensors (nor actuators)

    • I hope you got infected and help building a great learning experience for beginners and more advanced users.


  • Plugin Developer

    I'm sorry, I know you mean well, but that's an incredibly pedantic response.

    • I'm a professional adult, and I'd like to decide myself when I want to learn. I could have spent that sunday writing code for MySensors, teaching children to program, or reading an educational book.
    • Not everything that is hard or annoying is automatically a valuable learning experience. I already know how to code, so spending my time debugging contradictory instructions and non-working code is NOT a learning experience.
    • I wouldn't mind too much, but the whole promise of MySensors is that it's easy to get started with. From the front page:

    "We provide easy to follow build instructions, ready to use code examples"

    • Plug and play is very satisfying. The joy of seeing an open source project that actually has some polish is wonderful. Easy onboarding of beginners is very important, especially because this is an area where most Open Source projects usually fall flat. It looked like mySensors understood that.
    • If anything I'm losing the infection I originally had for MySensors. It's a great concept in theory. But if even the basics don't work as promised, it puts you off from discovering more.

    .

    I hear you on the Sleep thing though, hek explained that to me as well. I updated my code to automatically switch between using Sleep or the State Machine depending on whether the repeater mode is turned on, as that's probably a good indication of a node being battery powered or not.


  • Hero Member

    @alowhum I'm sorry if I have offended you in any way. I just wanted to express how I feel about MySensors in a reaction to how I interpreted the judgement on the examples. But let's not argue and focus on adding value (and good examples) to MySensors (I will add 'incredibly pedantic' to my résumé 😊 )


  • Hardware Contributor

    @alowhum
    I understand your point πŸ˜‰ but not everything! That'll be my only one post about this, i don't want to argue too..

    • that would be great if we could decide when learning or not.
      Unfortunately, that's not the diy way..you always have things to learn. Like the Mysensors API for instance. "If you don't know" that sleep needs to be removed and repeater enabled, this means the basic docs have not been read. I think this is very important to read docs

    • Do you know better framework to get started, with all mysensors features and same freedom in code?? There is no promise, i don't read it like this πŸ˜‰

    • Complete plug&play has always tradeoff..Mysensors core team is working hard to improve user experience and features, but can't cover everything..
      Helping people on forum, managing the project sources and docs, releasing new features and so on..
      Imagine, if core team needs to spend time on researching what's the best sensor for each usecase, updating the external libs each time it changes etc.. then, what would be the time allowed to improve the Mysensors core!? This is not a daily job. This is sharing what we can..

    • In general, examples are provided by users..makes sense imho. Then it's up to the user to update it. The best thing core team can do is testing it compiles..

    When i decide to build a new device, i always proceed like this:

    • i take a quick look at mysensors site to know what's proposed
    • then i compare on the internet what's the best option for my hardware
    • I code a raw sketch, learn how the external lib I need work if i need one
    • I update my code
      This is the way to go for everything in embedded world imho. And Mysensors handles lot of stuff that is not needed to worry.

    Please don't take it "pedantic", as i didn't see any "irony" above πŸ˜‰ These are just common sense facts..
    If you're doing a great work in refactoring sketch, that's awesome and we thank you of course. And we hope you'll still be there in a year or two for updating them, for plug&play 😜

    Plz keep the good work πŸ‘ , of course we're listening


  • Admin

    I'm sorry if you're disappointed by the provided examples. It is not super easy to create instructions suitable for beginners in both electronics and the programming field. And at the same time create something suitable for the advanced level users out there. The articles and examples has been created over a 4 years period and has been kept updated to work with the latest version of the MySensors library.

    Some might be outdated due to newer/better sensors available but it is a community effort to keep the site and examples updated. Testing is something we try to automate as much as possible but we haven't got the bandwidth to regression test every example with hardware.

    It is also impossible for us to keep every configuration permutation of every sensor available on the site. The examples should be seen as a good starting point for your project. You will at some point probably have to get your hands dirty and do some modifications to suite your specific needs.

    Keeping a community like this growing and up-to-date isn't happening by itself. We need help from everyone here. We've tried to make it easy to contribute new code and articles to the site. We encourage people to arrange their own meetups to learn, get inspiration and help each other. We're also arranging a yearly MySensors contest to get people involved and share their awesome work. Involvement is crucial.


  • Contest Winner

    You get what you pay for.


  • Admin

    @alowhum

    In addition to what @hek and @scalz are writing above, please remember that we (the members of the core group) have a daytime job, and families that demand our presence as well.

    So if you can see something that needs updating, and you are confident about it, then please join in, and make PR's against our project repositories, so we can get even better examples.


  • Plugin Developer

    Well this blew up πŸ˜„ Sorry if I offended!

    @Awi No worries, you haven't offended me. And I was a bit harsh, sorry about that.

    @slalz I understand an open source project will not be perfect and will need you to dive into it at some level. The question is: what level.

    "We provide easy to follow build instructions, ready to use code examples".

    I also understand we all have day jobs. My whole point was that I wanted to try and help. In fact, that's what I have been doing; writing code, researching better temperature and dust sensors. If you give me a (temporary) account on the website I will gladly update the build instructions. I was already adding examples to Github through the web interface as we speak πŸ™‚


  • Hardware Contributor

    Mysensors have 5k + users and first time I hear somebody complain about this so hard. It clearly states "focusing on do-it-yourself home automation". If someone wants plug & play (and not the diversity which MySensors offers) why not buy something off the shelf? There is no such thing like wasting a Sunday on MySensors if you are here for the right reasons.

    Worst of all? The attitude... how about instead being humble about this has been created by a hard working team on their free time instead of claiming their work need some love, talking about wasted a lot time and listing everything that is bad.

    Its good that you want to help but why not try the friendly way like - how can I make this better for the community? Can I help and how do i contribute? Did you guys think about this? You dont start a post like this. Im sure you will have much better luck this way.


  • Plugin Developer

    Im sorry, but you are misrepresenting my position.

    • I started this post to contribute, and point out an area where I wanted to do some good: to help this project live up to its promise of 'ready to use code examples'.
    • I never said I wanted plug-and-play, that was just to offset the narrative that plug-and-play is not a valuable thing. What it's about is creating a gentle slope to get new people involved in the community. Beginners need working code to help them stay interested in the promise of the project. If the hill is too steep, people will stop climbing. Because of survivorship bias you don't see all the people who tried and quit using MySensors.
    • I have contributed to multiple open source projects, including this one, so I know exactly what you mean about the effort. It also means that when I talk about wasted time, I know what I'm talking about. If two of the sensors I try need me to jump through a lot of hoops, and not the fun kind, then that's something we need to fix. I mean, with the WaveShare device the code for the dust sensor would give twice the level of actual dust! And that code has been on the website for half a year!

    I may have misinterpreted, but it seemed to me that MySensors project understood that the onboarding of new people is vital. The friendly design of the website with the cute drawings, the light-hearted writing, that seemed like a conscious strategy. One I can totally agree with. But if that's the strategy, then the examples need some love. That's all I was trying to say.

    What doesn't help is to paint things, and me, black-and-white. Pointing out that the examples don't work does not make me someone who is demanding 'plug and play'. And I don't think it's honest to then paint broken examples as a 'feature' to aid learning. I believe I was just trying to point to a valid concern about keeping it fun for new people to get involved. I thought this community understood that value given the light-hearted design choices.

    So when I post "steer clear of this one for now" at the Dust sensor page, it's not to disrespect you, but to help new people understand that the sensor is currently not ok, while I was trying to fix it. And yes, there is frustration that I've spent $20 on an old sensor that can be bought for $3 now. A lot of people may have had the same feeling these past months. But in all that time nobody left a warning.

    Sometimes it feels like people are just solving their own problems, and when they've fixed it for themselves, they don't care enough about the people that come after them. That's not an attack on the core developers by the way, that's a statement about us all.

    Anyway, onwards.

    I've contacted environmental agencies about which cheap laser-based sensor they recommend, and I've researched them in detail. I believe it may be a good idea to create a new 'default' dust sensor sketch around the PMS7003.

    I've also updated the temperature sensor code (I've been testing it today). I'll make an account on OpenHardware and post new versions there. Hek tells me those can then be integrated into the website.


Log in to reply
 

Suggested Topics

  • 4
  • 15
  • 17
  • 2
  • 9
  • 20

8
Online

11.4k
Users

11.1k
Topics

112.7k
Posts