Plugin : IPX800 card for generic use

Hello , I use a IPXv800 relay card from GCE Electronics company. It is a nice board with an embedded web server to control 8 output relays, 8 digital inputs, 4 analog inputs. It can be extended with some extensions cards to manage up to 32 relays / inputs and 16 analog inputs
[url=http://gce-electronics.com/en/]http://gce-electronics.com/en/[/url]

I only found a vera plugin for controlling window covers with it but nothing for the generic useage of relays & inputs.
so after the IPhoneLocator plugin, I decided to create my second real plugin for vera/UI5 ( not testable by me on UI7 ) which basically exposes the relays and the analog inputs as classical devices on VERA. The advantage of this approach is that these classical devices are then visible in any vera client app ( like phones etc )

The approach is also to limit configuration inside VERA and reuse as much as possible all the configuration and parameters set in the IPX800 configuration. for instance VERA device names are imported from the IPX configuration

Version 0.38

Features

[ul][li]UI5 / UI7 compatible[/li]
[li]the Ipxv800 device, is creating child devices in any room you want for each element we want to control.[/li]
[li]reachability of the Ipx800 device is reported and reachable/not reachable are events useable in scenes/notifications[/li]
[li]dynamic icons for the ipx800 device based on its reachability[/li]
[li]Controls the on/off status of the 1…32 relays via a classic power switch device.[/li]
[li]Supports a window covers as a dimmer device, use of 3 ipx relays ( up , stop and down ) in pulse mode. Supports intermediate positions of window cover[/li]
[li]respects configuration inside the IPX800, if a relay is programmed inside IPX800 to be a pulse ( Tb <> 0 ) it will trigger a pulse[/li]
[li]Expose the 1…16 analog inputs values as either a temperature sensor , light sensor or humidity sensor device and display the correct value according to IPX800 sensor configuration[/li]
[li]Expose the 1…32 digital inputs as either a power switch device or a Motion detector device and display the correct status according to IPX800 digital input state[/li]
[li]Controllable set of relays/analog/input which needs to be exposed in the Vera ( not necessarily needed to expose all the relays/analogs/inputs ). You can change device names/titles but DO NOT change the altid please.[/li]
[li]configuration enables choice of update mechanism between these options. ( vera poll + ipx push is possible (& recommended) at the same time)
[list]
[li]scheduled polled from VERA to IPX for update of status with controllable frequency in seconds[/li]
[li]only manual refresh based on “refresh” uPNP action & UI button (for use in scenes)[/li]
[li]Direct Push update from IPX800 if configured in IPX ( server=your vera ip, port=3480, Enable checkbox checked, Path = /data_request?id=lr_IPX800_Handler&mac=$M&deviceID=nnn where nnn is the vera device ID. [/li]
[/list]
[/li]
[li]UI5 dashboard
[list]
[li]firmware of the ipx800[/li]
[li]button to force a data refresh[/li]
[li]button to trigger the import of names from IPX800[/li]
[li]in Control tab, button to switch DEBUG mode state[/li]
[/list]
[/li]
[li]SETTINGS js tab
[list]
[li]facilitate entry of parameters with Regular expression checking for format of parameters. Dynamic save of changes in the Setting tabs. [/li]
[li]Button to test connectivity[/li]
[li]Button to open IPX web UI for configuration[/li]
[/list]
[/li][/ul]

Variables
Service : urn:upnp-org:serviceId:IPX8001

[ul][li]Debug: email address used in iCloud account[/li]
[li]Version: version of the plugin[/li]
[li]Present: 1 if the IPX card is reachable, 0 otherwise[/li]
[li]IconCode: 100 when the device is reachable, 0 otherwise. controls the icon display on UI5 dashboard[/li]
[li]IpxIpAddress:ip address of the ipx800 card[/li]
[li]FirmwareVersion:reported firmware version of the ipx800 card[/li]
[li]User: user of the basic authentication of the HTTP interface to the card ( WARNING read below )[/li]
[li]Password: password for above. ( WARNING read below )[/li]
[li]UpdateFrequency: in sec, refresh frequency for getting data, or 0 for manual mode (using Refresh action from a scene or script). Push mode update from IPX can also be setup in the IPX configuration, see the Settings tab for explanation. Both Poll & Pusg mode can coexist[/li]
[li]OutputRelays:a comma separated list of relay number to report in VERA. for instance “1,4” to only see relay 1 and relay 4. optionaly use W letter to make a window cover device with this syntax. 1W-2-3-30-40 where 1 is the relay for up command, W is the type ( window ), 2 is the relay for stop commmand, 3 is the relay for down command, 30 is the up cycle , 40 (optional) is the down cycle duration in sec. Window cover requires that you configure your IPX relays in Pulse mode (Tb parameter)[/li]
[li]InputRelays:a comma separated list of digital input number to report in VERA. for instance “1,4” to only see input 1 and input 4. Optionally each number can be followed by a letter to force a device type. P for powerswitch, M for motion sensor. example 1M,2P[/li]
[li]AnalogInputs:acomma separated list of relay number to report in VERA. for instance “1,2” to only see analog 1 and 2.Optionally each number can be followed by a letter to force a device type. T for Temp sensor, L for light sensor, H for humidity sensor. example 1T,2L,3,4H[/li][/ul]

Notifications

[ul][li]“Connection State” : When the device becomes reachable or not reachable, in no repeat mode[/li]
[li]Notification on child devices can be set ( like when temp goes above a certain level etc )[/li][/ul]

uPNP Actions

[ul][li]action “Refresh” : for forcing a refresh of data from the IPX to Vera.[/li]
[li]action “GetPresent” : for reporting if the IPX800 card is reachable or not[/li]
[li]action “IPXNames” : Read the configured relay/sensor names in IPX800 and set vera device names accordingly. works on previous firmware if you did not customize it on the IPX but on IPX firmware >=3.05.46 it takes advantage of the new ioname.xml page for that.[/li]
[li]action “SetDebug” : Set or unset DEBUG mode[/li]
[li]special “Handler” : to enable IPX to trigger refreshes in a Push mode[/li][/ul]

WARNING

[ul][li]Basic authentication does not work. it is because of the IPX800. Vera always sends the Basic authentication information in lower case letter in the http header like the standard requires and the IPX800 card expects it with a capital “A”. no easy workaround except changing code on the VERA which I refuse to do (for now ). SO: do not use user / password on your IPX800 card and in this plugin. this is coded, ready to be used for the day GCE fixes their http server side.[/li]
[li]this has been [glow=red,2,300]fixed [/glow]by GCE with their latest firmware >= [glow=red,2,300]3.05.46[/glow]. I tested Basic authentication from the plugin to the IPX with this version and it works[/li]
[li]v0.38 reads status.xml page as a fallback plan for card with older firmware than 3.05.38 but still with http support[/li][/ul]

Install

[ul][li]For Public version in the App Store [url=http://apps.mios.com/plugin.php?id=7426]MiOS Apps
[li]For Beta versions: [url=http://apps.mios.com/test-plugin.php?id=7426&show=versions]MiOS Apps [/li]
[li]source files on [url=http://code.mios.com/trac/mios_ipx800/browser/trunk]http://code.mios.com/trac/mios_ipx800/browser/trunk[/url][/li]
[list]
[li]if you chose this method, you need to install the ICON ( .png ) file manually into the folder /www/cmh/skins/default/icons of your vera[/li]
[li]All other files can be installed by uploading Luup files from your Vera page in Apps / Develop / Luup files[/li]
[/list][/ul]

Final thx to all authors of plugin from which I stole some snipset of code here and there, the list is too long to share here.

Feedbacks are welcomed and if this generates enough interest, I ll see if we can create a sub forum for it, for now, let’s use this thread

Enjoy…

Public in the app store now: [url=http://apps.mios.com/plugin.php?id=7426]MiOS Apps

A lot of work in your plugin. Great effort.

The hardware looks pretty good as well but as you have found, it appears to have the software http upper/lowercase header problem. The hardware manual indicates that the microchip stack is in use:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537041

Just need to hunt through the 300 meg of their framework code to find the bug. :o

So potentially a lot of PICs out there that won’t talk to Vera.

This thing seems pricey and looks like only in Europe?

Whats the advantage of using this?

[quote=“integlikewhoa, post:4, topic:184123”]This thing seems pricey and looks like only in Europe?
Whats the advantage of using this?[/quote]

[url=http://gce-electronics.com/en/]http://gce-electronics.com/en/[/url]

it is kind of the toy for electronic/electric kind of guy , where vera is more the toy for computer guys :slight_smile: I am more the computer guy so I use a lot vera and much more basically use for my ipx800. I cannot solder 2 things together almost so wont do complex stuff.

Joke aside, you control relays , dry contact inputs for receiving inputs from motion detectors, switches etc… , 4 analog inputs where you plug in thinkgs like sensors or dials, any kind of toy you build, the analog is essentially a volmeter and the IPX800 tells you the voltage, which depending on the sensor type you translate into a temperature, a PH, a humidity rate whatever. People do tons of crazy things with it and 8 inputs + 8 output + 4 analog + pulse counters ( for energy counter which or water valve counter which sends a pulse ) is not that pricy. fully http controllable. They just released a product which enables the main card and the extension to be connected via a 1000 m cable !

you can plug to it up to 3 extensions thus giving you 32 relays, 32 inputs, 16 analogs, 16 counters etc…
Stored on a DIN rack in your electricity counter, it is not hard to control many of your lights, power wall plugs etc just by wiring the cable & relay to it.

it has simple rules & scheduling capabilities so you can program when a relay is on or off based on a timer or a input or a value of an analog

Personally : I control my swimming pool

  • I can force the pump on or off indedently of the mecanical clock controller
  • I can force the cleaner robot on or off indedently of the mecanical clock controller
  • I control external temperature
  • I control temperature of the pipes ( to get an idea of temp of water in the pipe )
  • I trigger pump on when temperatures goes close to 0 C to avoid freezing in the pipes
  • I control a RF module to open / close my house gate
  • I control the gate external lights

last idea, you have a electrical bell in your house, just open the push button , add 2 wires from the button connectors into the relays connectors on the board and you make your bell ring , on demand, with a http call, when let’s say a motion detector detects something outside your house…

Now with this plugin , I can do all that from Vera and within scenes !

I have an alarm panel which is cheaper and has a ton of inputs, I also have arduino. Trying to figure out where this fits in.

Seems really pricey. Other thing is to many inputs and output in one place means alot of wiring in the house to get the sensor spread out threw the house.

Where if you split it up into 4 channel here then wireless to another 4 over there seems to make more sense.

Curious to see how this 200.00 modual is used.

[quote=“integlikewhoa, post:6, topic:184123”]I have an alarm panel which is cheaper and has a ton of inputs, I also have arduino. Trying to figure out where this fits in.

Seems really pricey. Other thing is to many inputs and output in one place means alot of wiring in the house to get the sensor spread out threw the house.

Where if you split it up into 4 channel here then wireless to another 4 over there seems to make more sense.

Curious to see how this 200.00 modual is used.[/quote]
sure, I see your points. the good news is nobody forces you to buy one :wink:

Just released a beta version v0.30 which enables the user to chose why type of VERA device he wants to use to expose the IPX relays, analogs and digital inputs.

http://apps.mios.com/test-plugin.php?id=7426&show=versions

Version 0.30 is public on the store now: [url=http://apps.mios.com/plugin.php?id=7426]MiOS Apps

Basic Authentication issue fixed by latest GCE firmware >= 3.05.46. I tested Basic authentication from the 0.30 plugin to the IPX with this version and it works.

Version 0.36 is bringing support for:

  • humidity sensor & XT400 CT50 analog sensors
  • non embedded devices ( child can be put in any room )
  • use of ionames.xml from IPX if page is present ( in latest firmware )
  • some optimization

Version 0.38 is public on the store and brings discovery, so even without entering its ip address it should find the canalplus settop box and its ip address by itself ( includes a uPNP UDP workaround found in the DNLA controller plugin ). in case this does not work you can still enter the IP address directly in the ip variable of the device

Upgrade 0.39 (private) for better UI7.0.3 display

Pending update on the MIOS Store

[ul][li]tested with IPX firmware 3.05.59d[/li]
[li]added caculated analog values for new sensors like PH & REDOX[/li]
[li]update to UI7 JSON format to take advantage of new placement logic of controls documented by VERA[/li][/ul]

will soon be public, otherwise you can install by opening http://:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=7426&Version=27650 and ignoring error messages

Hello Amg0

I have version 0.43 installed on my vera3 UI5, plugin is working fine.

I recently installed GCE X400 CT module with my IPX800 which sends it signal in Amps on Analog 4 to 8, but my analogue inputs are showing as temperature, how to set it up to read power (Whatts or Amps)

thanks
Philippe

[quote=“pipoa, post:15, topic:184123”]Hello Amg0

I have version 0.43 installed on my vera3 UI5, plugin is working fine.

I recently installed GCE X400 CT module with my IPX800 which sends it signal in Amps on Analog 4 to 8, but my analogue inputs are showing as temperature, how to set it up to read power (Whatts or Amps)

thanks
Philippe[/quote]

What do you have in the “AnalogInputs” variable ?
For Analog entry, I support only T (temp) L (light) and H(humidity) right now but I could add another type, just please let me know what VERA device_type would be the right one to use ?

Version in preparation to add window cover support.

It will work this way:

[ul][li]present a window cover device with classical commands[/li]
[li]uses 3 ipx relays ( up , stop and down ) in pulse mode ( Tb parameter <> 0 in the IPX )[/li]
[li]Supports intermediate positioning of the cover by stopping the roller after some time based on your full cycle duration[/li]
[li]configured in your OutputRelaysvariable with the following syntax: 1W-2-3-30-40 where 1 is the relay for up command, W is the type ( window ), 2 is the relay for stop commmand, 3 is the relay for down command, 30 is the up cycle duration in sec, 40 is the down cycle duration. 30 and/or 40 are optional , defaults to 60 sec[/li]
[li]Same principals as other IPX Vera devices created by this plugin, it makes scene and notifications possible from the VERA[/li][/ul]

Hi,

Just for confirmation. Will this plugin still work with the new version 4 of the IPX800?

I appreciate your help

[quote=“delle, post:18, topic:184123”]Hi,

Just for confirmation. Will this plugin still work with the new version 4 of the IPX800?

I appreciate your help[/quote]
Sorry but I do not have any idea , we need to see if the HTTp API remains compatible.
I have no short-term plan to buy a version for so it may be tricky to do it but I will gladly help whoever wants to do an improvement Of it. The internal architecture should make it easy.

Damned, I ordered the new version and just detected they published the new API. Seems a lot different than the V3, anyway I’ll give it a try when receiving the device next week

Thanks