I started to to write on a middleware making it possible to communicate with the MySensor network since I don’t own a Vera and didn’t plan to buy one. This project started long before it actually become MySensor. Due to the few hours I have to spare it have taken sometime.
I currently call the middleware msgw (MySensorGateWay)
The middleware has evolved from being a solution where I had to write all the graphical presentation of the collected data to actually become a some type of middleware.
Today it supports
- bidirectional integration with Openhab
- unidirectional integration with Domoticz
- storing values in rrd files. You have to create your own rrd files.
- assigning Radio IDs
I spend the time integrating deeper to Openhab since that is what I plan to have as a frontend GUI. I will be fairly easy to add other integrations.
The middleware is written in python and runs on a Raspberry connected to a Arduino UNO using usb.
I’m currently running some battery test for my network, not turning out to be what I hoped for. Currently no battery driven sensor sensor have survived a week.
I implemented RGB control from Openhab to a sensor (I call it a sensor, should maybe call it a node). By sending the RGB hex code as V_IR_SEND command to the sensor.
I also implemented an RFID tag reader. that reads the ID of the fob and sends it to the gateway. Here I use the type V_IR_RECEIVE
A combination node using both RFID and RGB can be found at https://github.com/wbcode/ham/blob/master/arduino/MySensorRFIDandRGB/RGBandRFID/RGBandRFID.ino
For fun or testing purpose I used to fobs to control a relay switch. Depending on which fob were used. Openhub (it’s called a rule in openhab) sent a on or off to the relay through the mygm..
rule RFID1
when Item Info_Text_FV_Mancave changed
then
switch (Info_Text_FV_Mancave.state) {
case 'CD59469F' : {say("Card")
sendCommand(Relay1_FV_Mancave,ON)
}
case '9DF07DCC' : { say("Keyring")
sendCommand(Relay1_FV_Mancave,OFF)
}
}
end
My goal is to monitor and automate my house. It will take a long time to get there since I only have a few hour now and then to work on the project. The msgw will only be a middleware that integrates between the sensor network and a GUI.
All the code I have written can be found on github: https://github.com/wbcode/ham
Some screenshots from the development of msgw as I call it now.
Debug functions and back when I still didn’t plan to integrate it to a GUI frontend.
Also old and will be modified to be proxy in through openhab. I want to have “map representing” of the current “now” status of all my sensors. The red over the WC is a motion sensor that have been triggered.
Domoticz - dashboard using a domoticz dummy sensor.
Openhab - current values received and controls to send commands into the network
Openhab - RGB controler
RRD graphs generated and presented by Openhab. This one showing a humidity/temp battery driven sensor.
Current lab corner, showing Raspberry, UNO, relay node and my combined RFID and RGB node. (Also some DVDs, who used DVDs today?)
WB