What makes a device controllable with the mobile app?



  • OK, so the only reason I am posting this here is because I tried to find the answer on the micasaverde forum and I got no response (as seems to be usual on that forum for most of the things I post unfortunately). I am going to pose this from a MySensors perspective since I am on this forum.

    What I am wondering is what luup file deals with the presentation of a device from outside of the Vera controller e.g. the mobile app? In other words, when I go to the mobile app on my phone, what tells that to show, say an on/off switch, when viewing a device in the list to be able to turn that device on or off? The reason I ask is that I am working on modifying a plugin for an HTTP switch to work with the ESP Easy firmware that I am using on some of my devices. I can create a switch and control it fine when I connect directly to the Vera box, but when I go to the mobile app, the device is listed, but there is no control to turn it on or off. I figured if I could figure out how it is done on the MySensors side of things I may be able to get it to work for this plugin.

    I am guessing that the Vera plugin for MySensors was written by @hek, but I could be wrong. Is there anyone that may have knowledge of how the Vere plugin works that can help?



  • Another place I noticed that the devices were not showing up is when allowing devices for discovery with the alexa plugin. I have 3 devices that use the ESP Easy firmware and I cannot control them directly from anything but connecting directly to the Vera controller.


  • Mod

    Have you ever considered any mqtt solution? Or cayenne mydevices or adafruit iot?



  • Have I ever thought of using MQTT? I had thought about it, just haven't dove into that yet. Most of my MySensors devices are running on nRF24L01 radios and that part is running good.

    One of my main reasons for doing this is to learn Vera plugin development a bit. The position I am in with this I think is a good way to learn some of the little things about plugin development without having to write an entire plugin from scratch right off the bat. Everything works fine when I connect directly to the Vera. I can turn the devices on and off, use them in scenes and just about anything that I would normally do on the Vera side. The only thing that doesn't seem to be working is anything that connects to my Vera from the getvera site when connecting to my account.


  • Mod

    I mentioned mqtt because it's more widespread and so it's more probable you may find a more tested mqtt plug in rather than a mysensors one. I don't know anything about Vera, I'm just trying to approach the problem from a different perspective 😀



  • @gohan Thanks, I appreciate the help. I do understand that MQTT is more widespread, but as mentioned, I am mainly doing this to learn more about plugin development. That and once it is done, I can give back an option for people that may have a lot of devices set up with ESP Easy and want to switch to Vera, but don't want to re-flash all of their devices.


  • Admin

    I don't know which app you are talking about but I guess the app must recognise the device type. The MySensors plugin mostly uses "standard" device types which probably shows up fine... but we also have a few custom once... like the distance sensor.

    If the app doesn't recognise the type, you probably won't see it.


  • Mod

    @hek
    It seems that locally everything is working, but on the cloud service he can't interact with the mysensors devices. Could it be that plugins only work locally on the Vera? (I wouldn't be surprised as cloud services are usually not very flexible)



  • @hek The app I am talking about is the Vera app for Android. Where can I find/define the device type?

    @gohan That is exactly it. Locally everything is working, but I see what @hek is saying that if the app doesn't recognize the device type, then it won't work from the app.


  • Admin

    Not sure, I haven't tried their cloud service. If you start modifying and create new devices their "cloud" must know how to create the layout... so they would need the locally stored device files (xml/json) which contain the presentation logic.



  • @hek OK, I'll rephrase the question. Where would I find the device type for a standard switch in the MySensors plugin? If I know where to find it there I may be able to find out what I need to change in the new plugin.


  • Admin



  • @hek ok, I am assuming that the device type has something to do with the urn:schemas. I am trying to understand the urn:schemas, because I had thought that that might have been part of the issue. In the D_HttpSwitch1.json file from the original creator uses "urn:mios-nullx8-com:serviceId:HttpSwitch1", where the D_BinaryLight1.json file uses "urn:upnp-org:serviceId:SwitchPower1"



  • @dbemowsk I know this is a very old topic, but if you still need to control the device with the app, you can change:
    device_json from D_HttpSwitch1.json to D_BinaryLight1.json
    0_1559247195945_616d9483-65a8-47fc-b3ce-1179fcd369d0-image.png



  • @camadort Thanks, I didn't know that. I'll give it a try.


Log in to reply
 

Suggested Topics

  • 3
  • 10
  • 2
  • 2
  • 6

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts