Navigation

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

    Posts made by SquareKinematics

    • RE: What did you build today (Pictures) ?

      Not MySensors, but related. Power over Ethernet (802.3af compliant) addon for the raspberry pi zero. I plan to use this for high power & high reliability devices where wireless will not work.

      Top one is a higher power version, bottom one just uses an off the shelf regulator.
      0_1512445820284_2017-12-04 19.44.55.jpg

      Currently these just have some IR LED's to control IR devices.

      posted in General Discussion
      SquareKinematics
      SquareKinematics
    • RE: What did you build today (Pictures) ?

      @Nca78 I will be sure to do that when it's done, it's still a little rough around the edges 🙂

      posted in General Discussion
      SquareKinematics
      SquareKinematics
    • RE: What did you build today (Pictures) ?

      4x cheap load cells under each foot of my bed
      0_1511141720759_2017-11-19 17.33.49.jpg

      Sparkfun HX711 breakout and an Arduino
      0_1511141724939_2017-11-19 17.33.58.jpg

      Was going for a bed occupancy sensor, but I got a pretty decent scale out of it, it is sensitive enough that it registers if I put my water bottle down on the bed.

      posted in General Discussion
      SquareKinematics
      SquareKinematics
    • RE: What does --my-is-rfm69hw do?

      @manutremo Thank you for that info-graphic. You are and @gohan are correct, I have an RFM69W. This is what I get for buying from the cheapest seller on eBay 😒

      posted in General Discussion
      SquareKinematics
      SquareKinematics
    • RE: What did you build today (Pictures) ?

      0_1509387688972_2017-10-30 11.14.08 - Copy.jpg

      I soldered together the PCB I made for my RFM69 Pi Gateway. Next step is to put it in a nice enclosure

      posted in General Discussion
      SquareKinematics
      SquareKinematics
    • What does --my-is-rfm69hw do?

      I have a raspberry pi gateway setup with an RFM69HW radio.

      I switched my Raspberry Pi Gateway from MQTT to TCP, and I was met with my only sensor node repeatedly sending find parent messages. It worked only in very close proximity to the gateway.

      After a bit of debugging I noticed that I added the --my-is-rfm69hw flag in my transition from MQTT to TCP. After removing this everything resumed normal operation.

      What does adding this flag do (my understanding is that is just changes the TX power levels), and why did it drastically reduce the range?

      posted in General Discussion
      SquareKinematics
      SquareKinematics
    • RE: Cannot connect mysensors to Home Assistant

      @martinhjelmare Good eye! I can't believe I missed this. Thank you. This solved my problem.

      I look forward to using this in my home automation setup 🙂

      posted in Home Assistant
      SquareKinematics
      SquareKinematics
    • RE: Cannot connect mysensors to Home Assistant

      @gohan Oh I didn't know I could put them there, I will do that!

      posted in Home Assistant
      SquareKinematics
      SquareKinematics
    • RE: Cannot connect mysensors to Home Assistant

      The messages are being published to the broker, that part is working. The last bit in my post shows what the broker is sending/receiving.

      Edit: From the manual

          --my-controller-ip-address=<IP> Controller or MQTT broker ip.
      

      In this case it represents my MQTT broker IP. I believe I have the usage correct.

      posted in Home Assistant
      SquareKinematics
      SquareKinematics
    • RE: Cannot connect mysensors to Home Assistant

      How else will it get the IP of my broker then? That's the only field I put in my server IP hosting home assistant the the MQTT broker.

      posted in Home Assistant
      SquareKinematics
      SquareKinematics
    • Cannot connect mysensors to Home Assistant

      Edit 2017-10-06: Issue solved!
      @martinhjelmare said in Cannot connect mysensors to Home Assistant:

      @SquareKinematics

      Your mysensors home assistant config is missing the value for the device key. In your case it should be mqtt.

      I've set everything up to test a simple switch and read the state in home assistant, it seems like everything is working except for home assistant, home assistant seemingly ignores the MQTT messages and does not show any mysensors entities.

      This is my setup:

      Switch→Arduino Nano→RFM69→RFM69→RaspberryPi→MQTT→MQTT broker→home assistant

      The raspberry pi is only running the mysensors gateway, the MQTT broker and home assistant are running on a server.

      From what I can tell there is an issue between the MQTT broker and home assistant because everything else works up to that point. Home Assistant simply does not display any my sensors entities, it is as if it is ignoring the MQTT messages. Any advice to get the mysensors entities showing would be much appreciated. Configuration and debug follows.

      This is the arduino code, using the 2.2 mysensors library, and arduino IDE 1.8.3

      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_RFM69
      #define MY_RFM69_NEW_DRIVER
      #define MY_RFM69_FREQUENCY RFM69_915MHZ 
      #define MY_IS_RFM69HW
      #define MY_NODE_ID 10
      
      #define MY_RFM69_NETWORKID 100
      
      #include <SPI.h>
      #include <MySensors.h>
      #include <Bounce2.h>
      
      #define CHILD_ID 3
      #define BUTTON_PIN  3  // Arduino Digital I/O pin for button/reed switch
      
      Bounce debouncer = Bounce(); 
      int oldValue=-1;
      
      // Change to V_LIGHT if you use S_LIGHT in presentation below
      MyMessage msg(CHILD_ID,V_TRIPPED);
      
      void setup()  
      {  
        // Setup the button
        pinMode(BUTTON_PIN,INPUT);
        // Activate internal pull-up
        digitalWrite(BUTTON_PIN,HIGH);
      
        // After setting up the button, setup debouncer
        debouncer.attach(BUTTON_PIN);
        debouncer.interval(5);
      
      }
      
      void presentation() {
        // Register binary input sensor to gw (they will be created as child devices)
        // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage. 
        // If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
        sendSketchInfo("testing", "2.0");
        present(CHILD_ID, S_DOOR);  
      }
      
      
      //  Check if digital input has changed and send in new value
      void loop() 
      {
        debouncer.update();
        // Get the update value
        int value = debouncer.read();
      
        if (value != oldValue) {
           // Send in the new value
           send(msg.set(value==HIGH ? 1 : 0));
           oldValue = value;
        }
      }
      

      These are my pi configuration options, also running version 2.2

      sudo ./configure --my-mqtt-client-id=rfm --my-mqtt-user=hass --my-mqtt-password=notarealpassword --my-mqtt-publish-topic-prefix=rfm-out --my-mqtt-subscribe-topic-prefix=rfm-in --my-transport=rfm69 --my-rfm69-frequency=915 --my-controller-ip-address=192.168.0.20 --my-gateway=mqtt --my-port=1883
      

      This is my home assistant configuration

      mysensors:
        gateways:
          - device:
            persistence_file: '/home/hass/.homeassistant/mysensors.json'
            topic_in_prefix: 'rfm-out'
            topic_out_prefix: 'rfm-in'
        optimistic: false
        persistence: true
        retain: true
        version: '2.0'
      mqtt:
        broker: 192.168.0.20
        port: 1883
        client_id: home-assistant-1
        keepalive: 60
        username: hass
        password: !secret mqtt_password
      

      Sample arduino serial monitor output

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.2.0-beta
      
      17 MCO:BGN:INIT NODE,CP=RPNNA---,VER=2.2.0-beta
      26 TSM:INIT
      27 TSF:WUR:MS=0
      29 TSM:INIT:TSP OK
      31 TSM:INIT:STATID=10
      33 TSF:SID:OK,ID=10
      34 TSM:FPAR
      39 TSF:MSG:SEND,10-10-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      784 TSF:MSG:READ,0-0-10,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      789 TSF:MSG:FPAR OK,ID=0,D=1
      2048 TSM:FPAR:OK
      2049 TSM:ID
      2050 TSM:ID:OK
      2052 TSM:UPL
      2060 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2069 TSF:MSG:READ,0-0-10,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2074 TSF:MSG:PONG RECV,HP=1
      2076 TSM:UPL:OK
      2078 TSM:READY:ID=10,PAR=0,DIS=1
      2092 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2101 TSF:MSG:READ,0-0-10,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2114 TSF:MSG:SEND,10-10-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.2.0-beta
      2138 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      4160 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=11,pt=0,l=7,sg=0,ft=0,st=OK:testing
      4184 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:2.0
      4197 TSF:MSG:SEND,10-10-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
      4203 MCO:REG:REQ
      4220 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      4230 TSF:MSG:READ,0-0-10,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      4235 MCO:PIM:NODE REG=1
      4237 MCO:BGN:STP
      4238 MCO:BGN:INIT OK,TSP=1
      4252 TSF:MSG:SEND,10-10-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      10210 TSF:MSG:SEND,10-10-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
      10233 TSF:MSG:SEND,10-10-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
      

      Sample gateway debug

      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0-beta
      mysgw: MCO:BGN:INIT GW,CP=RPNGL---,VER=2.2.0-beta
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: MCO:BGN:STP
      mysgw: MCO:BGN:INIT OK,TSP=1
      mysgw: Attempting MQTT connection...
      mysgw: connected to 192.168.0.20
      mysgw: MQTT connected
      mysgw: Sending message on topic: rfm-out/0/255/0/0/18
      mysgw: TSF:MSG:READ,10-10-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      mysgw: TSF:MSG:BC
      mysgw: TSF:MSG:FPAR REQ,ID=10
      mysgw: TSF:PNG:SEND,TO=0
      mysgw: TSF:CKU:OK
      mysgw: TSF:MSG:GWL OK
      mysgw: TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      mysgw: TSF:MSG:READ,10-10-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      mysgw: TSF:MSG:PINGED,ID=10,HP=1
      mysgw: TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      mysgw: TSF:MSG:READ,10-10-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      mysgw: TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      mysgw: TSF:MSG:READ,10-10-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.2.0-beta
      mysgw: Sending message on topic: rfm-out/10/255/0/0/17
      mysgw: TSF:MSG:READ,10-10-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
      mysgw: Sending message on topic: rfm-out/10/255/3/0/6
      mysgw: TSF:MSG:READ,10-10-0,s=255,c=3,t=11,pt=0,l=7,sg=0:testing
      mysgw: Sending message on topic: rfm-out/10/255/3/0/11
      mysgw: TSF:MSG:READ,10-10-0,s=255,c=3,t=12,pt=0,l=3,sg=0:2.0
      mysgw: Sending message on topic: rfm-out/10/255/3/0/12
      mysgw: TSF:MSG:READ,10-10-0,s=3,c=0,t=0,pt=0,l=0,sg=0:
      mysgw: Sending message on topic: rfm-out/10/3/0/0/0
      mysgw: TSF:MSG:READ,10-10-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
      mysgw: TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
      mysgw: TSF:MSG:READ,10-10-0,s=3,c=1,t=16,pt=2,l=2,sg=0:1
      mysgw: Sending message on topic: rfm-out/10/3/1/0/16
      mysgw: TSF:MSG:READ,10-10-0,s=3,c=1,t=16,pt=2,l=2,sg=0:0
      mysgw: Sending message on topic: rfm-out/10/3/1/0/16
      mysgw: TSF:MSG:READ,10-10-0,s=3,c=1,t=16,pt=2,l=2,sg=0:0
      mysgw: Sending message on topic: rfm-out/10/3/1/0/16
      mysgw: TSF:MSG:READ,10-10-0,s=3,c=1,t=16,pt=2,l=2,sg=0:1
      mysgw: Sending message on topic: rfm-out/10/3/1/0/16
      

      Sample MQTT monitoring (when switch is toggled)

      Client mosqsub/22910-E31230v5 sending CONNECT
      Client mosqsub/22910-E31230v5 received CONNACK
      Client mosqsub/22910-E31230v5 sending SUBSCRIBE (Mid: 1, Topic: #, QoS: 0)
      Client mosqsub/22910-E31230v5 received SUBACK
      Subscribed (mid: 1): 0
      Client mosqsub/22910-E31230v5 received PUBLISH (d0, q0, r0, m0, 'rfm-out/10/3/1/0/16', ... (1 bytes))
      rfm-out/10/3/1/0/16 0
      Client mosqsub/22910-E31230v5 received PUBLISH (d0, q0, r0, m0, 'rfm-out/10/3/1/0/16', ... (1 bytes))
      rfm-out/10/3/1/0/16 0
      Client mosqsub/22910-E31230v5 received PUBLISH (d0, q0, r0, m0, 'rfm-out/10/3/1/0/16', ... (1 bytes))
      rfm-out/10/3/1/0/16 1
      
      posted in Home Assistant
      SquareKinematics
      SquareKinematics