UPB lighting

Around 25 devices currently. They were all timing out. Just snapped that error at the beginning.

For those joining this game late, and being puzzled by the lack of /dev/ttyUSB0 device when plugging in the Simply Automated UMC-USB-W into the Home Assistant OS – this is because it’s missing the usb serial module for cypress_m8, which this device uses. So far I have not been able to figure out how to work around this.

Is there a way to change device type from light to switch or fan? I have read the entire thread. I see this was mentioned but I do think it was resolved. Thanks.

Not sure but I’m guessing you would have to create a template. I have a fan that appears as a light light.upb_bathroom_fan. In the GUI I just changed the icon next to the switch to a fan icon. For other projects (not UPB) I have used fan template but that’s much more involved.

Check out Devices and Services. Click Helpers. Add helper. Choose switch.

Does that help?

I know this is 2 1/2 years late but I got the HA UPB integration to work with the PIM-IP. The short answer is to disable authentication by unchecking the “Enable User Logins” on the PIM-IP.

I own a PCS PulseWorx UPB Powerline Interface Module IP (PIM-IP). I use it to run Upstart and configure my lights from my Windows PC over the net. I got HA running and decided to try the UPB integration, but I got a “Could not Connect” error. After reading this thread I noticed there was a connection problem due to the PIM-IP requiring authentication. So here is how to fix the authentication problem:

–Using your browser go to the URL of the PIM-IP and login to the web UI using “root”.
This is the user with configuration privileges.
–Go to Configuration, Users
–uncheck "Enable User Login

That’s it! When you go back to the HA UPB integration and configure the TCP address and file name it will connect and bring up your lights.

BTW, you can not use Upstart unless you disable the HA UPB integration first.

I only see an option to create a helper that converts a switch to something else. Not to convert a light to a switch or a fan. I resolved my issue by inserting the device code in yaml for the blueprint I was trying to utilize.

On another issue it seems a core OS update may have changed the usb device IDs. Any idea how to change the serial port the PIM is connected to after the initial configuration?

I am seeing the same behavior as travis4710 in Aug '21 earlier in this thread. I see the following logs : 2024-04-29 18:42:41.130 WARNING (MainThread) [upb_lib.upb] Timeout communicating with PIM, is it connected?
2024-04-29 18:42:51.131 WARNING (MainThread) [upb_lib.upb] Timeout communicating with UPB device ‘Living Room Appliance3’ (2_6_0)
2024-04-29 18:43:01.134 WARNING (MainThread) [upb_lib.upb] Timeout communicating with UPB device ‘Outside Appliance7’ (2_7_0)
I have two PIMs that are both HAI 36A00-1 and they exhibit the same behavior in Home Assistant in both Message mode and Pulse mode. I previously used this same PIM in OpenHab and it was able to get the status. I am using the Home Assistant Raspberry PI image on a Raspberry PI 5 with a serial Hat. Since someone mentioned using PIM UMC-DB9-W I will purchase it and see if I have the same result

Do you use the HAI PIM for programming the switches through UPStart?

My only guess at this point is that the pinouts for the serial connector are wrong. Perhaps Rx and Tx are crossed?

Yes, I use the same PIM in Upstart to configure the devices. I can send commands from Home Assistant and the device turns on and off. Home Assistant just can’t read UPB signals from the PIM. I had an extra serial cable so I replaced it and I still have the same result.

Here is a post from a while back where others are using the HAI PIM and are debugging their serial problems. Maybe there’s a hint in the post that will give a clue: https://cocoontech.com/threads/hai-upb-pim-upstart-connection.33350/

One suggestion I did see in there that might be good to try is to see if you can get a terminal program to read and write to the PIM.

I’m only taking stabs in the dark here… may something around the baud rate, parity, etc?? But you can write to the PIM which doesn’t make sense if the baud rate is wrong.

Is there a way you can see the serial setting when using UPStart? I’m assuming a Windows box, which appears you can get the serial settings (I googled “Windows get serial port baud rate”). I’d try it but don’t have a Windows machine handy.

I ordered the PIM with model number UMC-DB9-W and it came in today. I hooked it up to the Raspberry PI 5 and I still have the same error messages. I also ssh into the OS and made sure that everyone can use the serial device by running command chmod 777 /dev/AMA0. I am running the latest version Core 2024.5.2

That’s what I’m using for my PIM.

I’m using this cable (or similar) to connect the PIM to my HA box.

https://www.amazon.ca/UGREEN-Converter-Adapter-Prolific-Chipset/dp/B00QUZY4UG/

Thank you, Glenn. Based on your post I remembered I had a usb serial cable and I hooked it up and it is working like it should. For your reference, this is the link to the Serial HAT that wasn’t working for me : Serial HAT (RS232)

