Can I host controller like openHAB or PIdome on a VPS over the internet?



  • I want to build a system where my gateway could directly send messages to controller, and my controller is over the internet(not local).
    Can this be done? If yes, can anyone guide me?
    Thanks



  • You would need a local system in order to transmit the local gateway data to the hosted VPS. Something like a raspberry pi would handle that easily, you just need to mirror the serial data to the remote systems, and relay the remote requests to the local mysensors network. The location is essentially irrelevant. It does introduce more points of failure though, so depending on your technical abilities it may be worth doing or it may not, your call!


  • Hardware Contributor

    Why not use an MQTT Client Gateway and a MQTT cloudservice on the internet?



  • @FotoFieber can you please elaborate? I am pretty new to MQTT.
    I understand that MQTT uses ethernet port but MQTT is different from HTTP(The one we normally use to send requests to a webserver.)
    Eg Scenario: I have openHAB setup on a VPS. How can I use it as a controller through MQTT?

    Would it be something like this?
    MQTT Broker->MQTT Service->MQTT based server(VPS)



  • @Chester I wish to host the controller online, so that the user will only need to install a gateway device at premises. Which would in turn send all the commands to the controller just like a normal gateway but in this case the controller would be in the cloud.


  • Hardware Contributor

    @Prateek-Gupta
    http://en.wikipedia.org/wiki/MQTT

    MQTT is a simple protocol. To transfer messages to multiple consumers, a message broker like mosquitto http://mosquitto.org/ is used. Think of it as a message queuing service. You can connect multiple clients to an mqtt broker and multiple brokers can be connected to each other.

    To use this scenario with mysensors, I use an MQTT Client Gateway: http://forum.mysensors.org/topic/524/mqtt-client-gateway/27

    My mosquitto server is running on my synology NAS.



  • @FotoFieber Okay. Can we not use a WiFI chip like ESP8266 to send data to a MQTT Broker Service and make our VPS hosted controller listen to MQTT Broker Service?



  • @Prateek-Gupta I wasn't suggesting that you have the Pi as a controller, simply as a device pass serial/MQTT/MySensors data from the local sensors to the hosted VPS.

    The reason I suggested the Pi as a gateway was more for available processing power at a still reduced power useage. Sure, you could use something like an ESP8266, but then you are working within very finite constraints, With something like a Pi and an NRF radio plumbed into the GPIO of the Pi, you could create a gateway that can route MySensors packets over the local network, route the packet into to the hosted VPS, and also do things like create buffers for times where internet connection is out, or add other packages to the Pi to allow for expanded useability that you couldn't do with an ESP8266. That extra memory and flexibility for a few Watts of power? Priceless.

    Just remember we are giving ideas based on a pretty vague question. Are you looking to have openHAB integrate with MySensors only? Sure, and ESP8266 could probably do the job. Do you want to add Zwave support too? Uh oh, the ESP is starting to look pretty underpowered at that point.



  • @Chester I understand that my question is pretty vague but I want to thank you for still answering my queries.
    Yes, I very much agree that a Pi could be used as a mirroring device which could send Serial/MQTT data to the VPS and vice versa..

    No, I don't plan to add zwave, due to cost constraints.

    I want to add ESP so that I don't have wires dangling from the gateway.

    At this point, I have decided the following:

    • To have RPi+NRF24L01+ESP8266 as a gateway device
    • RPi+NRF24L01 handle all the sensors, routing
    • ESP8266 is used to send MQTT/Serial data to the cloud controller like openHAB using WiFi
    • User always has an option to use wired connection as RPi has a ethernet port built in
    • In case of internet outages, gateway device can make a stack of incoming data from sensors, would send them to the cloud once internet is back.

    Please have a look at this and let me know, if I am on the right track.

    Also, do you know of any resource which talks about having gateway and controller as a single device?

    Thanks once again.



  • I have a similar issue. I want to collect data from several locations and potentially also control some relays remotely. Some locations (Haiti0 will need to use a SIM card to send data. So I am looking for a reliable cloud based system to collect data and possibly control.

    I stumbled on this http://developers.sensetecnic.com/ , which is free. Lets you store, view data privately, and they host node-red so you can run rules and notifications or send data anywhere. It seems like a great offering but for some reason there is not that many people using it.

    The other thing i though about was having the remote locations post the data to dweet.io and then I could retieve from any machine i decide to be the central server. you can also do this privately for a few buck a month. If your channel resembles MQTT then you can run node-red locally and from there do formal MQTT or just a serial connection to any controller or board.

    I am still just testing different things. Amazon started their IoT offering yesterday which is currently free.


Log in to reply
 

Suggested Topics

  • 2
  • 10
  • 2
  • 5
  • 6
  • 48

37
Online

11.4k
Users

11.1k
Topics

112.6k
Posts