Dear MCV board members,
a friend of mine has designed and developed a plugin for most of Robot Electronic’s relay boards. He decided to move away from vera in short time, so the plugin comes without any support. I didn’t want to leave his work in vain, so i decided to publish the plugin. If there are any volunteers in adding support, please send me a DM.
The plugin is for switching the relays of the following robot electronics Ethernet and WiFi relayboards;
- ETH002
- ETH008
- ETH484
- WIFI484
- ETH8020
Note: This plugin only controls the relays and NOT the IO-ports!
I am not the developer, so please do not ask me anything about the programming. The plugin works pretty straight forward. Please make sure you download the latest firmware of your board as is described here for the ETH008 and here for the ETH8020.
The plugin will make a master device and depending on the board, a number of child devices. It will recognize the model itself, the hardware and firmware, and will state the last time it had an update.
Advanced options, make sure the IP-adress is as follows: “:”. For example: “192.168.1.10:17494”. You do not need to use account and password if you let it be the default by Robot Electronics.
The board uses simple http requests without confirmation, so the plugin polls the status of the relays regularly to make sure the status of the relays are always in sync with vera.
The plugin is tested with an ETH008 and ETH8020 relay board on a Vera lite and is pending approval now. Have fun!
I need some help to create a Service File (S_***) for the Robot Electronics Plugin. The plugin works for now, but MCV says i need the service file to avoid having problems in the future.
can someone please help me with the creation of the file? what information do you need, which one can i use as a base file for the service file?
tried to use the SwitchPower1, but seems to be too complex for the plugin (and me
), tried also the thinkingcleaner plugin S_-file, but cannot figure out what the file does anyway. So any help is much appreciated.
[quote=“fabstar81, post:3, topic:187601”]I need some help to create a Service File (S_***) for the Robot Electronics Plugin. The plugin works for now, but MCV says i need the service file to avoid having problems in the future.
can someone please help me with the creation of the file? what information do you need, which one can i use as a base file for the service file?
tried to use the SwitchPower1, but seems to be too complex for the plugin (and me
), tried also the thinkingcleaner plugin S_-file, but cannot figure out what the file does anyway. So any help is much appreciated.[/quote]
First you need to list all the device variables that you create with the plugin. Each variable has a name, a Service ID and a type (boolean, string, number, etc).
Then you need to list all the actions that the plugin implements. Each action has a name, a Service ID and, possibly, a list of argument names that it references.
@RexBeckett - would this work as a solution?
The plugin has a few variables like ipAddress and pollingInterval but these are all set through the UI and don’t really need to go in the services file. The only action is switch on/off which is already defined: urn:upnp-org:serviceId:SwitchPower1
The EtherRain plugin also has no services file but according to @ fabstar81 MCV say they might demand one in the future. Perhaps an empty services file may be the answer? Something like this called “S_ETHRelayBoard.xml”
[code]<?xml version="1.0"?>
1
0
<serviceStateTable>
</serviceStateTable>
<actionList>
</actionList>
[/code]
And in the “D_ETHRelayBoard.xml” file between these two lines place a reference to the above:
<serviceList>
</serviceList>
Insert this code:
<service>
<serviceType>urn:frijmann-nl:service:ETHRelays:1</serviceType>
<serviceId>urn:frijmann-nl:serviceId:ETHRelays1</serviceId>
<SCPDURL>S_ETHRelayBoard.xml</SCPDURL>
</service>
@RexBeckett - would this work as a solution?
That depends on whether MVC will just be checking for the presence of a Service file rather than verifying the contents.
I have found a few things that don’t work well or consistently when variables and/or actions are not properly defined. As a result I generally provide full service definitions.
[quote=“a-lurker, post:5, topic:187601”]@RexBeckett - would this work as a solution?
The plugin has a few variables like ipAddress and pollingInterval but these are all set through the UI and don’t really need to go in the services file. The only action is switch on/off which is already defined: urn:upnp-org:serviceId:SwitchPower1
The EtherRain plugin also has no services file but according to @ fabstar81 MCV say they might demand one in the future. Perhaps an empty services file may be the answer? Something like this called “S_ETHRelayBoard.xml”
[code]<?xml version="1.0"?>
1
0
<serviceStateTable>
</serviceStateTable>
<actionList>
</actionList>
[/code]
And in the “D_ETHRelayBoard.xml” file between these two lines place a reference to the above:
<serviceList>
</serviceList>
Insert this code:
<service>
<serviceType>urn:frijmann-nl:service:ETHRelays:1</serviceType>
<serviceId>urn:frijmann-nl:serviceId:ETHRelays1</serviceId>
<SCPDURL>S_ETHRelayBoard.xml</SCPDURL>
</service>
[/quote]
I updated the D_ETHRelayBoard.xml file with the code above, referencing to the S_File. Also made an S_ETHRelayBoard.xml file, not empty regarding RexBeckett’s comment. I defined all variables that are not used by the HA service files (2 to 3 only) and came up with the following service file, without the actions yet. How is this for a start?
<?xml version="1.0"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<serviceStateTable>
<stateVariable sendEvents="no">
<name>Outputs</name>
<dataType>number</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>Inputs</name>
<dataType>number</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>modelName</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>modelId</name>
<dataType>number</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>hardware</name>
<dataType>number</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>firmware</name>
<dataType>number</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>timeFormat</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>appVersion</name>
<dataType>number</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>RelayIds</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>pollingInterval</name>
<dataType>number</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>lastUpdate</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
<actionList>
</actionList>
</scpd>
other question, why isn’t the plugin showing up in the apps store in my vera? just in apps.mios.com it is available… ???
can somebody please review the service file ?
i’d like to submit it for approval, hopefully it will launch in the store from then on:
[code]<?xml version="1.0"?>
1
0
Outputs
number
Inputs
number
modelName
string
modelId
number
hardware
number
firmware
number
timeFormat
string
appVersion
number
RelayIds
string
pollingInterval
number
lastUpdate
string
<actionList>
<action>
<name>SetTarget</name>
<argumentList>
<argument>
<name>target</name>
<direction>in</direction>
<relatedStateVariable>target</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
[/code]
For some reason searching for apps from your Vera UI does not show any results for plugins you have installed on your Vera. Try searching for something else you have already installed and you’l see.
If I search for “Robot Electronics Relayboards” from my UI5 Vera I can find it just fine.
OK, didn’t know about that “hidden feature”. thanks for that.
remains the evaluation of the services file. i really have no idea if i am on the right track here.
can someone test this plugin against UI7? i think i want to upgrade to UI7, but it would be a shame if the plugin stopped working after the upgrade.
i also added the service file S_ETHRelayBoard.xml to the plugin and made a beta release for you to test (UI5 and 7)
I have been using this plugin for months and it suddenly stopped working. In fact it was causing the system to freeze during restart. This occurs even if I reload old backups from prior to the onset of the problem. If reset the system and try to install the app, it will get part way through the process and freeze.
I’ve been working with a very diligent support person from Vera, but to no avail so far. The system is flawless until I try to install the plugin.
Any ideas?
what UI are you on?
i only have a UI5 vera for test. and there it has been working flawlessly for months. I have to admit that i do not stress the plugin that much. today it only manages one relay of the ETH8020’s 20 relays.
what board are you on?
Thanks for the response.
I use an eth008. It was perfect on UI5 and it worked for a while on UI7. It started causing the luup engine to hang when I removed PLEG devices. I don’t know if it is related.
I have switched my primary control over to a Vera Edge and I am going to revert the Vera Lite (stand -alone)to UI5 and see how it goes.
Please let me know what the reconfigure brought you. I am happy to read the plug-in worked on ui7 anyway.
No luck so far. Vera support is working on it.
The unit would not load luup engine after the plugin was installed. Is there another version of the plugin I should try on UI5?
Any other ideas?
Thanks,
Tom
There are few versions. Last changes were adding the service file as requested by MCV.
You could try to go one or two versions back so any referral to the service file isn’t there.
Try it through apps.mios.com.
I will see if I can publish some more versions…