Need help with st_anything static st::PS_Generic

I cant seem to get the tiles on smart things classic to show correctly and there are no values that show up. If i just add the device as a child generic then i get the wrong tiles and i think everything would work if i could just get the right view in smart things classic. Nothing fancy here, i made a copy of the original classes and added a sub setDataG to take a value of 300 for testing sending.

#include <PS_Generic2.h> // Implements a pulse counter
static st::PS_Generic2 sensor1(F(“generic1”), 120, 0) ;
st::PS_Generic2 *genptr;
genptr = &sensor1;
genptr->setDataG(300);

I get the smartthings classic app thing added and fill in all data and then i can hit refresh and immediately in the serial debug for the device i can see -
Everything: Received: refresh
getData routine called
generic1
300
Everything: Sending: generic1 300
ST_Anything Callback: Sniffed data = generic1 300

So things are clearly talking and it is sending the 300 value i set. In the smartthings app i should see one tile and i see this, the wrong tiles as there should only be one. Any assistance with the ST_anything generic class would be greatly appreciated. Thank you

You are showing what appears to be the Parent Device, not the Child Generic Device…

Please explain what you are trying to accomplish using ST_Anything. I’ll try to provide some recommendations based on your requirements.

I am trying to add a simple device to show a count of how many times a light came on. I did not want to deal with degrees so i decided to not try the temperature class as i would still have had to make changes there to to remove the calculations. Not changing anything else in the generic class it does not make sense to me why it is not working. Also i have tried the original unmodified generic class and i get the same results. Thank you.

I am still a little confused… You’ll need to share a copy of your sketch, and your customized PS_Generic2 class. It’s really difficult to troubleshoot without more information.

How are you counting how many times the light came on?

Suddenly it seems to be working. Thank you for your help and your patience. And thank you for your work on the classes.

1 Like

I wanted to share that the issue was i was trying to have two different wifi connections - one to update the time from the internet and one to the hub. They were in conflict even though they looked fine. I cleaned everything from my sketch in preparation to make things simplified except for st_anything and then it worked so it was all me. Thank you again…

2 Likes

Good evening from the UK… Sorry If I have asked this question in the wrong place but I have an issue with setting up St_Anything.
I have done all the Arduino side, although I have not modified the code yet to anything specific sensors etc… I have set up DH and device on Smartthings Classic. When I go to configure the device (set up the IP address etc…), the instructions then talks of setting up the number of buttons, although in the configuration it asks for the timeout in secs (no field for buttons). However even when I have filled in all the elements and try to save it an error keeps coming up “Please fill out all the require fields”. All fields are filled in (even the timeout) so obviously I am doing something fundamentally wrong. Can you provide any insight. Regards Del

Not exactly the correct thread…but it’ll work.:wink: In the future, please use this thread.

I have removed the need to manually configure the number of buttons. This is now automated.

This is new, and determines how many seconds must expire without an update from the micro-controller, before the Parent Device’s Presence sensor value changes from ‘present’ to ‘no present’. The intention is to allow you to know if the micro-controller board has stopped sending data.

Can you please let me know if you’re using an Android phone? I have a hypothesis regarding this… it works perfectly on my iPhone, so I am wondering if Android is having this issue?

To avoid this issue while I troubleshoot it, please use the ST Web IDE to edit those device parameters. Find the Devices tab, select the parent device, then click EDIT as circled in red below.

Then fill in the values for each field, and click SAVE.

This should bypass the issue with the ST Classic App on Android…

@ukdel - Please update the Parent ST_Anything Ethernet DTH in the ST Web IDE from my GitHub repository. I have corrected the issue which is indeed an Android-only problem.

Yes it is an android phone. Many thanks for swift response I will check it out in the morning and let you know.
Del