Navigation

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

    Ivan Fontanals

    @Ivan Fontanals

    0
    Reputation
    2
    Posts
    167
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Ivan Fontanals Follow

    Best posts made by Ivan Fontanals

    This user hasn't posted anything yet.

    Latest posts made by Ivan Fontanals

    • RE: How can I communicate with the Gateway exposing a Rest API?

      Thanks @mfalkvidd for your answer.
      Let's see if I understood what you meant.

      I could use an existing controller ( For instance Home assistance ), use MySensors Gateway ( without touching anything ) and link it to my arduino via RF24? I would like to avoid extending the gateway if it's not the way 🙂

      But, how will the Home assistance know that I have a new Arduino with a RF24 module? The Controller will only talk to the gateway, correct? My arduino, in the other side, will have also the MySensors library and will implement the "presentation" method...but as far as I know, this communication is against the gateway.

      So...the controller will be able to talk with this gateway and send commands to each sensor ( via gateway ) ? Is that the way?

      I have the skills ( I hope at least 🙂 )....but it's my first time that I will work with this kind of gateways, Controllers, etc...and as you can see, I'm a little bit lost about the responsibility of each component.

      Again...thank you so much!

      posted in General Discussion
      Ivan Fontanals
      Ivan Fontanals
    • How can I communicate with the Gateway exposing a Rest API?

      Hi all!
      I'm new using mySensors and also this will be my first project using sensors, rf24 modules, etc...I think that I'm a little bit confused about how the Gateway works...and I just would like to confirm with you which is the best way to achieve the following:

      • I have configured several Arduinos + RF24 that will control my lights, sensor temperature, etc... All the "sensors" should communicate with the Gateway, which currently is a Raspberry Pi with a RF24 module. The current gateway is an Ethernet Gateway, so the port 5003 has been exposed.
      • My idea is to be able to control each light from Internet, cell phone, or whatever...so what I had in mind was to publish a REST API inside the gateway to capture the command and then, send the correct data to the correct arduino / sensor / relay.

      For instance, if I have 2 lights, I could switch the first one ON with : POST htpp://xxxxx/1/ON

      And here my questions:

      • I have not found any example reading from a REST API from the gateway and re-sending the request to the remote sensor (using rf24) . How I have to use the gateway to achieve that?
        Do I need a Controller or I can easily add this behaviour into the Ethernet Gateway?

      I can imagine other solutions...for instance, a Python or NodeJS program acting as HTTP server, and sending MQTT messages into the gateway...but I think should be easier to consume http request inside the gateway.

      Am I wrong? Which are your thoughts?

      Thank you very much in advance!

      Regards

      posted in General Discussion
      Ivan Fontanals
      Ivan Fontanals