[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

I may have it figured out. I had to disable the access to all ST devices and manually select the switches. I only tested one but will check the others tomorrow night.

1 Like

Iā€™ve run into the duplicate child problem. Itā€™s a little random about which child is duplicated. I tried the ā€œdelete the extra child thingā€ and of course I get the Error in parse() routine, error = java.lang.NullPointerException: Cannot get property 'dateCreated' on null object error.

Iā€™ve tried to build SmartApps that reference the child devices without deleting the duplicates, and I get unreliable results. Iā€™m guessing that itā€™s just a not-quite-right database behind the scenes.

Do I just keep trying to add the parent until by chance I get a list of children with no duplicates?

Thatā€™s one technique. Another is to delete the duplicate whose LastUpdated value does not change.

Dan,

I have my Arduino Mega 2560 with W5100 ethernet shield up and running your On_Off_EthernetW5100 sketch and can turn the LED on and off from the ST app.

Now Iā€™m trying to add your GitHub repository to my account:

  • Click on ā€œMy Device Handlersā€ from the navigation menu.
  • Click on ā€œSettingsā€ from the menu and add my GitHub Repository to your account
    • Owner: DanielOgorchock
    • Name: ST_Anything
    • Branch: master

However, when I click save to add your repository, I get the error message:
You donā€™t have access to DanielOgorchock/ST_Anything

I tried cutting and pasting directly from your README to avoid typos.

Suggestions?

No clue why youā€™re getting an error on the GitHub integration. Have you used GitHub integration with ST for any other repositories?

No, your repository was the first one (besides my own) that I tried to use the GitHub integration.

From googling the error, it sounds like a permission problem. It sounds like I need to be invited as a collaborator???

I wonder if this could be related to switching over to a Samsung account login?

Has anyone else added your repository using the GitHub integration recently?

I tried to login using my old pre-Samsung credentials but no luck. Since I migrated to Samsung account that appears to be the only way I can login.

Has anyone else been able to use the github integration to add Danielā€™s github repository since they migrated to Samsung account?

Daniel, I donā€™t suppose you could invite me as collaborator? My github owner name is charredwater

I really donā€™t want to manually add all your device handlers one by one since youā€™ve automated the processā€¦

Hmmmm, we have never had to add anyone as a collaborator to this repository. I am not sure what is wrong, but it seems to be specific to your account. Have you tried adding any other GitHub repositories from other developers?

I logged into github to make sure my account is working.
I have one repository named apache but Iā€™ve never committed anything to it.
I just created it so I could pull stuff from github.

When I look at My Device Handlers > Settings I see
Owner: charredwater
Name: SmartThingsPublic
Branch: master

But I donā€™t have a repository named SmartThingsPublic

I tried to add my own repository
Owner: charredwater
Name: Apache
Branch: master

and got the same error message as when I tried to add the ST_Anything repository:
You donā€™t have access to charredwater/apache

Any idea why I donā€™t have access to my own github repository???

No clue. You may want to start a new topic to see if anyone else can help you troubleshoot GitHub integration. Or, contact SmartThings Support for assistance.

One question for youā€¦what country are you in? Iā€™m not sure if ST enabled GitHub integration worldwide.

Iā€™m in California.

Thanks for helping me narrow down the problem. I think starting a new topic is a good idea.

I found a thread about github integration which suggested disconnecting my SmartThings account from github and then reconnecting. This did the trick. I was able to add your ST_Anything repository and add all your parent and child device handlers!

4 Likes

Newbie, sort of. Trying to get ST_Anything to command NodeMCU D1 to toggle. Using ST_Anything_Multiple (customization limited to wifi parameters). Live Logging shows ok communication. IDE serial communication shows seemingly good data transfer. Iā€™m expecting to see a child thing magically built for the switch device when I upload the sketch, but it doesnā€™t happen. No child devices are generated. I gotta be missing something embarrassingly fundamental. After several hours of try, re-try, re-read, repeat, Iā€™m out of ideas.
BTW, I was successful in getting the timed relay function to work using the ST_Anything_Relays_ESP8266 sketch but, of course, Iā€™m looking for a toggle ON/OFF.

So, it was working and now itā€™s not? Did you happen to delete the timed relay child devices without deleting the parent? If yes, delete the parent and recreate it manually as you did before.

Yep. Done that. No joy: After success with setting up a timed relay I deleted the child and parent from ST. (I didnā€™t want a pulsed output. I want switched output. So I reset and started over.) I uploaded ST-anything-multiple to ModeMCU with wifi credentials. Added new ā€œAnything parentā€ device in ST ide. All good. Configured device on phone using credentials. Still all good, but this is where I expect to see a child device automatically generated for the switch defined in the Multi sketch, but it doesnā€™t generate. In fact no children generate from the Multi sketch. They should, right?

Yes, it will create children if you correctly edited the sketch with more than just WiFi credentials (needs ST Hub IP address as well), and entered into the Parent Deviceā€™s settings the MAC address, is address, and port of the MCU.

Ya, I think I added all the required info, but Iā€™ll do it all again. Itā€™s a new dayā€¦ fresh eyes. Good to know with certainty what the finished product is supposed to look like. Fantastic work. Thanks so much.

Dan,
Iā€™m working on a device which uses a Arduino Mega to control about 48 relays. It uses most of the IOs on it. But I still have 2 serial port pins. I want to run ST_Anything on with a ESP12 as the wifi part. How do I partition the code between the two device?
Any ideas?

thanks,
chin

48 relays!!! What are you going to control with all of those relays? Wow! Youā€™ve made me curious.

As for using an Arduino MEGA + ESP WiFi, I do not recommend trying it. I have never had good luck with that combination being reliable. Use an Arduino MEGA + W5100 Ethernet shield if you want good, reliable performance.

Or, use a few NodeMCU ESP8266ā€™s or NodeMCU ESP32ā€™s instead. The ESP32 board has quite a bit of GPIO onboard already and has built-in WiFi.

BTW - Hereā€™s a link to my GitHub repo where I discussed using an Arduino MEGA + ESP01 combination with another user.

Dan, Itsā€™ a 16-station whole house intercom master station retrofit. Iā€™m reusing the slave units. I even design a PCB for the relays as wiring by hand would be a nightmare. Thanks for the pointer Iā€™ll look into it.