Does anyone have experience connecting the UPB PulseWorx Gateway? It is the upgraded version of the PIM-IP?

I’ve run into the same problem using the Pi3B serial hat and the standard serial cable to the PIM. I think the the problem started following my last update of HA core and OS. To be honest, I blindly ran the updates while I was also reconfiguring my UPB network (added a few modules) so the new upe file could theoretically have played a role. I am assuming not for now.

In my case, the HA command do eventually make it through to the PIM and the UPB light switch reacts after a 5-second delay. The UBP debug logs report the same communication problems despite the eventual success. Controlling the load locally does not get reflected back to HA. It seems like updates to the PIM are received, but acknowledgements back from the PIM to HA aren’t making it through.

When I first set up the hat, I used the following guide and went with moving Bluetooth to mini-UART. How to use the Serial HAT

Hoping this might be to blame, I shutdown HA and plugged the SD card into a Windows box to edit config.txt. Is this right? However, I cannot find how to run the systemctl command to disable Bluetooth. Any thoughts?

Before the config.txt changes, I also tried a USB to serial cable. After a few tries getting the PI booted (on boot, it used /dev/ttyUSB0 whereas it was on /dev/ttyUSB2 when I plugged it in hot… confusion!), the behaviour is the same. Comms make it to the PIM, but acks don’t seem to make it back.

Weird stuff! I have no idea what is going as I’m not too experienced debugging USB problems. One thing that might offer some insights is to turn on UPB integration debug logs and posting them here. I recommend following the instructions at the end of the integration docs.

Hi Glenn : Thank you for responding. Given that I am getting the same behaviour with both, I have gone back to using the serial cable connected to the RPi serial hat which I was using when the problem first started. I deleted the integration and re-added it. This is what appears in the logs at creation :

