sinricpro / feature-requests

Feature request tracker for Sinric Pro
0 stars 0 forks source link

Android Mobile app doesn't acepts ranges in decimal ( Web App does ). #50

Open aguirrea0960 opened 11 months ago

aguirrea0960 commented 11 months ago

Explanation: If you define water height in inches ( actual heighr is in centimeters) and the convertion always get decimans on it// Maybe is caused for a different version of API. ( The android APP es 2.23.1) and the API es 2.29....

kakopappa commented 11 months ago

Hi @aguirrea0960

Yes, when you convert centimeters to inches there will be decimal places. We do support decimals in the app.

Unfortunately, Alexa supports only Inches, not centimeters so we have only Inches as a unit of measure. I have raised this to the Amazon Alexa team. It seems it will be available in the future version. https://stackoverflow.com/questions/77338442/amazon-alexa-smart-home-skill-centimeters-for-units-of-measure/77368742#77368742

We do support decimal places in the range controller. Is your problem not showing decimals in Sinric Pro app? I have tried below and can see the decimal places in the app and portal.

  1. I have defined a range controller with inches. image

  2. send 0.99

image

  1. image

aguirrea0960 commented 11 months ago

Hi, thanks for your answer..

I'm trying to handle a Potable Water Tank at home, and I need several variables inside one device. At first, I tried to use MQTT and Tasmota Library to handle this kind of home devices because of the versatility that was accomplished. So, I saw sinric as an alternative to do the same, but I was surprised when I saw that there's only space for one type of sensor in one Sinric device... In my case, I would like to automate all the processes inside a water tank, like this: 1) two outputs to control solenoid valves for Filling water, and another to service water ( Inlet and Outlet). 2) two floating sensors to indicate high level and low level ( for safety and interrupt filling the tank and not serving beyond ran out of water). 3) and finally, a water level sensor ( ultrasonic ) to convert height in centimeters to percent of height for indicating actual water level.

So. that's my actual situation.. when you convert percent of height for example. yo will have 50.45% of water level.. because is calculated taking in account the max height and minimum height of the actual practical dimensions of my tank. if this could work as I need, I have two more tanks in my house to do An integral automation. ( One of this tanks is for Emergency Water Reserve ). and have special treatment.

Best regards, Alfonso.

El dom, 29 oct 2023 a las 0:38, Aruna Tennakoon @.***>) escribió:

Hi @aguirrea0960 https://github.com/aguirrea0960

Yes, when you convert centimeters to inches there will be decimal places. We do support decimals in the app.

Unfortunately, Alexa supports only Inches, not centimeters so we have only Inches as a unit of measure. We do support decimal places in the range controller. Is your problem not showing decimals in Sinric Pro app? I have tried below and can see the decimal places in the app and portal.

1.

I have defined a range controller with inches. [image: image] https://user-images.githubusercontent.com/7474406/278851064-e0d0a6d3-2106-4eb0-9fbf-761b471e2b3f.png 2.

send 0.99

[image: image] https://user-images.githubusercontent.com/7474406/278851079-80da8ecb-66af-4eb3-aa44-0c2fa8ec7f07.png

1.

[image: image] https://user-images.githubusercontent.com/7474406/278851115-6279df56-b3d4-4a4e-bc42-bdd9126bca27.png

— Reply to this email directly, view it on GitHub https://github.com/sinricpro/feature-requests/issues/50#issuecomment-1783996692, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG2PAQLJLDYDQ7GO73BGWBTYBXMUDAVCNFSM6AAAAAA6TA22B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHE4TMNRZGI . You are receiving this because you were mentioned.Message ID: @.***>

kakopappa commented 11 months ago

Thanks for the detailed explanation.

You should be able to use map function to convert to percentages without decimals.

eg:

int waterLevelAsPer = map((int)distanceInCm ,EMPTY_TANK_HEIGHT, FULL_TANK_HEIGHT, 0, 100); // Convert to percentage value based on tank height

for 1, 2, and 3 use the appropriate capabilities when you create a custom device type.

BTW, have you seen our tutorial for Water Tank? https://help.sinric.pro/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04