control of whr930

I am looking for a way to control the ventilator unit
The settings i would like to see are
Speed group 1 2 or 3
Temp of 4 systems
Temp setting
Ventilating or recirculating
The unit has an rs232 port

I found some guidance on this but all for knx

My question is if somebody knows a route to follow or how to translate it into a plugin
Thanks

As indicated before I am looking a way to control the house ventilating unit WHR930 with the Vera.

My idea is as follows

  1. To create two icons; one to indicate the value and one to change the settings
    I want to indicate the following items;
    • 4 times air temperature
    • 1 times temperature setting
    • Setting of speed (high/medium/low)
    • Setting of ventilator (ventilator out / ventilator in/out)

I want to change the following items;
- Temperature setting (between 18 and 22)
- Setting of speed (high/medium/low)
- Setting of ventilator (ventilator out – ventilator in/out)

  1. Connection between the Vera and the ventilator must be wireless (no internet/cable connection available at the location of the ventilator. My idea is an wifi to rs232 adapter to make the connection)

  2. The communication are based on commands to the ventilator unit and replay from the unit with the requested info , or commands to change settings

  3. Scenes must be able to change the unit; like if humidity is to high speed must go to high and if humidity goes down the speed must also go down; if toilets lights are on for a while (somebody reading the newspaper) the speed must go to high, etc

  4. The other information from the unit, like other settings are not to be changed

So i need to check the following steps

  • Make the icons with the layout at indicated
  • Make the wifi connection between the vera and the module
  • Sent the info commands and receive the data into vera
  • Translate the data received into understandable data

I have found the protocol used by the ventilator unit
I have found some programs written in LUA for the transmittion of data, but wired

If you have some guidance be so kind to assist
Thanks
Huib

I have created an json file

How can i check it if it is working and that the lay out is as i hopethat it should be

regards
Huib

First check that your Json is valid using JSONLint. If it’s valid, upload the device file and the Json file on Vera and create a device using that device file. This is the only way to test if the layout is OK.

@mcvflorin

thanks for the advice. do i also need the D_ , S_ and I_ files to test json file?

at the moment i am trying to make the I_ file but that is still no good
but can i test the layout without the I_file

rgds
Huib

To test the Json you need at least the device file (D_…xml).

@mcvflorin,

thanks for the advice and I am now able to get the device button on the screen

if i change some parts in the json file (location of items, and correction of typo’s)
i upload then into the vera by upload files etc

but the changes are not visible on the device
do i have to delete the device and create it again to update it of is there an other option

upfront thanks for the help

rgds
huib

If you change anything in the Json file, you must reload the Luup engine after uploading it, and refresh the UI. If you have Javascript tabs and you change something in the Javascript code, then it’s not necessary to reload the Luup engine after uploading the file. A simple UI refresh is enough.

@mcvflorin,

next querry;

how do i create or which name i use or the serviceID.

do i just create one, or to what requirements it needs to be

regards

Huib

It’s recommended to use the existing service IDs, but if none covers your needs, then you must create a new one. For info about the service ID names you should read the UPnP Device Architecture v1.1 at page 46.

@mcvflorin;

i have set up the dashboard in the form as i want it and have made the other files

i have now in the log file that I_ can not be parsed into the system

can you have a look at it
for your guidance i have attached all files

the output and transmitting to the unit i have still to find out

your guidance is appriciated

rgds
huib

I think the reason for the error is that you prefixed all the service IDs and action names with “–”. Only what’s between the tags is Lua code and can be commented out with “–”. Also, if you comment out all the Lua code between the tags, you don’t have to comment out the service IDs and the action names.

If you really want to comment out an entire action, you can do it with an XML comment, like this:

<actionList>
	<!--
	<action>
		<serviceID>-- urn:Kuiper-com:serviceId:dutchWHR930</serviceId>
		<name>-- VentHigh</name>
		<run>-- sendCommand("VENTHIGH")</run>
	</action>
	-->
