Navigation

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

    Best posts made by thazlett

    • CC128 Node

      Hi all, this is my first actual post on here so be nice 🙂

      I have been using MySensors with Domoticz on a Pi (original one) for a few months now. Very impressed with it and have had fun setting it up. I have coded a few of my own random little nodes. I have a number of projects planned based on MySensors. I have learned a lot with this project.

      What I would like to do now is get my CC128 power meter to send data via MySensors. I have no real need to do this. I just feel like it. Currently it is connected via serial to another Pi. The Pi has a cronjob that runs every minute, this reads the serial/xml from the CC128. The cron/script grabs the watts and temp sensor values and posts them to domoticz via my WiFi / json url. In Domoticz I have some dummy devices which display those values.

      Separate to this, the cronjob also sends the values off to a graphite/grafana server I have running on a VM. So I end up with a number of nice graphs. Domoticz graphs are also available to me in grafana via influx db.

      Anyway, has anybody done this with MySensors before? I can't see that anyone has. From the research I have done this morning, I just need a way for an Arduino/Sensor node to read serial/xml from the CC128 and parse them to the gateway with the appropriate variables. Essentially a node would replace the cronjob/pi.

      Any advice would be greatly appreciated! I will post any updates / progress I make here.

      Some pictures of the device(s):

      alt text

      alt text

      alt text

      As you can see, I have the CC128 powered by an old phone battery + one of the cheap TP4056 chargers / USB connected. This is part of my other plan (to have everything sort of survive a power cut/outage)

      posted in My Project
      thazlett
      thazlett
    • RE: Cheap Asda USB charger + Sensor node

      So I got another one of these and made a motion sensor version 🙂
      alt text

      I was thinking about making a multi sensor version of this. I have the sketches for many combinations of multi sensor sketches I have mashed together.

      posted in My Project
      thazlett
      thazlett
    • IP Gateway based on ncat + socat + USB

      I have been trying out different controllers (I use domoticz right now and have for a while). Having a TCP/IP based gateway like the ESP8266 is useful for this as you can have multiple clients connect to it, unlike a USB/Serial based one.

      What I ended up doing was using ncat (nmap package) and socat in this manner to basically create a linux based version of a TCP/IP based gateway. So I can use the USB/Serial based gateways here.

      So far this seems to work with mysensors and rflink very well for me (run two instances for each serial port and tcp port. I did not find much info on this when I was googling around so I thought I would share:

      #!/bin/bash
      
      port=5003
      serial=/dev/ttyUSB0
      baudrate=b38400
      
      ncat --listen --broker --keep-open 0.0.0.0 $port &
      socat $serial,$baudrate TCP:127.0.0.1:$port &
      
      

      My plan is to shove this on a pi zero w on start up with my rflink and mysensors gateways attached. Then I can just tell my controller(s) to connect to my 'gateway box' over my network. I could probably put it into a docker container or systemd/init script to do things a little cleaner(&) but hey, it works.

      posted in My Project
      thazlett
      thazlett