How to display a register variable in the Webfront?

Hello !

I test IPS since a few month on a 1-wire network. I have 32 I/O, sensores for temp, humidity, CO2, Watts, Water, heating command, vmc command, webcam, etc. I found all infos to set IPS in the german doc and forum. And it’s working fine.
I’m beginner in php language, but the simple fonctions to manage the 1-wire network, make rules and display values in the weboffice are ok for me.
Now, I have to read a battery monitor on a comport. I applied what i found in the german forum… I have the protocol, i set the comport, a cutter, the register variable linked on a script file (empty for the moment) and with the debug fonction in the register variable, the values are correct.
For example : 13054 (for 13,054 Volts)
It’s the first time i need to use the register variable…
I have now to /1000 the value from the register variable to have the value in volts, and display that in the Webfront with title and suffix. I read a lot of topics, but i don’t found the „how to“ to do that.
Can you help me with a step by step procedure ?
IPS vers. 2.6
Thanks a lot !

Patrick, from France

I suggest you familiarize yourself with the content of this page http://www.ip-symcon.de/en/service/documentation/module-reference/registervariable/

The (example) script will have to get started by the Instance you installed for the Register Variable
In the script you can then do the adjustement (divide by 10) and store the value of the Register Variable to a Variable with the correct Profile (Float XX.XX Volt).

This Variable you can display in the Webfront.

I am afraid you have to do a lot of reading but thats the only way to understand IPS

Your setup is correct and your research to the topic seems very good. I am glad to help you out on the missing link :wink:

In the script you have supplied in the RegisterVariable instance you can receive all values in the $_IPS[‚VALUE‘] variable. (It is documented in the link BestEx gave you)

In your example the receiving script may look like this:


SetValue(12345, $_IPS['VALUE'] / 1000);

12345 is the ID of your destination variable (float), where you probably already have defined your profile.

Regards,
paresy

Thanks a lot BestEx and Paresy,

OK, this was my missing link :
SetValue(12345, $_IPS[‚VALUE‘] / 1000);
12345 is the ID of your destination variable (float)

I have now understood how to transfer the data from the register variable to a destination float variable that can be displayed in Webfront.

I worked on the development of the hardware, now i need to spend time to learn how to use IPS to control the hardware :wink:
And I have to learn php :rolleyes:

Grüsse aus Frankreich,

Patrick