Time sensor value Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
sander88
Posts: 3
Joined: Tuesday 06 August 2019 23:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Time sensor value

Post by sander88 »

I would like to store a time value (in seconds) for virtual sensor.

This works for two types:
- Custom Sensor
- Counter, with subtype: Counter

But large values get converted to an exponent value like '7.38858e+06 seconds' (= 85 days) instead of regular number.

Can this behaviour turned off?

Or even better: is there a type to store seconds/time? I have already found a sensor of the type 'Counter' with the subtype 'Time'. But I can't figure out how to store data in it (Domoticz keeps showing the value as '?'). I can't find it in the documentation (https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s).
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Time sensor value

Post by waaren »

sander88 wrote: Tuesday 06 August 2019 23:13 I would like to store a time value (in seconds) for virtual sensor.
Would it be an option to store it in a text sensor ?

Code: Select all

http://IP:PORT/json.htm?type=command&param=udevice&idx=2268&nvalue=0&svalue=123456789012345678901234567890
largeNumber.png
largeNumber.png (16.73 KiB) Viewed 726 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
sander88
Posts: 3
Joined: Tuesday 06 August 2019 23:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Time sensor value

Post by sander88 »

waaren wrote: Wednesday 07 August 2019 0:42
sander88 wrote: Tuesday 06 August 2019 23:13 I would like to store a time value (in seconds) for virtual sensor.
Would it be an option to store it in a text sensor ?

Code: Select all

http://IP:PORT/json.htm?type=command&param=udevice&idx=2268&nvalue=0&svalue=123456789012345678901234567890
largeNumber.png
Thanks. Yes, I used a text sensor in this case.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest