Fibaro HC2 Virtual Device Gateway



  • I just got some got some basic functionality on a HC2 Controller Gateway for MySensors.

    In my first attempt to make this an fully functional MySensor controller it have the following functionality:

    • Register new Ardino Nodes/Relays with a new free radio ID

    • Autocreate new virtual Device for Door Sensors

    • Update Icon, Status and Last Update on Door sensors when changed

    • Autocreate new virtual device for Light Sensors (Relay)

    • Update Icon, Status and Last Update on Light/Relay sensors when changed

    • Turn On/Off Light/relay sensor from virtual device

    Some teasers on the virtual devices:
    DoorSensor.png
    LightSensor.png
    LightSensorSmall.png

    Thanks to hek for his support and time on all my questions on the MySensors API.

    Next step: Order more hardware for more sensors to test with:)

    //Mathias



  • Now also working with temperature sensor

    temp_large.png
    temp_small.png

    Seems to be some conversion issues when writing decimals to label values, it adds way to many decimals even if i try to convert it to just two decimals..

    //Mathias



  • Restriction #1 You cannot add a MySensor sensor as a main source for light,temp, humidity or thermostat on a room.

    This will not be added to the next coming releases but has been passed to the developeras at fibaro to be able to add Virtual Devices as default devices to room..

    //Mathias



  • Restriction #2 Its not possible from a MySensor/Virtual Device to register an event to be listed in the Events Panel.

    But you could have some history with fibaro:debug instead or other external source if needed.

    //Mathias



  • Decimals solved in labels by adding "\"" before and after value

    fibaro:call(nodeDevice,"setProperty", "ui.lblSensorStatus.value", "\"" .. value .. "\"")
    

    2015-06-22_10-13-36.png



  • Its looking pretty good!



  • Nice work 🙂
    What kind of Gateway do you use?
    To get just 2, decimlas you can try this instead, then you got the celcius sighn to

    "ui.lblSensorStatus.value", value.."°")


  • Im using an Ethernet Gateway as described here on MySensors.org with an arduino nano and W5100 ethernet module.

    Will add a celcius character so it looks nicer, thanks.


  • Admin

    But you're also using this branch of the library right?
    https://github.com/mysensors/Arduino/tree/gateway-refactoring

    (at least when compiling eth-gateway..)



  • No i think i took the one you could download from the ordinary pages. What is the differences, im pretty new in the arduino world:)


  • Admin

    Oh, even better! I thought the plugin needed a gateway which acted as a client (connecting to controller).



  • No, HC2 is connecting to the MySensor Gateway. Fibaro have locked down the ability to create a socket listener and is only available if you create a plugin which has been disabled for public users to upload.

    The code in HC2 is implemented as a Virtual Device that is creating an outbound tcp connection to the MySensors Ethernet Gateway.



  • Thanks for the reply, now i just have to wait for everything to come home so i can test this 🙂 more questions will come 😉



  • Hi
    I know this is an old topic, but I am just getting started with Mysensor.
    I would like to add my Fibaro setup.
    @mathias would you be able to share your LUNA code for the Virtual device to integrate the Gateway?
    And just out of interest what version of Fibaro are you running?
    It would be much appreciated
    Thanks
    Chris



  • Hi
    I'm also interested in this code for HC2



  • hello,
    I've a HC2 and I'm very interresting to test this code ... where can I found it ?
    thanks



  • Any progress on this topic? Fibaro have good controller, it would be interesting to have it fully integrated with Mysensors.



  • @Tomasz-Pazio Nothing has happened here. Have reached out a few times.
    I am using Domoticz with FibaroLink in the meantime. Would love to not have Domoticz in the middle but with Fibaro not opening plugins and dont know how to code this just have to do..

    I am trying to learn Lua very slowly.

    Hope the get there some point.

    Chris



  • Hello @mathias I dont know if you are still in the business of Writing code and solve problems like the Fibaro one.

    Could you please share the solution in full with the rest of us. It seems like this topic Fibaro/Mysensor died 2 years ago. Why is that? It feels strange when you got a proof of concept.

    If Mathias is out of business for some reason, could you @hek clearify things with the fibaro/mysensors. I noticed that you participated in a discussion at the z-wave forum in the sam matter.

    Regards/Med vänlig hälsning
    Thomas


  • Admin

    It seems abandoned, but I'll ping @mathias over email.


Log in to reply
 

Suggested Topics

  • 2
  • 48
  • 2
  • 10
  • 2
  • 17

5
Online

11.4k
Users

11.1k
Topics

112.7k
Posts