Navigation

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

    Best posts made by Damme

    • RE: Your workshop :)

      Hello everyone!

      It's fun seeing this thread alive again!

      Sorry I havn't been here for a long while, in the picture you'll see what have been keeping me occupied.. (the orange lawn mower, I'm reverse-engineering it!) and I also moved over from Arduino, atmega328p to esp8266 devices and more advanced cpu's (arm, cortex etc) and 'real' build enviroments..

      If there is any interest in my project, https://hackaday.io/project/6717-landlord

      The picture pretty much explains how my brain works.. I really need to clean up, might add another picture after that. Behind the mower two rigol devices are hiding, a scope and a p-psu.

      0_1461507797638_IMG_20160424_161735.jpg

      posted in General Discussion
      Damme
      Damme
    • MQTT Broker gateway

      How to Set-up MQTTGateway with OpenHAB

      What is MQTTGateway:
      MQTTGateway will act as a broker, a server. And any MQTT clients should be able to connect to it (Please let me know if you experience problems).
      MQTTGateway is a very simple implementation. It will not care if the client subscribes to anything or not.
      Every node package it receives it will publish to the client. Sketch name and version is also implemented.
      Most clients handle this well and just ignores messages it hasn't been subscribed yet.
      There are some settings in MQTT that can be good to take a look at.
      You will need to configure TCP_IP and TCP_PORT.
      MQTTGateway will also give nodes an ID between MQTT_FIRST_SENSORID and MQTT_LAST_SENSORID. The last position is stored in EEprom.

      As standard MQTT_SEND_SUBSCRIPTION is enabled. This basically means that the broker will send a empty payload to the node upon a subscribe package. This can be useful. Just keep in mind that you can receive empty payload packages.

      The MQTTGateway will also present its SketchName and SketchVersion.

      Lets get started!
      First follow https://github.com/openhab/openhab/wiki/Quick-Setup-an-openHAB-Server You can setup and try with DEMO configuration first.

      Then we need to unpack org.openhab.binding.mqtt into addons folder * NOTE (During development of MQTTGateway I found a bug inside openhab mqtt client which is solved in 1.6.0 nightly build. Use this nightly addon if you experience problems)

      • openhab.cfg
        All you need to do here is to add

        mqtt:mysensor.url=tcp://192.168.0.234:1883
        mqtt:mysensor.clientId=MQTT

      ClientID does not matter at all (just keep it short). And IP and Port is self explanatory.

      Now you can start OpenHAB, it will connect but nothing more will happen.
      This is because we hasn't subscribed to anything and OpenHAB will just ignore every incoming package.

      So here comes a sample configuration of OpenHAB.

      • items/test.items

        Group all
        Group node1 (all)
        Group node2 (all)
        Group sketch (all)

        Number node1_temp "Temp [%.1f °C]" (node1,all) {mqtt="<[mysensor:MyMQTT/20/10/V_TEMP:state:default]"}
        Number node1_humid "Humid [%.1f %%Rh]" (node1,all) {mqtt="<[mysensor:MyMQTT/20/11/V_HUM:state:default]"}

        Switch node2_sw1 "sw2" (node2,all) {mqtt=">[mysensor:MyMQTT/21/1/V_LIGHT:command:ON:1],>[mysensor:MyMQTT/21/1/V_LIGHT:command:OFF:0]"}
        Switch node2_sw2 "sw2 send + recieve example" (node2,all) {mqtt=">[mysensor:MyMQTT/21/2/V_LIGHT:command:ON:1],>[mysensor:MyMQTT/21/2/V_LIGHT:command:OFF:0],<[mysensor:MyMQTT/21/2/V_LIGHT:command:MAP(1on0off.map)]"}

        String sketch20 "Sketch name 20 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/20/255/V_SKETCH_NAME:state:default]"}
        String sketch21 "Sketch name 21 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/21/255/V_SKETCH_NAME:state:default]"}
        String sketch22 "Sketch name 22 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/22/255/V_SKETCH_NAME:state:default]"}
        String sketch23 "Sketch name 23 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/23/255/V_SKETCH_NAME:state:default]"}
        String sketch24 "Sketch name 24 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/24/255/V_SKETCH_NAME:state:default]"}
        String sketch25 "Sketch name 25 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/25/255/V_SKETCH_NAME:state:default]"}
        String sketch26 "Sketch name 26 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/26/255/V_SKETCH_NAME:state:default]"}
        String sketch27 "Sketch name 27 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/27/255/V_SKETCH_NAME:state:default]"}
        String sketch28 "Sketch name 28 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/28/255/V_SKETCH_NAME:state:default]"}
        String sketch29 "Sketch name 29 [%s]" (sketch,all) {mqtt="<[mysensor:MyMQTT/29/255/V_SKETCH_NAME:state:default]"}

      We also need to create a sitemap :

      • sitemap/test.sitemap

        sitemap demo label="Menu"
        Frame label="test" {
        Group item=node1 label="Temp hum node"
        Group item=node2 label="Switch node"
        Group item=sketch label="Sketch names"
        Group item=all label="Everything"
        }

      and a simple transformation file :

      • transform/1on0off.map

        1=ON
        0=OFF

      If everything worked and I didn't forget anything just fire up :

      http://[Openhab]:8080/openhab.app?sitemap=test

      After you restart one of your node's the data and sketch name should be visible.
      Openhab will forget everything after every restart. Use persistence to fix this (https://github.com/openhab/openhab/wiki/rrd4j-Persistence)

      posted in Controllers
      Damme
      Damme
    • RE: Antenna 101

      Lol
      I just realized why my wlan-antenna didn't work..👍 IMG_20140805_153548.jpg

      posted in Hardware
      Damme
      Damme
    • RE: Your workshop :)

      @Yveaux pff, it's clean room ESD class!

      posted in General Discussion
      Damme
      Damme
    • RE: 1.4 Beta

      @hek

      I just tried to send myself a picture over the network. real ugly code but it worked.. thought if I put a small cam and someone rings on the doorbell or something.. 🙂 (Right now I just read the data from SPI flash)

      posted in Announcements
      Damme
      Damme
    • SSMSG - Single file SQL MySensors Gateway

      This is what I've been working on, Exact purpose is still unknown, Probobly full of bugs and lacks functionallity.

      https://github.com/Damme/SSMSG

      start with no parameters and it will be running in background.

      • Requires version 1.4b
      posted in Development
      Damme
      Damme
    • RE: Open Source Home Automation (Raspberry)

      Maybe I'll leave the topic a bit, because I don't use raspberry myself but a linux server for my 'brain' so I don't have any problem with 'slowness'.
      I tried out openhab and actually likes it now, it is a bit ass to start up the configuration but then you learn it you'll easy put in new stuff. I might do a tutorial later on..

      But right now I'm looking at the communication between mysensors and openhab and yes I know there is one script written but I was thinking of making a new gateway software for the arduino.
      using mqtt protocol that is supported in openhab, and has a arduino library http://knolleary.net/arduino-client-for-mqtt/ ( https://github.com/knolleary/pubsubclient )

      an alternative to mqtt is to write something completely new using tcp binding or so, but I think its inventing the wheel all over again.

      posted in Controllers
      Damme
      Damme
    • RE: 1.4 Beta

      @Damme said:

      // gw.sleep(SLEEP_TIME); //Seems to break recieing message, loosing ~75%

      me just dumb here, delay(SLEEP_TIME); works. gw.sleep puts radio in sleep I guess.

      posted in Announcements
      Damme
      Damme
    • RE: Generalizing MySensors

      Good writing! me myself is writing a MQTT broker instead of serialgateway / ethernet gateway, Right now I'm waiting for new hardware so the development has stopped.

      One thing I really want is better ack support. I.E. I send on to a relay, and I request ack. I really think this should be the gateway to really see that the message got away and recieved, it not - retry (or report fail back).

      I also think we need to start thinging about MySensors 2.0 and it should not be VERA based protocol.

      posted in Development
      Damme
      Damme
    • RE: CloudFlare

      OT: I recommend hackers keyboard for android devices.. 🙂

      posted in Announcements
      Damme
      Damme
    • Mysensors MQTT gateway

      Hello

      MQTT Gateway for mysensors.

      https://github.com/Damme/MyMQTT

      Requires mysensors lib 1.4b

      //Daniel

      posted in Development
      Damme
      Damme