Open stevenyoussef opened 1 year ago
Hi, Sorry you are having problems. Here are a couple of things.
1) Personally, I wouldn't use a port with that high a value. I don't know that it won't work but given how Crestron treats integers in Simpl+ it would be better to choose a lower number. I have found that most people choose a random port in the 9000 range and I've never heard of someone having an issue with that.
2) The device ID of 0 comes from the Device ID parameter in the device module you are using. In your case it sounds like this is the Hubitat Switch module. You need to log into your Hubitat's web interface, go to the Maker API app under the Apps section, and trigger the Local URL - Get All Devices link. This will display the device ID's of all the devices you have selected to be supported by the Maker API app (it will be easier to read if you run the displayed JSON through one of the free JSON formatters available on the Internet). You can then select the Device ID of you switch and enter it as a parameter in the Hubitat Switch Module.
3) While you are looking at the Maker API web page on you Hubitat, make sure that the "URL to POST device events to" is set to:
http://[Crestron processor IP address]:[Port you chose and entered as a parameter in the Comm Module]
If this address is not correct, you won't get feedback of the status of you switch.
If you continue to have problems. Please change the Startup_Debug_Msg_Output parameter on the Comm Module to "Console" and capture the output in SimplDebugger. Then save the SimplDebugger log as a text file (this is much better than sending a screen shot) and post that information here.
Thanks
I've already set the device ID correctly, so the only thing I've changed is the port to 9000 and the "URL to POST device events to" section. It now does give me the right ID and something does trigger when I press the button in Crestron One, but it's giving me a 404 not found error. I've attached the log file. Hubitat Demo v3_11 - 2023.10.12 10.12.19 - HubitatDebugFile.txt
Turns out I had the wrong type of device set up in Hubitat, I had it as connector switch instead of generic Zigbee switch so now it's sending commands properly. However now when I try to trigger the switch on , it also triggers refresh, which I still have commented out. Looking at the logs, it's sending a forced refresh for some reason. I've attached that in this message as well. Hubitat Demo v3_11 - 2023.10.12 10.57.58 - Hubitat Forced Refresh.txt
Hi @stevenyoussef ,
There appear to be 2 things going on here. First, I believe you have the Auto_Refresh parameter on the Switch Module set to "Yes". This is designed for older switches that don't properly send feedback after a command to turn the switch on/off is sent from the Crestron system. Change that to "No" and the Crestron system will stop sending refresh commands.
Second, your switch, for whatever reason, doesn't support the refresh command. This is the first time I have ever seen a device that doesn't. Changing Auto_Refresh to "No" should fix the 404 error you are seeing all the time. Also, in your case, never pulse the refresh input on the Switch Module.
In the future, you may want to consider purchasing switches from a different manufacturer that work with the Hubitat. There are certainly lots of choices from very mainstream IoT device manufacturers. Personally, I've never heard of the K4001C before and I wasn't able to find a lot of information on it with a Google search. The fact that it has weird idiosyncrasies, like not supporting the refresh command, would make me shy away from it.
Thanks
Hi Jay,
Thanks for the help again. I wish that the switch was supported by Hubitat, but that choice is out of my hands. I was tinkering with it over the weekend, and at first it was starting to work! I click on a button in Crestron One, and the switch turns on. However, out of nowhere, it completely stopped working and I don't know why. I'm sure both IPs are correct, the access token is correct, the Maker ID as well as the Switch ID are correct, and the Processor port on 9000 is the same in both Simpl and MakerAPI. I don't know why everything is breaking all of the sudden. How did you survive in this industry for decades I am only 2 months in and am already going Joker mode? I attached the log files. Hubitat Demo v3_11 - 2023.10.15 11.54.20 - Hubitat Third Time's the Charm.txt
Two things.
1) There is something very strange going on here. Could you please copy the hubitat logic from your Crestron program into a separate program (you can delete the OAUTH_Accesss_Token parameter). Then send me the compiled.zip file of that program so I can see exactly what you have.
2) I just checked and I don't see the K4001C switch you have on the Hubitat Compatibility List: https://docs2.hubitat.com/devices/list-of-compatible-devices I don't know that it will even be possible to make this work with a device that isn't on the list of devices that is compatible with the Hubitat
Working with any technology can be frustrating. However, you can greatly reduce that level of frustration by using devices from well known manufacturers that are on the compatibility list. The path to success is typically much easier.
Hi Jay,
It's been a while since I wrote something here. I finally switched to a different device that is supported by Hubitat. However, that device is an outlet rather than a switch, and I don't see an outlet module in the demo program. What device should I use in this case?
Hi @stevenyoussef An outlet is just another form of a switch so the switch driver should work fine. Thanks
Hi Jay,
I currently have a CP4 system that is already set up with a static IP address that I'm trying to add the Hubitat hub in. I am trying to connect with the Hubitat hub via WiFi, but the Hubitat can only connect via DHCP and not a static IP address. My worry is that if if the power goes out and comes back (which happens a lot in Egypt unfortunately) the IP address will change in the Hubitat but not in the SIMPL Windows file. Is there a way to get past this or would I realistically need to connect the Hubitat hub via ethernet?
Hi @stevenyoussef,
You should be able to create a DHCP reservation on your router for the Hubitat. This will still allow the Hubitat to get an IP address from the router through DHCP but it will be the same IP address every time; just like a static IP. I can't tell you exactly how to do this because every router is slightly different. However, most routers include this feature.
Sorry for using the issues section, but I don't know how else to contact. I am currently trying to connect a K4001C switch, a Hubitat C-8, and a Crestron CP4 together, but I'm stuck on some parts. For one, in part 14.b.iii, it says to use "the communications port you want to use for your Crestron processor to receive messages", but I'm not sure what it is. After which, I want to get any response from the switch to make sure that I actually can interact with it from Crestron, especially if it's from Crestron One. I currently have my Crestron program to turn on a relay when I click a button in Crestron One by sending the Switch_1_On and Switch_1_On_FB to a relay, and that works well. How do I also have that button to send something to the switch and at least write something in the Hubitat's logs?
Edit 1: I'm using port 39501 based on part 15, I'm getting no feedback from my switch.
Edit 2: I'm looking through Toolbox, and I'm getting this in Communications_Err_Msg$: url = http://192.168.10.66/apps/api/2/devices/0?access_token=[my access token] Why is it giving me a device ID of 0?