Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. jimmy loyens
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by jimmy loyens

    • jimmy loyens

      OTA update mechanism with MYSbootloader
      Troubleshooting • • jimmy loyens  

      1
      0
      Votes
      1
      Posts
      436
      Views

      No one has replied

    • jimmy loyens

      Arduino pro mini dead after flashing MYSbootloader.
      Development • • jimmy loyens  

      30
      0
      Votes
      30
      Posts
      2121
      Views

      jimmy loyens

      @jimmy-loyens stuff in itallics i'm not absolutely shure about or are remaining problems. Anyone feel free to add or correct anything While writing this tutorial my node went offline So it might be i have to add some more to the tutorial lateron Seems to be a problem with MYController because i can still see node trying to communicate over mqtt. I see its my sh***ty router acting up again, even my internet went down just now. It seems that somehow the firmware on my node got corrupted, when connecting it to a serial monitor it didn't output anything. When looked on MQTT.fx at the messages node and GW where continiously exchanging "stream messages. Then i flashed the node the oldfashioned way and now its all up again. Still trying to find out what happened exactly.
    • jimmy loyens

      Get periodical sensor readings from children 1 & 2 while sensor on child 3 is interrupt driven.
      Development • • jimmy loyens  

      2
      0
      Votes
      2
      Posts
      372
      Views

      mfalkvidd

      @jimmy-loyens I would test if sending all values every time really has a large impact on battery life. I don't think it has. An alternative is to keep a counter of how many times only lightlevel has been sent and transmit every n times. This solution doesn't adapt to varying interrupt times though. tekka is working on possibility to get the approximate amount of time left when woken up by interrupt. Your use case could be perfect for this new feature.
    • jimmy loyens

      Is it necessairy to use child id when requestin battery level or sketch name ... ?
      Development • • jimmy loyens  

      6
      0
      Votes
      6
      Posts
      823
      Views

      jimmy loyens

      @sindrome73 Hi, shure you can bother me, happy to finaly help someone else (instead of asking help myself ). I dont really understand your quote since i dont speak spanish but i gues its a quote of my message. I just recently started playing with setting and requesting values so if someone (with more experiance) sees something wrong with what im writing here, feel free to correct me. Im using a mqtt gateway to communicate with my nodes. I have found i can use mqtt messages to set or clear a relay on a node withe the relay sketch (https://www.mysensors.org/build/relay) flashed to it by sending "mygateway1-in/nodeID/childID/Cmd/Ack/Type Payload" over MQTT. The "mygateway1-in" is the mqtt-topic for messages going to the node. (see this sketch for mqtt gateway https://www.mysensors.org/build/mqtt_gateway). The same should be possible using a serial gateway by sending "nodeID;childID;Cmd;Ack;Type;Payload" in the arduino serial monitor or any other terminal program (but i havent tried it with serial yet). Depending if payload is 1 or 0 the relay will turn on or off. You will notice in the relay sketch there is a function receive(). This is where the message to the node is interpreted and the state of the relay is set. The meaning of Cmd, Ack, Type and payload can be found here https://www.mysensors.org/download/serial_api_20. So when i want to turn the relay on on node 100 child 50 i actually send: "mygateway1-in/100/50/1/1/2 1", for turning it off i will send: "mygateway1-in/100/50/1/1/2 0". Notice in this case Cmd is 1 because we want to "SET" a value, and Type is 2 because it is a "binairy status". (see https://www.mysensors.org/download/serial_api_20). The same can be done for internal messages like requesting battery level or sketch name: Battery level => I_BATTERY_LEVEL => "mygateway1-in/100/50/3/1/1" => node returns battery level. Notice: Cmd=3 => internal message; Type=1 => I_BATTERY_LEVEL; Payload is empty => not setting anything Sketch name => I_SKETCH_NAME => "mygateway1-in/100/50/3/1/11" => node returns sketch name Notice: Cmd=3 => internal message; Type=11 => I_SKETCH_NAME; Payload is empty => not setting anything Same is true when requesting a sensor value, for example a temperature connected on child 12 of node 3: temperature => V_TEMP => "mygateway1-in/3/12/2/1/0" => node returns temperature Notice: Cmd=2 => Request; Type=0 => V_TEMP; Payload is empty => not setting anything Allso when setting a value other than for a relay, for example setting color of a RGB led on child 55 of node 47: rgb value => V_RGB => "mygateway1-in/47/55/1/1/40 0xffffff" => sets rgb ledcolour to white Notice: Cmd=1 => Set; Type=40 => V_RGB; Payload = 0xffffff => the value for r,g & b (in this case white) You can know wich Type value to use by looking in the sketch how the child is presented in present() function (S_HUM, S_TEMP, S_DOOR, ...) and looking up the appropreate V_value in the next table. (see https://www.mysensors.org/download/serial_api_20). Last remarque, the user (YOU) is responsible to write the code in the receive() function to handle incomming messages for the various types. You will notice in the relay sketch this is only done for V_STATUS because the sketch only has one type presented as S_BINARY. If your node has multiple children of various types you will have to expand your receive() function for any type you would like the node to receive messages from. If you make different functions for each type as you go allong and place these in the receive() function you should be able to re-use these functions in other sketches. I hope this helps, let me know how you get on Greets
    • jimmy loyens

      OpenHAB Mysensors binding 2.4: cant get mqtt gateway online
      Troubleshooting • mqtt openhab mysensors-binding • • jimmy loyens  

      49
      0
      Votes
      49
      Posts
      5899
      Views

      rgriffogoes

      By creating the file org.eclipse.smarthome.mqttbroker.cfg in the service folder (/usr/local/etc/openhab2/services in my case, chown to openhab), with the contents name=mosquitto host=192.168.1.69 secure=false port=1883 username= password= retain=true I was able to just create the MySensors MQTT gateway (using paperui) and it stayed online (no mqtt broker defined, but its addon is installed). I had the impressions that with the latest versions it should be possible to do everything in the PaperUI, and that the broker would use the mqtt2 addon (but in paper ui, service, config, mqtt tab, mqtt system broker connection, manage->plus button -> expert mode, I get to see the contents of the cfg file above) But unfortunately, it seems that the discovery services enters a endless loop (maybe I need to update my arduinos sketch to the latest mysensors code?) and I don't get any auto discovered things. If I trigger a new discovery it will stop the previous one and start again. Finally, I was able to manually create a thing, and link items on it. Eventually my battery level and humidity were displayed in the paper ui control page (after some weird delay, not updating once it shows in the log. the temperature didn't show up though). Not sure if my understanding is off (or paperui is limited in this sense) but in the "thing" creation page I only get to specify one child id. Then my multi sensors/value nodes would need to be define in multiple things? As I can't properly define channels for each child id, and I'm not sure what var1-5 are all about. I'll try defining things/channels/items directly in files in the following days, because so far I couldn't enjoy most of the benefits of this new version (auto discovery, logical grouping of physical device in "things", questionable "do-it-all in paper ui"), and I'm almost considering using mqtt1 binding in the new install
    • jimmy loyens

      [SOLVED] arduino no longer compiles Gateway W5100MQTTClient
      Troubleshooting • • jimmy loyens  

      5
      0
      Votes
      5
      Posts
      687
      Views

      jimmy loyens

      That workaround did it, now the library example compiles. Thanks
    • jimmy loyens

      Are rfm69 & nrf24l01 compatible
      Hardware • • jimmy loyens  

      3
      0
      Votes
      3
      Posts
      515
      Views

      jimmy loyens

      @mfalkvidd ok thanks for your answer.
    • jimmy loyens

      Ble presence/positioning nodes
      General Discussion • • jimmy loyens  

      3
      0
      Votes
      3
      Posts
      552
      Views

      jimmy loyens

      @mfalkvidd thanks for your reply. I had allready read these, but thanks for the links never the less. I have some bluetooth modules (hm-10 & at-09) in the mail. Allready have some i-tags laying around. I will see what i can make of this. My house is only one story so i would like to place one node in the middle of each room on the attic floor. If this works i will have some kick-ass presence detection , if it doesnt i will have some spare ble modules to play with. There just is no down-side to this
    • jimmy loyens

      [SOLVED] A2 interrupt doesn't wake node from sleep
      Troubleshooting • • jimmy loyens  

      10
      0
      Votes
      10
      Posts
      914
      Views

      jimmy loyens

      I just found this post on the forum: https://forum.mysensors.org/topic/6352/pin-change-interrupt-on-any-pin/11 It adds "_wokeUpByInterrupt = 0xFE; // Dirty hack to get out of MySensors sleep loop" at the end of every ISR and "// Unset value from dirty hack to get out of sleep loop (set in interrupt) _wokeUpByInterrupt = INVALID_INTERRUPT_NUM;" at the beginning of loop. I tried it, not knowing at all what i'm doing by adding these lines. But i do know it works!!! Even if it is a dirty hack, IT WORKS!!!! Now i can rewrite my code to do the processing/messaging in loop outside of the ISR. If anyone can explane what these lines do exactly please let me know. It would be even nicer if somewhere in the future there could be a sleep function in the MySensors library that supports these pinchange interrupt vectors, but this hack makes it work for now. Thanks for all the help!
    • jimmy loyens

      Help, sensor data is nolonger distributed to items
      OpenHAB • • jimmy loyens  

      3
      0
      Votes
      3
      Posts
      631
      Views

      jimmy loyens

      Its really strange but after saving the serialGW.rules file again (without change) everything started working again. But that was a good remark. Happened to me numerous times.
    • jimmy loyens

      Batt/temp/hum/light/6*dig pcb for grabs
      My Project • • jimmy loyens  

      2
      1
      Votes
      2
      Posts
      708
      Views

      Yveaux

      @jimmy-loyens You can post your (hardware) designs on www.openhardware.io, which is the MySensors hardware site!
    • jimmy loyens

      Serial gateway.rules sharing
      OpenHAB • • jimmy loyens  

      3
      0
      Votes
      3
      Posts
      595
      Views

      jimmy loyens

      @timo Do you use the mySensors binding or the serial binding to get your sensor data into openhab? I use the serial binding, so i have a rule to send the data to the right items. (btw since yesterday something broke and the data is no longer distributed to the items ). Might have to move over to the mySensors binding to. How is it working for you?
    • jimmy loyens

      Set sensor name & type (received) in openhab items
      OpenHAB • • jimmy loyens  

      1
      0
      Votes
      1
      Posts
      394
      Views

      No one has replied

    • jimmy loyens

      Cant set static node ID above 254
      Troubleshooting • year • • jimmy loyens  

      4
      0
      Votes
      4
      Posts
      689
      Views

      mfalkvidd

      Great work @jimmy-loyens, thanks for sharing