Meanwhile, thank you for the datasheet, but it’s difficult for me to understand. Can you suggest me a script to be able to set the colors and to perform a safe shutdown with the power button? just to understand the sending format and the format to receive a command from the buttonpower and be able to proceed with the shutdown. Thank you
For LED Control you can probably get away with just sending the raw commands to the serial port. For example, this will turn LED 4 to on (effect 0x01) and ‘green’
echo "\xfe\x00\x0d\x00\x04\xa1\x04\x01\x00\xff\x00\xad\x2a" > /dev/ttyS3
(last two bytes are calculated using CRC-16/KERMIT)
For button detection you would need to parse incoming packets with node RED or a script or so.
@Alexie I am probing the serial port for YC1175 for button events, however I am not seeing any double-click or long-presses coming through in the data as described in spec docs. See below, ‘frame’ is the data from YC1175. Are these events implemented?
[frame ] fe 00 0c 00 03 15 03 00 00 00 8c 57 [res] fe 00 09 40 03 15 00 52 ee [frame ] fe 00 0c 00 03 16 03 00 00 00 91 9b [res] fe 00 09 40 03 16 00 78 86 [frame ] fe 00 0c 00 03 17 03 00 00 00 9a df [res] fe 00 09 40 03 17 00 61 5e [frame ] fe 00 0c 00 03 18 03 00 00 00 f0 23 [res] fe 00 09 40 03 18 00 e2 96 [frame ] fe 00 0c 00 03 19 03 00 00 00 fb 67 [res] fe 00 09 40 03 19 00 fb 4e [frame ] fe 00 0c 00 03 1a 03 00 00 00 e6 ab [res] fe 00 09 40 03 1a 00 d1 26 [frame ] fe 00 0c 00 03 1b 03 00 00 00 ed ef [res] fe 00 09 40 03 1b 00 c8 fe [frame ] fe 00 0c 00 03 1c 03 00 00 00 dd 33 [res] fe 00 09 40 03 1c 00 85 f6 [frame ] fe 00 0c 00 03 1d 03 00 00 00 d6 77 [res] fe 00 09 40 03 1d 00 9c 2e [frame ] fe 00 0c 00 03 1e 03 00 00 00 cb bb [res] fe 00 09 40 03 1e 00 b6 46
This happens automatically, no code required. pressing the power button initiates a shutdown of the host OS.
Not all buttons support double click and long press function, so you can press different buttons to try? Some function buttons are supported by double click and long press, you press them will receive the corresponding command content on the protocol document.
I have tried all buttons, they all report 0x00 for single click no matter the input being double click or long press.
I tried to send a command but I received no response. I was trying with nodered. how can I proceed? reading the serial returns incomprehensible data from the debug on the serial from nodered
@malwar You need to parse the packets per the spec document. I started on a Python script to do some testing. Its incomplete but might help you as it shows how to parse + pack frames for comms with the yc1175.
When you first start up the system, yc1175 is pinging waiting for a response of firmware version. You may need to respond to this before it will accept commands to control indicator.
Eventually I will make a custom HA integration to control indicators and receive button events, but for now still working on getting HAOS working nicely. Its certainly possible to do all this in nodered as well, but I have no intention of working on that.
This command does work, but only after the YC1175 has been initialised by responding to the firmware version request (as is done in that python script I linked)
Reflash your iHost with… HAOS!
Early testing has been going great. So latest images are on github now.
Very crude docs on the wiki page, hopefully some of the early testers can help fill those out a bit more!
I must confirm that @darkxst has done a wonderful job. My iHost just became my new productive system for HAOS. I moved from a Synology VM.
Here is a library for the yc1175. This will form the basis of upcoming custom integration for Home Assistant, however might also be useful for folks using the plain linux distro.
pip install yc1175-indicator # main rgb indicator, blue flashing indicator-cli 4 --effect 2 --rgb 0 0 255
I would like to know if the HAOS add-on will ever be available in the iHost add-ons panel, I thought that this device was a valid alternative to Raspberry Py but I think I was wrong.
I need to integrate my GPS position into my home automation system but I realized that with HomeAssistant Core I will never be able to do it because I don’t have the skills to do this.
I trust in some good soul who can soon integrate this possibility and release a detailed guide on how to free our HASO in iHost
thank you all for your work.
Addons are not available when using Docker core. You need to instally my HAOS port instead to get addons, direct access to Zigbee and also control of the indicator.
There are some details on the Wiki. However as yet there is not a complete step-by-step guide for this.