Gateway for Pachube Or Mysql Database



  • Hello,

    I have started Home automation one year ago and I'm really interested on this project.
    As soon as understood, the gateway are always "server" gateway and are not sending data automatically like a "client" can send information on each reception.

    My idea is to be able to use gateway to send informations from sensors to a storage place in order to be able to make charts and generate actions.

    My first idea is to use the ethernet gateway and make sketch to make a html request to a php server with Post argument as var to be integrated inside a database. like this project: http://www.instructables.com/id/Save-data-of-temperature-and-humidity-on-MySQL-wit/
    I already have make this kind of plateform with lots of sensors on same arduino but the idea to be able to place sensors everywhere with RF transmition is really a good view, missing at home for me!

    The second idea is to make pachube request to store datas. using this kind of sketch => http://arduino.cc/en/Tutorial/PachubeCient )

    I don't know if someone have think about a similar idea?
    What are your opinion about this? Some recommendation?

    Thank you.


  • Hero Member

    Hello,

    I've taken the rever approach:

    • sensors are received by a gateway and pushed in Domoticz
    • I take all sensor values and I automagically push them every 10mn to pachube.

    cosmodom4

    This way I have best of both world, as long as the middle database correspond to mysensors capacities.



  • Hi, Thank you for your ideas.
    I'm not sure but as I have understand your script, in fact, the script is client and ask to the Mysensor gateway the values which have been send back to the domoticz script and sent to pachube.

    So: perl script => MysensorGW => perl script => Pachube
    the refrech rate is done by the perl script

    The problem of this, if i'm not wrong is to have a high speed in case you would like to see a door opening and manage alarm system for example. The problem is also for me to be able to receive action from external system to send relay action for exemple => so need gateway to be both server and client...

    On the same way, i dont understand how and where are stored the values inside the gateway if not used on each reception, are they stored somewhere to be able to answer them when serial request arrive?
    BR.


  • Mod

    See my post regarding MQTT here http://forum.mysensors.org/topic/175/open-source-home-automation-software/18

    With MQTT its easy to subscribe to the same sensor twice, once to publish the data to e.g pachube, once from your home automation software.



  • Here's how I'm charting the data collected,

    http://forum.mysensors.org/topic/61/mysensors-electricimp-xively

    Electric Imp can easily be replaced with arduino with connection to web via ethernet or wifi.


  • Hero Member

    @legeantvert said:

    On the same way, i dont understand how and where are stored the values inside the gateway if not used on each reception, are they stored somewhere to be able to answer them when serial request arrive?

    You could bypass this on some kind of events obviously !

    Actually my perl gateway is acting as the server Vera is for the arduino gateway. So from there I can trigger external URL, store data in a sqlite3 database... and so on !



Suggested Topics

6
Online

11.4k
Users

11.1k
Topics

112.7k
Posts