ElectronicCats / CayenneLPP

Library for Arduino compatible with Cayenne Low Power Payload
http://electroniccats.com/
MIT License
106 stars 48 forks source link

Please could you add litres/counter #21

Closed Cloolalang closed 3 years ago

Cloolalang commented 3 years ago

Please could you add litres/counter

sabas1080 commented 3 years ago

Hi @Cloolalang

You can use addDigitalInput or addDigitalOutput, or do you have a proposal of how it would be litres/counter?

xoseperez commented 3 years ago

CayenneLPP is based on the IPSO smart objects specification. The original implementation only covers some of the "starter pack" objects (appendix 2). This library covers some more including some from the "expansion pack" (appendix 3) but still sticks to the original specification (using the objectID - 3200 as index).

There is no "volume" (the specification is quite limited). I also use the Digital Output for counters as @sabas1080 suggests. Of course a specific data type for volume could be added, there are a lot of unused indexes, but mind it will be out of spec.

Cloolalang commented 3 years ago

Hey, thanks for your replies, very interesting. OK I see, digitalOut would work for me, I will decode using Node-red and rename the value there to litres for my application. Thanks for improving this API with the extras! good job! Is this the right one to use?: node-red-contrib-cayennelpp-extended Cheers P