Custom Mode Plugin

I’d like to create a custom mode device. Very similar the the House Modes plugin, but with different selection values that work in a radio-button configuration.

i.e. My Location: Site A, Site B, Site C, Site D

I’d also like the device to show up in my ImperiHome android app the way ‘My Modes’ does. It’s recognized as an ‘acutator’ with a selection list to choose one of the 4 modes. The House Modes plugin currently does not show up in that app for some reason.

Any suggestions as the to some specific luup files I might reference?

Hi,

I’d suggest using Multi Switch as a basis. You can label the buttons as you like and then develop some LUA or PLEG or rules engine or ALTUI workflow to control it (yes the options keep increasing). With Multi Switch as the basis you assure ImperiHome compatibility. If you make your own from scratch that won’t be the case.

Cheers Rene

Thanks for the suggestion. I actually tried that first, thinking it would work well. The only problem is that the MultiSwitch plugin shows up in ImperiHome as 8 separate on/off switches. Instead of one device with a selector menu. The way that ‘My Modes’ appears, which is what I want to do with my custom modes device. I’ve already coded a simple plugin in Vera, but it doesn’t appear in ImperiHiome. Screenshots attached.

Hi,

As stated remote control apps will not be able to support your one ‘tinkering’, sadly. When a plugin becomes a popular one you can ask the ImperiHome team to add it. Until then you are limited to the supported stuff.

Cheers Rene

[quote=“reneboer, post:4, topic:191772”]Hi,

As stated remote control apps will not be able to support your one ‘tinkering’, sadly. When a plugin becomes a popular one you can ask the ImperiHome team to add it. Until then you are limited to the supported stuff.

Cheers Rene[/quote]

That’s not necessarily true, in my experience as long as the device supports the right serviceIDs and deviceTypes that are already supported by the remote control app, there’s a good (but NOT 100%) chance it would work. That’s how I got my FanLincs to work in remote apps (specifically I hacked a virtual dimmer). If I were to try, i’d look at the files that My Modes uses and create my own copies with the labels and under the hood functionality changed. As long as it’s not an encrypted plugin it should be doable.

It’s by no means easy, especially if you aren’t familliar with luup and coding though but there’s a decent chance with the right tweaks you could get it to work

Yeah, that’s been my thinking that last few days, and how I’ve been experimenting. Trying to reference different service id’s. The tricky thing is, there is the ‘House Modes’ plugin that does NOT appear in the remote control app. That has a full set of luup files to look at. But the ‘My Modes’ device that DOES appear in the remote control app appears to be tied directly to the built in modes function. Not any plugin. The only reference to that I can find is in S_HomeAutomationGateway1.xml.

[quote=“zolakk, post:5, topic:191772”][quote=“reneboer, post:4, topic:191772”]Hi,

As stated remote control apps will not be able to support your one ‘tinkering’, sadly. When a plugin becomes a popular one you can ask the ImperiHome team to add it. Until then you are limited to the supported stuff.

Cheers Rene[/quote]

That’s not necessarily true, in my experience as long as the device supports the right serviceIDs and deviceTypes that are already supported by the remote control app, there’s a good (but NOT 100%) chance it would work. That’s how I got my FanLincs to work in remote apps (specifically I hacked a virtual dimmer). If I were to try, i’d look at the files that My Modes uses and create my own copies with the labels and under the hood functionality changed. As long as it’s not an encrypted plugin it should be doable.

It’s by no means easy, especially if you aren’t familliar with luup and coding though but there’s a decent chance with the right tweaks you could get it to work[/quote]
Hi, you can indeed try this. However, you risk impacting all devices that have the same service ID. But if you have one to spare and the standard UI behaviour fits your need then go for it. Make backups though :wink:

Cheers Rene