2024-12-16 21:18:48.810 INFO (MainThread) [upb_lib.upb] Using flags: {'': True}
2024-12-16 21:18:48.822 INFO (MainThread) [upb_lib.upb] Connecting to UPB PIM at serial:///dev/serial0
2024-12-16 21:18:48.831 DEBUG (MainThread) [upb_lib.proto] connected callback
2024-12-16 21:18:48.831 INFO (MainThread) [upb_lib.upb] Connected to UPB PIM
2024-12-16 21:18:48.831 DEBUG (MainThread) [upb_lib.proto] queued write ''
2024-12-16 21:18:48.832 DEBUG (MainThread) [upb_lib.proto] write_data ''
2024-12-16 21:18:48.833 DEBUG (MainThread) [upb_lib.proto] queued write '70028E'
2024-12-16 21:18:48.833 DEBUG (MainThread) [upb_lib.upb] Synchronizing status of UPB network...
2024-12-16 21:18:48.834 DEBUG (MainThread) [upb_lib.proto] queued write '07005501FF3074'
2024-12-16 21:18:48.835 DEBUG (MainThread) [upb_lib.proto] queued write '07005502FF3073'
2024-12-16 21:18:48.835 DEBUG (MainThread) [upb_lib.proto] queued write '07005503FF3072'
2024-12-16 21:18:48.835 DEBUG (MainThread) [upb_lib.proto] queued write '07005504FF3071'
2024-12-16 21:18:48.836 DEBUG (MainThread) [upb_lib.proto] queued write '07005505FF3070'
2024-12-16 21:18:48.839 INFO (MainThread) [upb_lib.upb] Using flags: {'': True}
2024-12-16 21:18:48.845 DEBUG (MainThread) [upb_lib.proto] disconnected callback
2024-12-16 21:18:48.845 WARNING (MainThread) [upb_lib.upb] PIM at serial:///dev/serial0 disconnected
2024-12-16 21:18:48.854 INFO (MainThread) [upb_lib.upb] Connecting to UPB PIM at serial:///dev/serial0
2024-12-16 21:18:48.925 DEBUG (MainThread) [upb_lib.proto] connected callback
2024-12-16 21:18:48.926 INFO (MainThread) [upb_lib.upb] Connected to UPB PIM
2024-12-16 21:18:48.930 DEBUG (MainThread) [upb_lib.proto] queued write ''
2024-12-16 21:18:48.931 DEBUG (MainThread) [upb_lib.proto] write_data ''
2024-12-16 21:18:48.932 DEBUG (MainThread) [upb_lib.proto] queued write '70028E'
2024-12-16 21:18:48.932 DEBUG (MainThread) [upb_lib.upb] Synchronizing status of UPB network...
2024-12-16 21:18:48.933 DEBUG (MainThread) [upb_lib.proto] queued write '07005501FF3074'
2024-12-16 21:18:48.933 DEBUG (MainThread) [upb_lib.proto] queued write '07005502FF3073'
2024-12-16 21:18:48.933 DEBUG (MainThread) [upb_lib.proto] queued write '07005503FF3072'
2024-12-16 21:18:48.934 DEBUG (MainThread) [upb_lib.proto] queued write '07005504FF3071'
2024-12-16 21:18:48.934 DEBUG (MainThread) [upb_lib.proto] queued write '07005505FF3070'
2024-12-16 21:18:53.932 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for PIM; retrying 1 more times.
2024-12-16 21:18:53.933 DEBUG (MainThread) [upb_lib.proto] write_data ''
2024-12-16 21:18:58.934 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for PIM; retrying 0 more times.
2024-12-16 21:18:58.935 WARNING (MainThread) [upb_lib.upb] Timeout communicating with PIM, is it connected?
2024-12-16 21:18:58.935 DEBUG (MainThread) [upb_lib.proto] write_data '70028E'
2024-12-16 21:19:03.936 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for PIM; retrying 1 more times.
2024-12-16 21:19:03.937 DEBUG (MainThread) [upb_lib.proto] write_data '70028E'
2024-12-16 21:19:08.938 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for PIM; retrying 0 more times.
2024-12-16 21:19:08.938 WARNING (MainThread) [upb_lib.upb] Timeout communicating with PIM, is it connected?
2024-12-16 21:19:08.939 DEBUG (MainThread) [upb_lib.proto] write_data '07005501FF3074'
2024-12-16 21:19:13.940 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 1 more times.
2024-12-16 21:19:13.941 DEBUG (MainThread) [upb_lib.proto] write_data '07005501FF3074'
2024-12-16 21:19:18.942 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 0 more times.
2024-12-16 21:19:18.943 WARNING (MainThread) [upb_lib.upb] Timeout communicating with UPB device 'entrance-front pot-lights-lower' (85_1_0)
2024-12-16 21:19:18.944 DEBUG (MainThread) [upb_lib.proto] write_data '07005502FF3073'
2024-12-16 21:19:23.945 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 1 more times.
2024-12-16 21:19:23.946 DEBUG (MainThread) [upb_lib.proto] write_data '07005502FF3073'
2024-12-16 21:19:28.947 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 0 more times.
2024-12-16 21:19:28.948 WARNING (MainThread) [upb_lib.upb] Timeout communicating with UPB device 'entrance-front pot-lights-upper' (85_2_0)
2024-12-16 21:19:28.948 DEBUG (MainThread) [upb_lib.proto] write_data '07005503FF3072'
2024-12-16 21:19:33.949 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 1 more times.
2024-12-16 21:19:33.950 DEBUG (MainThread) [upb_lib.proto] write_data '07005503FF3072'
2024-12-16 21:19:38.951 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 0 more times.
2024-12-16 21:19:38.951 WARNING (MainThread) [upb_lib.upb] Timeout communicating with UPB device 'bed4-basement ceiling-light' (85_3_0)
2024-12-16 21:19:38.952 DEBUG (MainThread) [upb_lib.proto] write_data '07005504FF3071'
2024-12-16 21:19:43.954 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 1 more times.
2024-12-16 21:19:43.955 DEBUG (MainThread) [upb_lib.proto] write_data '07005504FF3071'
2024-12-16 21:19:48.956 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 0 more times.
2024-12-16 21:19:48.956 WARNING (MainThread) [upb_lib.upb] Timeout communicating with UPB device 'living-room-main ceiling-light' (85_4_0)
2024-12-16 21:19:48.957 DEBUG (MainThread) [upb_lib.proto] write_data '07005505FF3070'
2024-12-16 21:19:53.959 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 1 more times.
2024-12-16 21:19:53.960 DEBUG (MainThread) [upb_lib.proto] write_data '07005505FF3070'
2024-12-16 21:19:58.961 DEBUG (MainThread) [upb_lib.proto] Timeout waiting for packet; retrying 0 more times.
2024-12-16 21:19:58.962 WARNING (MainThread) [upb_lib.upb] Timeout communicating with UPB device 'bed5-basement ceiling-light' (85_5_0)

Can you confirm one thing? When I insert my HA’s SD card into a Windows machine, is the config.txt in that partition indeed the boot partition? There isn’t some other config.txt hidden away in a Docker image that is the “real” file I should be editing is there? I must admit that I am a little unclear about the system architecture and am simply trying to reconfirm the basics.

That said, the logs clearly show that some form of connection is established, but then it stop responding.

The integration is unable to talk to the PIM. Yes, it connects. However, no data seems to be received by the PIM - hence all the timeouts. Check out some of the previous posts in this thread. There’s one that sounds similar to what is going on for you. It’s just a couple of messages back in this thread.

Good news is I think that your UPE file is recognized. Appears from this log to have 5 devices in it.

As to the SD card on windows I know nothing. I’ve never heard of a config.txt file.