</actionList>

@mcvflorin

thanks for the advice; but each answer gives the next question;

  1. i have now the warning {WHR930[76] : Lua Engine Failed to Loa}
    this means that the files can be read; but in which file is the error
    i thing the I_ file; is that correct?

  2. in the I_ file you declare the value of the variables; how can i check (by Putty or other option) if these value are declared and if they are the value as requested;
    example == local Position = Middle; can i get this on the screen?

  3. if i look at different D_ files (like D_quadrelay1 & D_dutchSmartMeter & D_IPSerial) they have all different info; and i i compaire this with the UPnP device architecture 1.1 they are all different

  4. the same for the S_ files

do we have somewhere something like standard D_ & I_ & S_ and D_json files as start
at the moment i am compairing my files with different formats and just try and error (more error that try)

in the Json file i indicate some “Actions” buttons;
to check the functions and to check the JSON file i would like to indicate something in the UI screen header ; is that possible?

again thanks for the advice

regards
huib

I have uploaded the last version of the files;

i am still fighting with the error message “WHR930[76] : Lua Engine Failed to Load”

If i look at the log files i see that the all the instructions from the Json files are being logged (with error)

I have reduced the I_ files to only the local values but still get the same error

In the S_ file i indicate the settings / values and the default value’s; is that the correct way. If so why i do not see the data in the dashboard in the UI or tab

So i need some guidance

thanks
Huib

You have several errors:

  1. In the Json file the service is wrong (there are two “-com”) at line 58.

  2. In the device file the service type and service ID are wrong. The correct ones are:

<serviceType>urn:Kuiper-com:service:dutchWHR930:1</serviceType> <serviceId>urn:Kuiper-com:serviceId:dutchWHR930</serviceId>

  1. You have a couple of errors in the Lua code:

[ul][li] parenthesis that aren’t closed (the first parenthesis after if):[/li][/ul]

if ((TempIn or "") == "" then luup.variable_set("urn:Kuiper-com:serviceId:dutchWHR930", "TempIn" , 18 , lul_device) end

[ul][li] functions declared inside the startup function: log, debug[/li][/ul]

I suggest testing your Lua code with a program like SciTE (on Windows):
http://forum.micasaverde.com/index.php/topic,7441.msg47591.html#msg47591

[quote=“huib, post:13, topic:172078”]1) i have now the warning {WHR930[76] : Lua Engine Failed to Loa}
this means that the files can be read; but in which file is the error
i thing the I_ file; is that correct?[/quote]

The error is in the Lua code. This can be either in the implementation file, or in a Lua file, if you have any (you don’t).

[quote=“huib, post:13, topic:172078”]2) in the I_ file you declare the value of the variables; how can i check (by Putty or other option) if these value are declared and if they are the value as requested;
example == local Position = Middle; can i get this on the screen?[/quote]

You can log them using [tt]luup.log()[/tt] and check the logs.

Yours is good.

You should look at a standard service file, like S_SwitchPower1.xml.

@mcvflorin,
Thanks and have some reading to do
Will revert
Huib

@mcvflorin,

have found a few “end” missing. and have the file uploaded and running.

now i go to the next step;

to get information from the unit i need to sent

(0x07 0xF0) to get an ok as return (0x07 0xF3)
and than i can sent an command for information or to change a certain setting

what program plug i can use as example

and how can i check the data going out

your guidance is as always highly appriciated

regards
huib

I am looking for the following advice;

in the D_json file you create a button with a certain command
(ContolGroup/Command)
in the I_ file you create the job to be carried out (actionlist/action)

how do i connect the button with the job/order
or
how do i start an action from the dashboard

thanks in advance

At the monent i modify the values with two scenes
Resulting that the data are altered at the button

But still fighting to activate an command from the button, see question above

Advice welkom

edit; i stil get the following respond
No implementation
i think that if the button is pressed no command is know to the system; is this correct

Rgds
Huib