Skip to content

Development

Discuss Arduino programming, library tips, share example sketches and post your general programming questions.
1.5k Topics 13.5k Posts

Subcategories


  • 56 578
    56 Topics
    578 Posts
    HJ_SKH
    Hi2All! Surprising is here. After about 24hours I refresh HA and suddenly my motion sensor was integrated. There is also second entity > battery : 0 , have to look deeper into that for understanding. Need to change little in the sketch, because don't want every short time 'no movement' so only when there is motion and maybe once a hour indication sensor is alive. Meantime I found 3 other good threats: https://forum.mysensors.org/topic/11200/finally-progress-evidence-based-radio-testing-method-and-capacitors https://forum.mysensors.org/topic/1664/which-are-the-best-nrf24l01-modules/27 https://forum.mysensors.org/topic/9550/build-a-reliable-power-supply-chain Very usefull for me also finally progress because of lacking time in the past. Great jobs are done here! Thanks for this all of you guys or girls!
  • CLIENT_GW_MQTT / Setup and automatisation of Presentation and set/req

    1
    0 Votes
    1 Posts
    567 Views
    No one has replied
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • Errors with Custom MySensors actuator (Neopixel/ws2812 Node)

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • sleep & interrupts

    12
    0 Votes
    12 Posts
    6k Views
    martinhjelmareM
    I would first go the simpler route and try to both read the pins in the loop and have the interrupts during sleep and test that. If loosing events in the test, I would go for a more complex solution, i.e. not using mysensors sleep but coding that from "scratch" and using attachInterrupt. Edit: On second thought, I think the second option would be to try and combine mysensors sleep function with interrupt and an attachedInterrupt with ISR. If that doesn't work, I would write a custom sleep function. If using attachInterrupt, I would detachInterrupt first thing in the ISR, then when the pin state is back to normal attach the interrupt again.
  • Standalone lights controll / controller-independent node

    6
    0 Votes
    6 Posts
    2k Views
    D
    @m26872 I agree with you about the wired connection, unfortunately in the apartment I rent now we have one switch in the middle of the apartment that controls five light bulbs in two different rooms (don't ask why), so running the cables trough whole apartment is just not practical. Which is the main reason I am motivated to MySensorify it all, it takes too much walking around for the light switch and too much hitting the door and the cat in the night. @fets Exactly, I found that method/setter in API and got inspired to go around/parallell of the controller. The sketch logic would be then: -- Switches On Click: sends message to Lights Control Node with its SwitchNodeID and SwitchAction (NodeID is sent automatically if I read API right?) -- Ligts Control Node On Message Received: Do some if else based on the SwitchNodeId and SwitchAction and send "Toggle" message to desired light or group of lights. (Right now I am a bit concerned whether to send the toggle message or on/off, as controller can get lights out of sync by running some automatic script. Not sure how to handle this yet, probably by always running some lights in the group-only (living room lights, bedroom etc)) -- Light nodes On Message Received (both from "Lights control node" and domoticz): do what it says in the message and report your status back to domoticz. I just started with MySensors and arduino programming (I do some programming in php). I will have some time now during the hollidays to play around, but do you guys see any challenges in this code and design logic? Something that could be difficult/impossible due to some design or code limitations? I guess switches and the Lights control node need to be presented to the gateway and the controller, which can then just ignore them. Also, which message should I send from switches and Lights control node, S_LIGHTS or some custom variable? Does anyone have some example of node-to-node communication and sending the messages between? I think I saw something on the forum about weather station but I cannot find it now
  • 3 BinarySwitch + 3 motions

    4
    0 Votes
    4 Posts
    1k Views
    S
    Of course it is, "A MySensor radio network can consist of up to 254 different radio nodes and each radio node can report data for 254 attached child sensors. This means that you can, in theory, manage data for up to 64516 sensors in a single radio network. If this isn't enough, you can create another parallel radio network on a different channel and there are 126 available channels." The above was an extract from the getting started page. Thank you for correcting me.
  • Support for wake up by Timer2 instead of WD

    3
    0 Votes
    3 Posts
    1k Views
    YveauxY
    @ewasscher said: Are other people interested in this? Apparently yes What would be the preferred way to implement this? I'm thinking of creating a new hardware type derived from the current MyHwATMega328. Better not implement it this way, as your implementation is still just ATMega328 hardware based. How about e.g. passing an extra parameter to the sleep() method, which defaults to watchdog? Is there any chance of this being included in MySensors if implemented properly? Ofcourse. MySensors is a community effort, and any useful addition/bugfix can make it into the library.
  • Understanding serial gateway code

    7
    0 Votes
    7 Posts
    2k Views
    T
    I'm interested in what you learn here. I'm not much of developer (ok - I'm NOT a developer! haha!) but would like to do something similar and posted a thread about it a few months ago. I think I was in the wrong section as I never got a response. http://forum.mysensors.org/topic/2200/vera-mqtt-gateway
  • Relay actuator + water meter pulse sensor sketch

    7
    0 Votes
    7 Posts
    4k Views
    T
    Hey there. Sorry for the delay. I never get notifications on this board for some reason. I'm using one of these: http://www.amazon.com/dp/B00EVKVM02/ref=pe_385040_30332190_TE_3p_dp_1 And one of these for my sprinkler 3/4 line: http://www.amazon.com/dp/B00EVKOK6A/ref=pe_385040_30332190_TE_3p_dp_2 http://www.amazon.com/gp/product/B009YVCMX4?psc=1&redirect=true&ref_=oh_aui_search_detailpage I couldn't find the 1" valve to go with the sensor but you get the idea. I'm just switching those with normal relays tied to the appropriate pins. Funny you should ask about this, however. I'm actually not overly thrilled with the flow sensors (especially the 1" model). It doesn't seem to detect low flow rates. Either my sketch isn't sensitive enough (maybe my debounce is screwed up) or it doesn't pulse for lower speeds. I'm considering another type of flow meter but 1) haven't found one yet 2) not looking forward to re-plumbing everything.
  • How to define Relay Id

    5
    0 Votes
    5 Posts
    3k Views
    korttomaK
    Unfortunately I don't know anything about Domoticz so I cannot say what "ID Enfant" stands for and where it comes from since the child id should not have to be unic in the system only the NODE_ID ( unfortunately it seems like this is also called sensorid sometimes ). If Domoticz needs unic CHILD_ID for all then I think it has been implemented incorrectly. I hope someone with more knowledge about Domoticz chime in here and explain this better.
  • Support for Gas Meter?

    3
    0 Votes
    3 Posts
    3k Views
    macieiksM
    Hello everyone ;) I just updated my Ethernet W5100 Gateway to beta 1.6.0 and I modified "WaterPulseSensor" to support V_GAS - present(CHILD_ID, S_GAS) and it is working... :) Right now I am testing it on my desk but I will try this weekend to attach magnet sensor to my gas meter ;) See yaaa ;)
  • Binary sensor expanded help

    15
    0 Votes
    15 Posts
    4k Views
    C
    Much cleaner! I'll give it a go soon. Thanks for all the help!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    30 Views
    No one has replied
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Change RF24 transport channel

    3
    0 Votes
    3 Posts
    2k Views
    F
    It should be possible. Why not use the SetChannel() function of the RF24 library to set a different channel for each network? And use few jumpers connected to free inputs of the cpu for channelselection, and/or Sensor-ID selection. So no need for recompilation....or automatic configuration....which method is also possible, but needs more code changes..
  • How to make/complie MYSBootloader

    11
    0 Votes
    11 Posts
    5k Views
    petewillP
    @siklosi said: I succeeded compiling MYSBootloader with Oitzu's help. I have compiled MYSbootloader for 8 and 16Mhz for all 127 channels. Here is archive... so you can try it. I have not yet tested it but it should be working https://www.dropbox.com/s/0gjxp9wl2uukj4y/Mysbootloader-8-16-1-127.zip?dl=1 Thanks for posting this! It didn't work for me when I tried with an UNO but it did when I used the USBASP V2.0. Thanks again!
  • Start/stop sequence

    2
    0 Votes
    2 Posts
    879 Views
    ahmedadelhosniA
    I dont have access to test your code now but what I see that could be wrong is using delay in your code. Delay will stop executing of the code for 100 ms. This is a lot. Search for non blocking delay examplew that uses timers to implement a delay. I guess also that there is a library for that which i saw in one of the examples of mysensors library.
  • 0 Votes
    12 Posts
    6k Views
    T
    @AWI @Hoffan @sundberg84 I can see both sketches are working, this is what the gateway prints out: 0;0;3;0;14;Gateway startup complete. 0;0;3;0;9;read: 105-105-0 s=255,c=0,t=18,pt=0,l=5:1.5.1 105;255;0;0;18;1.5.1 0;0;3;0;9;read: 105-105-0 s=255,c=3,t=6,pt=1,l=1:0 105;255;3;0;6;0 0;0;3;0;9;read: 105-105-0 s=255,c=3,t=11,pt=0,l=5:Relay 105;255;3;0;11;Relay 0;0;3;0;9;read: 105-105-0 s=255,c=3,t=12,pt=0,l=3:1.0 105;255;3;0;12;1.0 0;0;3;0;9;read: 105-105-0 s=1,c=0,t=3,pt=0,l=0: 105;1;0;0;3; 0;0;3;0;9;read: 105-105-0 s=2,c=0,t=3,pt=0,l=0: 105;2;0;0;3; 0;0;3;0;9;read: 105-105-0 s=3,c=0,t=3,pt=0,l=0: 105;3;0;0;3; 0;0;3;0;9;read: 105-105-0 s=4,c=0,t=3,pt=0,l=0: 105;4;0;0;3; Is this correct?
  • PiGatewaySerial using interrupts

    raspberry pi 2 pimatic interrupts serial gateway
    6
    3 Votes
    6 Posts
    4k Views
    OitzuO
    Bens doesn't seem to come back that fast.. I opened a ticket to the rf24 library owner: https://github.com/TMRh20/RF24/issues/172#issuecomment-163117684
  • Interrupt with gw.wait?

    3
    0 Votes
    3 Posts
    2k Views
    hekH
    @frankiboy Sounds reasonable. Al''add it to the TODO list.

10

Online

11.7k

Users

11.2k

Topics

113.0k

Posts